We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent eedbd41 commit cc554ceCopy full SHA for cc554ce
test/relative-time.js
@@ -561,6 +561,17 @@ suite('relative-time', function () {
561
await Promise.resolve()
562
assert.equal(time.shadowRoot.textContent, '1d')
563
})
564
+
565
+ test('micro formats months', async () => {
566
+ const datetime = new Date()
567
+ datetime.setMonth(datetime.getMonth() - 2)
568
+ const time = document.createElement('relative-time')
569
+ time.setAttribute('tense', 'past')
570
+ time.setAttribute('datetime', datetime)
571
+ time.setAttribute('format', 'micro')
572
+ await Promise.resolve()
573
+ assert.equal(time.shadowRoot.textContent, '2mo')
574
+ })
575
576
577
suite('[tense=future]', function () {
0 commit comments