Date counter

Описание

Счётчик дат – это всего лишь 9-килобайтный плагин WordPress.

Легко отображайте текущую дату или рассчитывайте разницу между двумя датами.

Текущая дата и время

Current date & time: [CurrentDatetime format="d/m/Y H:i"].
Current date & time: 05.07.2021 12:48.

[CurrentDatetime format="jS F, Y"].
6th July, 2021.

It's [CurrentDatetime format="g:i A (e)"].
It's 10:35 AM (UTC).

Все возможные форматы вы можете найти в документации.

Разница в дате и времени

I'm [DatetimeDifference startDate="1998-08-25" endDate="now" format="Y"] years old.
I'm 23 years old now.

[DatetimeDifference startDate="31.12.2020" endDate="now" format="a"] days have passed since the new year.
187 days have passed since the new year.

Tomorrow's trip at 14:35 (2:35 PM) starts in [DatetimeDifference startDate="now" endDate="07.07.2021 14:35" format="h hours & i minutes"].
Tomorrow's trip at 14:35 (2:35 PM) starts in 8 hours & 34 minutes.

Все возможные форматы вы можете найти в документации.

Общая дата и разница во времени

The store will open in [TotalDatetimeDifference startDate="now" endDate="16.07.2021 8:00" format="i"] minutes today.
The store will open in 19 minutes today.

[TotalDatetimeDifference startDate="now" endDate="25.08.2025" format="d"] days left until my b-day.
39 days left until my b-day.

Все возможные форматы можно найти в документация.

🤘Extra

Shift from today’s date: ± N days | ± N weeks | ± N months | ± N years

[DatetimeDifference startDate="now" endDate="+1day" format="d"]
[TotalDatetimeDifference startDate="-3years" endDate="now" format="d"]

Post created & modified date

[DatetimeDifference startDate="post:created" endDate="now" format="d"]
[TotalDatetimeDifference startDate="now" endDate="post:modified" format="d"]

Установка

  1. Загрузите файлы плагина в директорию /wp-content/plugins/date-counter или установите плагин через вкладку «Плагины».
  2. Активируйте плагин во вкладке «Плагины» в WordPress
  3. Разместите шорткод.

Отзывы

15.07.2021 9 ответов
Love it, but would like the option to count all minutes or hours from a specified date.
22.03.2021
Amazing easy to setup plugin. I was able to achieve exactly what I wanted with this plugin. Now on my front page at pipeworkpieces.com for potential customers I am able to easily change this from the back end based on my amount of orders. IMPORTANT NOTES: Delivery on items are 2 -4 weeks based on current orders in production and orders are scheduled to be made as they come in. If you place your order for your piece today your piece is guaranteed to be ready for shipping on Mon, Apr 12 . Great plugin
07.10.2019
I have been looking for something like this for a long time! Thank you very much for such a great job!
04.06.2019
Just as I needed. I made a little changed in code to seperate each digit and add extra own css to present number of days always as typical counter 🙂
08.11.2018 1 ответ
Thank you very much for the most amazing plugin. I was searching like mad for this feature online, I searched everywhere for the last 3 days and finally, I came on wordpress.org and I was so lucky to find your plugin. Thanks a lot again. God Bless You. Vashax
Посмотреть все 7 отзывов

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

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

Участники

«Date counter» переведён на 8 языков. Благодарим переводчиков за их работу.

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

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

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

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

2.0.3

Fixed exception messages in DatetimeDifference and TotalDatetimeDiffrence classes. Added support for creation and modification dates of the current post.

2.0.0

Плагин переработан: добавлены новые возможности и упрощен общий рабочий процесс.

1.0.4

Добавлена поддержка часовых зон. Теперь вы можете изменять часовую зону в настройках WordPress.

1.0.2

1.0.1

  • Первая версия плагина счетчика даты.