simpleparse.common.iso_date | index /home/mcfletch/pylive/simpleparse/common/iso_date.py |
Canonical ISO date format YYYY-MM-DDTHH:mm:SS+HH:mm
This parser is _extremely_ strict, and the dates that match it,
though really easy to work with for the computer, are not particularly
readable. See the iso_date_loose module for a slightly relaxed
definition which allows the "T" character to be replaced by a
" " character, and allows a space before the timezone offset, as well
as allowing the integer values to use non-0-padded integers.
ISO_date -- YYYY-MM-DD format, with a month and date optional
ISO_time -- HH:mm:SS format, with minutes and seconds optional
ISO_date_time -- YYYY-MM-DD HH:mm:SS+HH:mm format,
with time optional and TimeZone offset optional
Interpreter:
MxInterpreter
Interprets the parse tree as mx.DateTime values
ISO_date and ISO_time
returns DateTime objects
Time only
returns RelativeDateTime object which, when
added to a DateTime gives you the given time
within that day
Modules | ||||||
|
Classes | ||||||||||
|
Data | ||
_p = <simpleparse.parser.Parser instance> c = {'ISO_date': LibraryElement( production = 'ISO_date', ...enerator.Generator instance at 0x2aaaad5dca28>, ), 'ISO_date_time': LibraryElement( production = 'ISO_date_time'...enerator.Generator instance at 0x2aaaad5dca28>, ), 'ISO_time': LibraryElement( production = 'ISO_time', ...enerator.Generator instance at 0x2aaaad5dca28>, )} declaration = '\nyear := digit,digit,digit,digit\nmonth ...ate_time := ISO_date, ([T], ISO_time)?, offset?\n' haveMX = 1 name = 'ISO_date_time' |