@thyrith/momentkh 2.5.3 → 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/README.md +0 -5
- package/locale/km.js +3 -3
- package/momentkh.js +2 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -126,8 +126,3 @@ Welcome pull request
|
|
|
126
126
|
# References
|
|
127
127
|
* [គណនាម៉ោងទេវតាចុះ](http://www.dahlina.com/education/khmer_new_year_time.html?fbclid=IwAR0Eq6US-F0LfplMjKzmiRn7rvPgi31i74Wpv4mNhU034mzdyj-3hYrCA8w)
|
|
128
128
|
* [ប្រតិទិនចន្ទគតិ](http://www.cam-cc.org)
|
|
129
|
-
|
|
130
|
-
# Support me
|
|
131
|
-
I'm really happy if this project is useful to you.
|
|
132
|
-
|
|
133
|
-
If you would like to buy me some breakfast, here is my ABA account number: **000 485 222**. Don't forget to remark `momentkh` so that I can count it as usefulness of my work.
|
package/locale/km.js
CHANGED
|
@@ -49,11 +49,11 @@
|
|
|
49
49
|
moonDays: '᧡_᧢_᧣_᧤_᧥_᧦_᧧_᧨_᧩_᧪_᧫_᧬_᧭_᧮_᧯_᧱_᧲_᧳_᧴_᧵_᧶_᧷_᧸_᧹_᧺_᧻_᧼_᧽_᧾_᧿'.split('_'),
|
|
50
50
|
moonStatus: "កើត_រោច".split("_"),
|
|
51
51
|
moonStatusShort: "ក_រ".split("_"),
|
|
52
|
-
weekdays: 'អាទិត្យ_
|
|
52
|
+
weekdays: 'អាទិត្យ_ចន្ទ_អង្គារ_ពុធ_ព្រហស្បតិ៍_សុក្រ_សៅរ៍'.split('_'),
|
|
53
53
|
weekdaysShort: 'អា_ច_អ_ព_ព្រ_សុ_ស'.split('_'),
|
|
54
54
|
weekdaysMin: 'អា_ច_អ_ព_ព្រ_សុ_ស'.split('_'),
|
|
55
|
-
lunarMonths: "មិគសិរ_បុស្ស_មាឃ_ផល្គុន_ចេត្រ_ពិសាខ_ជេស្ឋ_អាសាឍ_ស្រាពណ៍_ភទ្របទ_អស្សុជ_
|
|
56
|
-
animalYear: "ជូត_ឆ្លូវ_ខាល_ថោះ_រោង_ម្សាញ់_
|
|
55
|
+
lunarMonths: "មិគសិរ_បុស្ស_មាឃ_ផល្គុន_ចេត្រ_ពិសាខ_ជេស្ឋ_អាសាឍ_ស្រាពណ៍_ភទ្របទ_អស្សុជ_កត្ដិក_បឋមាសាឍ_ទុតិយាសាឍ".split("_"),
|
|
56
|
+
animalYear: "ជូត_ឆ្លូវ_ខាល_ថោះ_រោង_ម្សាញ់_មមី_មមែ_វក_រកា_ច_កុរ".split("_"),
|
|
57
57
|
eraYear: "សំរឹទ្ធិស័ក_ឯកស័ក_ទោស័ក_ត្រីស័ក_ចត្វាស័ក_បញ្ចស័ក_ឆស័ក_សប្តស័ក_អដ្ឋស័ក_នព្វស័ក".split("_"),
|
|
58
58
|
preparse: function (string) {
|
|
59
59
|
return string.replace(/[១២៣៤៥៦៧៨៩០]/g, function (match) {
|
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')
|