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 (January 19, 2026 6:32 pm) is used when the samples have no start date – January 31, 2026 10:00 am.
[[wpdts-custom start="post-created" format="Y"]] [[wpdts-time-zone start="post-created"]]=> 2023 Europe/Bratislava
Show current date and time in default WordPress format:
[[wpdts]] => January 19, 2026 6:32 pm
or [[wpdts item="date-time"]] => January 19, 2026 6:32 pm
or [[wpdts-date-time]] => January 19, 2026 6:32 pm
(The default WordPress date and time format is used.)
Show current date only in the default WordPress format:
[[wpdts item="date"]] => January 19, 2026
or [[wpdts-date]] => January 19, 2026
Show current time only in the default WordPress format:
[[wpdts item="time"]] => 6:32 pm
or [[wpdts-time]] => 6:32 pm
Show current date and time with custom format based on the PHP date() function symbols:
[[wpdts-custom format="d F Y, H:i A"]] => 19 January 2026, 18:32 PM
Show the time 3 years, 4 months, 5 days, 6 hours, 20 minutes and 30 seconds ago starting from a specific date:
[[wpdts-custom format="M j, Y H:i:s a" start="2019-09-16 17:45:53" years="-3" months="-4" days="-5" hours="-6" minutes="-20" seconds="-30"]] => May 11, 2016 11:25:23 am
Show this, next, previous (last) day of week, work weekday, etc. based on the relative date and time format:
[[wpdts-date start="yesterday"]] => January 18, 2026
[[wpdts-date start="tomorrow"]] => January 20, 2026
[[wpdts-date start="this week friday"]] => January 23, 2026
[[wpdts-date start="last week friday"]] => January 16, 2026
[[wpdts-date start="next week friday"]] => January 30, 2026
[[wpdts-date start="last weekday"]] => January 16, 2026
[[wpdts-date start="next weekday"]] => January 20, 2026
[[wpdts-date start="last day of next month"]] => February 28, 2026
… view more relative formats.
Show post/page creation and modification date and time in European format:
[[wpdts-custom start="post-created" format="j.n.Y G:i"]] => 18.3.2023 19:07
[[wpdts-custom start="post-modified" format="j.n.Y G:i"]] => 29.5.2023 19:37
Show 4 and 2-digit year, copyright year, month and day of month:
[[wpdts-year]] => 2026
[[wpdts-year-short years="+2"]] => 28
Copyright © 2001-[[wpdts-year]] => Copyright © 2001-2026
[[wpdts-month months="+1"]] => 02
[[wpdts-month months="+1" zero="no"]] => 2
[[wpdts-day days="-1" zero="no"]] => 18
[[wpdts-day zero="no" days_suffix="yes"]] => 19th
Show month name (previous, this, and next month):
[[wpdts-month-name months="-1"]] => December
[[wpdts-month-name]] => January
[[wpdts-month-name months="+1"]] => February
Show month short three letter name (previous, this, and next month):
[[wpdts-month-name-short months="-1"]] => Dec
[[wpdts-month-name-short]] => Jan
[[wpdts-month-name-short months="+1"]] => Feb
Show week of the year, day of the year, days in the month, days in February for the year:
[[wpdts-week-of-year]] => 04
[[wpdts-day-of-year]] => 19
[[wpdts-days-in-month]] => 31
[[wpdts-days-in-february]] => 28
[[wpdts-days-in-year]] => 365
Show weekday as number, full name or three letter name:
[[wpdts-weekday]] => 1
[[wpdts-weekday-name]] => Monday
[[wpdts-weekday-name-short]] => Mon
Show hours, minutes, seconds and am/pm:
[[wpdts-hours hours_24="no" zero="no"]]:[[wpdts-minutes]]:[[wpdts-seconds]] [[wpdts item="am-pm"]] => 6:32:08 pm
or much shorter if you can use the PHP date() function format characters
[[wpdts-custom format="g:i:s a"]] => 6:32:08 pm
Show next day, next weekday, or next last day of month from a list (weekly or monthly repeating dates).
[[wpdts-custom format="D, M j – H:i" next="Fri 19:30"]] => Fri, Jan 23 – 19:30
[[wpdts-date-time start="2020-04-25 03:03:03" next="Sat 4:00, Sun 11:00"]] => April 25, 2020 4:00 am
[[wpdts-date-time next="1, 14, 20, tue 18:00, thu 18:00, last-day-of-month 16:00"]] => January 20, 2026 6:00 pm
[[wpdts-custom start="2020-04-05 10:00:00" format="d M, g:i a" next="5 10:00, 10 11:00, 15 10:30, 20 10:30, 25 10:40, 30 15:15"]] => 05 Apr, 10:00 am