| |
- DateConverter
-
- EpochConverter
- MxDatetimeConverter
- PyDatetimeConverter
- intdate(__builtin__.int, DateConverter)
- __builtin__.int(__builtin__.object)
-
- intdate(__builtin__.int, DateConverter)
- datetime.tzinfo(__builtin__.object)
-
- FixedOffset
- LocalTimezone
- USTimeZone
- UTC
class DateConverter |
|
An abstract class to allow users to specify dates however they
want. The class provides a standard set of calls which take the
users date instance and convert to to the output indicated. This
allows you to store dates as mx datetimes, python datetimes,
epochs etc. |
|
Methods defined here:
- __call__(self, x)
- convert userland datetime instance x to epoch
- add_month(self, x, direction=1)
- return now plus one month as epoch
- add_year(self, x, direction=1)
- return now plus one year as epoch
- ceil_day(self, x)
- return the ceiled day
- ceil_hour(self, x)
- return the ceiled hour as epoch
- ceil_minute(self, x)
- return the ceiled minute
- ceil_month(self, x)
- return the ceiled month
- ceil_year(self, x)
- return the ceiled year
- day_of_week(self, x)
- return day of week; monday is 0
- epoch(self, x)
- convert userland datetime instance x to epoch
- floor_day(self, x)
- return the floored day
- floor_hour(self, x)
- return the floored hour as epoch
- floor_minute(self, x)
- return the floored minute
- floor_month(self, x)
- return the floored month
- floor_year(self, x)
- return the floored year
- from_epoch(self, e)
- return an instance of your date from the epoch
- hms(self, x)
- return the hour, minute, second
- strftime(self, fmt, x)
- format x using strftime format string fmt
- strptime(self, datestr, fmt)
- return an instance of your date from a date string and fouermat
- ymd(self, x)
- return the year month day. month and day are indexed from 1
- ymdhms_to_epoch(self, year, month, day, hour, minute, second)
|
class EpochConverter(DateConverter) |
|
Represent time in the epoch |
|
Methods defined here:
- ceil_day(self, x)
- return the ceiled day
- ceil_hour(self, x)
- return the ceiled hour
- ceil_minute(self, x)
- return the ceiled minute
- day_of_week(self, x)
- return day of week; monday is 0
- epoch(self, x)
- convert userland datetime instance x to epoch
- floor_day(self, x)
- return the floored day
- floor_hour(self, x)
- return the floored hour
- floor_minute(self, x)
- return the floored minute
- from_epoch(self, e)
- return an instance of your date from the epoch
- hms(self, x)
- return the hour, minute, second
- strftime(self, fmt, x)
- format x using strftime format string fmt
- strptime(self, datestr, fmt)
- return an instance of your date from a date string and format
- ymd(self, x)
- return the year month day. month and day are indexed from 1
Methods inherited from DateConverter:
- __call__(self, x)
- convert userland datetime instance x to epoch
- add_month(self, x, direction=1)
- return now plus one month as epoch
- add_year(self, x, direction=1)
- return now plus one year as epoch
- ceil_month(self, x)
- return the ceiled month
- ceil_year(self, x)
- return the ceiled year
- floor_month(self, x)
- return the floored month
- floor_year(self, x)
- return the floored year
- ymdhms_to_epoch(self, year, month, day, hour, minute, second)
|
class MxDatetimeConverter(DateConverter) |
|
Convert egenix mx.Datetime instances |
|
Methods defined here:
- epoch(self, x)
- convert userland datetime instance x to epoch
- from_epoch(self, e)
- return an instance of your date from the epoch
Methods inherited from DateConverter:
- __call__(self, x)
- convert userland datetime instance x to epoch
- add_month(self, x, direction=1)
- return now plus one month as epoch
- add_year(self, x, direction=1)
- return now plus one year as epoch
- ceil_day(self, x)
- return the ceiled day
- ceil_hour(self, x)
- return the ceiled hour as epoch
- ceil_minute(self, x)
- return the ceiled minute
- ceil_month(self, x)
- return the ceiled month
- ceil_year(self, x)
- return the ceiled year
- day_of_week(self, x)
- return day of week; monday is 0
- floor_day(self, x)
- return the floored day
- floor_hour(self, x)
- return the floored hour as epoch
- floor_minute(self, x)
- return the floored minute
- floor_month(self, x)
- return the floored month
- floor_year(self, x)
- return the floored year
- hms(self, x)
- return the hour, minute, second
- strftime(self, fmt, x)
- format x using strftime format string fmt
- strptime(self, datestr, fmt)
- return an instance of your date from a date string and fouermat
- ymd(self, x)
- return the year month day. month and day are indexed from 1
- ymdhms_to_epoch(self, year, month, day, hour, minute, second)
|
class PyDatetimeConverter(DateConverter) |
|
Convert python2.3 date or datetime instances |
|
Methods defined here:
- day_of_week(self, x)
- return day of week; monday is 0
- epoch(self, x)
- convert userland datetime instance x to epoch
- from_epoch(self, e)
- return an instance of your date from the epoch
- hms(self, x)
- return the hour, minute, second
- strftime(self, fmt, x)
- format x using strftime format string fmt
- strptime(self, datestr, fmt)
- return an instance of your date from a date string and format
- ymd(self, x)
- return the year month day. month and day are indexed from 1
Methods inherited from DateConverter:
- __call__(self, x)
- convert userland datetime instance x to epoch
- add_month(self, x, direction=1)
- return now plus one month as epoch
- add_year(self, x, direction=1)
- return now plus one year as epoch
- ceil_day(self, x)
- return the ceiled day
- ceil_hour(self, x)
- return the ceiled hour as epoch
- ceil_minute(self, x)
- return the ceiled minute
- ceil_month(self, x)
- return the ceiled month
- ceil_year(self, x)
- return the ceiled year
- floor_day(self, x)
- return the floored day
- floor_hour(self, x)
- return the floored hour as epoch
- floor_minute(self, x)
- return the floored minute
- floor_month(self, x)
- return the floored month
- floor_year(self, x)
- return the floored year
- ymdhms_to_epoch(self, year, month, day, hour, minute, second)
|
class USTimeZone(datetime.tzinfo) |
| |
- Method resolution order:
- USTimeZone
- datetime.tzinfo
- __builtin__.object
Methods defined here:
- __init__(self, hours, reprname, stdname, dstname)
- __repr__(self)
- dst(self, dt)
- tzname(self, dt)
- utcoffset(self, dt)
Data and other attributes defined here:
- __dict__ = <dictproxy object>
- dictionary for instance variables (if defined)
- __weakref__ = <attribute '__weakref__' of 'USTimeZone' objects>
- list of weak references to the object (if defined)
Methods inherited from datetime.tzinfo:
- __getattribute__(...)
- x.__getattribute__('name') <==> x.name
- __reduce__(...)
- -> (cls, state)
- fromutc(...)
- datetime in UTC -> datetime in local time.
Data and other attributes inherited from datetime.tzinfo:
- __new__ = <built-in method __new__ of type object>
- T.__new__(S, ...) -> a new object with type S, a subtype of T
|
class intdate(__builtin__.int, DateConverter) |
|
Subclasses int for use as dates. |
|
- Method resolution order:
- intdate
- __builtin__.int
- __builtin__.object
- DateConverter
Methods defined here:
- __init__(self, ordinal)
- date(self)
- epoch(self, x)
- convert userland datetime instance x to epoch
- from_epoch(self, e)
- return an instance of your date from the epoch
- isoformat(self)
- timetuple(self)
Properties defined here:
- day
- get lambda self
- month
- get lambda self
- year
- get lambda self
Data and other attributes defined here:
- __dict__ = <dictproxy object>
- dictionary for instance variables (if defined)
- __weakref__ = <attribute '__weakref__' of 'intdate' objects>
- list of weak references to the object (if defined)
Methods inherited from __builtin__.int:
- __abs__(...)
- x.__abs__() <==> abs(x)
- __add__(...)
- x.__add__(y) <==> x+y
- __and__(...)
- x.__and__(y) <==> x&y
- __cmp__(...)
- x.__cmp__(y) <==> cmp(x,y)
- __coerce__(...)
- x.__coerce__(y) <==> coerce(x, y)
- __div__(...)
- x.__div__(y) <==> x/y
- __divmod__(...)
- x.__divmod__(y) <==> xdivmod(x, y)y
- __float__(...)
- x.__float__() <==> float(x)
- __floordiv__(...)
- x.__floordiv__(y) <==> x//y
- __getattribute__(...)
- x.__getattribute__('name') <==> x.name
- __getnewargs__(...)
- __hash__(...)
- x.__hash__() <==> hash(x)
- __hex__(...)
- x.__hex__() <==> hex(x)
- __int__(...)
- x.__int__() <==> int(x)
- __invert__(...)
- x.__invert__() <==> ~x
- __long__(...)
- x.__long__() <==> long(x)
- __lshift__(...)
- x.__lshift__(y) <==> x<<y
- __mod__(...)
- x.__mod__(y) <==> x%y
- __mul__(...)
- x.__mul__(y) <==> x*y
- __neg__(...)
- x.__neg__() <==> -x
- __nonzero__(...)
- x.__nonzero__() <==> x != 0
- __oct__(...)
- x.__oct__() <==> oct(x)
- __or__(...)
- x.__or__(y) <==> x|y
- __pos__(...)
- x.__pos__() <==> +x
- __pow__(...)
- x.__pow__(y[, z]) <==> pow(x, y[, z])
- __radd__(...)
- x.__radd__(y) <==> y+x
- __rand__(...)
- x.__rand__(y) <==> y&x
- __rdiv__(...)
- x.__rdiv__(y) <==> y/x
- __rdivmod__(...)
- x.__rdivmod__(y) <==> ydivmod(y, x)x
- __repr__(...)
- x.__repr__() <==> repr(x)
- __rfloordiv__(...)
- x.__rfloordiv__(y) <==> y//x
- __rlshift__(...)
- x.__rlshift__(y) <==> y<<x
- __rmod__(...)
- x.__rmod__(y) <==> y%x
- __rmul__(...)
- x.__rmul__(y) <==> y*x
- __ror__(...)
- x.__ror__(y) <==> y|x
- __rpow__(...)
- y.__rpow__(x[, z]) <==> pow(x, y[, z])
- __rrshift__(...)
- x.__rrshift__(y) <==> y>>x
- __rshift__(...)
- x.__rshift__(y) <==> x>>y
- __rsub__(...)
- x.__rsub__(y) <==> y-x
- __rtruediv__(...)
- x.__rtruediv__(y) <==> y/x
- __rxor__(...)
- x.__rxor__(y) <==> y^x
- __str__(...)
- x.__str__() <==> str(x)
- __sub__(...)
- x.__sub__(y) <==> x-y
- __truediv__(...)
- x.__truediv__(y) <==> x/y
- __xor__(...)
- x.__xor__(y) <==> x^y
Data and other attributes inherited from __builtin__.int:
- __new__ = <built-in method __new__ of type object>
- T.__new__(S, ...) -> a new object with type S, a subtype of T
Methods inherited from DateConverter:
- __call__(self, x)
- convert userland datetime instance x to epoch
- add_month(self, x, direction=1)
- return now plus one month as epoch
- add_year(self, x, direction=1)
- return now plus one year as epoch
- ceil_day(self, x)
- return the ceiled day
- ceil_hour(self, x)
- return the ceiled hour as epoch
- ceil_minute(self, x)
- return the ceiled minute
- ceil_month(self, x)
- return the ceiled month
- ceil_year(self, x)
- return the ceiled year
- day_of_week(self, x)
- return day of week; monday is 0
- floor_day(self, x)
- return the floored day
- floor_hour(self, x)
- return the floored hour as epoch
- floor_minute(self, x)
- return the floored minute
- floor_month(self, x)
- return the floored month
- floor_year(self, x)
- return the floored year
- hms(self, x)
- return the hour, minute, second
- strftime(self, fmt, x)
- format x using strftime format string fmt
- strptime(self, datestr, fmt)
- return an instance of your date from a date string and fouermat
- ymd(self, x)
- return the year month day. month and day are indexed from 1
- ymdhms_to_epoch(self, year, month, day, hour, minute, second)
| |