date.1 (2010 09)

d
date(1) date(1)
%w Weekday as a one-digit decimal number [
0-6 (Sunday-Saturday)]. For example,
3.
%W Week number of the year (Monday as the first day of the week) as a two-digit decimal number
[00-53]. All days that precede the first Monday in the year are considered to be in week
00.
For example,
02.
%x Current date representation. For example,
01/12/94.
%X Current time representation. For example,
19:45:58.
%y Year without century as a two-digit decimal number [
00-99]. For example, 93.
%Y Year with century as a four-digit decimal number [
1970-2037]. For example, 1994.
%Z Time zone name (or no characters if time zone cannot be determined). For example,
PST.
%% The % character.
Obsolescent Directives
The following directives are provided for backward compatibility. It is recommended that the preceding
directives be used instead.
%D Date in usual U.S. format. For example,
01/12/94. Use %x or %m/%d/%y instead.
%F Full month name. For example, January. Use %B instead.
%h Abbreviated month name. For example, Jan. Use %b instead.
%r Time in 12-hour U.S. format. For example, 07:45:58 PM. Use "%I:%M:%S %p"
instead.
%T Time in 24-hour U.S. format. For example, 19:45:58. Use %X or %H:%M:%S
instead.
%z Time zone name (or no characters if time zone cannot be determined). For example,
PST. Use
%Z instead.
Modified Formatting Directives
Some Formatting Directives can be modified by the
E and O modifier characters to indicate a different
format or specification for the language specified in the
LC_TIME environment variable.
If the corresponding keyword (
era, era_year, era_d_fmt, and alt_digit) is not specified or not
supported, the unmodified field descriptor value is used. The command
LC_ALL=language locale -ck era era_year era_d_fmt alt_digit
displays the keywords and their values in the specified language (see locale (1)).
%Ec Alternate appropriate date and time representation.
%EC The name of the base year in alternate representation.
%Ex Alternate date representation.
%Ey Offset from %EC (year only) in the alternate representation.
%EY Full alternate year representation.
%Od Day of month using the alternate numeric symbols.
%Oe Day of month using the alternate numeric symbols with leading space-character fill if
applicable.
%OH Hour (24-hour clock) using the alternate numeric symbols.
%OI Hour (12-hour clock) using the alternate numeric symbols.
%Om Month using the alternate numeric symbols.
%OM Minutes using the alternate numeric symbols.
%OS Seconds using the alternate numeric symbols.
%OU Week number of the year (Sunday is the first day of the week) using the alternate
numeric symbols.
%Ow Weekday as number using the alternate numeric symbols (Sunday=0).
%OW Weekday number of the year (Monday is the first day of the week) using the alternate
numeric symbols.
HP-UX 11i Version 3: September 2010 3 Hewlett-Packard Company 3