| %y | Year without century (00–99) |
| %Y | Year with century ("1990") |
| %b | Abbreviated month name ("Jan") |
| %B | Full month name ("January") |
| %m | Month as a decimal number (01–12) |
| %a | Abbreviated weekday name ("Fri") |
| %A | Full weekday name ("Friday") |
| %w | Weekday as a decimal number (0–6), where Sunday is 0 |
| %d | Day of the month as a decimal number (01–31) |
| %e | Same as %d but does not print the leading 0 |
| %j | Day of the year as a decimal number (001–366) |
| %H | Hour based on a 24-hour clock as a decimal number (00–23) |
| %I | Hour based on a 12-hour clock as a decimal number (01–12) |
| %p | A.M./P.M. designation for the locale |
| %M | Minute as a decimal number (00–59) |
| %S | Second as a decimal number (00–59) |
| %F | Milliseconds as a decimal number (000–999) |
| %x | Date using the date representation for the locale |
| %X | Time using the time representation for the locale |
| %c | Shorthand for %X %x, the locale format for date and time |
| %Z | Time zone name |
| %z | Time zone offset in hours and minutes from GMT (HHMM) |
| %% | A % character |
No comments:
Post a Comment