- We check if the current day is greater than or equal to the 20th. If true, the deadline is set to the 20th of the next month; otherwise, it’s set to the 20th of the current month.
- The deadline is formatted as
YYYY-MM-20T23:59:59
, ensuring the countdown ends at midnight on the 20th.
Finally, we need to initialize the clock by calling initializeClock()
with the clockdiv
ID and the calculated deadline
: