Loading...
 
Skip to main content

History: Date and Time

Source of version: 17 (current)

Copy to clipboard
            !Date and Time tab
{DIV(float=right,width="200px")}^::Related Topics::
*((Date and Time Features))^{DIV}
;__Overview__:Configure how Tiki displays date and time information.
;__To Access__:From the ((General Admin)) page, click the __Date and Time__ tab.
;__Notes__:See the [#Date_and_Time_Formats|Date and Time Formats table] and [http://www.php.net/manual/en/function.strftime.php|PHP Manual] for detailed information on date and time settings.

~tc~ Prefrence documentation generated from https://sourceforge.net/p/tikiwiki/code/HEAD/tree/trunk/lib/prefs/ ~/tc~
~tc~ To update documentation see https://dev.tiki.org/How-to-get-commit-access ~/tc~
{PREFDOC(tab="general-dateandtime" img="10:474")/}


{img src=img/icons/information.png alt="Tip"} __Tip__: When you save your changes, Tiki will display a sample of the selected date and time formats.


!!Date and Time Formats
See http://php.net/manual/en/function.date.php for more information on PHP date and time formats.

!!!Day
{FANCYTABLE(head="Format Character  | Description" headvaligns="bottom" colwidths="20%|80%")}
~np~ %a ~/np~ |Abbreviated weekday name according to the current locale
~np~ %A~/np~ |Full weekday name according to the current locale
~np~ %d~/np~ |Day of the month as a decimal number (range 01 to 31)
~np~ %e~/np~ |Day of the month as a decimal number, a single digit is preceded by a space (range  1 to 31)
~np~ %u ~/np~ |Day of the week as a decimal, with 1 representing Monday (range 1 to 7)
~np~ %w ~/np~ |Day of the week as a decimal, with 0 being Sunday (range 0 to 6)
~np~ %j ~/np~ |Day of the year as a decimal number (range 001 to 366)
{FANCYTABLE}

!!!Week
{FANCYTABLE(head="Format Character  | Description" headvaligns="bottom" colwidths="20%|80%")}
~np~ %U ~/np~ |Week number of the current year as a decimal number, starting with the first Sunday as the first day of the first week
~np~ %W ~/np~ |Week number of the current year as a decimal number, starting with the first Monday as the first day of the first week
~np~ %V ~/np~ |The ISO 8601:1988 week number of the current year as a decimal number, range 01 to 53, where week 1 is the first week that has at least 4 days in the current year, and with Monday as the first day of the week. (Use %G or %g for the year component that corresponds to the week number for the specified timestamp.){FANCYTABLE}

!!!Month
{FANCYTABLE(head="Format Character  | Description" headvaligns="bottom" colwidths="20%|80%")}
~np~ %b ~/np~ |Abbreviated month name according to the current locale
~np~ %B ~/np~ |Full month name according to the current locale
~np~  %m ~/np~  |Month as a decimal number (range 01 to 12){FANCYTABLE}

!!!Year
{FANCYTABLE(head="Format Character  | Description" headvaligns="bottom" colwidths="20%|80%")}
~np~ %C ~/np~ |Century number (the year divided by 100 and truncated to an integer, range 00 to 99)
~np~ %G ~/np~ |The 4-digit year corresponding to the ISO week number (see %V). This has the same format and value as %Y, except that if the ISO week number belongs to the previous or next year, that year is used instead.
~np~ %g ~/np~ |Like %G, but without the century.
~np~ %y ~/np~ |Year as a decimal number without a century (range 00 to 99)
~np~ %Y ~/np~ |Year as a decimal number including the century{FANCYTABLE}

!!!Time
{FANCYTABLE(head="Format Character  | Description" headvaligns="bottom" colwidths="20%|80%")}
~np~ %H ~/np~ |Hour as a decimal number using a 24-hour clock (range 00 to 23)
~np~ %I ~/np~ |Hour as a decimal number using a 12-hour clock (range 01 to 12)
~np~ %M ~/np~ |Minute as a decimal number
~np~ %p ~/np~ |Either __am__ or __pm__ according to the given time value, or the corresponding strings for the current locale
~np~ %r ~/np~ |Time in a.m. and p.m. notation
~np~ %R ~/np~ |Time in 24 hour notation
~np~ %S ~/np~ |Second as a decimal number
~np~ %T ~/np~ |Current time, equal to ~np~%H:%M:%S~/np~{FANCYTABLE}

!!!Notes
{FANCYTABLE(head="Format Character  | Description" headvaligns="bottom" colwidths="20%|80%")}
~np~ %c ~/np~ |Preferred date and time representation for the current locale
~np~ %x ~/np~ |Preferred date representation for the current locale without the time
~np~ %X ~/np~ |Preferred time representation for the current locale without the date
~np~ %D ~/np~ |Same as ~np~%m/%d/%y~/np~
~np~ %h ~/np~ |Same as ~np~%b~/np~
~np~%n~/np~|Newline character
~np~ %t ~/np~ |Tab character
~np~ %Z or %z ~/np~ |Time zone or name or abbreviation
~np~ %% ~/np~ |A literal __%__ character
{FANCYTABLE}