Template:M-timer
This template is designed to provide a timer function, which can display the required display content within the specified regular time.
This template has 5 parameters:
- from: The time format used to set the start time of the timer.
- to: The time format used to declare the end time of the set timing
- todo: The content to be displayed when the point is not yet reached. (event has not started yet)
- doing: The content to be displayed in the timed period. (activity in progress)
- done: the content to be displayed after the timer ends, (the event has ended)
example:
Specify a single point in time: {{m-timer |from=2021-1-1-1 |todo=Event hasn't started yet|doing=Activitying|done=Done }}
Done
Specify a time period: {{m-timer |from=2020-1-1-15|to=2021-1-1-15 |todo=Event hasn't started yet|doing=Activitying|done=Done }}
Done
{{m-timer |from=2030-1-11-15 |todo=Event hasn't started yet|doing=Activitying|done=Done }}
Event hasn't started yet
{{m-timer |from=2021-1-1-15|to=2021-1-15-15 |todo=Event hasn't started yet|doing=Activitying|done=Done }}
Done
Use the wildcard ** to automatically match all intervals. The code in the example means that every day in January 2121 after 1 o'clock and after 23 o'clock {{m-timer |from=2021-1-**-1 |todo=Event hasn't started yet|doing=Activitying|done=Done }} {{m-timer |from=2021-1-**-23 |todo=Event hasn't started yet|doing=Activitying|done=Done }}
{{m-timer |from=2021-1-**-1 |todo=Event hasn't started yet|doing=Activitying|done=Done }
Done