Spacefem.com

PHP Date Format

This is another one of those things I made because I need it all the time and can never find it. We use unix/perl/PHP date formats for all sorts of fun stuff (my forum is one of those places), and this page wll show you how to format those numbers. For a more detailed explination, look here.
FormatResultNotes
F jS, Y, g:i aMay 16th, 2012, 10:56 pmBasic date and time
m.d.y05.16.12Simple month.day.year with leading zeros
l, F jS G:i:sWednesday, May 16th 22:56:57Day, date, and 24-hour (military) time
D M jWed May 16Short versions of day and month
n/j g:i A5/16 10:56 PMDate without leading zeros and AM/PM in uppercase
Y: \D\a\y #z2012: Day #136Day of the year (0-365)



Unformatted numerical date:

(Current date in this box is 0 seconds away from today's date)


The breakdown (year must be between 1970 and 2038):
Hour:
Minute:
Second:
Month:
Day:
Year: