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:

  1. «This is my 8th year in this industry […]»
  2. «Our little shop is up and running for 11 years […]»
  3. «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?


To install Magic Dates:

  1. Upload the ‘magic_dates.php’ file into the ‘/wp-content/plugins/’ directory
  2. Activate the plugin through the ‘Plugins’ menu in WordPress
  3. Use the shortcode [magicdate][/magicdate] in the editor to calculate the interval in years
  4. Use the shortcode [magicdays][/magicdays] in the editor to calculate the interval in days


I've been looking for this plugin for a few months now. It's works exactly as advertised. What I'm going to do is apply text over a background div. The end result will look like a graphic but it will update automatically. It's a Years in business graphic.
Does what it says, and does it perfectly! Thank you so much for this plugin and providing it for free! You sir (dev) are a gentleman! Cheers Question, can this be used for auto changing the copyright year? IE: 2016 (auto makes it 2017 next year)
Посмотреть все 4 отзыва

Участники и разработчики

«Magic Dates» — проект с открытым исходным кодом. В развитие плагина внесли свой вклад следующие участники:


Перевести «Magic Dates» на ваш язык.

Заинтересованы в разработке?

Посмотрите код, проверьте SVN репозиторий, или подпишитесь на журнал разработки по RSS.

Журнал изменений


Add days interval calculations between today and a given date


Maintenance Release


Maintenance Release


Initial release