2008-02-22 Raphael Ackermann <raphael.ackermann@gmail.com>
* src/FilterEditor/_EditRule.py * src/Filters/Rules/_HasAttributeBase.py * src/Filters/Rules/Family/_MatchesFilter.py * src/Filters/Rules/Event/_MatchesFilter.py * src/Filters/Rules/Event/_MatchesSourceFilter.py * src/Filters/Rules/Event/_HasType.py * src/Filters/Rules/Event/_MatchesPersonFilter.py * src/Filters/Rules/_HasTextMatchingRegexpOf.py * src/Filters/Rules/_HasReferenceCountBase.py * src/Filters/Rules/_HasNoteSubstrBase.py * src/Filters/Rules/__init__.py * src/Filters/Rules/_HasGrampsId.py * src/Filters/Rules/_RegExpIdBase.py * src/Filters/Rules/_IsPrivate.py * src/Filters/Rules/_Rule.py * src/Filters/Rules/_HasMarkerBase.py * src/Filters/Rules/_HasEventBase.py * src/Filters/Rules/Note/_MatchesFilter.py * src/Filters/Rules/Person/_MatchesFilter.py * src/Filters/Rules/Person/_MatchesEventFilter.py * src/Filters/Rules/MediaObject/_MatchesFilter.py * src/Filters/Rules/_HasTextMatchingSubstringOf.py * src/Filters/Rules/_Everything.py * src/Filters/Rules/_MatchesFilterBase.py * src/Filters/Rules/_HasNoteRegexBase.py * src/DateHandler/_DateUtils.py pylint and doc fixes. svn: r10094
This commit is contained in:
@ -38,7 +38,7 @@ from DateHandler import LANG_TO_DISPLAY, LANG, parser, displayer
|
||||
#--------------------------------------------------------------
|
||||
def get_date_formats():
|
||||
"""
|
||||
Returns the lists supported formats for date parsers and displayers
|
||||
Return the lists supported formats for date parsers and displayers.
|
||||
"""
|
||||
try:
|
||||
return LANG_TO_DISPLAY[LANG].formats
|
||||
@ -53,7 +53,7 @@ def set_format(value):
|
||||
|
||||
def set_date(date_base, text) :
|
||||
"""
|
||||
Sets the date of the DateBase instance.
|
||||
Set the date of the DateBase instance.
|
||||
|
||||
The date is parsed into a Date instance.
|
||||
|
||||
@ -61,23 +61,25 @@ def set_date(date_base, text) :
|
||||
@type date_base: DateBase
|
||||
@param text: The text to use for the text string in date
|
||||
@type text: str
|
||||
|
||||
"""
|
||||
parser.set_date(date_base.get_date_object(),text)
|
||||
parser.set_date(date_base.get_date_object(), text)
|
||||
|
||||
def get_date(date_base) :
|
||||
"""
|
||||
Returns a string representation of the date of the DateBase instance.
|
||||
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.
|
||||
@return: Returns a string representing the DateBase date
|
||||
@rtype: str
|
||||
|
||||
"""
|
||||
return displayer.display(date_base.get_date_object())
|
||||
|
||||
def get_quote_date(date_base):
|
||||
"""
|
||||
Returns a string representation of the date of the DateBase instance.
|
||||
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
|
||||
@ -85,5 +87,6 @@ def get_quote_date(date_base):
|
||||
|
||||
@return: Returns a string representing the DateBase date
|
||||
@rtype: str
|
||||
|
||||
"""
|
||||
return displayer.quote_display(date_base.get_date_object())
|
||||
|
Reference in New Issue
Block a user