web:modx:revolution:dateformat
日付のフォーマット
スニペットなどで使用されるフォーマット。
例:strtotime:date=`%Y/%-m/%d` → 2011/5/11
Code | Display | Example |
---|---|---|
%a | Short weekday name | Sun |
%A | Full weekday name | Sunday |
%b | Short month name | Jan |
%B | Full month name | January |
%c | Local date and time | Wed Jan 7 00:22:10 2010 |
%C | Century (the year divided by 100, range 00 to 99) | 20 |
%d | Day of the month (01 to 31) | 03 |
%D | Same as %m/%d/%y | 04/29/10 |
%e | Day of the month (1 to 31) | 3 |
%g | like %G, but without the century | 11 |
%G | The 4-digit year corresponding to the ISO week number (see %V). This has the same format and value as %Y | 2011 |
%h | same as %b | |
%H | Hour (24-hour clock) | 00-23 |
%I | Hour (12-hour clock) | 01-12 |
%j | Day of the year | 001 to 366 |
%m | Month | 01 to 12 |
%-m | Month | 1 to 12 |
%M | Minute | 00 to 59 |
%n | Newline character | \n |
%p | am or pm | amz |
%P | AM or PM | AM |
%r | Same as %I:%M:%S %p | 08:23:11 PM |
%R | Same as %H:%M | 23:11 |
%S | Second | 00 to 59 |
%t | Tab character | \t |
%T | Same as %H:%M:%S | 26:12:27 |
%u | Weekday (Monday=1) | 01 to 07 |
%V | 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. | 01-53 |
%w | Weekday (Sunday=0) | 00 to 06 |
%x | Date only | 01/25/09 |
%X | Time only | 02:58:12 |
%y | Two-digit year | 09 |
%Y | Four-digit year | 2010 |
%Z or %z | Time zone offset or name | -005 or EST |
%% | A literal % character | % |
参照
web/modx/revolution/dateformat.txt · 最終更新: 2017/04/14 05:21 by 127.0.0.1