Package DateHandler :: Module _DateUtils
[frames] | no frames]

Module _DateUtils

source code

Class handling language-specific selection for date parser and displayer.

Functions
 
get_date_formats()
Return the lists supported formats for date parsers and displayers.
source code
 
set_format(value) source code
 
set_date(date_base, text)
Set the date of the DateBase instance.
source code
str
get_date(date_base)
Return a string representation of the date of the DateBase instance.
source code
str
get_quote_date(date_base)
Return a string representation of the date of the DateBase instance.
source code

Imports: LANG_TO_DISPLAY, LANG, parser, displayer


Function Details

set_date(date_base, text)

source code 

Set the date of the DateBase instance.

The date is parsed into a Date instance.

Parameters:
  • date_base (DateBase) - The DateBase instance to set the date to.
  • text (str) - The text to use for the text string in date

get_date(date_base)

source code 

Return a string representation of the date of the DateBase instance.

This representation is based off the default date display format determined by the locale's DateDisplay instance.

Returns: str
Returns a string representing the DateBase date

get_quote_date(date_base)

source code 

Return a string representation of the date of the DateBase instance.

This representation is based off the default date display format determined by the locale's DateDisplay instance. The date is enclosed in quotes if the Date is not a valid date.

Returns: str
Returns a string representing the DateBase date