kollavarsham / kollavarsham-js

TypeScript implementation of kollavarsham that in turn generates Python, C# and Java ones
https://kollavarsham.org/implementations.html
MIT License
10 stars 6 forks source link

API - `fromGregorianDate` giving one day ahead #497

Open nithincvpoyyil opened 3 years ago

nithincvpoyyil commented 3 years ago

kollavarsham.fromGregorianDate(new Date()) gives me below date, but actual malayalm calender showing date as '28'

{ "_naksatra": { "saka": "P-bhadrapada", "enMalayalam": "Poororuttathi", "mlMalayalam": "പൂരുരുട്ടാതി" }, "year": 1196, "month": 7, "date": 29, "gregorianDate": "2021-03-12T15:36:22.094Z", "julianDay": 2459286, "ahargana": 1870820, "sauraMasa": 10, "sauraDivasa": 29, "sakaDate": { "_naksatra": { "saka": "P-bhadrapada", "enMalayalam": "Poororuttathi", "mlMalayalam": "പൂരുരുട്ടാതി" }, "year": 1942, "month": 10, "date": 14, "gregorianDate": "2021-03-12T15:36:22.094Z", "julianDay": 2459286, "ahargana": 1870820, "sauraMasa": 10, "sauraDivasa": 29, "paksa": "Krsnapaksa", "kaliYear": 5121, "adhimasa": "", "fractionalTithi": 0.7046195776476161, "sunriseHour": 6, "sunriseMinute": 3, "originalAhargana": 1870820.2512182216 } }

nithincvpoyyil commented 3 years ago

Date showing in another calender

Screenshot 2021-03-12 at 9 00 36 pm
nithincvpoyyil commented 3 years ago

Date by Kollavarsham.fromGregDate()

Screenshot 2021-03-12 at 8 58 30 pm