-
Notifications
You must be signed in to change notification settings - Fork 184
/
scratch.js
35 lines (30 loc) · 894 Bytes
/
scratch.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
// const spacetime = require('./builds/spacetime.cjs')
import spacetime from './src/index.js'
// console.log(spacetime('Feb 29 2001').iso())
// console.log(spacetime('2001-02-02T12Z').tz)
// console.log(spacetime('', 'Africa/Cairo').timezone())
console.log(spacetime('1970-01-01', 'gmt').isEqual('1970-01-01'))
// console.log(spacetime('1970-01-02', 'gmt').isEqual('1970-01-02'))
// console.log(spacetime('1970-01-02', 'gmt').isEqual('1970-01-01'))
// console.log(spacetime('1970-01-01', 'gmt').isEqual('1970-01-02'))
// let s = spacetime(null, 'pacific/fiji')
// console.log(s.time())
// console.log(s.timezone())
// s = s.minus(5, 'months')
// console.log(s.time())
// console.log(s.timezone())
// s = spacetime(null, 'America/Toronto')
// console.log(s.time())
// console.log(s.timezone())
/*
bahia_banderas
chihuahua
mazatlan
merida
mexico_city
monterrey
amman
damascus
tehran
fiji
*/