panchang-ts 0.4.2 → 0.5.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/dist/index.cjs +7 -6
- package/dist/index.js +7 -6
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -3008,7 +3008,7 @@ function computeChandraMasa(siderealSun, siderealMoon, nameFn) {
|
|
|
3008
3008
|
const sunAtNextNewMoon = (siderealSun + daysUntilNext / TROPICAL_YEAR * 360) % 360;
|
|
3009
3009
|
const solarMonthAtNext = Math.floor(sunAtNextNewMoon / 30);
|
|
3010
3010
|
const isAdhika = solarMonthAtPrev === solarMonthAtNext;
|
|
3011
|
-
const index = solarMonthAtPrev;
|
|
3011
|
+
const index = (solarMonthAtPrev + 1) % 12;
|
|
3012
3012
|
const name = nameFn(index, isAdhika);
|
|
3013
3013
|
const isKrishnaPaksha = elongation >= 180;
|
|
3014
3014
|
const purnimantaIndex = isKrishnaPaksha ? (index + 1) % 12 : index;
|
|
@@ -3219,11 +3219,12 @@ var FESTIVAL_REGISTRY = [
|
|
|
3219
3219
|
{ key: "maha_navami", masa: 6, tithi: 8, type: "major" },
|
|
3220
3220
|
{ key: "dussehra", masa: 6, tithi: 9, type: "major" },
|
|
3221
3221
|
{ key: "sharad_purnima", masa: 6, tithi: 14, type: "major" },
|
|
3222
|
-
//
|
|
3223
|
-
{ key: "karva_chauth", masa:
|
|
3224
|
-
{ key: "dhanteras", masa:
|
|
3225
|
-
{ key: "narak_chaturdashi", masa:
|
|
3226
|
-
{ key: "diwali", masa:
|
|
3222
|
+
// Ashwin (6) — Krishna Paksha festivals (Amanta: Ashwin; Purnimanta calls these "Kartika")
|
|
3223
|
+
{ key: "karva_chauth", masa: 6, tithi: 18, type: "major" },
|
|
3224
|
+
{ key: "dhanteras", masa: 6, tithi: 27, type: "major" },
|
|
3225
|
+
{ key: "narak_chaturdashi", masa: 6, tithi: 28, type: "major" },
|
|
3226
|
+
{ key: "diwali", masa: 6, tithi: 29, type: "major" },
|
|
3227
|
+
// Kartika (7) — Shukla Paksha
|
|
3227
3228
|
{ key: "kartika_purnima", masa: 7, tithi: 14, type: "minor" },
|
|
3228
3229
|
// Magha (10)
|
|
3229
3230
|
{ key: "vasant_panchami", masa: 10, tithi: 4, type: "major" },
|
package/dist/index.js
CHANGED
|
@@ -3006,7 +3006,7 @@ function computeChandraMasa(siderealSun, siderealMoon, nameFn) {
|
|
|
3006
3006
|
const sunAtNextNewMoon = (siderealSun + daysUntilNext / TROPICAL_YEAR * 360) % 360;
|
|
3007
3007
|
const solarMonthAtNext = Math.floor(sunAtNextNewMoon / 30);
|
|
3008
3008
|
const isAdhika = solarMonthAtPrev === solarMonthAtNext;
|
|
3009
|
-
const index = solarMonthAtPrev;
|
|
3009
|
+
const index = (solarMonthAtPrev + 1) % 12;
|
|
3010
3010
|
const name = nameFn(index, isAdhika);
|
|
3011
3011
|
const isKrishnaPaksha = elongation >= 180;
|
|
3012
3012
|
const purnimantaIndex = isKrishnaPaksha ? (index + 1) % 12 : index;
|
|
@@ -3217,11 +3217,12 @@ var FESTIVAL_REGISTRY = [
|
|
|
3217
3217
|
{ key: "maha_navami", masa: 6, tithi: 8, type: "major" },
|
|
3218
3218
|
{ key: "dussehra", masa: 6, tithi: 9, type: "major" },
|
|
3219
3219
|
{ key: "sharad_purnima", masa: 6, tithi: 14, type: "major" },
|
|
3220
|
-
//
|
|
3221
|
-
{ key: "karva_chauth", masa:
|
|
3222
|
-
{ key: "dhanteras", masa:
|
|
3223
|
-
{ key: "narak_chaturdashi", masa:
|
|
3224
|
-
{ key: "diwali", masa:
|
|
3220
|
+
// Ashwin (6) — Krishna Paksha festivals (Amanta: Ashwin; Purnimanta calls these "Kartika")
|
|
3221
|
+
{ key: "karva_chauth", masa: 6, tithi: 18, type: "major" },
|
|
3222
|
+
{ key: "dhanteras", masa: 6, tithi: 27, type: "major" },
|
|
3223
|
+
{ key: "narak_chaturdashi", masa: 6, tithi: 28, type: "major" },
|
|
3224
|
+
{ key: "diwali", masa: 6, tithi: 29, type: "major" },
|
|
3225
|
+
// Kartika (7) — Shukla Paksha
|
|
3225
3226
|
{ key: "kartika_purnima", masa: 7, tithi: 14, type: "minor" },
|
|
3226
3227
|
// Magha (10)
|
|
3227
3228
|
{ key: "vasant_panchami", masa: 10, tithi: 4, type: "major" },
|
package/package.json
CHANGED