Current Date Free
How to Use
[lwcd display="format(s)"], replacing format(s) with the desired output from the available formats below.
Multiple Formats in One Shortcode
[lwcd display="F jS"] would output
F full text of the month, then a space, then
j day of the month - no zero, then
S day of the month suffix.
Example: Today is February 24th
Multiple Formats in One Shortcode with Text
[lwcd display="h:i:s A"] would output hour:minuite:second space capital AM/PM. The colons output as the character they are.
Example: The time is 06:01:07 PM>
Multiple Formats in One Shortcode with Conflicting Text
[lwcd display="Today is the z day of o."] would output jibberish since some of the letters are also recognised formats. You must tell the shortcode not to convert the letter to a date, time, etc but print them as text. To flag the letter as text, insert a
\ before each letter. For simplicity, you can do them all except the ones needed. Another options would be to use two shortcodes.
[lwcd display="Today is the z day of o."] would output UTC202124pm21 0107 2806UTC 54 24pm21 2021f 2021.
[lwcd display="\T\o\d\a\y \i\s \t\h\e z \d\a\y \o\f o."] would output UTC20212421 0107 06UTC 54 2421 2021 2021.
Today is the [lwcd display="z"] day of [lwcd display="o"]. would output Today is the [lwcd display="z"] day of [lwcd display="o"].
d - Day of the month, 2 digits with leading zeros, example 01 to 31
D - A text representation of a day, three letters, exmaple Mon through Sun
j - Day of the month without leading zeros, example 1 to 31
l - (lowercase ‘L’) A full text representation of the day of the week, example Sunday through Saturday
S - English suffix for the day of the month, 2 characters, example st, nd, rd or th.
w - Numeric representation of the day of the week, example 0 (for Sunday) through 6 (for Saturday)
z - The day of the year (starting from 0), example 0 through 365
W - Week number of year, weeks starting on Monday, example 42 (the 42nd week in the year)
L - Whether it’s a leap year, example 1 if it is a leap year, 0 otherwise.
Y - A four digit representation of a year, example 2004
y - A two digit representation of a year, example 04
a - Lowercase Ante meridiem and Post meridiem, example am or pm
A - Uppercase Ante meridiem and Post meridiem, example AM or PM
g - 12-hour format of an hour without leading zeros, example 1 through 12
G - 24-hour format of an hour without leading zeros, example 0 through 23
h - 12-hour format of an hour with leading zeros, example 01 through 12
H - 24-hour format of an hour with leading zeros, example 00 through 23
i - Minutes with leading zeros, example 00 to 59
s - Seconds, with leading zeros, example 00 through 59
e - Timezone identifier, example UTC, GMT, Atlantic/Azores
I - (capital i)Whether or not the date is in daylight saving time, example 1 if Daylight Saving Time, 0 otherwise.
O - Difference to Greenwich time (GMT) in hours, example +0200
P - Difference to Greenwich time (GMT) with colon, example +02:00
T - Timezone abbreviation, example EST, MDT
c - ISO 8601 formatted date, example 2004-02-12T15:19:21+00:00
r - RFC 2822 formatted date, examlpe Thu, 21 Dec 2000 16:01:07 +0200
U - Seconds since the Unix Epoch (January 1 1970 00:00:00 GMT), example
Official vs Minified
This is the official version found within the WordPress repository. It includes all WordPress required files, will receive update notifications through your WordPress Dashboard, and includes a help page in the Dashboard Settings.
This build contains the identical font-end functionality and uses the same shortcodes as the Repository build but has been stripped down to just the minimum. Code contains minimal WordPress required comments, no Dashboard admin page, no unnecessary line breaks or spaces.