simpleparse.common.iso_date
index
s:\sp\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
            
mx.DateTime
simpleparse.common.chartypes
simpleparse.common
simpleparse.common.numbers
simpleparse.objectgenerator
 
Classes
            
simpleparse.dispatchprocessor.DispatchProcessor(simpleparse.processor.Processor)
MxInterpreter
 
class MxInterpreter(simpleparse.dispatchprocessor.DispatchProcessor)
      Interpret a parsed ISO_date_time_loose in GMT/UTC time or localtime
 
  
Method resolution order:
MxInterpreter
simpleparse.dispatchprocessor.DispatchProcessor
simpleparse.processor.Processor
simpleparse.processor.MethodSource

Methods defined here:
ISO_date(self, (tag, left, right, sublist), buffer)
Interpret the ISO date format
ISO_date_time(self, (tag, left, right, sublist), buffer)
Interpret the loose ISO date + time format
ISO_time(self, (tag, left, right, sublist), buffer)
Interpret the ISO time format
__init__(self, inputLocal=1, returnLocal=1)
offset(self, (tag, left, right, sublist), buffer)
Calculate the time zone offset as a date-time delta
offset_sign(self, (tag, left, right, sublist), buffer)
Interpret the offset sign as a multiplier

Data and non-method functions defined here:
__doc__ = 'Interpret a parsed ISO_date_time_loose in GMT/UTC time or localtime\n\t\t'
str(object) -> string
 
Return a nice string representation of the object.
If the argument is a string, the return value is the same object.
__module__ = 'simpleparse.common.iso_date'
str(object) -> string
 
Return a nice string representation of the object.
If the argument is a string, the return value is the same object.
dateName = 'ISO_date'
str(object) -> string
 
Return a nice string representation of the object.
If the argument is a string, the return value is the same object.
day = <IntInterpreter object @ 8797552>
Interpret an integer (or unsigned integer) string as an integer
hour = <IntInterpreter object @ 8797552>
Interpret an integer (or unsigned integer) string as an integer
integer = <IntInterpreter object @ 8797552>
Interpret an integer (or unsigned integer) string as an integer
minute = <IntInterpreter object @ 8797552>
Interpret an integer (or unsigned integer) string as an integer
month = <IntInterpreter object @ 8797552>
Interpret an integer (or unsigned integer) string as an integer
offset_hour = <IntInterpreter object @ 8797552>
Interpret an integer (or unsigned integer) string as an integer
offset_minute = <IntInterpreter object @ 8797552>
Interpret an integer (or unsigned integer) string as an integer
second = <IntInterpreter object @ 8797552>
Interpret an integer (or unsigned integer) string as an integer
timeName = 'ISO_time'
str(object) -> string
 
Return a nice string representation of the object.
If the argument is a string, the return value is the same object.
year = <IntInterpreter object @ 8797552>
Interpret an integer (or unsigned integer) string as an integer

Methods inherited from simpleparse.dispatchprocessor.DispatchProcessor:
__call__(self, value, buffer)
Process the results of the parsing run over buffer
 
Value can either be: (success, tags, next) for a top-level
production, or (tag, left, right, children) for a non-top
production.

Methods inherited from simpleparse.processor.Processor:
__repr__(self)
Return a representation of the class
 
Data
             __file__ = r'S:\sp\simpleparse\common\iso_date.pyc'
__name__ = 'simpleparse.common.iso_date'
_p = <simpleparse.parser.Parser instance at 0x00822BA0>
c = {'ISO_date': LibraryElement( production = 'ISO_date', ...se.generator.Generator instance at 0x00850138>, ), 'ISO_date_time': LibraryElement( production = 'ISO_date_time'...se.generator.Generator instance at 0x00850138>, ), 'ISO_time': LibraryElement( production = 'ISO_time', ...se.generator.Generator instance at 0x00850138>, )}
declaration = '\nyear := digit,digit,digit,digit\nmonth ...ate_time := ISO_date, ([T], ISO_time)?, offset?\n'
haveMX = 1
name = 'ISO_date_time'