momento

A vanilla bare bones polyfil for moment.js

jsapi
return lit.utils.momento 
txtUpdated 137.9w ago
{ MsToRelative: [Getter], DatesToRelativeDelta: [Getter] }
jsusage
const {MsToRelative} = lit.utils.momento
const now = Date.now()
const inThePast = 0 - 1000*60*60*24*7
return MsToRelative(inThePast)
txtUpdated 137.9w ago
1w ago
jsusage
const {MsToRelative} = lit.utils.momento
const now = Date.now()
const mtimeMs = lit.stats.local.stat.mtimeMs
return MsToRelative(mtimeMs - now)
txtUpdated 137.9w ago
1m ago

Implementation