Package netcdftime :: Module netcdftime :: Class datetime
[hide private]
[frames] | no frames]

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 [hide private]
  __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
  __repr__(self)
  strftime(self, format=None)
  timetuple(self)

Method Details [hide private]

__init__(self, year, month, day, hour=0, minute=0, second=0, dayofwk=-1, dayofyr=1)
(Constructor)

source code 
dayofyr set to 1 by default - otherwise time.strftime will complain

__repr__(self)
(Representation operator)

source code 
None

strftime(self, format=None)

source code 
None

timetuple(self)

source code 
None