Template:Counter

From CWCki
Jump to navigation Jump to search

This template automates the big counter and the previous streak: if the current streak breaks the record, this template will handle this for you.

For use in both Begging and Coping counters.

Examples

Scenario Input Output
Chris last did something on 24 November 2022 (for the big counter). {{Counter|2022-11-24 04:00:00|big=yes}} 61
Chris last did something on 24 November 2022. {{Counter|2022-11-24 04:00:00}} 61 days
Chris last did something on 24 December 2022, and the longest streak was 15 days. {{Counter|2022-12-24 04:00:00|15}} 31 days
Chris last did something on 24 January 2023, and the longest streak was 15 days. {{Counter|2023-01-24 04:00:00|15}} 15 days
Chris last did something on 24 January 2023, and the longest streak was one day. {{Counter|2023-01-24 04:00:00|1}} 1 day
Chris last did something yesterday, and the longest streak was not recorded. {{Counter|2023-01-23 04:00:00|0}} or
{{Counter|2023-01-23 04:00:00}}
1 day
Chris last did something just now, and the longest streak was not recorded. {{Counter|2023-01-24 04:00:00|0}} or
{{Counter|2023-01-24 04:00:00}}
0 days