Graphics Reference
In-Depth Information
Table 8-1. Date format options
Option Description
Year with century (2012)
%Y
Year without century (12)
%y
Month as a decimal number (08)
%m
Abbreviated month name in current locale (Aug)
%b
Full month name in current locale (August)
%B
Day of month as a decimal number (04)
%d
Week of the year as a decimal number, with Sunday as the first day of the week (00-53)
%U
Week of the year as a decimal number, with Monday as the first day of the week (00-53)
%W
Day of week (0-6, Sunday is 0)
%w
Abbreviated weekday name (Thu)
%a
Full weekday name (Thursday)
%A
Some of these items are specific to the computer's locale. Months and days have different names
in different languages (the examples here are generated with a US locale). You can change the
locale with Sys.setlocale() . For example, this will change the date formatting to use an Itali-
an locale:
# Mac and Linux
Sys.setlocale( "LC_TIME" , "it_IT.UTF-8" )
# Windows
Sys.setlocale( "LC_TIME" , "italian" )
Note that the locale names may differ between platforms, and your computer must have support
for the locale installed at the operating system level.
See Also
See ?Sys.setlocale for more about setting the locale.
See ?strptime for information about converting strings to dates, and for information about
formatting the date output.
Search WWH ::




Custom Search