Difference between revisions of "Date Formats Explained"

From Phoenix Cart User Guide
 
(3 intermediate revisions by the same user not shown)
Line 2: Line 2:
 
<hr>
 
<hr>
  
 
+
<big>
%a Weekday, short version Wed
+
{| class="wikitable"
 
+
|+ Date Formats for example, as used in Main Language Files<br>
%A Weekday, full version Wednesday
+
|-
 
+
| %a|| Weekday, short version|| Wed
%w Weekday as a number 0-6, 0 is Sunday 3
+
|-
 
+
| %A|| Weekday, full version|| Wednesday
%d Day of month 01-31 31
+
|-
 
+
| %w|| Weekday as a number 0-6, 0 is Sunday|| 3
%b Month name, short version Dec
+
|-
 
+
| %d|| Day of month 01-31|| 31
%B Month name, full version December
+
|-
 
+
| %b|| Month name, short version|| Dec
%m Month as a number 01-12 12
+
|-
 
+
| %B|| Month name, full version|| December
%y Year, short version, without century 18
+
|-
+
| %m|| Month as a number 01-12|| 12
%Y Year, full version 2018
+
|-
 
+
| %y|| Year, short version, without century|| 18
%H Hour 00-23 17
+
|-
+
| %Y|| Year, full version|| 2018
%I Hour 00-12 05
+
|-
 
+
| %H|| Hour 00-23|| 17
%p AM/PM PM
+
|-
 
+
| %I|| Hour 00-12|| 05
%M Minute 00-59 41
+
|-
 
+
| %p|| AM/PM|| PM
%S Second 00-59 08
+
|-
 
+
| %M|| Minute 00-59|| 41
%f Microsecond 000000-999999 548513
+
|-
 
+
| %S|| Second 00-59|| 08
%z UTC offset +0100
+
|-
 
+
| %f|| Microsecond 000000-999999|| 548513
%Z Timezone CST
+
|-
 
+
| %z|| UTC offset|| +0100
%j Day number of year 001-366 365
+
|-
 
+
| %Z|| Timezone|| CST
%U Week number of year, Sunday as the first day of week, 00-53 52
+
|-
 
+
| %j|| Day number of year 001-366|| 365
%W Week number of year, Monday as the first day of week, 00-53 52
+
|-
 
+
| %U|| Week number of year, Sunday as the first day of week, 00-53|| 52
%c Local version of date and time Mon Dec 31 17:41:00 2018
+
|-
+
| %W|| Week number of year, Monday as the first day of week, 00-53|| 52
%C Century 20
+
|-
 
+
| %c|| Local version of date and time|| Mon Dec 31 17:41:00 2018
%x Local version of date 12/31/18
+
|-
 
+
| %C|| Century|| 20
%X Local version of time 17:41:00
+
|-
 
+
| %x|| Local version of date|| 12/31/18
%% A % character %
+
|-
 
+
| %X|| Local version of time|| 17:41:00
%G ISO 8601 year 2018
+
|-
 
+
| %%|| A % character|| %
%u ISO 8601 weekday (1-7) 1
+
|-
 
+
| %G|| ISO 8601 year|| 2018
%V ISO 8601 weeknumber (01-53) 01
+
|-
 
+
| %u|| ISO 8601 weekday (1-7)|| 1
 
+
|-
 +
| %V|| ISO 8601 weeknumber (01-53)|| 01
 +
|}
 +
</big>
 
<hr>
 
<hr>
  
 
{{Contribute}}
 
{{Contribute}}

Latest revision as of 13:40, 1 February 2024

Back
FAQ Tips & Tricks

Date Formats for example, as used in Main Language Files
%a Weekday, short version Wed
%A Weekday, full version Wednesday
%w Weekday as a number 0-6, 0 is Sunday 3
%d Day of month 01-31 31
%b Month name, short version Dec
%B Month name, full version December
%m Month as a number 01-12 12
%y Year, short version, without century 18
%Y Year, full version 2018
%H Hour 00-23 17
%I Hour 00-12 05
%p AM/PM PM
%M Minute 00-59 41
%S Second 00-59 08
%f Microsecond 000000-999999 548513
%z UTC offset +0100
%Z Timezone CST
%j Day number of year 001-366 365
%U Week number of year, Sunday as the first day of week, 00-53 52
%W Week number of year, Monday as the first day of week, 00-53 52
%c Local version of date and time Mon Dec 31 17:41:00 2018
%C Century 20
%x Local version of date 12/31/18
%X Local version of time 17:41:00
%% A % character %
%G ISO 8601 year 2018
%u ISO 8601 weekday (1-7) 1
%V ISO 8601 weeknumber (01-53) 01


Phoenix Cart User Guide, like CE Phoenix Cart, is free to use but is maintained by unpaid volunteers.

Code references are licensed under a Commons Attribution-NonCommercial-ShareAlike 2.0 UK: England & Wales License.
All other content is the reserved Intellectual Property and Copyright of phoenixcart.org