vpetkovic
1/22/2020 - 1:46 PM

Date and Time Formats

This is self explanatory and the only reason this exist is to have it handly for very quick reference as it is slightly different than in other languages like for instance in C#

https://www.php.net/manual/en/datetime.format.php

d	day of the month with leading zeros	03 or 17
j	day of the month without leading zeros	3 or 17
D	day of the week as a three-letter abbreviation	Mon
l	full day of the week	Monday
m	month as a number with leading zeros	09 or 12
n	month as a number without leading zeros	9 or 12
M	month as a three-letter abbreviation	Sep
h – Represents hour in 12-hour format with leading zeros (01 to 12).
H – Represents hour in in 24-hour format with leading zeros (00 to 23).
i – Represents minutes with leading zeros (00 to 59).
F	full month	September
y	two-digit year	18
Y	full year	2018
a – Represents lowercase ante meridian and post meridian (am or pm).
A – Represents uppercase ante meridian and post meridian (AM or PM).