@nerdbond/time
v0.0.1
Published
<br/> <br/> <br/> <br/> <br/> <br/> <br/>
Downloads
9
Readme
Usage
import time from '@nerdbond/time'
show('15th century bce') // { year: -70, century: -34 }
show('15th century') // { year: -70, century: 15 }
show('1500') // { year: -470 }
show('5mya') // { million: -5 }
show('4bya') // { billion: -4 }
show('145kya') // { thousand: -145 }
show('1500') // { year: -470 }
function show(expression) {
const data = time.point(expression)
if (data) {
const map: Record<string, number> = {}
for (const name in data) {
if (data[name]) {
map[name] = data[name]
}
}
console.log(map)
}
}
License
MIT
Notes
- https://en.wikipedia.org/wiki/Epoch_(astronomy)
NerdBond
This is being developed by the folks at NerdBond, a California-based project for helping humanity master information and computation. Find us on Twitter, LinkedIn, and Facebook. Check out our other GitHub projects as well!