Next: , Previous: System_boolean, Up: System


3.2.1.2 System.date

Implements: see System_object

Represents a date/time value.

Supported constructors:

System.date()
Date object with all arguments set to 0.
System.date(seconds, minutes, hours, day_of_month, month, year, day_of_week, day_of_year, dst)
Date object with all arguments set to the given values.

Supported properties:

sec
Number of seconds (0..61)
min
Number of minutes (0..59)
hour
Number of hours (0..23)
day_of_month
Day of month (1..31)
month
Month (0..11)
year
Years since 1900
day_of_week
Day of week (0..6, Sunday = 0)
day_of_year
Day of year (0..365)
dst
Daylight Saving Time? (0 = false, 1 = true)

Supported methods:

str()
Returns a string representation of the object (overridden; see System_object).
now_local()
Return new date object with current time in the local time zone.
now_gmt()
Return new date object with current time as GMT.
parse(date, format)
Return new date object representing the parsed date, using the given format. See strptime() for usable format codes.
format(fmt)
Return string representation of date using the given format fmt. See strftime() for usable format strings.
timestamp()
Return number of seconds since epoch of this object.