@thyrith/momentkh 2.5.4 → 2.5.5
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/momentkh.js +2 -2
- package/package.json +1 -1
package/momentkh.js
CHANGED
|
@@ -630,8 +630,8 @@ khNewYearMoments = constant.khNewYearMoments
|
|
|
630
630
|
}
|
|
631
631
|
let epochLerngSak = Moment(`17-04-${gregorianYear} ${info.timeOfNewYear.hour}:${info.timeOfNewYear.minute}`, 'DD-MM-YYYY H:m')
|
|
632
632
|
let khEpoch = findLunarDate(epochLerngSak)
|
|
633
|
-
let diffFromEpoch = (((khEpoch.month - 4) *
|
|
634
|
-
(((info.lunarDateLerngSak.month - 4) *
|
|
633
|
+
let diffFromEpoch = (((khEpoch.month - 4) * 29) + khEpoch.day) -
|
|
634
|
+
(((info.lunarDateLerngSak.month - 4) * 29) + info.lunarDateLerngSak.day)
|
|
635
635
|
let result = epochLerngSak.subtract(diffFromEpoch + numberNewYearDay - 1, 'day')
|
|
636
636
|
// Caching
|
|
637
637
|
Moment.khNewYearMoments[gregorianYear] = result.format('DD-MM-YYYY H:m')
|