format] date [
In the first form, prints the current date and time, specifying an optional display
format. In the second form, a privileged user can set the current date by supplying a numeric
format can consist of literal text strings (blanks must be quoted) as well as field descriptors, whose values will appear as described next (the listing shows some logical groupings).
Insert a newline.
Insert a tab.
Month of year (01-12).
Day of month (01-31).
Last two digits of year (00-99).
Abbreviated month name.
Day of month (1-31); pad single digits with a space.
Four-digit year (e.g., 2004).
"Century," or year/1000, as an integer.
Week-based year within century (00-99).
Week-based year, including the century (0000-9999).
Hour in 24-hour format (00-23).
Second (00–61); 61 permits leap seconds and double-leap seconds.
Hour (24-hour clock; 0–23); single digits are preceded by a space.
Hour (12-hour clock; 1–12); single digits are preceded by a space.
Hour in 12-hour format (01–12).
String to indicate a.m. or p.m. (default is
%I:%M:%S %p format.
Day of week (Sunday = 0).
Weekday as a decimal number (–7, Sunday = 1).
Week number in year (00–53); start week on Sunday.