U
U
unlik2016-04-01 00:50:45
PHP
unlik, 2016-04-01 00:50:45

Cyclic timer?

Who can tell me how to make such a timer. The countdown should start on the 1st of each month, should count down 3 days. Then reset and count again.
The price should increase every 3 days starting from the 1st of the month.
We need a timer that will count how much is left before the increase.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Saboteur, 2016-04-01
@saboteur_kiev

What is the task and why?
So use cron.
on the first day, reset the price
to 3,5,8,11, and so on, run the price increase script and save somewhere the timestamp from this date +3 days.
Display the counter from the timestamp minus the current date on the site - you get a countdown timer.

A
Andrey, 2016-04-01
@AndryG

Isn't it easier to calculate the price if you know the date the initial price was set and the current time?

The price increases every 3 days starting from the 1st of the month.
I'm at a loss to suggest further. It is difficult to guess what how much should be counted.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question