A specific point in time, identified by year, month, day, hour,
minute, second.
Python's datetime module calls this a "datetime".
|
Time
|
__init__(self,
arg1=None,
month=1,
day=1,
hour=0,
minute=0,
second=0)
The constructor for a Time object. |
source code
|
|
|
Time
|
__add__(self,
arg)
Add a Period to this Time to produce a new Time. |
source code
|
|
|
boolean
|
__eq__(self,
arg)
Compare two Time objects for equality. |
source code
|
|
|
boolean
|
__ge__(self,
arg)
Compare two Time objects for relative position in time. |
source code
|
|
|
boolean
|
__gt__(self,
arg)
Compare two Time objects to determine if one is later (greater than)
the other. |
source code
|
|
|
boolean
|
__le__(self,
arg)
Compare two Time objects for relative position in time. |
source code
|
|
|
boolean
|
__lt__(self,
arg)
Compare two Time objects for relative position in time. |
source code
|
|
|
boolean
|
__neq__(self,
arg)
Compare two Time objects for inequality. |
source code
|
|
|
string
|
__str__(self)
Return a string representation of self as an isodate + space +
isotime |
source code
|
|
|
Time or Period
|
|
|
Time
|
add(self,
**kwargs)
A method to add time to a Time object. |
source code
|
|
|
Time
|
|
|
Time
|
|
|
Time
|
|
|
Time
|
|
|
Period
|
diff(self,
eventTime)
Determine the difference (a Period) between two Times. |
source code
|
|
|
tuple
|
diffyears(self,
eventTime)
Determine the difference (a Period) between myself and the time of
some event. |
source code
|
|
|
tuple
|
diffy(self,
eventTime)
Determine the difference (a Period) between myself and the time of
some event. |
source code
|
|
|
tuple
|
|
|
tuple
|
diffym(self,
eventTime)
Determine the difference (a Period) between myself and the time of
some event. |
source code
|
|
|
tuple
|
diffmonths(self,
eventTime)
Determine the difference (a Period) between myself and the time of
some event. |
source code
|
|
|
tuple
|
diffm(self,
eventTime)
Determine the difference (a Period) between myself and the time of
some event. |
source code
|
|
|
Time
|
exitWeekend(self,
direction=None)
return a new Time object which has been moved so it does not fall on
a Saturday or Sunday. |
source code
|
|
|
Time
|
flex(self,
baseTime)
A method for adding days to a date, based on a base date. |
source code
|
|
|
Time
|
fromFile(self,
filename)
Returns:
a new Time object with the datetime of the last modification date of
the file with <filename>. |
source code
|
|
|
Time
|
|
|
string
|
|
|
tuple
|
|
|
string
|
|
|
string
|
|
|
string
|
|
|
string
|
|
|
int
|
|
|
string
|
|
|
string
|
get_dt2(self)
Return a string containing the civildate and the time (including
seconds) e.g. |
source code
|
|
|
int
|
|
|
string
|
|
|
string
|
|
|
string
|
get_isodatetime(self,
sep='T',
datesep='-',
timesep=':',
seps=None)
Return a string containing an ISO datetime in format
yyyy-mm-ddThh:mm:ss. |
source code
|
|
|
string
|
get_isofilename(self,
sep='-')
Return a string containing the ISO datetime in a format suitable for
making a filename. |
source code
|
|
|
int
|
|
|
int
|
|
|
int
|
|
|
int
|
|
|
string
|
|
|
int
|
|
|
string
|
|
|
string
|
get_t2d(self)
Return a string containing the time and the civil date (including
seconds). |
source code
|
|
|
tuple
|
|
|
string
|
get_twd(self)
Return a string containing the time, the weekday name, and the
civildate. |
source code
|
|
|
string
|
get_t2wd(self)
Return a string containing the time (including seconds), the weekday
name, and the civildate. |
source code
|
|
|
string
|
|
|
string
|
|
|
string
|
get_wd(self)
Returns a string containing the weekday name and the civildate. |
source code
|
|
|
string
|
get_wdt(self)
Returns a string containing the weekday name, the civildate, and the
time. |
source code
|
|
|
string
|
get_wdt2(self)
Returns a string containing the weekday name, the civildate, and the
time (including seconds). |
source code
|
|
|
int
|
|
|
string
|
|
|
Time
|
goto(self,
**kwargs)
Returns a clone of self but with some component(s) (year, month, day,
hour, minute, second) reset to a new value. |
source code
|
|
|
Time
|
gotoMonth(self,
argMonth,
direction='NEXT',
**kwargs)
Returns a new Time object in which the month has been moved to the
specified argMonth. |
source code
|
|
|
Time
|
|
|
Time
|
|
|
Time
|
|
|
Time
|
gotoYearEnd(self)
Return a new Time object in which the time has been moved to the end
of the year. |
source code
|
|
|
Time
|
__gotoNearestMonth(self,
month,
useTodayFlag)
Return a new Time object in which the month has been moved (forward
or backward) to the closest month with month number <month>. |
source code
|
|
|
Time
|
__gotoNearestWeekday(self,
weekday,
useTodayFlag)
Return a new Time object in which the weekday has been moved (forward
or backward) to the closest weekday with weekday number
<weekday>. |
source code
|
|
|
Time
|
gotoWeekday(self,
argWeekday,
direction='NEXT',
**kwargs)
Return a new Time object in which the date has been moved to the
specified argWeekday. |
source code
|
|
|
boolean
|
|
|
Time
|
|
|
Time
|
minus(self,
**kwargs)
Subtract some amounts of time from the current time. |
source code
|
|
|
string
|
civildate
Return a string containing the civildate.
|
|
tuple
|
civiltimebase
A utility method for other civiltime methods.
|
|
string
|
civiltime
Return a string containing the civil time.
|
|
string
|
t
Return a string containing the civil time.
|
|
string
|
civiltime2
Return a string containing the civil time (including seconds.)
|
|
string
|
t2
Return a string containing the civil time (including seconds.)
|
|
string
|
d
Return a string containing the civildate.
|
|
string
|
dostime
Return the datetime in the format used by Microsoft's MS-DOS.
|
|
int
|
day
Return the day part of the datetime.
|
|
string
|
dt
Return a string containing the civildate and the time, e.g.
|
|
string
|
dt2
Return a string containing the civildate and the time (including
seconds) e.g.
|
|
int
|
hour
Return the hour portion of the Time, as an int.
|
|
string
|
isodate
Return a string containing an ISO date in format yyyy-mm-dd, e.g.
|
|
string
|
isotime
Return a string containing ISO time in format hh:mm:ss, e.g.
|
|
string
|
isodatetime
Return a string containing an ISO datetime in format
yyyy-mm-ddThh:mm:ss.
|
|
string
|
isofilename
Return a string containing the ISO datetime in a format suitable for
making a filename.
|
|
int
|
isoweekday
Return the ISO weekday number as an int, where Monday=1 ..
|
|
int
|
weekday
Return the ISO weekday number as an int, where Monday=1 ..
|
|
int
|
weeknumber
Return the ISO week number, as an int.
|
|
int
|
isoweeknumber
Return the ISO week number, as an int.
|
|
int
|
minute
Return the minute portion of a Time, as an int.
|
|
int
|
month
Return the month portion of a Time, as an int.
|
|
string
|
monthname
Return a string containing the natural language name of the month.
|
|
string
|
m
Return a string containing the natural language name of the month.
|
|
int
|
second
Return the second portion of a Time, as an int.
|
|
string
|
td
Return a string containing the time and the civil date.
|
|
string
|
t2d
Return a string containing the time and the civil date (including
seconds).
|
|
string
|
twd
Return a string containing the time, the weekday name, and the
civildate.
|
|
string
|
t2wd
Return a string containing the time (including seconds), the weekday
name, and the civildate.
|
|
string
|
unixdate
Return a string containing a Unix date, e.g.
|
|
string
|
weekdayname
Returns the natural language name of the day of the week.
|
|
string
|
w
Returns the natural language name of the day of the week.
|
|
string
|
wd
Returns a string containing the weekday name and the civildate.
|
|
string
|
wdt
Returns a string containing the weekday name, the civildate, and the
time.
|
|
string
|
wdt2
Returns a string containing the weekday name, the civildate, and the
time (including seconds).
|
|
int
|
year
Return the year as an int, e.g.
|
|
string
|
y
Return the year as a string, e.g.
|