react-native-bikram-sambat 0.1.3 → 0.1.4
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 +19 -0
- package/README.md +2 -0
- package/lib/commonjs/accessibility/index.js +1 -1
- package/lib/commonjs/accessibility/labels.js +2 -2
- package/lib/commonjs/accessibility/labels.js.map +1 -1
- package/lib/commonjs/calendar/get-calendar-month-grid.js +5 -5
- package/lib/commonjs/calendar/index.js +1 -1
- package/lib/commonjs/components/NepaliCalendar/CalendarDay.js +2 -2
- package/lib/commonjs/components/NepaliCalendar/CalendarDay.js.map +1 -1
- package/lib/commonjs/components/NepaliCalendar/CalendarGrid.js +5 -5
- package/lib/commonjs/components/NepaliCalendar/CalendarGrid.js.map +1 -1
- package/lib/commonjs/components/NepaliCalendar/CalendarHeader.js +8 -8
- package/lib/commonjs/components/NepaliCalendar/CalendarHeader.js.map +1 -1
- package/lib/commonjs/components/NepaliCalendar/NepaliCalendar.js +37 -37
- package/lib/commonjs/components/NepaliCalendar/NepaliCalendar.js.map +1 -1
- package/lib/commonjs/components/NepaliCalendar/index.js +1 -1
- package/lib/commonjs/components/NepaliDatePicker/DatePickerModal.js +7 -7
- package/lib/commonjs/components/NepaliDatePicker/DatePickerModal.js.map +1 -1
- package/lib/commonjs/components/NepaliDatePicker/NepaliDatePicker.js +9 -9
- package/lib/commonjs/components/NepaliDatePicker/NepaliDatePicker.js.map +1 -1
- package/lib/commonjs/components/NepaliDatePicker/index.js +2 -2
- package/lib/commonjs/components/NepaliRangePicker/NepaliRangePicker.js +12 -12
- package/lib/commonjs/components/NepaliRangePicker/NepaliRangePicker.js.map +1 -1
- package/lib/commonjs/components/NepaliRangePicker/RangePickerModal.js +12 -12
- package/lib/commonjs/components/NepaliRangePicker/RangePickerModal.js.map +1 -1
- package/lib/commonjs/components/NepaliRangePicker/index.js +3 -3
- package/lib/commonjs/components/NepaliRangePicker/range-utils.js +7 -7
- package/lib/commonjs/components/NepaliRangePicker/range-utils.js.map +1 -1
- package/lib/commonjs/core/arithmetic.js +3 -3
- package/lib/commonjs/core/bsData.js +107 -8
- package/lib/commonjs/core/bsData.js.map +1 -1
- package/lib/commonjs/core/conversion.js +4 -4
- package/lib/commonjs/core/conversion.js.map +1 -1
- package/lib/commonjs/core/dateKey.js +1 -1
- package/lib/commonjs/core/format/format.js +9 -9
- package/lib/commonjs/core/format/format.js.map +1 -1
- package/lib/commonjs/core/format/index.js +2 -2
- package/lib/commonjs/core/format/parse.js +3 -3
- package/lib/commonjs/core/format/parse.js.map +1 -1
- package/lib/commonjs/core/index.js +19 -19
- package/lib/commonjs/core/index.js.map +1 -1
- package/lib/commonjs/core/locale/index.js +2 -2
- package/lib/commonjs/core/numerals/index.js +1 -1
- package/lib/commonjs/core/validation.js +4 -3
- package/lib/commonjs/core/validation.js.map +1 -1
- package/lib/commonjs/index.js +32 -32
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/package.json +1 -0
- package/lib/commonjs/theme/create-theme.js +1 -1
- package/lib/commonjs/theme/index.js +2 -2
- package/lib/commonjs/utils/date-helpers.js +4 -4
- package/lib/commonjs/utils/date-helpers.js.map +1 -1
- package/lib/commonjs/utils/index.js +1 -1
- package/lib/module/accessibility/index.js +1 -1
- package/lib/module/accessibility/index.js.map +1 -1
- package/lib/module/accessibility/labels.js +1 -1
- package/lib/module/accessibility/labels.js.map +1 -1
- package/lib/module/calendar/get-calendar-month-grid.js +6 -6
- package/lib/module/calendar/get-calendar-month-grid.js.map +1 -1
- package/lib/module/calendar/index.js +1 -1
- package/lib/module/calendar/index.js.map +1 -1
- package/lib/module/components/NepaliCalendar/CalendarDay.js +1 -1
- package/lib/module/components/NepaliCalendar/CalendarDay.js.map +1 -1
- package/lib/module/components/NepaliCalendar/CalendarGrid.js +3 -3
- package/lib/module/components/NepaliCalendar/CalendarGrid.js.map +1 -1
- package/lib/module/components/NepaliCalendar/CalendarHeader.js +4 -4
- package/lib/module/components/NepaliCalendar/CalendarHeader.js.map +1 -1
- package/lib/module/components/NepaliCalendar/NepaliCalendar.js +8 -8
- package/lib/module/components/NepaliCalendar/NepaliCalendar.js.map +1 -1
- package/lib/module/components/NepaliCalendar/index.js +1 -1
- package/lib/module/components/NepaliCalendar/index.js.map +1 -1
- package/lib/module/components/NepaliDatePicker/DatePickerModal.js +3 -3
- package/lib/module/components/NepaliDatePicker/DatePickerModal.js.map +1 -1
- package/lib/module/components/NepaliDatePicker/NepaliDatePicker.js +4 -4
- package/lib/module/components/NepaliDatePicker/NepaliDatePicker.js.map +1 -1
- package/lib/module/components/NepaliDatePicker/index.js +2 -2
- package/lib/module/components/NepaliDatePicker/index.js.map +1 -1
- package/lib/module/components/NepaliRangePicker/NepaliRangePicker.js +4 -4
- package/lib/module/components/NepaliRangePicker/NepaliRangePicker.js.map +1 -1
- package/lib/module/components/NepaliRangePicker/RangePickerModal.js +4 -4
- package/lib/module/components/NepaliRangePicker/RangePickerModal.js.map +1 -1
- package/lib/module/components/NepaliRangePicker/index.js +3 -3
- package/lib/module/components/NepaliRangePicker/index.js.map +1 -1
- package/lib/module/components/NepaliRangePicker/range-utils.js +1 -1
- package/lib/module/components/NepaliRangePicker/range-utils.js.map +1 -1
- package/lib/module/core/arithmetic.js +3 -3
- package/lib/module/core/arithmetic.js.map +1 -1
- package/lib/module/core/bsData.js +107 -8
- package/lib/module/core/bsData.js.map +1 -1
- package/lib/module/core/conversion.js +4 -4
- package/lib/module/core/conversion.js.map +1 -1
- package/lib/module/core/dateKey.js +1 -1
- package/lib/module/core/dateKey.js.map +1 -1
- package/lib/module/core/format/format.js +6 -6
- package/lib/module/core/format/format.js.map +1 -1
- package/lib/module/core/format/index.js +2 -2
- package/lib/module/core/format/index.js.map +1 -1
- package/lib/module/core/format/parse.js +2 -2
- package/lib/module/core/format/parse.js.map +1 -1
- package/lib/module/core/index.js +10 -10
- package/lib/module/core/index.js.map +1 -1
- package/lib/module/core/locale/index.js +2 -2
- package/lib/module/core/locale/index.js.map +1 -1
- package/lib/module/core/numerals/index.js +1 -1
- package/lib/module/core/numerals/index.js.map +1 -1
- package/lib/module/core/validation.js +4 -3
- package/lib/module/core/validation.js.map +1 -1
- package/lib/module/index.js +8 -8
- package/lib/module/index.js.map +1 -1
- package/lib/module/package.json +1 -0
- package/lib/module/theme/create-theme.js +1 -1
- package/lib/module/theme/create-theme.js.map +1 -1
- package/lib/module/theme/index.js +2 -2
- package/lib/module/theme/index.js.map +1 -1
- package/lib/module/utils/date-helpers.js +2 -2
- package/lib/module/utils/date-helpers.js.map +1 -1
- package/lib/module/utils/index.js +1 -1
- package/lib/module/utils/index.js.map +1 -1
- package/lib/typescript/src/core/bsData.d.ts.map +1 -1
- package/lib/typescript/src/core/validation.d.ts.map +1 -1
- package/package.json +3 -3
- package/src/core/bsData.ts +105 -6
- package/src/core/conversion.ts +1 -1
- package/src/core/validation.ts +7 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validation.d.ts","sourceRoot":"","sources":["../../../../src/core/validation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAIxD,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAepE;AAED,wBAAgB,aAAa,CAAC,IAAI,EAAE,WAAW,GAAG,OAAO,CAyBxD;AAED,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,WAAW,GAAG,OAAO,CAYnE;AAED,wBAAgB,2BAA2B,CAAC,IAAI,EAAE,WAAW,GAAG,WAAW,
|
|
1
|
+
{"version":3,"file":"validation.d.ts","sourceRoot":"","sources":["../../../../src/core/validation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAIxD,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAepE;AAED,wBAAgB,aAAa,CAAC,IAAI,EAAE,WAAW,GAAG,OAAO,CAyBxD;AAED,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,WAAW,GAAG,OAAO,CAYnE;AAED,wBAAgB,2BAA2B,CAAC,IAAI,EAAE,WAAW,GAAG,WAAW,CA2B1E;AAED,wBAAgB,yBAAyB,IAAI,WAAW,CAGvD;AAED,wBAAgB,oBAAoB,CAAC,KAAK,CAAC,EAAE;IAC3C,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,WAAW,GAAG,IAAI,CAAC;IAC3B,YAAY,CAAC,EAAE,WAAW,CAAC;CAC5B,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAuBlC;AAED,wBAAgB,aAAa,CAAC,IAAI,EAAE,WAAW,GAAG,OAAO,CAoBxD"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-native-bikram-sambat",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.4",
|
|
4
4
|
"description": "React Native Bikram Sambat calendar and Nepali date picker with AD to BS converter, BS to AD converter, and TypeScript support.",
|
|
5
5
|
"main": "./lib/commonjs/index.js",
|
|
6
6
|
"module": "./lib/module/index.js",
|
|
@@ -93,11 +93,11 @@
|
|
|
93
93
|
"typescript": "^5.5.4"
|
|
94
94
|
},
|
|
95
95
|
"scripts": {
|
|
96
|
-
"build": "
|
|
96
|
+
"build": "node ./scripts/build.cjs",
|
|
97
97
|
"typecheck": "tsc --noEmit",
|
|
98
98
|
"test": "jest",
|
|
99
99
|
"clean": "rimraf lib",
|
|
100
|
-
"prepack": "
|
|
100
|
+
"prepack": "node ./scripts/build.cjs",
|
|
101
101
|
"pack:dry": "npm pack --dry-run"
|
|
102
102
|
},
|
|
103
103
|
"react-native-builder-bob": {
|
package/src/core/bsData.ts
CHANGED
|
@@ -28,14 +28,113 @@ export type BSYearOffset = {
|
|
|
28
28
|
readonly totalDays: number;
|
|
29
29
|
};
|
|
30
30
|
|
|
31
|
-
//
|
|
32
|
-
//
|
|
33
|
-
// This placeholder exists only to prove the conversion architecture.
|
|
31
|
+
// Imported from the upstream `@nakarmi23/bikram-sambat` year table and capped to
|
|
32
|
+
// the range we currently support in this package.
|
|
34
33
|
export const BS_CALENDAR_DATA: BSCalendarData = {
|
|
35
|
-
anchorBS: { calendar: 'BS', year:
|
|
36
|
-
anchorAD: { calendar: 'AD', year:
|
|
34
|
+
anchorBS: { calendar: 'BS', year: 2000, month: 1, day: 1 },
|
|
35
|
+
anchorAD: { calendar: 'AD', year: 1943, month: 4, day: 14 },
|
|
37
36
|
monthLengthsByYear: {
|
|
38
|
-
|
|
37
|
+
2000: [30, 32, 31, 32, 31, 30, 30, 30, 29, 30, 29, 31],
|
|
38
|
+
2001: [31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30],
|
|
39
|
+
2002: [31, 31, 32, 32, 31, 30, 30, 29, 30, 29, 30, 30],
|
|
40
|
+
2003: [31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 31],
|
|
41
|
+
2004: [30, 32, 31, 32, 31, 30, 30, 30, 29, 30, 29, 31],
|
|
42
|
+
2005: [31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30],
|
|
43
|
+
2006: [31, 31, 32, 32, 31, 30, 30, 29, 30, 29, 30, 30],
|
|
44
|
+
2007: [31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 31],
|
|
45
|
+
2008: [31, 31, 31, 32, 31, 31, 29, 30, 30, 29, 29, 31],
|
|
46
|
+
2009: [31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30],
|
|
47
|
+
2010: [31, 31, 32, 32, 31, 30, 30, 29, 30, 29, 30, 30],
|
|
48
|
+
2011: [31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 31],
|
|
49
|
+
2012: [31, 31, 31, 32, 31, 31, 29, 30, 30, 29, 30, 30],
|
|
50
|
+
2013: [31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30],
|
|
51
|
+
2014: [31, 31, 32, 32, 31, 30, 30, 29, 30, 29, 30, 30],
|
|
52
|
+
2015: [31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 31],
|
|
53
|
+
2016: [31, 31, 31, 32, 31, 31, 29, 30, 30, 29, 30, 30],
|
|
54
|
+
2017: [31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30],
|
|
55
|
+
2018: [31, 32, 31, 32, 31, 30, 30, 29, 30, 29, 30, 30],
|
|
56
|
+
2019: [31, 32, 31, 32, 31, 30, 30, 30, 29, 30, 29, 31],
|
|
57
|
+
2020: [31, 31, 31, 32, 31, 31, 30, 29, 30, 29, 30, 30],
|
|
58
|
+
2021: [31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30],
|
|
59
|
+
2022: [31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 30],
|
|
60
|
+
2023: [31, 32, 31, 32, 31, 30, 30, 30, 29, 30, 29, 31],
|
|
61
|
+
2024: [31, 31, 31, 32, 31, 31, 30, 29, 30, 29, 30, 30],
|
|
62
|
+
2025: [31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30],
|
|
63
|
+
2026: [31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 31],
|
|
64
|
+
2027: [30, 32, 31, 32, 31, 30, 30, 30, 29, 30, 29, 31],
|
|
65
|
+
2028: [31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30],
|
|
66
|
+
2029: [31, 31, 32, 31, 32, 30, 30, 29, 30, 29, 30, 30],
|
|
67
|
+
2030: [31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 31],
|
|
68
|
+
2031: [30, 32, 31, 32, 31, 30, 30, 30, 29, 30, 29, 31],
|
|
69
|
+
2032: [31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30],
|
|
70
|
+
2033: [31, 31, 32, 32, 31, 30, 30, 29, 30, 29, 30, 30],
|
|
71
|
+
2034: [31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 31],
|
|
72
|
+
2035: [30, 32, 31, 32, 31, 31, 29, 30, 30, 29, 29, 31],
|
|
73
|
+
2036: [31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30],
|
|
74
|
+
2037: [31, 31, 32, 32, 31, 30, 30, 29, 30, 29, 30, 30],
|
|
75
|
+
2038: [31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 31],
|
|
76
|
+
2039: [31, 31, 31, 32, 31, 31, 29, 30, 30, 29, 30, 30],
|
|
77
|
+
2040: [31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30],
|
|
78
|
+
2041: [31, 31, 32, 32, 31, 30, 30, 29, 30, 29, 30, 30],
|
|
79
|
+
2042: [31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 31],
|
|
80
|
+
2043: [31, 31, 31, 32, 31, 31, 29, 30, 30, 29, 30, 30],
|
|
81
|
+
2044: [31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30],
|
|
82
|
+
2045: [31, 32, 31, 32, 31, 30, 30, 29, 30, 29, 30, 30],
|
|
83
|
+
2046: [31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 31],
|
|
84
|
+
2047: [31, 31, 31, 32, 31, 31, 30, 29, 30, 29, 30, 30],
|
|
85
|
+
2048: [31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30],
|
|
86
|
+
2049: [31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 30],
|
|
87
|
+
2050: [31, 32, 31, 32, 31, 30, 30, 30, 29, 30, 29, 31],
|
|
88
|
+
2051: [31, 31, 31, 32, 31, 31, 30, 29, 30, 29, 30, 30],
|
|
89
|
+
2052: [31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30],
|
|
90
|
+
2053: [31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 30],
|
|
91
|
+
2054: [31, 32, 31, 32, 31, 30, 30, 30, 29, 30, 29, 31],
|
|
92
|
+
2055: [31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30],
|
|
93
|
+
2056: [31, 31, 32, 31, 32, 30, 30, 29, 30, 29, 30, 30],
|
|
94
|
+
2057: [31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 31],
|
|
95
|
+
2058: [30, 32, 31, 32, 31, 30, 30, 30, 29, 30, 29, 31],
|
|
96
|
+
2059: [31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30],
|
|
97
|
+
2060: [31, 31, 32, 32, 31, 30, 30, 29, 30, 29, 30, 30],
|
|
98
|
+
2061: [31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 31],
|
|
99
|
+
2062: [30, 32, 31, 32, 31, 31, 29, 30, 29, 30, 29, 31],
|
|
100
|
+
2063: [31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30],
|
|
101
|
+
2064: [31, 31, 32, 32, 31, 30, 30, 29, 30, 29, 30, 30],
|
|
102
|
+
2065: [31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 31],
|
|
103
|
+
2066: [31, 31, 31, 32, 31, 31, 29, 30, 30, 29, 29, 31],
|
|
104
|
+
2067: [31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30],
|
|
105
|
+
2068: [31, 31, 32, 32, 31, 30, 30, 29, 30, 29, 30, 30],
|
|
106
|
+
2069: [31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 31],
|
|
107
|
+
2070: [31, 31, 31, 32, 31, 31, 29, 30, 30, 29, 30, 30],
|
|
108
|
+
2071: [31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30],
|
|
109
|
+
2072: [31, 32, 31, 32, 31, 30, 30, 29, 30, 29, 30, 30],
|
|
110
|
+
2073: [31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 31],
|
|
111
|
+
2074: [31, 31, 31, 32, 31, 31, 30, 29, 30, 29, 30, 30],
|
|
112
|
+
2075: [31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30],
|
|
113
|
+
2076: [31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 30],
|
|
114
|
+
2077: [31, 32, 31, 32, 31, 30, 30, 30, 29, 30, 29, 31],
|
|
115
|
+
2078: [31, 31, 31, 32, 31, 31, 30, 29, 30, 29, 30, 30],
|
|
116
|
+
2079: [31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30],
|
|
117
|
+
2080: [31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 30],
|
|
118
|
+
2081: [31, 32, 31, 32, 31, 30, 30, 30, 29, 30, 29, 31],
|
|
119
|
+
2082: [31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30],
|
|
120
|
+
2083: [31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30],
|
|
121
|
+
2084: [31, 31, 32, 31, 31, 30, 30, 30, 29, 30, 30, 30],
|
|
122
|
+
2085: [31, 32, 31, 32, 30, 31, 30, 30, 29, 30, 30, 30],
|
|
123
|
+
2086: [30, 32, 31, 32, 31, 30, 30, 30, 29, 30, 30, 30],
|
|
124
|
+
2087: [31, 31, 32, 31, 31, 31, 30, 30, 29, 30, 30, 30],
|
|
125
|
+
2088: [30, 31, 32, 32, 30, 31, 30, 30, 29, 30, 30, 30],
|
|
126
|
+
2089: [30, 32, 31, 32, 31, 30, 30, 30, 29, 30, 30, 30],
|
|
127
|
+
2090: [30, 32, 31, 32, 31, 30, 30, 30, 29, 30, 30, 30],
|
|
128
|
+
2091: [31, 31, 32, 32, 31, 30, 30, 29, 30, 29, 30, 30],
|
|
129
|
+
2092: [31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 31],
|
|
130
|
+
2093: [31, 31, 31, 32, 31, 31, 29, 30, 30, 29, 29, 31],
|
|
131
|
+
2094: [31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30],
|
|
132
|
+
2095: [31, 31, 32, 32, 31, 30, 30, 29, 30, 29, 30, 30],
|
|
133
|
+
2096: [31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 31],
|
|
134
|
+
2097: [31, 31, 31, 32, 31, 31, 29, 30, 30, 29, 30, 30],
|
|
135
|
+
2098: [31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30],
|
|
136
|
+
2099: [31, 31, 32, 32, 31, 30, 30, 29, 30, 29, 30, 30],
|
|
137
|
+
2100: [31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 31],
|
|
39
138
|
},
|
|
40
139
|
};
|
|
41
140
|
|
package/src/core/conversion.ts
CHANGED
|
@@ -68,6 +68,6 @@ function throwUnsupportedRange(): never {
|
|
|
68
68
|
const range = getSupportedBSYearRange();
|
|
69
69
|
|
|
70
70
|
throw new RangeError(
|
|
71
|
-
`Conversion is limited to BS years ${range.min}-${range.max}
|
|
71
|
+
`Conversion is limited to supported BS years ${range.min}-${range.max}.`
|
|
72
72
|
);
|
|
73
73
|
}
|
package/src/core/validation.ts
CHANGED
|
@@ -68,7 +68,13 @@ export function clampBSDateToSupportedRange(date: BSDateValue): BSDateValue {
|
|
|
68
68
|
}
|
|
69
69
|
|
|
70
70
|
if (date.year > range.max) {
|
|
71
|
-
|
|
71
|
+
const maxYearMonths = BS_CALENDAR_DATA.monthLengthsByYear[range.max];
|
|
72
|
+
return {
|
|
73
|
+
calendar: 'BS',
|
|
74
|
+
year: range.max,
|
|
75
|
+
month: 12,
|
|
76
|
+
day: maxYearMonths ? maxYearMonths[11] : 30,
|
|
77
|
+
};
|
|
72
78
|
}
|
|
73
79
|
|
|
74
80
|
const monthLengths = BS_CALENDAR_DATA.monthLengthsByYear[date.year];
|