Difference between revisions of "Template:Counter"
Jump to navigation
Jump to search
Little Owl (talk | contribs) |
Little Owl (talk | contribs) |
||
Line 33: | Line 33: | ||
| {{Counter|{{#time:Y-m-d H:00:00|now}}|1}} | | {{Counter|{{#time:Y-m-d H:00:00|now}}|1}} | ||
|- | |- | ||
| Chris last did something | | Chris last did something yesterday, and the previous streak was not recorded. | ||
| <code><nowiki>{{Counter|</nowiki>{{#time:Y-m-d H:00:00|now - 1 day}}<nowiki> | | <code><nowiki>{{Counter|</nowiki>{{#time:Y-m-d H:00:00|now - 1 day}}<nowiki>|0}}</nowiki></code> or<br/><code><nowiki>{{Counter|</nowiki>{{#time:Y-m-d H:00:00|now - 1 day}}<nowiki>}}</nowiki></code> | ||
| {{Counter|{{#time:Y-m-d H:00:00|now - 1 day}} | | {{Counter|{{#time:Y-m-d H:00:00|now - 1 day}}}} | ||
|- | |- | ||
| Chris last did something just now, and the previous streak was not recorded. | | Chris last did something just now, and the previous streak was not recorded. | ||
| <code><nowiki>{{Counter|</nowiki>{{#time:Y-m-d H:00:00|now}}<nowiki>|0}}</nowiki></code> | | <code><nowiki>{{Counter|</nowiki>{{#time:Y-m-d H:00:00|now}}<nowiki>|0}}</nowiki></code> or<br/><code><nowiki>{{Counter|</nowiki>{{#time:Y-m-d H:00:00|now}}<nowiki>}}</nowiki></code> | ||
| {{Counter|{{#time:Y-m-d H:00:00|now}}|0}} | | {{Counter|{{#time:Y-m-d H:00:00|now}}|0}} | ||
|} | |} | ||
[[Category:Front page templates]]</noinclude> | [[Category:Front page templates]]</noinclude> |
Revision as of 02:26, 25 July 2021
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 September 2024 (for the big counter). | {{Counter|2024-09-24 01:00:00|big=yes}}
|
61 |
Chris last did something on 24 September 2024. | {{Counter|2024-09-24 01:00:00}}
|
61 days |
Chris last did something on 24 October 2024, and the previous streak was 15 days ago. | {{Counter|2024-10-24 01:00:00|15}}
|
31 days |
Chris last did something on 24 November 2024, and the previous streak was 15 days ago. | {{Counter|2024-11-24 01:00:00|15}}
|
15 days |
Chris last did something on 24 November 2024, and the previous streak was 1 day ago. | {{Counter|2024-11-24 01:00:00|1}}
|
1 day |
Chris last did something yesterday, and the previous streak was not recorded. | {{Counter|2024-11-23 01:00:00|0}} or{{Counter|2024-11-23 01:00:00}}
|
1 day |
Chris last did something just now, and the previous streak was not recorded. | {{Counter|2024-11-24 01:00:00|0}} or{{Counter|2024-11-24 01:00:00}}
|
0 days |