python:DateTime()
2007/02/25 16:35:04.697 Universal
Syntax Notes
tal:define="myTime python:DateTime()" --> 2007/02/25 11:35:04.697 US/Eastern
-
tal:replace="myTime/day" --> 25
tal:replace="python:myTime.strftime('%A')" --> Sunday
Formats
-
strftime(%Y/%m/%d) : 2007/02/25
-------------------------------------------------------------
-
strftime(%a) --> Sun
-
strftime(%A) --> Sunday
-
strftime(%b) --> Feb
-
strftime(%B) --> February
-
strftime(%c) --> Sun Feb 25 11:35:04 2007
-
strftime(%d) --> 25
-
strftime(%H) --> 11
-
strftime(%I) --> 11
-
strftime(%j) --> 056
-
strftime(%m) --> 02
-
strftime(%M) --> 35
-
strftime(%p) --> AM
-
strftime(%s) --> 1172421304
-
strftime(%U) --> 08
-
strftime(%w) --> 0
-
strftime(%W) --> 08
-
strftime(%x) --> 02/25/07
-
strftime(%X) --> 11:35:04
-
strftime(%y) --> 07
-
strftime(%Y) --> 2007
-
strftime(%Z) --> EST
Methods of Date Objects
-
dow() --> 0
-
aCommon() --> Feb 25, 2007 11:35 am
-
h_12() --> 11
-
HTML4() --> 2007-02-25T16:35:04Z
-
dayOfYear() --> 56
-
AMPM() --> 11:35:04 am
-
Month() --> February
-
mm() --> 02
-
ampm() --> am
-
hour() --> 11
-
aCommonZ() --> Feb 25, 2007 11:35 am US/Eastern
-
pCommon() --> Feb. 25, 2007 11:35 am
-
minute() --> 35
-
day() --> 25
-
Date() --> 2007/02/25
-
Time() --> 11:35:04
-
TimeMinutes() --> 11:35
-
yy() --> 07
-
dd() --> 25
-
rfc822() --> Sun, 25 Feb 2007 11:35:04 -0500
-
fCommon() --> February 25, 2007 11:35 am
-
fCommonZ() --> February 25, 2007 11:35 am US/Eastern
-
timeTime() --> 1172421304.71 (this is a floating point number, not a string)
-
parts() --> (2007, 2, 25, 11, 35, 4.7069999999999999, 'US/Eastern') (this is a tuple, not a string)
-
PreciseAMPM() --> 11:35:04.707 am
-
AMPMMinutes() --> 11:35 am
-
pDay() --> Sun.
-
h_24() --> 11
-
pCommonZ() --> Feb. 25, 2007 11:35 am US/Eastern
-
dow_1() --> 1 (integer)
-
timezone() --> US/Eastern
-
year() --> 2007
-
PreciseTime() --> 11:35:04.708
-
ISO() --> 2007-02-25 11:35:04
-
millis() --> 1172421304709
-
second() --> 4.709
-
month() --> 2 (integer)
-
pMonth() --> Feb.
-
aMonth() --> Feb
-
Day() --> Sunday
-
aDay() --> Sun
Extra Fun
('night','morning','afternoon','evening')[_.DateTime().h_24()/6] -->
morning