Skip to content

Commit f6cd294

Browse files
Merge pull request #456 from spencermountain/dev
7.11.0rc
2 parents 93e8fc8 + c294cf0 commit f6cd294

12 files changed

Lines changed: 732 additions & 885 deletions

builds/spacetime.cjs

Lines changed: 261 additions & 255 deletions
Large diffs are not rendered by default.

builds/spacetime.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

builds/spacetime.mjs

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

changelog.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,14 @@ This project follows semVer, where:
99
1010
-->
1111

12+
### 7.11.0 [Sep 2025]
13+
- **[fix]** - millennium API typo (w/ backward compat)
14+
- **[update]** - update CICD script
15+
- **[update]** - Update Kazakhstan timezones to UTC+5
16+
- **[update]** - add Coyhaique iana code
17+
- **[update]** - nuuk and scoresbysund dst changes
18+
- **[update]** - dependencies
19+
1220
### 7.10.0 [Apr 2025]
1321
- **[fix]** - capitalization of "Etc/Utc" #446
1422
- **[new]** - `.isoFull()` method

package-lock.json

Lines changed: 396 additions & 558 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "spacetime",
3-
"version": "7.10.0",
3+
"version": "7.11.0",
44
"description": "figure-out dates across timezones",
55
"main": "src/index.js",
66
"unpkg": "builds/spacetime.min.js",
@@ -52,24 +52,24 @@
5252
"printWidth": 100
5353
},
5454
"devDependencies": {
55-
"@types/node": "22.14.1",
55+
"@types/node": "24.5.2",
5656
"@types/tape": "5.8.1",
5757
"codecov": "3.8.3",
58-
"eslint-plugin-regexp": "2.7.0",
58+
"eslint-plugin-regexp": "2.10.0",
5959
"nyc": "17.1.0",
60-
"rollup": "4.40.0",
60+
"rollup": "4.52.3",
6161
"rollup-plugin-commonjs": "10.1.0",
6262
"rollup-plugin-filesize-check": "1.2.0",
6363
"rollup-plugin-json": "^4.0.0",
6464
"rollup-plugin-node-resolve": "5.2.0",
6565
"rollup-plugin-terser": "7.0.2",
66-
"shelljs": "0.9.2",
66+
"shelljs": "0.10.0",
6767
"tap-dancer": "0.3.4",
6868
"tape": "5.9.0",
6969
"timekeeper": "2.3.1",
7070
"tslib": "2.8.1",
71-
"tsx": "4.19.3",
72-
"typescript": "5.8.3"
71+
"tsx": "4.20.6",
72+
"typescript": "5.9.2"
7373
},
7474
"license": "Apache-2.0"
7575
}

scratch.js

Lines changed: 2 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -2,56 +2,7 @@ import spacetime from './src/index.js'
22

33
// console.log(spacetime('Feb 29 2001').iso())
44

5-
//
6-
// let s = spacetime('1995-12-07T03:24:30', 'Africa/Cairo')
7-
// s = s.timezone('America/Toronto')
8-
// console.log(s.iso())
9-
10-
11-
12-
let mils = 1744200453183
13-
let secs = 1744200453
14-
155
let s = spacetime('jan 5 2028 4:30pm')
16-
console.log(s.epochSeconds());
17-
console.log(s.iso());
18-
19-
20-
21-
// let s = spacetime("foobar", 'UTC')
22-
// console.log(s.time())
23-
// console.log(s.epoch)
24-
// console.log(s.year())
25-
const arr = [
26-
'millisecond',
27-
'second',
28-
'minute',
29-
'hour',
30-
'hourFloat',
31-
'hour12',
32-
'time',
33-
'ampm',
34-
'dayTime',
35-
'iso',
36-
'epochsecs',
37-
'date',
38-
'day',
39-
'dayName',
40-
'dayOfYear',
41-
'week',
42-
'month',
43-
'monthName',
44-
'quarter',
45-
'season',
46-
'year',
47-
'era',
48-
'decade',
49-
'century',
50-
'millenium',
51-
]
52-
// arr.forEach(fn => {
53-
// console.log(s[fn](), fn)
54-
// })
6+
console.log(s.millenium());
7+
console.log(s.millennium());
558

56-
// console.log(s.epochsecs(), 1735689600)
57-
// console.log(s.epochsecs() == 1735689600)

src/_version.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
export default '7.10.0'
1+
export default '7.11.0'

test/kazakhstan-timezones.test.js

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
import test from 'tape'
2+
import spacetime from './lib/index.js'
3+
4+
test('kazakhstan-timezones-utc5', (t) => {
5+
// After March 1, 2024, all Kazakhstan timezones should be UTC+5
6+
// Testing with a date after the transition
7+
const date = '2024-06-15T12:00:00'
8+
9+
const kazakhstanTimezones = [
10+
'Asia/Almaty',
11+
'Asia/Qyzylorda',
12+
'Asia/Qostanay',
13+
'Asia/Aqtau',
14+
'Asia/Aqtobe',
15+
'Asia/Atyrau',
16+
'Asia/Oral'
17+
]
18+
19+
kazakhstanTimezones.forEach(tz => {
20+
const s = spacetime(date, tz)
21+
const offset = s.timezone().current.offset
22+
t.equal(offset, 5, `${tz} should have offset 5 (UTC+5), got ${offset}`)
23+
})
24+
25+
t.end()
26+
})
27+
28+
test('kazakhstan-timezone-names', (t) => {
29+
// Test that Kazakhstan timezone names are properly recognized
30+
const s1 = spacetime.now('Asia/Almaty')
31+
t.ok(s1.timezone().name, 'Asia/Almaty should be recognized')
32+
33+
const s2 = spacetime.now('Asia/Qyzylorda')
34+
t.ok(s2.timezone().name, 'Asia/Qyzylorda should be recognized')
35+
36+
const s3 = spacetime.now('Asia/Qostanay')
37+
t.ok(s3.timezone().name, 'Asia/Qostanay should be recognized')
38+
39+
t.end()
40+
})

test/smoke.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ test('random january time', (t) => {
108108
['Africa/Abidjan', 'Jan 29 12:09pm'],
109109
['America/Inuvik', 'Jan 29 5:09am'],
110110
['America/Lima', 'Jan 29 7:09am'],
111-
['Asia/Almaty', 'Jan 29 6:09pm'],
111+
['Asia/Almaty', 'Jan 29 5:09pm'],
112112
['Asia/Barnaul', 'Jan 29 7:09pm'],
113113
['Asia/Urumqi', 'Jan 29 6:09pm'],
114114
['Asia/Tbilisi', 'Jan 29 4:09pm'],

0 commit comments

Comments
 (0)