netcdftime.netcdftime.datetime

Package netcdftime :: Module netcdftime :: Class datetime |

# Class datetime

source code

Phony datetime object which mimics the python datetime object, but allows for dates that don't exist in the proleptic gregorian calendar. Doesn't do timedelta operations, doesn't overload + and -.

Has strftime, timetuple and __repr__ methods. The format of the string produced by __repr__ is controlled by self.format (default %Y-%m-%d %H:%M:%S).

Instance variables are year,month,day,hour,minute,second,dayofwk,dayofyr and format.

Instance Methods
__init__(self, year, month, day, hour=0, minute=0, second=0, dayofwk=-1, dayofyr=1) dayofyr set to 1 by default - otherwise time.strftime will complain | source code
__repr__(self) | source code
strftime(self, format=None) | source code
timetuple(self) | source code