@wesantal/santali-calendar 1.0.2 → 1.0.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/README.md +46 -21
- package/dist/constants/festivals.d.ts.map +1 -1
- package/dist/constants/festivals.js.map +1 -1
- package/dist/constants/months.d.ts +1 -0
- package/dist/constants/months.d.ts.map +1 -1
- package/dist/constants/months.js +10 -2
- package/dist/constants/months.js.map +1 -1
- package/dist/constants/moon.d.ts +4 -0
- package/dist/constants/moon.d.ts.map +1 -0
- package/dist/constants/moon.js +21 -0
- package/dist/constants/moon.js.map +1 -0
- package/dist/constants/rules.d.ts +7 -0
- package/dist/constants/rules.d.ts.map +1 -0
- package/dist/constants/rules.js +7 -0
- package/dist/constants/rules.js.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/types/index.d.ts +49 -1
- package/dist/types/index.d.ts.map +1 -1
- package/dist/utils/astronomy.d.ts +7 -0
- package/dist/utils/astronomy.d.ts.map +1 -0
- package/dist/utils/astronomy.js +44 -0
- package/dist/utils/astronomy.js.map +1 -0
- package/dist/utils/calendar.d.ts +2 -15
- package/dist/utils/calendar.d.ts.map +1 -1
- package/dist/utils/calendar.js +47 -50
- package/dist/utils/calendar.js.map +1 -1
- package/dist/utils/leap-year.d.ts +0 -3
- package/dist/utils/leap-year.d.ts.map +1 -1
- package/dist/utils/leap-year.js +1 -3
- package/dist/utils/leap-year.js.map +1 -1
- package/dist/utils/month.d.ts +23 -0
- package/dist/utils/month.d.ts.map +1 -0
- package/dist/utils/month.js +101 -0
- package/dist/utils/month.js.map +1 -0
- package/dist/utils/moon-date.d.ts +24 -0
- package/dist/utils/moon-date.d.ts.map +1 -0
- package/dist/utils/moon-date.js +31 -0
- package/dist/utils/moon-date.js.map +1 -0
- package/dist/utils/moon-phase.d.ts +44 -0
- package/dist/utils/moon-phase.d.ts.map +1 -0
- package/dist/utils/moon-phase.js +121 -0
- package/dist/utils/moon-phase.js.map +1 -0
- package/dist/utils/year.utils.d.ts +15 -0
- package/dist/utils/year.utils.d.ts.map +1 -0
- package/dist/utils/year.utils.js +36 -0
- package/dist/utils/year.utils.js.map +1 -0
- package/package.json +60 -58
package/README.md
CHANGED
|
@@ -24,16 +24,19 @@ import {
|
|
|
24
24
|
getMonth,
|
|
25
25
|
isLeapYear,
|
|
26
26
|
weekDays,
|
|
27
|
+
santaliWeeks,
|
|
27
28
|
festivals,
|
|
28
29
|
months,
|
|
29
|
-
formatDate,
|
|
30
30
|
formatDateShort,
|
|
31
31
|
toOlChikiNumeral,
|
|
32
|
+
getNextNewMoon,
|
|
33
|
+
getNextFullMoon,
|
|
34
|
+
getMoonPhase,
|
|
32
35
|
} from "@wesantal/santali-calendar";
|
|
33
36
|
|
|
34
37
|
// Get today's Santali date
|
|
35
38
|
const today = getToday();
|
|
36
|
-
// { day: 15, year: 2026, month: "ᱢᱟᱜᱽ",
|
|
39
|
+
// { day: 15, year: 2026, month: { name: "ᱢᱟᱜᱽ", english: "Mag", ... }, monthIndex: 0, ... }
|
|
37
40
|
|
|
38
41
|
// Convert any Gregorian date
|
|
39
42
|
const date = getDate(new Date("2026-06-15"));
|
|
@@ -52,8 +55,12 @@ const magh = getMonth(2026, 0);
|
|
|
52
55
|
toOlChikiNumeral(2026); // "᱒᱐᱒᱖"
|
|
53
56
|
|
|
54
57
|
// Format dates
|
|
55
|
-
formatDate("2026-01-19T00:00:00.000Z"); // "19 January 2026"
|
|
56
58
|
formatDateShort("2026-01-19T00:00:00.000Z"); // "19 Jan 2026"
|
|
59
|
+
|
|
60
|
+
// Moon phase utilities
|
|
61
|
+
const nextNewMoon = getNextNewMoon();
|
|
62
|
+
const nextFullMoon = getNextFullMoon();
|
|
63
|
+
const phase = getMoonPhase(new Date("2026-06-15"));
|
|
57
64
|
```
|
|
58
65
|
|
|
59
66
|
## Calendar Structure
|
|
@@ -63,19 +70,20 @@ formatDateShort("2026-01-19T00:00:00.000Z"); // "19 Jan 2026"
|
|
|
63
70
|
```typescript
|
|
64
71
|
{
|
|
65
72
|
year: 2026,
|
|
66
|
-
startDate: "2026-01-
|
|
67
|
-
endDate: "2027-01-
|
|
73
|
+
startDate: "2026-01-19",
|
|
74
|
+
endDate: "2027-01-07",
|
|
68
75
|
currentMonthIndex: 0,
|
|
69
76
|
months: [
|
|
70
77
|
{
|
|
71
78
|
name: "ᱢᱟᱜᱽ",
|
|
72
79
|
english: "Mag",
|
|
73
|
-
startDate: "2026-01-
|
|
74
|
-
endDate: "2026-02-
|
|
80
|
+
startDate: "2026-01-19",
|
|
81
|
+
endDate: "2026-02-17",
|
|
82
|
+
totalDays: 30,
|
|
75
83
|
days: [
|
|
76
84
|
null, // empty padding cell
|
|
77
|
-
{ day: "
|
|
78
|
-
// ...
|
|
85
|
+
{ day: "᱑", date: "2026-01-19", weekDay: "Sunday", isToday: false, isCurrentMonth: true, isNewMoon: false, isFullMoon: false, santaliWeekDay: "ᱥᱤᱸᱜᱤ" },
|
|
86
|
+
// ... flat array of 42 cells (6 rows × 7 columns)
|
|
79
87
|
]
|
|
80
88
|
},
|
|
81
89
|
// ... 12 or 13 months
|
|
@@ -89,11 +97,11 @@ Each month contains a flat `days` array with 42 cells (6 rows × 7 columns). Eac
|
|
|
89
97
|
|
|
90
98
|
- A `SantaliCalendarDay` object:
|
|
91
99
|
```typescript
|
|
92
|
-
{ day: "
|
|
100
|
+
{ day: "᱑", date: "2026-01-19", weekDay: "Sunday", isToday: false, isCurrentMonth: true, isNewMoon: false, isFullMoon: false, santaliWeekDay: "ᱥᱤᱸᱜᱤ" }
|
|
93
101
|
```
|
|
94
102
|
- `null` for empty padding cells
|
|
95
103
|
|
|
96
|
-
The `day` field is in Ol Chiki script. Use `weekDay`
|
|
104
|
+
The `day` field is in Ol Chiki script. Use `weekDay` for English names or `santaliWeekDay` for Ol Chiki weekday names when rendering a grid layout.
|
|
97
105
|
|
|
98
106
|
## Santali Months
|
|
99
107
|
|
|
@@ -103,14 +111,14 @@ The `day` field is in Ol Chiki script. Use `weekDay` to determine column positio
|
|
|
103
111
|
| 1 | Phagun | ᱯᱷᱟ.ᱜᱩᱱ | 29 |
|
|
104
112
|
| 2 | Chaat | ᱪᱟ.ᱛ | 30 |
|
|
105
113
|
| 3 | Baisak | ᱵᱟ.ᱭᱥᱟ.ᱠ | 29 |
|
|
106
|
-
| 4 | Jhent | ᱡᱷᱮᱸᱴ |
|
|
114
|
+
| 4 | Jhent | ᱡᱷᱮᱸᱴ | 29 |
|
|
107
115
|
| 5 | Asal | ᱟᱥᱟᱲ | 29 |
|
|
108
116
|
| 6 | Saan | ᱥᱟᱱ | 30 |
|
|
109
117
|
| 7 | Bhador | ᱵᱷᱟᱫᱚᱨ | 29 |
|
|
110
118
|
| 8 | Dasain | ᱫᱟᱥᱟᱸᱭ | 30 |
|
|
111
119
|
| 9 | Saharay | ᱥᱚᱦᱨᱟᱭ | 29 |
|
|
112
120
|
| 10 | Aghan | ᱟᱜᱷᱟᱬ | 30 |
|
|
113
|
-
| 11 | Pus | ᱯᱩᱥ |
|
|
121
|
+
| 11 | Pus | ᱯᱩᱥ | 30 |
|
|
114
122
|
|
|
115
123
|
**Normal year:** 354 days (12 months). **Leap year:** 384 days (adds Sarcha, a 30-day intercalary month).
|
|
116
124
|
|
|
@@ -144,20 +152,28 @@ null = empty cell
|
|
|
144
152
|
| `getToday()` | Today's Santali date |
|
|
145
153
|
| `getDate(date)` | Convert a Gregorian date to Santali |
|
|
146
154
|
| `isLeapYear(year)` | Check if year has 13 months |
|
|
147
|
-
| `
|
|
148
|
-
| `formatDate(iso)` | Long format date (e.g. "19 January 2026") |
|
|
155
|
+
| `getYearDays(year)` | Get total days in a year (354 or 384) |
|
|
149
156
|
| `formatDateShort(iso)` | Short format date (e.g. "19 Jan 2026") |
|
|
150
157
|
| `toOlChikiNumeral(n)` | Convert number to Ol Chiki script |
|
|
158
|
+
| `getNextNewMoon(date?)` | Find the next New Moon |
|
|
159
|
+
| `getNextFullMoon(date?)` | Find the next Full Moon |
|
|
160
|
+
| `getMoonPhase(date)` | Get moon phase for a date |
|
|
161
|
+
| `getMoonPhaseName(illumination)` | Get phase name from illumination data |
|
|
162
|
+
| `getMoonPhaseIcon(illumination)` | Get phase icon from illumination data |
|
|
163
|
+
| `getMoonPhaseDescription(illumination)` | Get phase description from illumination data |
|
|
164
|
+
| `getSunriseAndSunset(date, lat, lng)` | Get sunrise/sunset times |
|
|
165
|
+
| `getMoonTimes(date, lat, lng)` | Get moonrise/moonset times |
|
|
166
|
+
| `getLunarPhases(start, end)` | Get all phases between two dates |
|
|
151
167
|
|
|
152
168
|
### Constants
|
|
153
169
|
|
|
154
170
|
| Export | Description |
|
|
155
171
|
|--------|-------------|
|
|
156
172
|
| `months` | Array of 12 base month definitions |
|
|
157
|
-
| `
|
|
158
|
-
| `
|
|
159
|
-
| `
|
|
160
|
-
| `
|
|
173
|
+
| `santaliMonths` | Array of 13 months (includes Sarcha for leap years) |
|
|
174
|
+
| `festivals` | Array of 4 Santali cultural festivals/events |
|
|
175
|
+
| `weekDays` | Array of English weekday names (Sunday-first) |
|
|
176
|
+
| `santaliWeeks` | Array of Ol Chiki weekday objects with `name` and `english` |
|
|
161
177
|
|
|
162
178
|
## Festivals
|
|
163
179
|
|
|
@@ -165,11 +181,11 @@ null = empty cell
|
|
|
165
181
|
import { festivals } from "@wesantal/santali-calendar";
|
|
166
182
|
|
|
167
183
|
festivals.forEach((f) => {
|
|
168
|
-
console.log(`${f.name}: ${f.
|
|
184
|
+
console.log(`${f.name}: ${f.startedAt}`);
|
|
169
185
|
});
|
|
170
186
|
```
|
|
171
187
|
|
|
172
|
-
Each festival includes `id`, `name`, `date
|
|
188
|
+
Each festival includes `id`, `name`, `startedAt` (founding date), `description`, and `type` (`"cultural"` or `"community"`).
|
|
173
189
|
|
|
174
190
|
## TypeScript
|
|
175
191
|
|
|
@@ -177,7 +193,10 @@ Full type support:
|
|
|
177
193
|
|
|
178
194
|
```typescript
|
|
179
195
|
import type {
|
|
196
|
+
DateTime,
|
|
180
197
|
WeekDay,
|
|
198
|
+
SantaliWeekDay,
|
|
199
|
+
SantaliWeek,
|
|
181
200
|
SantaliMonth,
|
|
182
201
|
SantaliMonthInfo,
|
|
183
202
|
SantaliCalendarYear,
|
|
@@ -187,6 +206,12 @@ import type {
|
|
|
187
206
|
SantaliCalendarMonth,
|
|
188
207
|
SantaliFestival,
|
|
189
208
|
TodaySantaliDate,
|
|
209
|
+
MoonPhase,
|
|
210
|
+
MoonPhaseIcon,
|
|
211
|
+
MoonPhaseName,
|
|
212
|
+
LunarQuarterType,
|
|
213
|
+
LunarQuarter,
|
|
214
|
+
LunarEvents,
|
|
190
215
|
} from "@wesantal/santali-calendar";
|
|
191
216
|
```
|
|
192
217
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"festivals.d.ts","sourceRoot":"","sources":["../../src/constants/festivals.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEpD,eAAO,MAAM,SAAS,EAAE,eAAe,
|
|
1
|
+
{"version":3,"file":"festivals.d.ts","sourceRoot":"","sources":["../../src/constants/festivals.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEpD,eAAO,MAAM,SAAS,EAAE,eAAe,EA+BtC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"festivals.js","sourceRoot":"","sources":["../../src/constants/festivals.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,SAAS,GAAsB;IAC1C;QACE,EAAE,EAAE,8BAA8B;QAClC,IAAI,EAAE,sBAAsB;QAC5B,WAAW,EAAE,sDAAsD;QACnE,SAAS,EAAE,YAAY;QACvB,IAAI,EAAE,UAAU;KACjB;
|
|
1
|
+
{"version":3,"file":"festivals.js","sourceRoot":"","sources":["../../src/constants/festivals.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,SAAS,GAAsB;IAC1C;QACE,EAAE,EAAE,8BAA8B;QAClC,IAAI,EAAE,sBAAsB;QAC5B,WAAW,EAAE,sDAAsD;QACnE,SAAS,EAAE,YAAY;QACvB,IAAI,EAAE,UAAU;KACjB;IACD;QACE,EAAE,EAAE,WAAW;QACf,IAAI,EAAE,WAAW;QACjB,WAAW,EAAE,WAAW;QACxB,SAAS,EAAE,YAAY;QACvB,IAAI,EAAE,WAAW;KAClB;IAED;QACE,EAAE,EAAE,yCAAyC;QAC7C,IAAI,EAAE,iBAAiB;QACvB,WAAW,EAAE,qDAAqD;QAClE,SAAS,EAAE,YAAY;QACvB,IAAI,EAAE,WAAW;KAClB;IAED;QACE,EAAE,EAAE,0CAA0C;QAC9C,IAAI,EAAE,mCAAmC;QACzC,WAAW,EAAE,0CAA0C;QACvD,SAAS,EAAE,YAAY;QACvB,IAAI,EAAE,UAAU;KACjB;CACF,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"months.d.ts","sourceRoot":"","sources":["../../src/constants/months.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAErD,eAAO,MAAM,MAAM,EAAE,gBAAgB,EA6DpC,CAAC"}
|
|
1
|
+
{"version":3,"file":"months.d.ts","sourceRoot":"","sources":["../../src/constants/months.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAErD,eAAO,MAAM,MAAM,EAAE,gBAAgB,EA6DpC,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,gBAAgB,EAO3C,CAAC"}
|
package/dist/constants/months.js
CHANGED
|
@@ -20,7 +20,7 @@ export const months = [
|
|
|
20
20
|
english: "Baisak",
|
|
21
21
|
},
|
|
22
22
|
{
|
|
23
|
-
days:
|
|
23
|
+
days: 29,
|
|
24
24
|
name: "ᱡᱷᱮᱸᱴ",
|
|
25
25
|
english: "Jhent",
|
|
26
26
|
},
|
|
@@ -55,9 +55,17 @@ export const months = [
|
|
|
55
55
|
english: "Aghan",
|
|
56
56
|
},
|
|
57
57
|
{
|
|
58
|
-
days:
|
|
58
|
+
days: 30,
|
|
59
59
|
name: "ᱯᱩᱥ",
|
|
60
60
|
english: "Pus",
|
|
61
61
|
},
|
|
62
62
|
];
|
|
63
|
+
export const santaliMonths = [
|
|
64
|
+
...months,
|
|
65
|
+
{
|
|
66
|
+
days: 30,
|
|
67
|
+
name: "ᱥᱟᱨᱪᱟ",
|
|
68
|
+
english: "Sarcha",
|
|
69
|
+
},
|
|
70
|
+
];
|
|
63
71
|
//# sourceMappingURL=months.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"months.js","sourceRoot":"","sources":["../../src/constants/months.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,MAAM,GAAuB;IACxC;QACE,IAAI,EAAE,EAAE;QACR,IAAI,EAAE,MAAM;QACZ,OAAO,EAAE,KAAK;KACf;IACD;QACE,IAAI,EAAE,EAAE;QACR,IAAI,EAAE,SAAS;QACf,OAAO,EAAE,QAAQ;KAClB;IACD;QACE,IAAI,EAAE,EAAE;QACR,IAAI,EAAE,MAAM;QACZ,OAAO,EAAE,OAAO;KACjB;IACD;QACE,IAAI,EAAE,EAAE;QACR,IAAI,EAAE,UAAU;QAChB,OAAO,EAAE,QAAQ;KAClB;IACD;QACE,IAAI,EAAE,EAAE;QACR,IAAI,EAAE,OAAO;QACb,OAAO,EAAE,OAAO;KACjB;IACD;QACE,IAAI,EAAE,EAAE;QACR,IAAI,EAAE,MAAM;QACZ,OAAO,EAAE,MAAM;KAChB;IACD;QACE,IAAI,EAAE,EAAE;QACR,IAAI,EAAE,KAAK;QACX,OAAO,EAAE,MAAM;KAChB;IACD;QACE,IAAI,EAAE,EAAE;QACR,IAAI,EAAE,QAAQ;QACd,OAAO,EAAE,QAAQ;KAClB;IACD;QACE,IAAI,EAAE,EAAE;QACR,IAAI,EAAE,QAAQ;QACd,OAAO,EAAE,QAAQ;KAClB;IACD;QACE,IAAI,EAAE,EAAE;QACR,IAAI,EAAE,QAAQ;QACd,OAAO,EAAE,SAAS;KACnB;IACD;QACE,IAAI,EAAE,EAAE;QACR,IAAI,EAAE,OAAO;QACb,OAAO,EAAE,OAAO;KACjB;IACD;QACE,IAAI,EAAE,EAAE;QACR,IAAI,EAAE,KAAK;QACX,OAAO,EAAE,KAAK;KACf;CACF,CAAC"}
|
|
1
|
+
{"version":3,"file":"months.js","sourceRoot":"","sources":["../../src/constants/months.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,MAAM,GAAuB;IACxC;QACE,IAAI,EAAE,EAAE;QACR,IAAI,EAAE,MAAM;QACZ,OAAO,EAAE,KAAK;KACf;IACD;QACE,IAAI,EAAE,EAAE;QACR,IAAI,EAAE,SAAS;QACf,OAAO,EAAE,QAAQ;KAClB;IACD;QACE,IAAI,EAAE,EAAE;QACR,IAAI,EAAE,MAAM;QACZ,OAAO,EAAE,OAAO;KACjB;IACD;QACE,IAAI,EAAE,EAAE;QACR,IAAI,EAAE,UAAU;QAChB,OAAO,EAAE,QAAQ;KAClB;IACD;QACE,IAAI,EAAE,EAAE;QACR,IAAI,EAAE,OAAO;QACb,OAAO,EAAE,OAAO;KACjB;IACD;QACE,IAAI,EAAE,EAAE;QACR,IAAI,EAAE,MAAM;QACZ,OAAO,EAAE,MAAM;KAChB;IACD;QACE,IAAI,EAAE,EAAE;QACR,IAAI,EAAE,KAAK;QACX,OAAO,EAAE,MAAM;KAChB;IACD;QACE,IAAI,EAAE,EAAE;QACR,IAAI,EAAE,QAAQ;QACd,OAAO,EAAE,QAAQ;KAClB;IACD;QACE,IAAI,EAAE,EAAE;QACR,IAAI,EAAE,QAAQ;QACd,OAAO,EAAE,QAAQ;KAClB;IACD;QACE,IAAI,EAAE,EAAE;QACR,IAAI,EAAE,QAAQ;QACd,OAAO,EAAE,SAAS;KACnB;IACD;QACE,IAAI,EAAE,EAAE;QACR,IAAI,EAAE,OAAO;QACb,OAAO,EAAE,OAAO;KACjB;IACD;QACE,IAAI,EAAE,EAAE;QACR,IAAI,EAAE,KAAK;QACX,OAAO,EAAE,KAAK;KACf;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,aAAa,GAAuB;IAC/C,GAAG,MAAM;IACT;QACE,IAAI,EAAE,EAAE;QACR,IAAI,EAAE,OAAO;QACb,OAAO,EAAE,QAAQ;KAClB;CACF,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"moon.d.ts","sourceRoot":"","sources":["../../src/constants/moon.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAEjE,eAAO,MAAM,gBAAgB,EAAE,aAAa,EASlC,CAAC;AAEX,eAAO,MAAM,gBAAgB,EAAE,aAAa,EASlC,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export const MOON_PHASE_NAMES = [
|
|
2
|
+
"New Moon",
|
|
3
|
+
"Waxing Crescent",
|
|
4
|
+
"First Quarter",
|
|
5
|
+
"Waxing Gibbous",
|
|
6
|
+
"Full Moon",
|
|
7
|
+
"Waning Gibbous",
|
|
8
|
+
"Last Quarter",
|
|
9
|
+
"Waning Crescent",
|
|
10
|
+
];
|
|
11
|
+
export const MOON_PHASE_ICONS = [
|
|
12
|
+
"🌑",
|
|
13
|
+
"🌒",
|
|
14
|
+
"🌓",
|
|
15
|
+
"🌔",
|
|
16
|
+
"🌕",
|
|
17
|
+
"🌖",
|
|
18
|
+
"🌗",
|
|
19
|
+
"🌘",
|
|
20
|
+
];
|
|
21
|
+
//# sourceMappingURL=moon.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"moon.js","sourceRoot":"","sources":["../../src/constants/moon.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,gBAAgB,GAAoB;IAC/C,UAAU;IACV,iBAAiB;IACjB,eAAe;IACf,gBAAgB;IAChB,WAAW;IACX,gBAAgB;IAChB,cAAc;IACd,iBAAiB;CACT,CAAC;AAEX,MAAM,CAAC,MAAM,gBAAgB,GAAoB;IAC/C,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;CACI,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export declare const IST_TIME_ZONE = "Asia/Kolkata";
|
|
2
|
+
export declare const MONTH_START_CUTOFF_HOUR = 17;
|
|
3
|
+
export declare const MONTH_START_CUTOFF_MINUTE = 0;
|
|
4
|
+
export declare const METONIC_CYCLE_START = 2026;
|
|
5
|
+
export declare const METONIC_LEAP_POS: Set<number>;
|
|
6
|
+
export declare const YEAR_ANCHOR_DATE = "2026-01-19T00:00:00.000Z";
|
|
7
|
+
//# sourceMappingURL=rules.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rules.d.ts","sourceRoot":"","sources":["../../src/constants/rules.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,aAAa,iBAAiB,CAAC;AAC5C,eAAO,MAAM,uBAAuB,KAAK,CAAC;AAC1C,eAAO,MAAM,yBAAyB,IAAI,CAAC;AAC3C,eAAO,MAAM,mBAAmB,OAAO,CAAC;AACxC,eAAO,MAAM,gBAAgB,aAAoC,CAAC;AAClE,eAAO,MAAM,gBAAgB,6BAA6B,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export const IST_TIME_ZONE = "Asia/Kolkata";
|
|
2
|
+
export const MONTH_START_CUTOFF_HOUR = 17;
|
|
3
|
+
export const MONTH_START_CUTOFF_MINUTE = 0;
|
|
4
|
+
export const METONIC_CYCLE_START = 2026;
|
|
5
|
+
export const METONIC_LEAP_POS = new Set([1, 4, 7, 9, 12, 15, 18]);
|
|
6
|
+
export const YEAR_ANCHOR_DATE = "2026-01-19T00:00:00.000Z";
|
|
7
|
+
//# sourceMappingURL=rules.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rules.js","sourceRoot":"","sources":["../../src/constants/rules.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,aAAa,GAAG,cAAc,CAAC;AAC5C,MAAM,CAAC,MAAM,uBAAuB,GAAG,EAAE,CAAC;AAC1C,MAAM,CAAC,MAAM,yBAAyB,GAAG,CAAC,CAAC;AAC3C,MAAM,CAAC,MAAM,mBAAmB,GAAG,IAAI,CAAC;AACxC,MAAM,CAAC,MAAM,gBAAgB,GAAG,IAAI,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,CAAC,CAAC;AAClE,MAAM,CAAC,MAAM,gBAAgB,GAAG,0BAA0B,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -2,7 +2,9 @@ export * from "./constants/festivals.js";
|
|
|
2
2
|
export * from "./constants/months.js";
|
|
3
3
|
export * from "./constants/week-days.js";
|
|
4
4
|
export * from "./types/index.js";
|
|
5
|
+
export * from "./utils/astronomy.js";
|
|
5
6
|
export * from "./utils/calendar.js";
|
|
6
7
|
export * from "./utils/leap-year.js";
|
|
8
|
+
export * from "./utils/moon-phase.js";
|
|
7
9
|
export * from "./utils/numeral.js";
|
|
8
10
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,0BAA0B,CAAC;AACzC,cAAc,uBAAuB,CAAC;AACtC,cAAc,0BAA0B,CAAC;AACzC,cAAc,kBAAkB,CAAC;AACjC,cAAc,qBAAqB,CAAC;AACpC,cAAc,sBAAsB,CAAC;AACrC,cAAc,oBAAoB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,0BAA0B,CAAC;AACzC,cAAc,uBAAuB,CAAC;AACtC,cAAc,0BAA0B,CAAC;AACzC,cAAc,kBAAkB,CAAC;AACjC,cAAc,sBAAsB,CAAC;AACrC,cAAc,qBAAqB,CAAC;AACpC,cAAc,sBAAsB,CAAC;AACrC,cAAc,uBAAuB,CAAC;AACtC,cAAc,oBAAoB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -2,7 +2,9 @@ export * from "./constants/festivals.js";
|
|
|
2
2
|
export * from "./constants/months.js";
|
|
3
3
|
export * from "./constants/week-days.js";
|
|
4
4
|
export * from "./types/index.js";
|
|
5
|
+
export * from "./utils/astronomy.js";
|
|
5
6
|
export * from "./utils/calendar.js";
|
|
6
7
|
export * from "./utils/leap-year.js";
|
|
8
|
+
export * from "./utils/moon-phase.js";
|
|
7
9
|
export * from "./utils/numeral.js";
|
|
8
10
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,0BAA0B,CAAC;AACzC,cAAc,uBAAuB,CAAC;AACtC,cAAc,0BAA0B,CAAC;AACzC,cAAc,kBAAkB,CAAC;AACjC,cAAc,qBAAqB,CAAC;AACpC,cAAc,sBAAsB,CAAC;AACrC,cAAc,oBAAoB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,0BAA0B,CAAC;AACzC,cAAc,uBAAuB,CAAC;AACtC,cAAc,0BAA0B,CAAC;AACzC,cAAc,kBAAkB,CAAC;AACjC,cAAc,sBAAsB,CAAC;AACrC,cAAc,qBAAqB,CAAC;AACpC,cAAc,sBAAsB,CAAC;AACrC,cAAc,uBAAuB,CAAC;AACtC,cAAc,oBAAoB,CAAC"}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
|
+
import { MoonIllumination } from "suncalc";
|
|
2
|
+
export type DateTime = Date | string | number;
|
|
1
3
|
export type WeekDay = "Sunday" | "Monday" | "Tuesday" | "Wednesday" | "Thursday" | "Friday" | "Saturday";
|
|
4
|
+
export type SantaliWeekDay = "ᱥᱤᱸᱜᱤ" | "ᱚᱛᱮ" | "ᱵᱟᱞᱮ" | "ᱥᱟᱹᱜᱩᱱ" | "ᱥᱟᱹᱨᱫᱤ" | "ᱡᱟᱹᱨᱩᱢ" | "ᱧᱩᱦᱩᱢ";
|
|
2
5
|
export interface SantaliWeek {
|
|
3
|
-
name:
|
|
6
|
+
name: SantaliWeekDay;
|
|
4
7
|
english: string;
|
|
5
8
|
}
|
|
6
9
|
export interface SantaliFestival {
|
|
@@ -39,7 +42,10 @@ export interface SantaliCalendarDay {
|
|
|
39
42
|
date: string;
|
|
40
43
|
isToday: boolean;
|
|
41
44
|
weekDay: WeekDay;
|
|
45
|
+
isNewMoon: boolean;
|
|
46
|
+
isFullMoon: boolean;
|
|
42
47
|
isCurrentMonth: boolean;
|
|
48
|
+
santaliWeekDay: SantaliWeekDay;
|
|
43
49
|
}
|
|
44
50
|
export type SantaliCalendarDayCell = SantaliCalendarDay | null;
|
|
45
51
|
export interface SantaliCalendarMonth {
|
|
@@ -58,4 +64,46 @@ export interface SantaliCalendarYear {
|
|
|
58
64
|
currentMonthIndex: number;
|
|
59
65
|
months: SantaliCalendarMonth[];
|
|
60
66
|
}
|
|
67
|
+
export type MoonPhaseIcon = "🌑" | "🌒" | "🌓" | "🌔" | "🌕" | "🌖" | "🌗" | "🌘";
|
|
68
|
+
export type MoonPhaseName = "New Moon" | "Waxing Crescent" | "First Quarter" | "Waxing Gibbous" | "Full Moon" | "Waning Gibbous" | "Last Quarter" | "Waning Crescent";
|
|
69
|
+
export interface MoonPhase {
|
|
70
|
+
date: string;
|
|
71
|
+
icon: MoonPhaseIcon;
|
|
72
|
+
name: MoonPhaseName;
|
|
73
|
+
description: string;
|
|
74
|
+
illumination: MoonIllumination;
|
|
75
|
+
}
|
|
76
|
+
export type LunarQuarterType = "NEW_MOON" | "FIRST_QUARTER" | "FULL_MOON" | "LAST_QUARTER";
|
|
77
|
+
export interface LunarQuarter {
|
|
78
|
+
type: LunarQuarterType;
|
|
79
|
+
/**
|
|
80
|
+
* Astronomy Engine quarter number.
|
|
81
|
+
*
|
|
82
|
+
* 0 = New Moon
|
|
83
|
+
* 1 = First Quarter
|
|
84
|
+
* 2 = Full Moon
|
|
85
|
+
* 3 = Last Quarter
|
|
86
|
+
*/
|
|
87
|
+
quarter: number;
|
|
88
|
+
/**
|
|
89
|
+
* Exact astronomical UTC time.
|
|
90
|
+
*/
|
|
91
|
+
date: Date;
|
|
92
|
+
/**
|
|
93
|
+
* ISO UTC date-time.
|
|
94
|
+
*/
|
|
95
|
+
dateTime: string;
|
|
96
|
+
/**
|
|
97
|
+
* Calendar date in YYYY-MM-DD.
|
|
98
|
+
*/
|
|
99
|
+
dateString: string;
|
|
100
|
+
name: string;
|
|
101
|
+
icon: string;
|
|
102
|
+
}
|
|
103
|
+
export interface LunarEvents {
|
|
104
|
+
newMoon?: LunarQuarter;
|
|
105
|
+
firstQuarter?: LunarQuarter;
|
|
106
|
+
fullMoon?: LunarQuarter;
|
|
107
|
+
lastQuarter?: LunarQuarter;
|
|
108
|
+
}
|
|
61
109
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,OAAO,GACf,QAAQ,GACR,QAAQ,GACR,SAAS,GACT,WAAW,GACX,UAAU,GACV,QAAQ,GACR,UAAU,CAAC;AAEf,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","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AAC;IACb,IAAI,EAAE,aAAa,CAAC;IACpB,IAAI,EAAE,aAAa,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,gBAAgB,CAAC;CAChC;AAED,MAAM,MAAM,gBAAgB,GAC1B,UAAU,GAAG,eAAe,GAAG,WAAW,GAAG,cAAc,CAAC;AAE9D,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,gBAAgB,CAAC;IAEvB;;;;;;;OAOG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,IAAI,EAAE,IAAI,CAAC;IAEX;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB,IAAI,EAAE,MAAM,CAAC;IAEb,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,WAAW;IAC1B,OAAO,CAAC,EAAE,YAAY,CAAC;IACvB,YAAY,CAAC,EAAE,YAAY,CAAC;IAC5B,QAAQ,CAAC,EAAE,YAAY,CAAC;IACxB,WAAW,CAAC,EAAE,YAAY,CAAC;CAC5B"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { DateTime, LunarQuarter } from "../types/index.js";
|
|
2
|
+
export declare function getNextNewMoon(date?: DateTime): LunarQuarter;
|
|
3
|
+
/**
|
|
4
|
+
* Find the next Full Moon (Purnima).
|
|
5
|
+
*/
|
|
6
|
+
export declare function getNextFullMoon(date?: DateTime): LunarQuarter;
|
|
7
|
+
//# sourceMappingURL=astronomy.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"astronomy.d.ts","sourceRoot":"","sources":["../../src/utils/astronomy.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAU3D,wBAAgB,cAAc,CAAC,IAAI,GAAE,QAAqB,GAAG,YAAY,CAiBxE;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,IAAI,GAAE,QAAqB,GAAG,YAAY,CAezE"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { SearchMoonPhase } from "astronomy-engine";
|
|
2
|
+
import { toDate } from "date-fns";
|
|
3
|
+
/**
|
|
4
|
+
* Converts Astronomy Engine AstroTime
|
|
5
|
+
* into a JavaScript Date.
|
|
6
|
+
*/
|
|
7
|
+
function astroTimeToDate(time) {
|
|
8
|
+
return time.date;
|
|
9
|
+
}
|
|
10
|
+
export function getNextNewMoon(date = new Date()) {
|
|
11
|
+
const time = SearchMoonPhase(0, toDate(date), 40);
|
|
12
|
+
if (!time) {
|
|
13
|
+
throw new Error("Unable to find the next New Moon.");
|
|
14
|
+
}
|
|
15
|
+
const eventDate = astroTimeToDate(time);
|
|
16
|
+
return {
|
|
17
|
+
quarter: 0,
|
|
18
|
+
date: eventDate,
|
|
19
|
+
type: "NEW_MOON",
|
|
20
|
+
dateTime: eventDate.toISOString(),
|
|
21
|
+
dateString: eventDate.toISOString().slice(0, 10),
|
|
22
|
+
name: "New Moon",
|
|
23
|
+
icon: "🌑",
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Find the next Full Moon (Purnima).
|
|
28
|
+
*/
|
|
29
|
+
export function getNextFullMoon(date = new Date()) {
|
|
30
|
+
const time = SearchMoonPhase(180, toDate(date), 40);
|
|
31
|
+
if (!time)
|
|
32
|
+
throw new Error("Unable to find the next Full Moon.");
|
|
33
|
+
const eventDate = astroTimeToDate(time);
|
|
34
|
+
return {
|
|
35
|
+
quarter: 2,
|
|
36
|
+
date: eventDate,
|
|
37
|
+
type: "FULL_MOON",
|
|
38
|
+
dateTime: eventDate.toISOString(),
|
|
39
|
+
dateString: eventDate.toISOString().slice(0, 10),
|
|
40
|
+
name: "Full Moon",
|
|
41
|
+
icon: "🌕",
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
//# sourceMappingURL=astronomy.js.map
|
|
@@ -0,0 +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AW;QACjB,QAAQ,EAAE,SAAS,CAAC,WAAW,EAAE;QACjC,UAAU,EAAE,SAAS,CAAC,WAAW,EAAE,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC;QAChD,IAAI,EAAE,WAAW;QACjB,IAAI,EAAE,IAAI;KACX,CAAC;AACJ,CAAC"}
|
package/dist/utils/calendar.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { SantaliCalendarMonth, SantaliCalendarYear, SantaliMonth, TodaySantaliDate } from "../types/index.js";
|
|
1
|
+
import { DateTime, SantaliCalendarMonth, SantaliCalendarYear, SantaliMonth, TodaySantaliDate } from "../types/index.js";
|
|
2
|
+
export declare function formatToDateString(date: DateTime): string;
|
|
2
3
|
export declare function buildNormalMonth(month: SantaliMonth, previousMonth?: SantaliMonth, nextMonth?: SantaliMonth): SantaliCalendarMonth;
|
|
3
4
|
export declare function formatDateShort(iso: string): string;
|
|
4
5
|
/**
|
|
@@ -28,20 +29,6 @@ export declare function getBaseMonthDays(): number;
|
|
|
28
29
|
* Throws if the base months don't contain exactly 354 days.
|
|
29
30
|
*/
|
|
30
31
|
export declare function validateMonths(): void;
|
|
31
|
-
/**
|
|
32
|
-
* Calculate the beginning of any Santali year from the known anchor.
|
|
33
|
-
*
|
|
34
|
-
* 2026 = YEAR_ANCHOR_DATE
|
|
35
|
-
*
|
|
36
|
-
* For future years:
|
|
37
|
-
* add each previous year's actual length.
|
|
38
|
-
*
|
|
39
|
-
* For previous years:
|
|
40
|
-
* subtract each previous year's actual length.
|
|
41
|
-
*
|
|
42
|
-
* This is important because a leap year is not necessarily 365/366 days.
|
|
43
|
-
*/
|
|
44
|
-
export declare function buildYearStart(year: number, anchorYear?: number, anchorDate?: string): string;
|
|
45
32
|
/**
|
|
46
33
|
* Build all months for a particular Santali year.
|
|
47
34
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"calendar.d.ts","sourceRoot":"","sources":["../../src/utils/calendar.ts"],"names":[],"mappings":"AAUA,OAAO,
|
|
1
|
+
{"version":3,"file":"calendar.d.ts","sourceRoot":"","sources":["../../src/utils/calendar.ts"],"names":[],"mappings":"AAUA,OAAO,EACL,QAAQ,EAER,oBAAoB,EACpB,mBAAmB,EACnB,YAAY,EAEZ,gBAAgB,EAEjB,MAAM,mBAAmB,CAAC;AAiB3B,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,QAAQ,GAAG,MAAM,CAEzD;AAED,wBAAgB,gBAAgB,CAC9B,KAAK,EAAE,YAAY,EACnB,aAAa,CAAC,EAAE,YAAY,EAC5B,SAAS,CAAC,EAAE,YAAY,GACvB,oBAAoB,CAuFtB;AAED,wBAAgB,eAAe,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAMnD;AAMD;;;;;;;;;;;;;GAaG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAEhD;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,IAAI,MAAM,CAEzC;AAED;;;;GAIG;AACH,wBAAgB,cAAc,IAAI,IAAI,CAOrC;AAMD;;;;;;;;;;GAUG;AACH,wBAAgB,WAAW,CACzB,IAAI,EAAE,MAAM,EACZ,aAAa,EAAE,MAAM,GACpB,YAAY,EAAE,CAmChB;AAED;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,mBAAmB,CAuC7D;AAMD;;;;;;;;;GASG;AACH,wBAAgB,QAAQ,CACtB,IAAI,EAAE,MAAM,EACZ,UAAU,EAAE,MAAM,GACjB,oBAAoB,CAetB;AAED;;;;;;;;GAQG;AACH,wBAAgB,OAAO,CAAC,IAAI,EAAE,IAAI,GAAG,MAAM,GAAG,gBAAgB,CAkE7D;AAMD;;GAEG;AACH,wBAAgB,QAAQ,IAAI,gBAAgB,CAE3C"}
|