Skip to content

Commit

Permalink
ensure threshold date firmly reaches over 31 days for the month
Browse files Browse the repository at this point in the history
  • Loading branch information
keithamus committed Mar 7, 2023
1 parent f0f5e08 commit 135eaec
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/relative-time.js
Expand Up @@ -270,7 +270,7 @@ suite('relative-time', function () {

suite('[threshold]', function () {
test('switches to dates after 30 past days with default threshold', async () => {
const now = new Date(Date.now() - 31 * 60 * 60 * 24 * 1000).toISOString()
const now = new Date(Date.now() - 32 * 60 * 60 * 24 * 1000).toISOString()
const time = document.createElement('relative-time')
time.setAttribute('lang', 'en-US')
time.setAttribute('datetime', now)
Expand Down

0 comments on commit 135eaec

Please sign in to comment.