13.4 The date type

For more information about manipulating dates in Pyxplot, see Section 4.11. For more information about manipulating times and dates in Pyxplot, see Section 4.11. Many of the methods listed below take an optional timezone string as their final argument. This should be specified in the form Europe/London, America/New_York or Australia/Perth, as used by the tz database. A complete list of available timezones can be found here: http://en.wikipedia.org/wiki/List_of_tz_database_time_zones. If universal time is used, the timezone may be specified as UTC.

str($<format>,<timezone>$)
The str($<format>,<timezone>$) method converts a date object to a string with an optional format string supplied as an argument (see the time.string() function).

toDayOfMonth($<timezone>$)
The toDayOfMonth($<timezone>$) method returns the day of the month of a date object in the current calendar.

toDayWeekName($<timezone>$)
The toDayWeekName($<timezone>$) method returns the name of the day of the week of a date object.

toDayWeekNum($<timezone>$)
The toDayWeekNum($<timezone>$) method returns the day of the week (1–7) of a date object.

toHour($<timezone>$)
The toHour($<timezone>$) method returns the integer hour component (0–23) of a date object.

toJD()
The toJD() method converts a date object to a numerical Julian date.

toMinute($<timezone>$)
The toMinute($<timezone>$) method returns the integer minute component (0–59) of a date object.

toMJD()
The toMJD() method converts a date object to a modified Julian date.

toMonthName($<timezone>$)
The toMonthName($<timezone>$) method returns the name of the month in which a date object falls.

toMonthNum($<timezone>$)
The toMonthNum($<timezone>$) method returns the number (1–12) of the month in which a date object falls.

toSecond($<timezone>$)
The toSecond($<timezone>$) method returns the seconds component (0–60) of a date object, including the non-integer component.

toUnix()
The toUnix() method converts a date object to a Unix time.

toYear($<timezone>$)
The toYear($<timezone>$) method returns the year in which a date object falls in the current calendar.