Welcome, Guest Login

Support Center

Formatting Date and Time

Last Updated: Jan 16, 2015 08:45AM PST
LiveWhale uses PHP's date formatting functions. You can use the following date formatting characters below to build date format strings to use in LiveWhale widgets. See the date and formatting options with examples below:

Day of Month    
%d Numeric, with leading zeros 01-31
%j Numeric, without leading zero 1-31
%S The English suffix for the day of the month st, nd, or th in the 1st, 2nd, or 15th
%l Full name (lowercase 'L') Sunday - Saturday
%D Three letter name Mon - Sun
%m Numeric, with leading zeros 01-12
%n Numeric, without leading zeros 1-12
%F Full text month January - December
%M Three letter textual Jan - Dec
%Y Numeric, 4 digits Ex., 1999, 2003
%y Numeric, 2 digits Ex., 99, 03
%a Lowercase am, pm
%A Uppercase AM, PM
%g Hour, 12-hour, without leading zeros 1-12
%h Hour, 12-hour, with leading zeros 01-12
%G Hour, 24-hour, without leading zeros 0-23
%H Hour, 24-hour, with leading zeros 00-23
%i Minutes, with leading zeros 00-59
%s Seconds, with leading zeros 00-59
%T Timezone abbreviation Ex., EST, PST
%c ISO 8601 2004-02-14T15:19:25+00:00
%r RFC 2822 Sat, 14 Feb 2015 16:01 +0200


Here are some examples of date format strings and result output that can be used in LiveWhale widgets. 

The % sign means that the format character should represent a format variable and not a string that would display "as-is". 

%F %j, %Y January 1, 2015
%F, %Y January, 2015
%l, %F %j%S, %Y Thursday, January 1, 2015
%g:%i %a 12:50 am
%Y/%m/%d 2015/01/16
%Y/%m/%d %g:%i %A 2015/01/16 10:26 AM
%M %j, %Y Jan 6, 2015
Current Date:%F %j%S Current Date: January 1st
seconds ago
a minute ago
minutes ago
an hour ago
hours ago
a day ago
days ago
Invalid characters found