
Display a current, past or future date or time that may or may not change during every new visit of the specific page or post.
Shortcode to show any current, past, and future date or time. Display this, previous, or next year, month, day, etc. in your posts and pages.
This is probably the last date and time shortcode plugin you will ever need for your websites since it is very rich in features.
If you need support or more information about this free plugin please see the description and the F.A.Q. section below or write in the Support Forum.
The following shortcodes are included in the free plugin and can be used directly in the content of your WordPress page or post:
September November]]
Oct 3, 2025 10:19 pm
Oct 3, 2025 10:19 pm
Oct 3, 2025
10:19 pm
Oct 3, 2025 10:19 pm
1759519156
2025
,2025
25
10
,10
October
Oct
03
,03
22
,22
19
,19
16
,16
276
31
28
365
5
Friday
Fri
40
pm
Europe/Sofia
- Show date and/or time in the default WordPress format.
- Show date and/or time in custom format using the PHP date and time formatting characters.
- Show date and/or time based on fixed SQL/date/time formats or any relative date and time format. See the Relative Formats section.
- Show year separately as 4 or 2-digit number (e.g. 1999 or 99).
- Show month as number (1-12), full name (January-December) or 3-letter name (Jan-Dec).
- Show day as number with or without leading zero, with or without suffix (st, nd, rd, th).
- Show hour, minutes, seconds with or without leading zero.
- Show day of week as number (1-7), full name (Monday-Sunday) or three letters (Mon-Sun).
- Show the day of the year (1-366).
- Show the week of the year (1-52).
- Show the number of days for the month (28-31).
- Show the number of days in February for the year (28 or 29).
- Show Unix timestamp and the shortcode time-zone.
- Show the first day from a list of next coming weekdays, days of month, or the last day of the current month.
- Add or subtract years, months, days, hours, minutes and/or seconds before showing the final result.
- Set post/page creation or modification time (including GMT variants) as “start” attribute.
You can add the following attributes to Oct 3, 2025 10:19 pm
to show the date and time that you need:
item
– what date and time information to show. The used values are:date-time
– default WP date and time format (default value)date
– default WP date formattime
– default WP time formatcustom
– custom format using the PHP date and time formatting characterstimestamp
– Unix timestampyear
,years
– 4-digit yearyear-short, years-short
– 2-digit yearmonth
,months
– month as number (1-12)month-name
– month as name (January-December)month-name-short
– month as 3-letter name (Jan-Dec)day
,days
– day of monthhour
,hours
– hoursminute
,minutes
– minutessecond
,seconds
– secondsday-of-year
– day of the year as numberdays-in-month
– number of days in the monthdays-in-february
– number of days in the month of February for the yearweekday
– day of the week as number (1-7)weekday-name
– day of the week as full name (Monday-Sunday)weekday-name-short
– day of the week as short 3-letter name (Mon-Sun)week-of-year
– week of year, since first Monday of the year (1-52)am-pm
– shows am/pm or AM/PM according to the am_pm attribute (“L” or “U”)time-zone
– the current time zone for the shortcode result
format
– date format used with the PHP date and time formatting characters only whenitem
is set tocustom
start
– set the basic date and time for the shortcode; defaults to the WordPress time in the current timezone.- initial date and/or time string based on fixed SQL/date/time formats (e.g. 2022-09-16 17:45:53 or Sep 16, 2022 17:45:53) or any relative date and time format (see Relative Formats section).
now
– the default initial current date and time based on the WordPress General settings timezonepost-created
– gets the post/page creation date and timepost-created-gmt
– gets the post/page creation date and time GMTpost-modified
– gets the post/page last modification date and timepost-modified-gmt
– gets the post/page last modification date and time GMT
next
– move the init date and time to the next coming selected (can have more than one value separated by comma)mon
,tue
,wed
,thu
,fri
,sat
,sun
– weekday shortname (and with first letter in uppercase)1
–31
– day of monthlast-day-of-month
– the last day of month – 28, 29, 30 or 31
time_zone
– select the time zone for which to display the result from the available PHP time zones.i18n
– set months and weeks names to be displayed in the current language (‘on’ by default)days_suffix
– set suffix st, nd, rd, th for theday
anddays
item e.g. 1st, 2nd, 3rd, 4th, etc.hours_24
– set 24 or 12 hours formatam_pm
– used with theam-pm
item when 12 hours format is preferred: “L” for lowercase (am, pm) or “U” for uppercase (AM, PM)years
– change in years e.g.years="+1"
oryears="-1"
before showingmonths
– change in months e.g.months="+2"
ormonths="-2"
before showingdays
– change in days e.g.days="+7"
ordays="-7"
before showinghours
– change in hours e.g.hours="+12"
orhours="-12"
before showingminutes
,minutes_change
– change in minutes e.g.minutes="+30"
orminutes="-30"
before showingseconds
,seconds_change
– change in seconds e.g.seconds="+45"
orseconds="-45"
before showingzero
– show loading zero when months, days, hours, minutes and seconds are displayed. Old ones ‘x-zero’ for each separate item are still supported for compatibility.
IMPORTANT: Please always use straight quotes when adding the attributes. The curly/smart ones are not recognized by the WordPress shortcode functions.
Here are few examples of the shortcode/s usage with a variety of attributes and the results. The examples are in the following display format: [shortcode sample] => visible result. The current start date and time (Oct 3, 2025 12:02 pm) is used when the samples have no start date.
Show current date and time in default WordPress format:
Oct 3, 2025 10:19 pm => Oct 3, 2025 12:02 pm
or Oct 3, 2025 10:19 pm => Oct 3, 2025 12:02 pm
or Oct 3, 2025 10:19 pm => Oct 3, 2025 12:02 pm
(The default WordPress date and time format is used.)
Show current date only in the default WordPress format:
Oct 3, 2025 => Oct 3, 2025
or Oct 3, 2025 => Oct 3, 2025
Show current time only in the default WordPress format:
10:19 pm => 12:02 pm
or 10:19 pm => 12:02 pm
Show current date and time with custom format based on the PHP DateTime format symbols:
03 October 2025, 22:19 PM => 03 October 2025, 12:02 PM
Show the time 3 years, 4 months, 5 days, 6 hours, 20 minutes and 30 seconds ago starting from a specific date:
May 11, 2019 11:25:23 am => May 11, 2019 11:25:23 am
Show this, next, previous (last) day of week, work weekday, etc. based on the relative date and time format:
Oct 2, 2025 => Oct 2, 2025
Oct 4, 2025 => Oct 4, 2025
Oct 3, 2025 => Oct 3, 2025
Sep 26, 2025 => Sep 26, 2025
Oct 10, 2025 => Oct 10, 2025
Oct 2, 2025 => Oct 2, 2025
Oct 6, 2025 => Oct 6, 2025
Nov 30, 2025 => Nov 30, 2025
Oct 8, 2025 => Oct 8, 2025
Oct 10, 2025 => Oct 10, 2025
Oct 2, 2025 => Oct 2, 2025
Oct 2, 2025 => Oct 2, 2025
… view more relative formats.
Start with a relative date or fixed date and time in one time-zone and get the final result in another time-zone:
Oct 4, 2025 5:00 am => Oct 4, 2025 5:00 am
Aug 12, 2022 11:00 am => Aug 12, 2022 11:00 am
… view all supported time-zones.
Show post/page creation and modification date and time in European format:
14.12.2019 15:35 => 14.12.2019 15:35
16.4.2025 14:58 => 16.4.2025 14:58
Show 4 and 2-digit year, copyright year, month and day of month:
2025 => 2025
27 => 27
Copyright © 2001-2025 => Copyright © 2001-2025
11 => 11
11 => 11
2 => 2
3rd => 3rd
Show month name (previous, this, and next month):
September => September September
October => October
November => November November
Show month short three letter name (previous, this, and next month):
Sep => Sep
Oct => Oct
Nov => Nov
Show week of the year, day of the year, days in the month, days in February for the year:
40 => 40
276 => 276
31 => 31
28 => 28
365 => 365
Show weekday as number, full name or three letter name:
5 => 5
Friday => Friday
Fri => Fri
Show hours, minutes, seconds and am/pm:
10:19:16 pm => 12:02:26 pm
or much shorter if you can use the PHP date() function format characters
10:19:16 pm => 12:02:26 pm
Show next day, next weekday, or next last day of month from a list (weekly or monthly repeating dates).
Fri, Oct 10 – 19:30 => Fri, Oct 3 – 19:30
Apr 25, 2020 4:00 am => Apr 25, 2020 4:00 am
Oct 7, 2025 6:00 pm => Oct 7, 2025 6:00 pm
05 Apr, 10:00 am => 05 Apr, 10:00 am
From WordPress Dashboard
- Navigate to
Plugins
->Add New
from your WordPress dashboard. - Search for
WP Date and Time Shortcode
and install it. - Activate the plugin.
Manual Installation
- Download the plugin file:
wp-date-and-time-shortcode.zip
. - Unzip the file.
- Upload the
wp-date-and-time-shortcode
folder to your/wp-content/plugins
directory (do not rename the folder). - Activate the plugin from the Plugins menu.
It will start doing its job as soon as you put the shortcode in your page or post. That’s all, folks!
(IN DEVELOPMENT) 3.0 PRO EDITION with an annual subscription plan
WP Date and Time Shortcode is fully FREE and contains all main features that are needed by most users. Check them out!
However, since we want to continue supporting this plugin and adding new non-basic features, we have decided to offer a Pro edition with an annual subscription plan offered at a very (very) affordable price per website. We are working hard to release the Pro edition although it took us a little bit more time to prepare it than expected in the beginning.
Note: All users who have already donated 9 or more EUR to this plugin will get the first year of subscription for 1 website for free. They will be contacted when it is available.
What will you get with WP Date and Time Shortcode Pro in the near future?
- Technical support by [email](mailto:support@denra.com) and Facebook Messenger chat on our [website](https://www.denra.com/). The free version will be supported by the [Support Forum](https://wordpress.org/support/plugin/wp-date-and-time-shortcode/) only.
- JavaScript display of the shortcode result even on cached pages. You won’t need to turn off the caching for any page and post!
- Additional pre-defined date and time initialization values like:
- First visit on the website (saved as cookie, session and user option if possible)
- Last visit on the website (saved as cookie, session and user option if possible)
- Catholic and Orthodox Easter dates
- Passover
- Hanukkah
- Mother’s day
- Father’s day
- Columbus day
- Thanksgiving day
- Black Friday
- Cyber Monday
- Christmas
- New year
- Chinese new year
- and more.
- Additional items and attributes:
- `style` – change font face, color and size;
- `time_zone=”browser”` – modify the shortcode result to the visitor’s time-zone (not 100% accurate since it gets the time-zone by IP address or from browser);
- `counter` – dynamically change displayed values as a ticking text clock;
- Shortcode Wizard – create shortcodes using an easy to use step-by-step wizard.
- Menu Location – change the menu display – main admin menu, settings menu, top menu, or turn off all.
- And more.
IMPORTANT NOTE: Not all Pro features will be released in the first Pro version since more work and testing is needed for some of them.
2.6.9
- Fixed: Notice for incorrect call of _load_textdomain_just_in_time function for the new WordPress versions was removed.
- Improved: Framework compatibility for the fixed notice.
- Improved: Compatibility with WordPress version 6.8.
2.6.8
- Fixed: Possible “vulnerability” when a registered contributor creates post or page content using a Oct 3, 2025 12:02 pm shortcode in it and purposely places a malicious JavaScript code in the post_id attribute. Then if the submitted content is overlooked and published by the administrator or the editor, the inserted JavaScript may run causing an XSS or other issue.
2.6.7
- Removed: The localization code of the Framework for the administration page is leading to a notice in the PHP error log file with the new WordPress 6.7.x versions, so it was removed for now. The localization ability will be restored in a future framework version.
- Improved: Compatibility with WordPress version 6.7.1.
- Added: A reminder for newsletter subscription and donation.
2.6.6
- Improved: Does not throw an error when unknown `time_zone` attribute value is used.
- Other: WordPress 6.6 compatibility.
2.6.5
- Fixed: Some changes in the code to remove deprecation messages related to PHP 8.0+.
2.6.4
- Fixed: Bug fixed in the
next
attribute for some edge cases. - Added: Backward compatibility with version 2.5.3 –
timezone
duplicate item added.
2.6.3
- Added: The missing post ID or post object for the
post_id
attribute when theitem
ispost-created(-gmt)
,post-modified(-gmt)
does not throw a PHP error but shows an understandable message.
2.6.2
- Fixed: A bug with UTC+ or UTC- time zones. Please update if you have that type of time zone set for your website.
2.6.1
- Fixed: Removed a couple of warnings.
2.6
- Fixed: A bug with WordPress default time-zone for relative dates was fixed. The default time-zone works correctly now when a relative date is set in the `start` parameter e.g. today, tomorrow, yesterday, next week, etc.
- Added: A specific time-zone can be used in the `start` attribute e.g. America/New_York, Europe/London, Asia/Tokyo, etc.
- Added: New attribute `time_zone` was added to define for which time-zone the result must be displayed e.g. America/New_York, Europe/London, Asia/Tokyo, etc.
- Added: New `timestamp` parameter for the `item` attribute to show the UNIX timestamp.
- Added: New `time-zone` parameter for the `item` attribute to show the current time-zone for the shortcode result.
- Added: A post ID can be selected with a new `post_id` attribute when `date-created-(gmt)` or `date-modified(-gmt)` is set for `item`.
- Modified: Readme.txt info changes.
- Other: WordPress 6.2 compatibility.
2.5.4
- Fixed: A bug with WordPress default time zone for relative dates was fixed. The default time zone works correctly now when a relative date is set in the `start` parameter e.g. today, tomorrow, yesterday, next week, etc.
- Added: A specific time zone can be used in the `start` attribute e.g. America/New_York, Europe/London, Asia/Tokyo, etc.
- Added: New attribute `time_zone` was added to define for which time zone the result must be displayed e.g. America/New_York, Europe/London, Asia/Tokyo, etc.
- Added: New `timestamp` parameter for the `item` attribute to show the UNIX timestamp.
- Added: New `time-zone` parameter for the `item` attribute to show the current time zone for the shortcode result.
- Added: A post ID can be selected with a new `post_id` attribute when `date-created-(gmt)` or `date-modified(-gmt)` is set for `item`.
- Other: WordPress 6.2 compatibility.
2.5.3
- Other: WordPress 5.5.3 – 6.1 compatibility.
2.5.2
- Modified: Readme.txt info changes.
- Other: WordPress 5.5.2 compatibility.
2.5.1
- Added: Description how to show date and/or time based on any [relative date and time format](https://www.php.net/manual/en/datetime.formats.relative.php).
2.5
- Fixed: Removed Framework warnings on plugin activation and usage.
2.4
- Fixed: There was a bug in the next attribute in some cases when the next day is in the next month. Please update!
- Modified: Changing the shortcode to Oct 3, 2025 12:02 pm instead of Oct 3, 2025 12:02 pm and Oct 3, 2025 12:02 pm. Backward compatibility is supported and old shortcodes will still work but the use of the new one everywhere is strongly recommended.
- Modified: Changing the init attribute to start. Backward compatibility is supported the old init attribute but the use of the new start attribute everywhere is strongly recommended.
- Other: Preparation for the next 3.0 major update.
2.3.1
- Fixed: A critical bug with shortcodes attributes was fixed. Please update!
2.3
- Fixed: A critical bug with some default attributes initialization was fixed. Please update!
- Improved: Added
years-short
alias foryear-short
- Improved: There is only one
zero
attribute now for months, days, hours, minutes and seconds. Old ones ‘x_zero’ are still supported for compatibility. - Other: WordPress 5.4 compatibility.
2.2.1
- Fixed: Item
days-in-month
works even when PHP on server is complied without –enable-calendar option. - Other: WordPress 5.3.2 compatibility.
2.2
- Added: Shortcode item
days-in-year
added. - Added: Shortcode duplicate/alias item
date-time
for itemdatetime
. - Added:
next
attribute that helps in displaying the next date from a list of weekdays, days of month, or the last day of the current month. - Improved: Framework update and bug fixes.
2.1.1
- Fixed:
week-of-year
item not showing correctly.
2.1
- Framework update and bug fixes.
2.0
- Added: Denra Plugins Framework 1.0.
- Added: Feature to set the
init
attribute from page/post creation or modification time.
1.2
- Added: Shorter version for the
_change
attributes removing the_change
part.
1.1
- Added: More shortcodes for easier and faster use by missing the
item
attribute.
1.0.1
- Fixed: A couple of bug fixes after the initial release
1.0
- Initial release
Frequently Asked Questions (F.A.Q)
Please make sure that you are using only straight double quotes (“) and not curly/smart ones(„“) for the attributes. The curly ones are not recognized by the shortcode functions. If you are using the straight quotes only and you are still having issues please contact us for support.
If you are using a caching plugin you may need to exclude the page or post with the shortcode from it so the content may be generated dynamically. If you are using the init
attribute with a fixed initial value you may also block the change of the shortcode result if needed.
As we were improving the plugin we found out the `Oct 3, 2025 10:19 pm` shortcode will be much more recognizable and easier to use by everyone so we decided to change to it. We strongly recommend the use of the new `Oct 3, 2025 10:19 pm` shortcode although backward compatibility for `Oct 3, 2025 10:19 pm` or `Oct 3, 2025 10:19 pm` is supported.
We have completed the development of Free edition of this plugin and it has a big number of features which may cover every basic need. In future we will be only supporting it for WordPress version compatibility and bugs. However we will be releasing a Pro edition soon with an annual subscription plan and it will have many new features. Please send all your suggestions and ideas to our e-mail address and they may be developed and included in the paid product in future. Please note that if you have suggested a new feature and it is implemented you will get a one year subscription for 1 website for free.