Skip to content
Márk Török edited this page May 4, 2018 · 2 revisions

Date

current_time

The time in 24-hour notation (%H:%M:%S).
Example : date current_time

month_name

The abbreviated month name according to the current locale.
Example : date month_name

name_of_day

The full name of the day of the week according to the current locale.
Example : date name_of_day

century

The century number (year/100) as a 2-digit integer.
Example : date century

day_of_month

The day of the month as a decimal number (range 01 to 31).
Example : date day_of_month

hour

The hour as a decimal number using a 24-hour clock (range 00 to 23).
Example : date hour

date

Equivalent to %Y-%m-%d (the ISO 8601 date format).
Example : date date

day_of_year

The day of the year as a decimal number (range 001 to 366).
Example : date day_of_year

month

The month as a decimal number (range 01 to 12).
Example : date month

minute

The minute as a decimal number (range 00 to 59).
Example : date minute

seconds_since_epoch

The number of seconds since the Epoch, 1970-01-01 00:00:00 +0000 (UTC).
Example : date seconds_since_epoch

second

The second as a decimal number (range 00 to 60).
Example : date second
Note : The range is up to 60 to allow for occasional leap seconds.

day_of_week

The day of the week as a decimal, range 1 to 7, Monday being 1.
Example : date day_of_week

week_of_year

The week number of the current year as a decimal number, range 00 to 53, starting with the first Monday as the first day of week 01.
Example : date week_of_year

year

The year as a decimal number including the century.
Example : date year