module timelinelib.config.dateformatparser¶
The DateFormatParser is used define how a date string shall be parsed, given a pattern describing the date format.
The date format string shall contain three regions (YEAR, MONTH, DAY) with two region separators in between.
-
timelinelib.config.dateformatparser.
REGION_START_POS
= 0¶
-
timelinelib.config.dateformatparser.
REGION_LENGTH
= 1¶
-
timelinelib.config.dateformatparser.
REGION_SEPARATOR
= 2¶
-
timelinelib.config.dateformatparser.
REGION_TYPE
= 3¶
-
timelinelib.config.dateformatparser.
YEAR
= 'YEAR'¶
-
timelinelib.config.dateformatparser.
MONTH
= 'MONTH'¶
-
timelinelib.config.dateformatparser.
DAY
= 'DAY'¶
-
timelinelib.config.dateformatparser.
ERROR_TEXT
= "Invalid Date Format:\n\nThe format should contain\n one year placeholder = yyyy\n one month placeholder = mmm or mm\n one day placeholder = dd\n two placeholders for separators between year, month and day\n\nSeparators can't contain the letters y, m or d\n\nExample of valid formats:\n yyyy-mm-dd\n dd/mm/yyyy\n mmm/dd-yyyy\n "¶