spug.util.DateTime
index
/home/mmuller/w/spug/util/DateTime.py

Combination of date and time.  Same functionality as @spug.util.Date.Date
but with hour, minute and second preserved.

 
Modules
       
time

 
Classes
       
util.Date.Date
util.DateTime.DateTime

 
class DateTime(util.Date.Date)
    Class that stores a date and time.  Derives from @spug.util.Date.Date
and supports all of its functionality.
 
  Methods defined here:
__cmp__(self, other)
Overrides the date comparison operator to allow us to compare time.
__init__(self, timeval=0, other=None, year=0, month=0, day=0, hour=0, minute=0, second=0, foreverPast=0, foreverFuture=0)
Note that all of *Date*s construction forms are supported except
for *stdfmt*.
__str__(self)
getHour(self)
Returns the hour of the day (0-23)
getMinute(self)
Returns the minute of the hour (0-59)
getSecond(self)
Returns the second

Methods inherited from util.Date.Date:
__add__(self, days)
Returns a new date consisting of the given date plus /days/.
__getattr__(self, attr)
Provides the transparent computation of the time attribute.
__setstate__(self, dict)
Allows conversion from old-style representation.
__sub__(self, other)
Returns the difference (in days) between two dates.  A day is assumed
to be 86400 seconds.
 
If /other/ is not a date, but is a number, a new date is returned that
is /other/ days before /self/.
dst(self)
Returns true if daylight savings time is in effect for this date,
false if not.
format(self, formatStr)
Returns the date and time formated using the strftime function.
formatNewStd(self)
Returns a string consisting of the receiver formatted as `mm/dd/yyyy`
formatShort(self)
Returns a string consisting of the receiver formatted as mmddyy
formatStd(self)
Returns a string consisting of the receiver formatted as `mm/dd/yy`
getDay(self)
Returns the day of the month.
getDayOfWeek(self)
Returns the current day of the week as a number.
getMonth(self)
Returns the month
getYear(self)
Returns the year.
last(self, weekday)
Returns a new date which is the given /weekday/ immediately prior to
the date of /self/.  If /self/s date falls on that weekday, returns
a copy of /self/.
next(self, weekday)
Returns a new date which is the given /weekday/ following the date of 
/self/.  If /self/s date falls on that weekday, returns a copy of /self/.
ymd(self)
Returns a tuple consisting of the year, month, and day.

Data and other attributes inherited from util.Date.Date:
april = 4
august = 8
december = 12
february = 2
friday = 5
january = 1
july = 7
june = 6
march = 3
may = 5
monday = 1
november = 11
october = 10
saturday = 6
september = 9
sunday = 0
thursday = 4
tuesday = 2
wednesday = 3