Package s3 :: Module s3datetime :: Class S3DateTimeParser
[frames] | no frames]

Class S3DateTimeParser

source code

object --+
         |
        S3DateTimeParser

Date/Time Parser for non-Gregorian calendars

Instance Methods
 
__init__(self, calendar, dtfmt=None)
Constructor
source code
 
parse(self, string)
Parse a date/time string
source code
 
set_format(self, dtfmt)
Update the date/time format for this parser, and generate the corresponding pyparsing grammar
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties

Inherited from object: __class__

Method Details

__init__(self, calendar, dtfmt=None)
(Constructor)

source code 

Constructor

Parameters:
  • calendar - the calendar
  • dtfmt - the date/time format
Overrides: object.__init__

parse(self, string)

source code 

Parse a date/time string

Parameters:
  • string - the date/time string
Returns:
a timetuple (y, m, d, hh, mm, ss)

set_format(self, dtfmt)

source code 

Update the date/time format for this parser, and generate the corresponding pyparsing grammar

Parameters:
  • dtfmt - the date/time format