In our use case, we had a countdown until the start of October. Now that we are in October, the expectation was that the countdown date would show a value of 0.
Instead, it gives the negative value of time since it expired, at the time the page loaded. Refreshing the page will change the value.
The date-count-up option looks like it's working properly as intended currently, so we may just need another option that can be set to have when-ended="stop" have the value return 0 after the timer has elapsed in the past.
Add these amp-date-countdown elements that count down until the Y2K issue occurs and see if they behave as expected, and wonder how we should set a stopped clock at 0:
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions.
Description
https://amp.dev/documentation/components/amp-date-countdown/ does not clarify what should happen for an amp-date-countdown time that has expired.
In our use case, we had a countdown until the start of October. Now that we are in October, the expectation was that the countdown date would show a value of 0. Instead, it gives the negative value of time since it expired, at the time the page loaded. Refreshing the page will change the value.
The date-count-up option looks like it's working properly as intended currently, so we may just need another option that can be set to have when-ended="stop" have the value return 0 after the timer has elapsed in the past.
Reproduction Steps
Using the AMP playground for amp-date-countdown: https://playground.amp.dev/?url=https%3A%2F%2Fpreview.amp.dev%2Fdocumentation%2Fexamples%2Fcomponents%2Famp-date-countdown&format=websites&_gl=1*2cbo5p*_ga*YW1wLV9fMTBORjE2UzRUNXRGZDJSV1Z4S2c.
Add these amp-date-countdown elements that count down until the Y2K issue occurs and see if they behave as expected, and wonder how we should set a stopped clock at 0:
Relevant Logs
No response
Browser(s) Affected
Chrome, Firefox, Safari, Edge, UC Browser
OS(s) Affected
No response
Device(s) Affected
No response
AMP Version Affected
2109102127000