Magic Dates

If you are like me, you are probably responsible for updating content in (some) of your clients’ sites. Have you ever had pieces of content like these:
- “This is my 8th year in this industry […]”
- “Our little shop is up and running for 11 years […]”
- “9 years ago we decided to open our shop […]”
Then, at some point next year your client calls and tells you to update the “11 years” to “12 years”. Wouldn’t be great if these number could be auto-increased?
And that’s where “Magic Dates” comes to play.
How to use it:
Whenever you find yourself writing content in the editor, at the moment that you need an auto-increased number of years use the plugin like this:
(Example current year: 2020)
[magicdate]2005[/magicdate] => This will produce 15
If you want an ordinal number (1st, 2nd, 3rd etc) use it like this:
[magicdate ordinalize=’true’]2008[/magicdate] => This will produce 12th
Use the [magicdays]YYYY-mm-dd[/magicdays] shortcode to calculate the number of days between today and the given date
Easy eh?
Download & install the zip archive
The plugin package installer can be downloaded from the WP2E project tab called “code”.
1 – Select the version to download if this option is available otherwise the “latest” version of the main plugin will be used.
2 – After downloading the zip archive install the plugin package installer in you local environment and activate the script from the plugin list.
3 – Under the section “Plugins” of the admin dashboard you should see a new “Dependencies & Licenses” link. Follow the instructions from this panel to finalize the installation of the missing dependencies.
- Give a name to your project
- Download the Installer Package
- Install & activate the plugin locally
- Install the suggested dependencies
Tips: Use the WP2E panel to add/suggest new dependencies to the local installation. Press F5 in the list of dependencies if the changes are not displayed right away.



