cronli5 0.1.7 → 0.2.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/CHANGELOG.md +43 -0
- package/README.md +5 -5
- package/cronli5.min.js +2 -2
- package/dist/cronli5.cjs +363 -75
- package/dist/cronli5.js +363 -75
- package/dist/lang/en.cjs +363 -75
- package/dist/lang/en.js +363 -75
- package/package.json +1 -1
- package/src/core/ir.ts +5 -0
- package/src/lang/en/dialects.ts +6 -2
- package/src/lang/en/index.ts +735 -102
- package/types/core/ir.d.ts +1 -0
package/src/lang/en/dialects.ts
CHANGED
|
@@ -34,7 +34,8 @@ const dialects: {[name: string]: DialectStyle} = {
|
|
|
34
34
|
pm: 'p.m.',
|
|
35
35
|
sep: ':',
|
|
36
36
|
serialComma: true,
|
|
37
|
-
through: ' through '
|
|
37
|
+
through: ' through ',
|
|
38
|
+
untilWindow: true
|
|
38
39
|
},
|
|
39
40
|
house: {
|
|
40
41
|
am: 'AM',
|
|
@@ -58,7 +59,10 @@ function resolveDialect(
|
|
|
58
59
|
dialect?: Cronli5Options['dialect']
|
|
59
60
|
): DialectStyle {
|
|
60
61
|
if (typeof dialect === 'object' && dialect !== null) {
|
|
61
|
-
|
|
62
|
+
// A custom style inherits the US base but NOT the until-window: a custom
|
|
63
|
+
// dialect that only overrides the connective (e.g. `{through: ' until '}`)
|
|
64
|
+
// keeps the "through <last fire>" close, just spelled with its own word.
|
|
65
|
+
return {...dialects.us, untilWindow: false, ...dialect};
|
|
62
66
|
}
|
|
63
67
|
|
|
64
68
|
// The legacy 'uk' name resolves to 'gb'; a name another language owns
|