@northguild/gmt 1.14.2 → 1.15.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +43 -13
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/plain/calculate/diffDateAsDuration.js +1 -1
- package/dist/plain/calculate/index.d.ts +2 -1
- package/dist/plain/calculate/index.js +2 -1
- package/dist/plain/calculate/{weekOfYear.d.ts → weekOfYearForDate.d.ts} +0 -14
- package/dist/plain/calculate/weekOfYearForDate.js +28 -0
- package/dist/plain/calculate/weekOfYearForDateTime.d.ts +14 -0
- package/dist/plain/calculate/{weekOfYear.js → weekOfYearForDateTime.js} +1 -27
- package/dist/plain/format/formatCalendar.d.ts +2 -2
- package/dist/plain/format/formatDate.d.ts +3 -2
- package/dist/plain/format/formatDate.js +1 -1
- package/dist/plain/format/formatDateRange.d.ts +3 -2
- package/dist/plain/format/formatDateRange.js +1 -1
- package/dist/plain/format/formatDateTime.d.ts +3 -2
- package/dist/plain/format/formatDateTime.js +1 -1
- package/dist/plain/format/formatDateTimeRange.d.ts +3 -2
- package/dist/plain/format/formatDateTimeRange.js +1 -1
- package/dist/plain/format/formatDateTimeToParts.d.ts +3 -2
- package/dist/plain/format/formatDateTimeToParts.js +1 -1
- package/dist/plain/format/formatDateToParts.d.ts +3 -2
- package/dist/plain/format/formatDateToParts.js +1 -1
- package/dist/plain/format/formatRelativeDate.d.ts +3 -14
- package/dist/plain/format/formatRelativeDateTime.d.ts +3 -14
- package/dist/plain/format/formatRelativeTime.d.ts +3 -14
- package/dist/plain/format/formatTime.d.ts +2 -1
- package/dist/plain/get/getNowUnit.d.ts +2 -3
- package/dist/plain/interval/splitIntervalByUnitDate.js +1 -1
- package/dist/regex/calendar-date.d.ts +19 -0
- package/dist/regex/calendar-date.js +19 -10
- package/dist/regex/calendar-zoned-date-time.d.ts +45 -0
- package/dist/regex/calendar-zoned-date-time.js +45 -40
- package/dist/regex/date-time.d.ts +18 -0
- package/dist/regex/date-time.js +18 -1
- package/dist/regex/date.d.ts +16 -0
- package/dist/regex/date.js +16 -1
- package/dist/regex/http-date.d.ts +15 -0
- package/dist/regex/http-date.js +15 -6
- package/dist/regex/leap-second.d.ts +12 -0
- package/dist/regex/leap-second.js +12 -1
- package/dist/regex/rfc-2822.d.ts +18 -0
- package/dist/regex/rfc-2822.js +18 -8
- package/dist/regex/rfc-3339.d.ts +19 -0
- package/dist/regex/rfc-3339.js +19 -6
- package/dist/regex/sql-date-time.d.ts +14 -0
- package/dist/regex/sql-date-time.js +14 -6
- package/dist/regex/time-zone-like.d.ts +21 -0
- package/dist/regex/time-zone-like.js +21 -0
- package/dist/regex/time.d.ts +59 -0
- package/dist/regex/time.js +59 -3
- package/dist/regex/unix.d.ts +21 -0
- package/dist/regex/unix.js +21 -0
- package/dist/regex/utc-date-time.d.ts +20 -0
- package/dist/regex/utc-date-time.js +20 -1
- package/dist/types/calendar-options.d.ts +11 -0
- package/dist/types/calendar-options.js +0 -0
- package/dist/types/datetime-format-options.d.ts +6 -0
- package/dist/types/datetime-format-options.js +0 -0
- package/dist/types/duration-unit.d.ts +5 -0
- package/dist/types/duration-unit.js +0 -0
- package/dist/types/index.d.ts +11 -0
- package/dist/types/index.js +11 -0
- package/dist/types/now-unit.d.ts +5 -0
- package/dist/types/now-unit.js +0 -0
- package/dist/types/relative-date-time-unit.d.ts +6 -0
- package/dist/types/relative-date-time-unit.js +0 -0
- package/dist/types/relative-date-unit.d.ts +5 -0
- package/dist/types/relative-date-unit.js +0 -0
- package/dist/types/relative-time-options.d.ts +18 -0
- package/dist/types/relative-time-options.js +0 -0
- package/dist/types/relative-time-unit.d.ts +5 -0
- package/dist/types/relative-time-unit.js +0 -0
- package/dist/types/relative-unit.d.ts +6 -0
- package/dist/types/relative-unit.js +0 -0
- package/dist/types/unix-now-unit.d.ts +5 -0
- package/dist/types/unix-now-unit.js +0 -0
- package/dist/types/utc-now-unit.d.ts +5 -0
- package/dist/types/utc-now-unit.js +0 -0
- package/dist/unix/calculate/startOrEndOfUnix.d.ts +18 -0
- package/dist/unix/calculate/startOrEndOfUnix.js +18 -0
- package/dist/unix/format/formatCalendarUnix.d.ts +27 -1
- package/dist/unix/format/formatRelativeUnix.d.ts +1 -8
- package/dist/unix/format/formatUnix.d.ts +19 -0
- package/dist/unix/format/formatUnix.js +19 -0
- package/dist/unix/get/getUnixNowUnit.d.ts +2 -3
- package/dist/unix/parse/parseUnitFromUnix.d.ts +24 -0
- package/dist/unix/validate/isValidUnixUnit.d.ts +15 -0
- package/dist/utc/calculate/startOrEndOfUtc.d.ts +17 -0
- package/dist/utc/calculate/startOrEndOfUtc.js +17 -0
- package/dist/utc/format/formatCalendarUtc.d.ts +2 -2
- package/dist/utc/format/formatRelativeUtc.d.ts +2 -12
- package/dist/utc/format/formatUtc.d.ts +33 -0
- package/dist/utc/format/formatUtc.js +17 -0
- package/dist/utc/get/getUtcNowUnit.d.ts +2 -3
- package/dist/utc/parse/parseUnitFromUtc.d.ts +23 -0
- package/dist/zoned/format/formatRelativeZoned.d.ts +1 -8
- package/dist/zoned/format/formatTimeZoneName.d.ts +15 -0
- package/dist/zoned/format/formatZonedDateTime.d.ts +2 -1
- package/dist/zoned/format/formatZonedRange.d.ts +2 -1
- package/dist/zoned/format/formatZonedToParts.d.ts +2 -1
- package/dist/zoned/get/getDstTransitions.d.ts +18 -2
- package/dist/zoned/get/getZonedNowUnit.d.ts +24 -0
- package/dist/zoned/interval/intervalDifferenceZoned.d.ts +3 -3
- package/dist/zoned/interval/intervalDifferenceZoned.js +3 -3
- package/dist/zoned/interval/intervalXorZoned.d.ts +6 -4
- package/dist/zoned/interval/intervalXorZoned.js +6 -4
- package/dist/zoned/parse/getZonedOffsetAs.d.ts +11 -0
- package/dist/zoned/parse/parseUnitFromZoned.d.ts +24 -0
- package/package.json +25 -7
- package/skills/gmt-arithmetic/SKILL.md +83 -0
- package/skills/gmt-basics/SKILL.md +80 -0
- package/skills/gmt-integration/SKILL.md +73 -0
- package/skills/gmt-timezone/SKILL.md +80 -0
- package/skills/_artifacts/domain_map.yaml +0 -547
- package/skills/_artifacts/skill_spec.md +0 -67
- package/skills/_artifacts/skill_tree.yaml +0 -278
- package/skills/api-expansion-workflow/SKILL.md +0 -52
- package/skills/app-integration/SKILL.md +0 -38
- package/skills/calculate-dates/SKILL.md +0 -432
- package/skills/compare-dates/SKILL.md +0 -412
- package/skills/convert-types/SKILL.md +0 -305
- package/skills/durations/SKILL.md +0 -418
- package/skills/format-date-time/SKILL.md +0 -486
- package/skills/format-date-time/references/format-api.md +0 -34
- package/skills/format-relative-time/SKILL.md +0 -223
- package/skills/get-current/SKILL.md +0 -229
- package/skills/interval-ops/SKILL.md +0 -432
- package/skills/issue-creation/SKILL.md +0 -118
- package/skills/lint-package-suggestion/SKILL.md +0 -37
- package/skills/new-method-implementation/SKILL.md +0 -71
- package/skills/parse-date-time/SKILL.md +0 -349
- package/skills/pr-contribution/SKILL.md +0 -180
- package/skills/unit-test-generation/SKILL.md +0 -56
- package/skills/validate-dates/SKILL.md +0 -438
- package/skills/zoned-date-ops/SKILL.md +0 -422
- package/skills/zoned-date-ops/references/timezones.md +0 -13
|
@@ -1,278 +0,0 @@
|
|
|
1
|
-
# skills/_artifacts/skill_tree.yaml
|
|
2
|
-
# Generated by skill-tree-generator
|
|
3
|
-
# Library: @northguild/gmt
|
|
4
|
-
# Version: 1.14.0
|
|
5
|
-
library:
|
|
6
|
-
name: '@northguild/gmt'
|
|
7
|
-
version: 1.14.0
|
|
8
|
-
repository: https://github.com/northguild/gmt.git
|
|
9
|
-
description: Temporal-based date and time utilities with timezone support and polyfill integration
|
|
10
|
-
generated_from:
|
|
11
|
-
domain_map: 'skills/_artifacts/domain_map.yaml'
|
|
12
|
-
skill_spec: 'skills/_artifacts/skill_spec.md'
|
|
13
|
-
generated_at: '2026-08-23'
|
|
14
|
-
|
|
15
|
-
skills:
|
|
16
|
-
# Consumer-facing core skills
|
|
17
|
-
- name: Get Current Date/Time
|
|
18
|
-
slug: get-current
|
|
19
|
-
type: core
|
|
20
|
-
domain: core-date-operations
|
|
21
|
-
path: 'skills/get-current/SKILL.md'
|
|
22
|
-
package: 'packages/gmt'
|
|
23
|
-
description: Get the current date, time, or timestamp as ISO 8601 strings
|
|
24
|
-
sources:
|
|
25
|
-
- 'northguild/gmt:packages/gmt/src/plain/get/index.ts'
|
|
26
|
-
- 'northguild/gmt:packages/gmt/src/zoned/get/index.ts'
|
|
27
|
-
- 'northguild/gmt:packages/gmt/src/utc/get/index.ts'
|
|
28
|
-
- 'northguild/gmt:packages/gmt/src/unix/get/index.ts'
|
|
29
|
-
|
|
30
|
-
- name: Parse Date/Time
|
|
31
|
-
slug: parse-date-time
|
|
32
|
-
type: core
|
|
33
|
-
domain: core-date-operations
|
|
34
|
-
path: 'skills/parse-date-time/SKILL.md'
|
|
35
|
-
package: 'packages/gmt'
|
|
36
|
-
description: Parse individual components from date/time strings; also parseRfc2822, parseHttp, parseSql, parseRfc3339 for decoding fixed interchange grammars (email Date headers, HTTP headers, SQL datetime literals, RFC 3339)
|
|
37
|
-
sources:
|
|
38
|
-
- 'northguild/gmt:packages/gmt/src/plain/parse/index.ts'
|
|
39
|
-
- 'northguild/gmt:packages/gmt/src/zoned/parse/parseRfc2822.ts'
|
|
40
|
-
- 'northguild/gmt:packages/gmt/src/utc/parse/parseHttp.ts'
|
|
41
|
-
- 'northguild/gmt:packages/gmt/src/plain/parse/parseSql.ts'
|
|
42
|
-
- 'northguild/gmt:packages/gmt/src/zoned/parse/parseRfc3339.ts'
|
|
43
|
-
|
|
44
|
-
- name: Format Date/Time
|
|
45
|
-
slug: format-date-time
|
|
46
|
-
type: core
|
|
47
|
-
domain: core-date-operations
|
|
48
|
-
path: 'skills/format-date-time/SKILL.md'
|
|
49
|
-
package: 'packages/gmt'
|
|
50
|
-
description: Format date/time values for display with locale support; includes plain absolute (formatDate/Time/DateTime), plain relative (formatRelativeDate/Time/DateTime), standalone locale calendar-name lookups (getLocaleEraNames, getLocaleMonthNames, getLocaleWeekdayNames, getLocaleMeridiems), and fixed-grammar named machine formats (formatRfc2822, formatHttp, formatSql, formatRfc3339)
|
|
51
|
-
sources:
|
|
52
|
-
- 'northguild/gmt:packages/gmt/src/plain/format/index.ts'
|
|
53
|
-
- 'northguild/gmt:packages/gmt/src/plain/locale/index.ts'
|
|
54
|
-
- 'northguild/gmt:packages/gmt/src/plain/locale/getLocaleEraNames.ts'
|
|
55
|
-
- 'northguild/gmt:packages/gmt/src/plain/locale/getLocaleMonthNames.ts'
|
|
56
|
-
- 'northguild/gmt:packages/gmt/src/plain/locale/getLocaleWeekdayNames.ts'
|
|
57
|
-
- 'northguild/gmt:packages/gmt/src/zoned/format/formatRfc2822.ts'
|
|
58
|
-
- 'northguild/gmt:packages/gmt/src/utc/format/formatHttp.ts'
|
|
59
|
-
- 'northguild/gmt:packages/gmt/src/plain/format/formatSql.ts'
|
|
60
|
-
- 'northguild/gmt:packages/gmt/src/zoned/format/formatRfc3339.ts'
|
|
61
|
-
- 'northguild/gmt:packages/gmt/src/plain/locale/getLocaleMeridiems.ts'
|
|
62
|
-
|
|
63
|
-
- name: Format Relative Time
|
|
64
|
-
slug: format-relative-time
|
|
65
|
-
type: core
|
|
66
|
-
domain: core-date-operations
|
|
67
|
-
path: 'skills/format-relative-time/SKILL.md'
|
|
68
|
-
package: 'packages/gmt'
|
|
69
|
-
description: Produce human-friendly relative strings ("yesterday", "in 2 hours") across plain, zoned, unix, and utc values
|
|
70
|
-
requires:
|
|
71
|
-
- format-date-time
|
|
72
|
-
sources:
|
|
73
|
-
- 'northguild/gmt:packages/gmt/src/plain/format/formatRelativeDate.ts'
|
|
74
|
-
- 'northguild/gmt:packages/gmt/src/plain/format/formatRelativeTime.ts'
|
|
75
|
-
- 'northguild/gmt:packages/gmt/src/plain/format/formatRelativeDateTime.ts'
|
|
76
|
-
- 'northguild/gmt:packages/gmt/src/zoned/format/formatRelativeZoned.ts'
|
|
77
|
-
- 'northguild/gmt:packages/gmt/src/unix/format/formatRelativeUnix.ts'
|
|
78
|
-
- 'northguild/gmt:packages/gmt/src/utc/format/formatRelativeUtc.ts'
|
|
79
|
-
|
|
80
|
-
- name: Calculate Dates
|
|
81
|
-
slug: calculate-dates
|
|
82
|
-
type: core
|
|
83
|
-
domain: core-date-operations
|
|
84
|
-
path: 'skills/calculate-dates/SKILL.md'
|
|
85
|
-
package: 'packages/gmt'
|
|
86
|
-
description: Add or subtract time from dates; add*/subtract* accept an optional overflow ("constrain" | "reject") option, diff* accept optional smallestUnit/roundingIncrement/roundingMode rounding options, addBusinessDays/subtractBusinessDays skip weekends for Mon–Fri arithmetic, clampDate restricts a date to a range, closestDateTo finds the nearest candidate by calendar distance, getLocaleStartOfWeek/getLocaleEndOfWeek compute locale-driven week boundaries
|
|
87
|
-
sources:
|
|
88
|
-
- 'northguild/gmt:packages/gmt/src/plain/calculate/index.ts'
|
|
89
|
-
- 'northguild/gmt:packages/gmt/src/plain/calculate/clampDate.ts'
|
|
90
|
-
- 'northguild/gmt:packages/gmt/src/plain/calculate/closestDateTo.ts'
|
|
91
|
-
|
|
92
|
-
- name: Durations
|
|
93
|
-
slug: durations
|
|
94
|
-
type: core
|
|
95
|
-
domain: core-date-operations
|
|
96
|
-
path: 'skills/durations/SKILL.md'
|
|
97
|
-
package: 'packages/gmt'
|
|
98
|
-
description: Parse, validate, combine, rebalance, and format ISO 8601 duration strings via isValidDuration, parseDuration, addDuration/subtractDuration, normalizeDuration, and formatDuration; bridge diff* functions to duration strings via diffDateAsDuration/diffDateTimeAsDuration/diffZonedAsDuration/diffUnixAsDuration/diffUtcAsDuration
|
|
99
|
-
requires:
|
|
100
|
-
- calculate-dates
|
|
101
|
-
sources:
|
|
102
|
-
- 'northguild/gmt:packages/gmt/src/duration/index.ts'
|
|
103
|
-
- 'northguild/gmt:packages/gmt/src/plain/calculate/diffDateAsDuration.ts'
|
|
104
|
-
- 'northguild/gmt:packages/gmt/src/plain/calculate/diffDateTimeAsDuration.ts'
|
|
105
|
-
- 'northguild/gmt:packages/gmt/src/zoned/calculate/diffZonedAsDuration.ts'
|
|
106
|
-
- 'northguild/gmt:packages/gmt/src/unix/calculate/diffUnixAsDuration.ts'
|
|
107
|
-
- 'northguild/gmt:packages/gmt/src/utc/calculate/diffUtcAsDuration.ts'
|
|
108
|
-
|
|
109
|
-
- name: Compare Dates
|
|
110
|
-
slug: compare-dates
|
|
111
|
-
type: core
|
|
112
|
-
domain: core-date-operations
|
|
113
|
-
path: 'skills/compare-dates/SKILL.md'
|
|
114
|
-
package: 'packages/gmt'
|
|
115
|
-
description: Compare date values for ordering; use isWeekend/isZonedWeekend for locale-aware weekend checks, isBusinessDay for fixed ISO Mon–Fri business-day checks, and getLocaleDayOfWeek/getLocaleZonedDayOfWeek for locale-relative day-of-week indices
|
|
116
|
-
sources:
|
|
117
|
-
- 'northguild/gmt:packages/gmt/src/plain/compare/index.ts'
|
|
118
|
-
- 'northguild/gmt:packages/gmt/src/zoned/compare/index.ts'
|
|
119
|
-
- 'northguild/gmt:packages/gmt/src/plain/get/index.ts'
|
|
120
|
-
- 'northguild/gmt:packages/gmt/src/zoned/get/index.ts'
|
|
121
|
-
|
|
122
|
-
- name: Validate Dates
|
|
123
|
-
slug: validate-dates
|
|
124
|
-
type: core
|
|
125
|
-
domain: core-date-operations
|
|
126
|
-
path: 'skills/validate-dates/SKILL.md'
|
|
127
|
-
package: 'packages/gmt'
|
|
128
|
-
description: Validate date/time strings, timezone identifiers, intervals, and ranges; check whether a timezone observes daylight saving time (hasDaylightSaving); list DST transition instants for a timezone in a given year (getDstTransitions); check point-in-interval and interval-in-interval containment; merge overlapping or adjacent intervals; split intervals into sub-intervals by duration unit
|
|
129
|
-
sources:
|
|
130
|
-
- 'northguild/gmt:packages/gmt/src/plain/validate/index.ts'
|
|
131
|
-
- 'northguild/gmt:packages/gmt/src/plain/interval/validate/index.ts'
|
|
132
|
-
- 'northguild/gmt:packages/gmt/src/plain/interval/intervalContainsDate.ts'
|
|
133
|
-
- 'northguild/gmt:packages/gmt/src/plain/interval/intervalContainsTime.ts'
|
|
134
|
-
- 'northguild/gmt:packages/gmt/src/plain/interval/intervalContainsDateTime.ts'
|
|
135
|
-
- 'northguild/gmt:packages/gmt/src/plain/interval/intervalUnionDate.ts'
|
|
136
|
-
- 'northguild/gmt:packages/gmt/src/plain/interval/intervalUnionTime.ts'
|
|
137
|
-
- 'northguild/gmt:packages/gmt/src/plain/interval/intervalUnionDateTime.ts'
|
|
138
|
-
- 'northguild/gmt:packages/gmt/src/plain/interval/splitIntervalByUnitDate.ts'
|
|
139
|
-
- 'northguild/gmt:packages/gmt/src/plain/interval/splitIntervalByUnitTime.ts'
|
|
140
|
-
- 'northguild/gmt:packages/gmt/src/plain/interval/splitIntervalByUnitDateTime.ts'
|
|
141
|
-
- 'northguild/gmt:packages/gmt/src/utc/validate/index.ts'
|
|
142
|
-
- 'northguild/gmt:packages/gmt/src/utc/interval/validate/index.ts'
|
|
143
|
-
- 'northguild/gmt:packages/gmt/src/utc/interval/intervalContainsUtc.ts'
|
|
144
|
-
- 'northguild/gmt:packages/gmt/src/utc/interval/intervalUnionUtc.ts'
|
|
145
|
-
- 'northguild/gmt:packages/gmt/src/utc/interval/splitIntervalByUnitUtc.ts'
|
|
146
|
-
- 'northguild/gmt:packages/gmt/src/unix/validate/index.ts'
|
|
147
|
-
- 'northguild/gmt:packages/gmt/src/unix/interval/validate/index.ts'
|
|
148
|
-
- 'northguild/gmt:packages/gmt/src/unix/interval/intervalContainsUnix.ts'
|
|
149
|
-
- 'northguild/gmt:packages/gmt/src/unix/interval/intervalUnionUnix.ts'
|
|
150
|
-
- 'northguild/gmt:packages/gmt/src/unix/interval/splitIntervalByUnitUnix.ts'
|
|
151
|
-
- 'northguild/gmt:packages/gmt/src/zoned/validate/index.ts'
|
|
152
|
-
- 'northguild/gmt:packages/gmt/src/zoned/validate/hasDaylightSaving.ts'
|
|
153
|
-
- 'northguild/gmt:packages/gmt/src/zoned/get/getDstTransitions.ts'
|
|
154
|
-
- 'northguild/gmt:packages/gmt/src/zoned/interval/validate/index.ts'
|
|
155
|
-
- 'northguild/gmt:packages/gmt/src/zoned/interval/intervalContainsZoned.ts'
|
|
156
|
-
- 'northguild/gmt:packages/gmt/src/zoned/interval/intervalUnionZoned.ts'
|
|
157
|
-
- 'northguild/gmt:packages/gmt/src/zoned/interval/splitIntervalByUnitZoned.ts'
|
|
158
|
-
|
|
159
|
-
- name: Zoned Date Operations
|
|
160
|
-
slug: zoned-date-ops
|
|
161
|
-
type: core
|
|
162
|
-
domain: zoned-date-operations
|
|
163
|
-
path: 'skills/zoned-date-ops/SKILL.md'
|
|
164
|
-
package: 'packages/gmt'
|
|
165
|
-
description: Work with timezone-aware dates and times; includes formatZonedDateTime, formatZonedRange, formatRelativeZoned, convertPlainDateTimeToZoned with full DST disambiguation control, addZoned/subtractZoned with overlap-only DST disambiguation control, clampZoned/closestZonedTo for range restriction and nearest-candidate selection, and the startOfZoned/endOfZoned/startOfQuarterForZoned/endOfQuarterForZoned/mapZonedHoursInDay/getLocaleZonedStartOfWeek/getLocaleZonedEndOfWeek/getLocaleZonedDayOfWeek family (plus unix/ counterparts) with full disambiguation + offset control
|
|
166
|
-
sources:
|
|
167
|
-
- 'northguild/gmt:packages/gmt/src/zoned/get/index.ts'
|
|
168
|
-
- 'northguild/gmt:packages/gmt/src/zoned/format/index.ts'
|
|
169
|
-
- 'northguild/gmt:packages/gmt/src/zoned/validate/index.ts'
|
|
170
|
-
- 'northguild/gmt:packages/gmt/src/zoned/convert/index.ts'
|
|
171
|
-
- 'northguild/gmt:packages/gmt/src/zoned/calculate/addZoned.ts'
|
|
172
|
-
- 'northguild/gmt:packages/gmt/src/zoned/calculate/subtractZoned.ts'
|
|
173
|
-
- 'northguild/gmt:packages/gmt/src/zoned/calculate/startOfZoned.ts'
|
|
174
|
-
- 'northguild/gmt:packages/gmt/src/zoned/calculate/endOfZoned.ts'
|
|
175
|
-
- 'northguild/gmt:packages/gmt/src/zoned/calculate/startOfQuarterForZoned.ts'
|
|
176
|
-
- 'northguild/gmt:packages/gmt/src/zoned/calculate/endOfQuarterForZoned.ts'
|
|
177
|
-
- 'northguild/gmt:packages/gmt/src/zoned/calculate/getLocaleZonedStartOfWeek.ts'
|
|
178
|
-
- 'northguild/gmt:packages/gmt/src/zoned/calculate/getLocaleZonedEndOfWeek.ts'
|
|
179
|
-
- 'northguild/gmt:packages/gmt/src/zoned/calculate/clampZoned.ts'
|
|
180
|
-
- 'northguild/gmt:packages/gmt/src/zoned/calculate/closestZonedTo.ts'
|
|
181
|
-
- 'northguild/gmt:packages/gmt/src/zoned/map/mapZonedHoursInDay.ts'
|
|
182
|
-
- 'northguild/gmt:packages/gmt/src/unix/calculate/startOfUnix.ts'
|
|
183
|
-
- 'northguild/gmt:packages/gmt/src/unix/calculate/endOfUnix.ts'
|
|
184
|
-
- 'northguild/gmt:packages/gmt/src/unix/calculate/startOfQuarterForUnix.ts'
|
|
185
|
-
- 'northguild/gmt:packages/gmt/src/unix/calculate/endOfQuarterForUnix.ts'
|
|
186
|
-
|
|
187
|
-
- name: Convert Temporal Types
|
|
188
|
-
slug: convert-types
|
|
189
|
-
type: core
|
|
190
|
-
domain: conversion
|
|
191
|
-
path: 'skills/convert-types/SKILL.md'
|
|
192
|
-
package: 'packages/gmt'
|
|
193
|
-
description: Convert between plain and zoned (with DST disambiguation control), or unix/utc representations; convertDateToCalendar expresses a date in a non-Gregorian CalendarSystem (gregorian, hebrew, islamic-civil, islamic-tabular, islamic-umalqura, japanese, buddhist, taiwan, persian, indian, ethiopic, ethiopic-amete-alem, coptic)
|
|
194
|
-
sources:
|
|
195
|
-
- 'northguild/gmt:packages/gmt/src/plain/convert/index.ts'
|
|
196
|
-
- 'northguild/gmt:packages/gmt/src/zoned/convert/index.ts'
|
|
197
|
-
- 'northguild/gmt:packages/gmt/src/unix/convert/index.ts'
|
|
198
|
-
- 'northguild/gmt:packages/gmt/src/utc/convert/index.ts'
|
|
199
|
-
- 'northguild/gmt:packages/gmt/src/types/calendar-system.ts'
|
|
200
|
-
- 'northguild/gmt:packages/gmt/src/internal/ethiopicFamilyCalendar.ts'
|
|
201
|
-
|
|
202
|
-
# Consumer-facing interval skills
|
|
203
|
-
- name: Interval Operations
|
|
204
|
-
slug: interval-ops
|
|
205
|
-
type: core
|
|
206
|
-
domain: interval-operations
|
|
207
|
-
path: 'skills/interval-ops/SKILL.md'
|
|
208
|
-
package: 'packages/gmt'
|
|
209
|
-
description: Range math over two-point intervals — validate, contain, overlap, intersect, union, difference, xor, abut, engulf, construct from a point + duration, split by duration unit, and count calendar-unit boundaries across plain, zoned, unix, and utc
|
|
210
|
-
requires: []
|
|
211
|
-
sources:
|
|
212
|
-
- 'northguild/gmt:packages/gmt/src/plain/interval/index.ts'
|
|
213
|
-
- 'northguild/gmt:packages/gmt/src/zoned/interval/index.ts'
|
|
214
|
-
- 'northguild/gmt:packages/gmt/src/unix/interval/index.ts'
|
|
215
|
-
- 'northguild/gmt:packages/gmt/src/utc/interval/index.ts'
|
|
216
|
-
- 'northguild/gmt:packages/gmt/src/duration/validate/isValidDuration.ts'
|
|
217
|
-
|
|
218
|
-
# Consumer-facing composition skills
|
|
219
|
-
- name: App Integration
|
|
220
|
-
slug: app-integration
|
|
221
|
-
type: composition
|
|
222
|
-
domain: integration
|
|
223
|
-
path: 'skills/app-integration/SKILL.md'
|
|
224
|
-
package: 'packages/gmt'
|
|
225
|
-
description: Integrate gmt with application frameworks
|
|
226
|
-
|
|
227
|
-
- name: Lint Package Suggestion
|
|
228
|
-
slug: lint-package-suggestion
|
|
229
|
-
type: composition
|
|
230
|
-
domain: integration
|
|
231
|
-
path: 'skills/lint-package-suggestion/SKILL.md'
|
|
232
|
-
package: 'packages/gmt'
|
|
233
|
-
description: Recommend appropriate lint packages from @northguild toolchain
|
|
234
|
-
requires: []
|
|
235
|
-
|
|
236
|
-
# Lifecycle skills
|
|
237
|
-
- name: Issue Creation
|
|
238
|
-
slug: issue-creation
|
|
239
|
-
type: lifecycle
|
|
240
|
-
domain: core-date-operations
|
|
241
|
-
path: 'skills/issue-creation/SKILL.md'
|
|
242
|
-
package: 'packages/gmt'
|
|
243
|
-
description: Create feature requests with proper details for maintainers
|
|
244
|
-
|
|
245
|
-
- name: PR Contribution
|
|
246
|
-
slug: pr-contribution
|
|
247
|
-
type: lifecycle
|
|
248
|
-
domain: integration
|
|
249
|
-
path: 'skills/pr-contribution/SKILL.md'
|
|
250
|
-
package: 'packages/gmt'
|
|
251
|
-
description: Contribute improvements via pull requests
|
|
252
|
-
|
|
253
|
-
# Maintainer skills (document how to work on gmt itself)
|
|
254
|
-
- name: New Method Implementation
|
|
255
|
-
slug: new-method-implementation
|
|
256
|
-
type: core
|
|
257
|
-
domain: core-date-operations
|
|
258
|
-
path: 'skills/new-method-implementation/SKILL.md'
|
|
259
|
-
package: 'packages/gmt'
|
|
260
|
-
description: Implement or extend a gmt API in packages/gmt/src
|
|
261
|
-
|
|
262
|
-
- name: Unit Test Generation
|
|
263
|
-
slug: unit-test-generation
|
|
264
|
-
type: core
|
|
265
|
-
domain: core-date-operations
|
|
266
|
-
path: 'skills/unit-test-generation/SKILL.md'
|
|
267
|
-
package: 'packages/gmt'
|
|
268
|
-
description: Write or update gmt unit tests with deterministic Temporal-safe patterns
|
|
269
|
-
requires:
|
|
270
|
-
- new-method-implementation
|
|
271
|
-
|
|
272
|
-
- name: API Expansion Workflow
|
|
273
|
-
slug: api-expansion-workflow
|
|
274
|
-
type: lifecycle
|
|
275
|
-
domain: core-date-operations
|
|
276
|
-
path: 'skills/api-expansion-workflow/SKILL.md'
|
|
277
|
-
package: 'packages/gmt'
|
|
278
|
-
description: Handle feature requests for missing gmt functionality
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: api-expansion-workflow
|
|
3
|
-
description: >
|
|
4
|
-
Handle feature requests for missing gmt functionality by checking existing
|
|
5
|
-
APIs first, then proposing a Temporal-backed custom method path with required
|
|
6
|
-
issue/PR guidance and test-backed behavioral specs.
|
|
7
|
-
metadata:
|
|
8
|
-
library_version: 1.14.2
|
|
9
|
-
---
|
|
10
|
-
|
|
11
|
-
# API Expansion Workflow
|
|
12
|
-
|
|
13
|
-
Use this skill when a user asks for behavior that is not currently covered by gmt.
|
|
14
|
-
|
|
15
|
-
## Decision flow
|
|
16
|
-
|
|
17
|
-
1. Check existing APIs first
|
|
18
|
-
- Search `packages/gmt/src/plain` and `packages/gmt/src/zoned`.
|
|
19
|
-
- If capability exists, use the existing method and do not add new API.
|
|
20
|
-
|
|
21
|
-
- When evaluating whether to add a new API, enforce the library's strict input/output policy: new public methods must accept explicit shapes (ISO 8601 strings, IANA timezone ids, or numeric unix epochs) and return normalized outputs. If the requested capability implies permissive parsing, recommend implementing a small adapter outside of core gmt instead of widening gmt's surface.
|
|
22
|
-
|
|
23
|
-
2. If capability does not exist
|
|
24
|
-
- Tell the user it is possible with Temporal because gmt ships Temporal.
|
|
25
|
-
- Tell the user it requires a new custom method in gmt.
|
|
26
|
-
|
|
27
|
-
3. Ask for product feedback loop
|
|
28
|
-
- Recommend opening a GitHub issue requesting the method.
|
|
29
|
-
- Suggest they include use case, expected input/output, and timezone expectations.
|
|
30
|
-
|
|
31
|
-
4. If implementing now
|
|
32
|
-
- Implement method with Temporal using gmt conventions.
|
|
33
|
-
- Add solid unit tests in the same change.
|
|
34
|
-
- Suggest opening a PR against gmt or attaching exact proposal text to the issue.
|
|
35
|
-
|
|
36
|
-
## Required issue template guidance
|
|
37
|
-
|
|
38
|
-
Encourage users to include:
|
|
39
|
-
|
|
40
|
-
1. Problem statement and current workaround.
|
|
41
|
-
2. Proposed method name.
|
|
42
|
-
3. Input and output examples.
|
|
43
|
-
4. Invalid input behavior expectations.
|
|
44
|
-
5. Plain vs zoned expectations and locale/timezone constraints.
|
|
45
|
-
|
|
46
|
-
## Test requirements for expansion work
|
|
47
|
-
|
|
48
|
-
1. Happy-path coverage for core scenarios.
|
|
49
|
-
2. Invalid-input fallback coverage.
|
|
50
|
-
3. Boundary coverage for date/time edges.
|
|
51
|
-
4. Zoned/DST coverage when timezone logic is involved.
|
|
52
|
-
5. Locale matrix coverage when locale options are part of API behavior.
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: app-integration
|
|
3
|
-
description: >
|
|
4
|
-
Guidance for integrating `@northguild/gmt` with application frameworks and
|
|
5
|
-
libraries (routers, query caches, table sorting, state management). Emphasizes
|
|
6
|
-
strict I/O, canonicalization, and cache-key hygiene.
|
|
7
|
-
metadata:
|
|
8
|
-
library_version: 1.14.2
|
|
9
|
-
---
|
|
10
|
-
|
|
11
|
-
# App Integration
|
|
12
|
-
|
|
13
|
-
Use this skill when recommending or implementing integrations between gmt
|
|
14
|
-
and application frameworks and libraries (routers, query caches, table
|
|
15
|
-
sorting/grouping, state management, etc.).
|
|
16
|
-
|
|
17
|
-
## Purpose
|
|
18
|
-
|
|
19
|
-
- Encourage stable cache keys that depend on explicit, canonical representations (ISO 8601 strings or normalized epoch numbers) instead of `Date` objects or fuzzy strings.
|
|
20
|
-
- Recommend validating and canonicalizing inputs with gmt validators/parsers before using them in keys or persisted state.
|
|
21
|
-
|
|
22
|
-
## Recommendations
|
|
23
|
-
|
|
24
|
-
- Use ISO 8601 strings for query/cache keys:
|
|
25
|
-
|
|
26
|
-
```js
|
|
27
|
-
['events', { start: '2024-02-29', end: '2024-03-01' }]
|
|
28
|
-
```
|
|
29
|
-
|
|
30
|
-
- Validate timezone params with `isValidTimezone` before using as a key.
|
|
31
|
-
- For Unix epoch times, pick one canonical unit (milliseconds recommended) and stick to it; use explicit helpers to convert when needed.
|
|
32
|
-
- Never use `Date` instances in keys — transform them to ISO strings or numeric epochs first.
|
|
33
|
-
- When working with routers (Next.js, React Router, etc.), ensure date params are validated and canonicalized before use in loaders/components.
|
|
34
|
-
- For table libraries (TanStack Table, etc.), use ISO strings for sort keys to ensure consistent ordering across environments.
|
|
35
|
-
|
|
36
|
-
## Design Principle
|
|
37
|
-
|
|
38
|
-
- Reiterate gmt's strict I/O philosophy: public APIs accept explicit shapes only (ISO 8601 strings, IANA timezone ids, epoch numbers). Keep canonicalized representations at boundaries to ensure cache stability and reproducible behavior across environments.
|