react-day-picker 10.0.0-next.1 → 10.0.0-next.2
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/LICENSE +1 -1
- package/README.md +5 -5
- package/dist/cjs/locale.d.ts +0 -2
- package/dist/cjs/locale.js +2 -6
- package/dist/esm/locale.d.ts +0 -2
- package/dist/esm/locale.js +0 -2
- package/package.json +7 -104
- package/buddhist.d.ts +0 -1
- package/buddhist.js +0 -2
- package/dist/cjs/buddhist/index.d.ts +0 -26
- package/dist/cjs/buddhist/index.js +0 -48
- package/dist/cjs/buddhist/lib/format.d.ts +0 -3
- package/dist/cjs/buddhist/lib/format.js +0 -30
- package/dist/cjs/ethiopic/index.d.ts +0 -44
- package/dist/cjs/ethiopic/index.js +0 -77
- package/dist/cjs/ethiopic/lib/addMonths.d.ts +0 -9
- package/dist/cjs/ethiopic/lib/addMonths.js +0 -27
- package/dist/cjs/ethiopic/lib/addYears.d.ts +0 -9
- package/dist/cjs/ethiopic/lib/addYears.js +0 -26
- package/dist/cjs/ethiopic/lib/differenceInCalendarMonths.d.ts +0 -8
- package/dist/cjs/ethiopic/lib/differenceInCalendarMonths.js +0 -17
- package/dist/cjs/ethiopic/lib/eachMonthOfInterval.d.ts +0 -11
- package/dist/cjs/ethiopic/lib/eachMonthOfInterval.js +0 -30
- package/dist/cjs/ethiopic/lib/eachYearOfInterval.d.ts +0 -7
- package/dist/cjs/ethiopic/lib/eachYearOfInterval.js +0 -21
- package/dist/cjs/ethiopic/lib/endOfMonth.d.ts +0 -8
- package/dist/cjs/ethiopic/lib/endOfMonth.js +0 -17
- package/dist/cjs/ethiopic/lib/endOfWeek.d.ts +0 -9
- package/dist/cjs/ethiopic/lib/endOfWeek.js +0 -16
- package/dist/cjs/ethiopic/lib/endOfYear.d.ts +0 -7
- package/dist/cjs/ethiopic/lib/endOfYear.js +0 -15
- package/dist/cjs/ethiopic/lib/format.d.ts +0 -22
- package/dist/cjs/ethiopic/lib/format.js +0 -135
- package/dist/cjs/ethiopic/lib/formatNumber.d.ts +0 -19
- package/dist/cjs/ethiopic/lib/formatNumber.js +0 -32
- package/dist/cjs/ethiopic/lib/getMonth.d.ts +0 -7
- package/dist/cjs/ethiopic/lib/getMonth.js +0 -14
- package/dist/cjs/ethiopic/lib/getWeek.d.ts +0 -9
- package/dist/cjs/ethiopic/lib/getWeek.js +0 -44
- package/dist/cjs/ethiopic/lib/getYear.d.ts +0 -7
- package/dist/cjs/ethiopic/lib/getYear.js +0 -14
- package/dist/cjs/ethiopic/lib/index.d.ts +0 -22
- package/dist/cjs/ethiopic/lib/index.js +0 -38
- package/dist/cjs/ethiopic/lib/isSameMonth.d.ts +0 -8
- package/dist/cjs/ethiopic/lib/isSameMonth.js +0 -16
- package/dist/cjs/ethiopic/lib/isSameYear.d.ts +0 -8
- package/dist/cjs/ethiopic/lib/isSameYear.js +0 -16
- package/dist/cjs/ethiopic/lib/newDate.d.ts +0 -9
- package/dist/cjs/ethiopic/lib/newDate.js +0 -25
- package/dist/cjs/ethiopic/lib/setMonth.d.ts +0 -8
- package/dist/cjs/ethiopic/lib/setMonth.js +0 -17
- package/dist/cjs/ethiopic/lib/setYear.d.ts +0 -8
- package/dist/cjs/ethiopic/lib/setYear.js +0 -19
- package/dist/cjs/ethiopic/lib/startOfDay.d.ts +0 -7
- package/dist/cjs/ethiopic/lib/startOfDay.js +0 -14
- package/dist/cjs/ethiopic/lib/startOfMonth.d.ts +0 -7
- package/dist/cjs/ethiopic/lib/startOfMonth.js +0 -14
- package/dist/cjs/ethiopic/lib/startOfWeek.d.ts +0 -9
- package/dist/cjs/ethiopic/lib/startOfWeek.js +0 -15
- package/dist/cjs/ethiopic/lib/startOfYear.d.ts +0 -7
- package/dist/cjs/ethiopic/lib/startOfYear.js +0 -14
- package/dist/cjs/ethiopic/utils/EthiopicDate.d.ts +0 -17
- package/dist/cjs/ethiopic/utils/EthiopicDate.js +0 -2
- package/dist/cjs/ethiopic/utils/daysInMonth.d.ts +0 -13
- package/dist/cjs/ethiopic/utils/daysInMonth.js +0 -22
- package/dist/cjs/ethiopic/utils/index.d.ts +0 -6
- package/dist/cjs/ethiopic/utils/index.js +0 -22
- package/dist/cjs/ethiopic/utils/isEthiopicDateValid.d.ts +0 -2
- package/dist/cjs/ethiopic/utils/isEthiopicDateValid.js +0 -15
- package/dist/cjs/ethiopic/utils/isEthiopicLeapYear.d.ts +0 -7
- package/dist/cjs/ethiopic/utils/isEthiopicLeapYear.js +0 -12
- package/dist/cjs/ethiopic/utils/toEthiopicDate.d.ts +0 -17
- package/dist/cjs/ethiopic/utils/toEthiopicDate.js +0 -54
- package/dist/cjs/ethiopic/utils/toGeezNumerals.d.ts +0 -8
- package/dist/cjs/ethiopic/utils/toGeezNumerals.js +0 -51
- package/dist/cjs/ethiopic/utils/toGregorianDate.d.ts +0 -9
- package/dist/cjs/ethiopic/utils/toGregorianDate.js +0 -59
- package/dist/cjs/hebrew/index.d.ts +0 -26
- package/dist/cjs/hebrew/index.js +0 -76
- package/dist/cjs/hebrew/lib/addMonths.d.ts +0 -1
- package/dist/cjs/hebrew/lib/addMonths.js +0 -15
- package/dist/cjs/hebrew/lib/addYears.d.ts +0 -1
- package/dist/cjs/hebrew/lib/addYears.js +0 -12
- package/dist/cjs/hebrew/lib/differenceInCalendarMonths.d.ts +0 -1
- package/dist/cjs/hebrew/lib/differenceInCalendarMonths.js +0 -10
- package/dist/cjs/hebrew/lib/eachMonthOfInterval.d.ts +0 -2
- package/dist/cjs/hebrew/lib/eachMonthOfInterval.js +0 -23
- package/dist/cjs/hebrew/lib/eachYearOfInterval.d.ts +0 -2
- package/dist/cjs/hebrew/lib/eachYearOfInterval.js +0 -19
- package/dist/cjs/hebrew/lib/endOfMonth.d.ts +0 -1
- package/dist/cjs/hebrew/lib/endOfMonth.js +0 -10
- package/dist/cjs/hebrew/lib/endOfYear.d.ts +0 -1
- package/dist/cjs/hebrew/lib/endOfYear.js +0 -11
- package/dist/cjs/hebrew/lib/findMonthIndexByCode.d.ts +0 -1
- package/dist/cjs/hebrew/lib/findMonthIndexByCode.js +0 -13
- package/dist/cjs/hebrew/lib/format.d.ts +0 -3
- package/dist/cjs/hebrew/lib/format.js +0 -152
- package/dist/cjs/hebrew/lib/getMonth.d.ts +0 -1
- package/dist/cjs/hebrew/lib/getMonth.js +0 -7
- package/dist/cjs/hebrew/lib/getYear.d.ts +0 -1
- package/dist/cjs/hebrew/lib/getYear.js +0 -7
- package/dist/cjs/hebrew/lib/index.d.ts +0 -17
- package/dist/cjs/hebrew/lib/index.js +0 -33
- package/dist/cjs/hebrew/lib/isSameMonth.d.ts +0 -1
- package/dist/cjs/hebrew/lib/isSameMonth.js +0 -9
- package/dist/cjs/hebrew/lib/isSameYear.d.ts +0 -1
- package/dist/cjs/hebrew/lib/isSameYear.js +0 -7
- package/dist/cjs/hebrew/lib/newDate.d.ts +0 -1
- package/dist/cjs/hebrew/lib/newDate.js +0 -7
- package/dist/cjs/hebrew/lib/setMonth.d.ts +0 -1
- package/dist/cjs/hebrew/lib/setMonth.js +0 -12
- package/dist/cjs/hebrew/lib/setYear.d.ts +0 -1
- package/dist/cjs/hebrew/lib/setYear.js +0 -31
- package/dist/cjs/hebrew/lib/startOfMonth.d.ts +0 -1
- package/dist/cjs/hebrew/lib/startOfMonth.js +0 -8
- package/dist/cjs/hebrew/lib/startOfYear.d.ts +0 -1
- package/dist/cjs/hebrew/lib/startOfYear.js +0 -8
- package/dist/cjs/hebrew/utils/calendarMath.d.ts +0 -17
- package/dist/cjs/hebrew/utils/calendarMath.js +0 -139
- package/dist/cjs/hebrew/utils/constants.d.ts +0 -13
- package/dist/cjs/hebrew/utils/constants.js +0 -36
- package/dist/cjs/hebrew/utils/dateConversion.d.ts +0 -5
- package/dist/cjs/hebrew/utils/dateConversion.js +0 -74
- package/dist/cjs/hebrew/utils/serial.d.ts +0 -9
- package/dist/cjs/hebrew/utils/serial.js +0 -76
- package/dist/cjs/hijri/index.d.ts +0 -28
- package/dist/cjs/hijri/index.js +0 -92
- package/dist/cjs/hijri/lib/addMonths.d.ts +0 -1
- package/dist/cjs/hijri/lib/addMonths.js +0 -9
- package/dist/cjs/hijri/lib/addYears.d.ts +0 -1
- package/dist/cjs/hijri/lib/addYears.js +0 -9
- package/dist/cjs/hijri/lib/differenceInCalendarMonths.d.ts +0 -1
- package/dist/cjs/hijri/lib/differenceInCalendarMonths.js +0 -10
- package/dist/cjs/hijri/lib/eachMonthOfInterval.d.ts +0 -2
- package/dist/cjs/hijri/lib/eachMonthOfInterval.js +0 -29
- package/dist/cjs/hijri/lib/eachYearOfInterval.d.ts +0 -2
- package/dist/cjs/hijri/lib/eachYearOfInterval.js +0 -19
- package/dist/cjs/hijri/lib/endOfMonth.d.ts +0 -1
- package/dist/cjs/hijri/lib/endOfMonth.js +0 -14
- package/dist/cjs/hijri/lib/endOfYear.d.ts +0 -1
- package/dist/cjs/hijri/lib/endOfYear.js +0 -14
- package/dist/cjs/hijri/lib/fallbackLocaleData.d.ts +0 -5
- package/dist/cjs/hijri/lib/fallbackLocaleData.js +0 -111
- package/dist/cjs/hijri/lib/format.d.ts +0 -3
- package/dist/cjs/hijri/lib/format.js +0 -149
- package/dist/cjs/hijri/lib/getMonth.d.ts +0 -1
- package/dist/cjs/hijri/lib/getMonth.js +0 -7
- package/dist/cjs/hijri/lib/getYear.d.ts +0 -1
- package/dist/cjs/hijri/lib/getYear.js +0 -7
- package/dist/cjs/hijri/lib/index.d.ts +0 -17
- package/dist/cjs/hijri/lib/index.js +0 -33
- package/dist/cjs/hijri/lib/isSameMonth.d.ts +0 -1
- package/dist/cjs/hijri/lib/isSameMonth.js +0 -10
- package/dist/cjs/hijri/lib/isSameYear.d.ts +0 -1
- package/dist/cjs/hijri/lib/isSameYear.js +0 -9
- package/dist/cjs/hijri/lib/newDate.d.ts +0 -1
- package/dist/cjs/hijri/lib/newDate.js +0 -7
- package/dist/cjs/hijri/lib/setMonth.d.ts +0 -1
- package/dist/cjs/hijri/lib/setMonth.js +0 -27
- package/dist/cjs/hijri/lib/setYear.d.ts +0 -1
- package/dist/cjs/hijri/lib/setYear.js +0 -15
- package/dist/cjs/hijri/lib/startOfMonth.d.ts +0 -1
- package/dist/cjs/hijri/lib/startOfMonth.js +0 -12
- package/dist/cjs/hijri/lib/startOfYear.d.ts +0 -1
- package/dist/cjs/hijri/lib/startOfYear.js +0 -12
- package/dist/cjs/hijri/utils/conversion.d.ts +0 -5
- package/dist/cjs/hijri/utils/conversion.js +0 -40
- package/dist/cjs/hijri/utils/daysInMonth.d.ts +0 -1
- package/dist/cjs/hijri/utils/daysInMonth.js +0 -24
- package/dist/cjs/hijri/utils/range.d.ts +0 -21
- package/dist/cjs/hijri/utils/range.js +0 -104
- package/dist/cjs/hijri/utils/types.d.ts +0 -5
- package/dist/cjs/hijri/utils/types.js +0 -2
- package/dist/cjs/locale/en-US-jalali.d.ts +0 -6
- package/dist/cjs/locale/en-US-jalali.js +0 -74
- package/dist/cjs/locale/fa-IR-jalali.d.ts +0 -6
- package/dist/cjs/locale/fa-IR-jalali.js +0 -74
- package/dist/cjs/noonJalaliDateLib.d.ts +0 -9
- package/dist/cjs/noonJalaliDateLib.js +0 -113
- package/dist/cjs/persian.d.ts +0 -71
- package/dist/cjs/persian.js +0 -106
- package/dist/esm/buddhist/index.d.ts +0 -26
- package/dist/esm/buddhist/index.js +0 -40
- package/dist/esm/buddhist/lib/format.d.ts +0 -3
- package/dist/esm/buddhist/lib/format.js +0 -27
- package/dist/esm/ethiopic/index.d.ts +0 -44
- package/dist/esm/ethiopic/index.js +0 -34
- package/dist/esm/ethiopic/lib/addMonths.d.ts +0 -9
- package/dist/esm/ethiopic/lib/addMonths.js +0 -24
- package/dist/esm/ethiopic/lib/addYears.d.ts +0 -9
- package/dist/esm/ethiopic/lib/addYears.js +0 -23
- package/dist/esm/ethiopic/lib/differenceInCalendarMonths.d.ts +0 -8
- package/dist/esm/ethiopic/lib/differenceInCalendarMonths.js +0 -14
- package/dist/esm/ethiopic/lib/eachMonthOfInterval.d.ts +0 -11
- package/dist/esm/ethiopic/lib/eachMonthOfInterval.js +0 -27
- package/dist/esm/ethiopic/lib/eachYearOfInterval.d.ts +0 -7
- package/dist/esm/ethiopic/lib/eachYearOfInterval.js +0 -18
- package/dist/esm/ethiopic/lib/endOfMonth.d.ts +0 -8
- package/dist/esm/ethiopic/lib/endOfMonth.js +0 -14
- package/dist/esm/ethiopic/lib/endOfWeek.d.ts +0 -9
- package/dist/esm/ethiopic/lib/endOfWeek.js +0 -13
- package/dist/esm/ethiopic/lib/endOfYear.d.ts +0 -7
- package/dist/esm/ethiopic/lib/endOfYear.js +0 -12
- package/dist/esm/ethiopic/lib/format.d.ts +0 -22
- package/dist/esm/ethiopic/lib/format.js +0 -131
- package/dist/esm/ethiopic/lib/formatNumber.d.ts +0 -19
- package/dist/esm/ethiopic/lib/formatNumber.js +0 -29
- package/dist/esm/ethiopic/lib/getMonth.d.ts +0 -7
- package/dist/esm/ethiopic/lib/getMonth.js +0 -11
- package/dist/esm/ethiopic/lib/getWeek.d.ts +0 -9
- package/dist/esm/ethiopic/lib/getWeek.js +0 -41
- package/dist/esm/ethiopic/lib/getYear.d.ts +0 -7
- package/dist/esm/ethiopic/lib/getYear.js +0 -11
- package/dist/esm/ethiopic/lib/index.d.ts +0 -22
- package/dist/esm/ethiopic/lib/index.js +0 -22
- package/dist/esm/ethiopic/lib/isSameMonth.d.ts +0 -8
- package/dist/esm/ethiopic/lib/isSameMonth.js +0 -13
- package/dist/esm/ethiopic/lib/isSameYear.d.ts +0 -8
- package/dist/esm/ethiopic/lib/isSameYear.js +0 -13
- package/dist/esm/ethiopic/lib/newDate.d.ts +0 -9
- package/dist/esm/ethiopic/lib/newDate.js +0 -22
- package/dist/esm/ethiopic/lib/setMonth.d.ts +0 -8
- package/dist/esm/ethiopic/lib/setMonth.js +0 -14
- package/dist/esm/ethiopic/lib/setYear.d.ts +0 -8
- package/dist/esm/ethiopic/lib/setYear.js +0 -16
- package/dist/esm/ethiopic/lib/startOfDay.d.ts +0 -7
- package/dist/esm/ethiopic/lib/startOfDay.js +0 -11
- package/dist/esm/ethiopic/lib/startOfMonth.d.ts +0 -7
- package/dist/esm/ethiopic/lib/startOfMonth.js +0 -11
- package/dist/esm/ethiopic/lib/startOfWeek.d.ts +0 -9
- package/dist/esm/ethiopic/lib/startOfWeek.js +0 -12
- package/dist/esm/ethiopic/lib/startOfYear.d.ts +0 -7
- package/dist/esm/ethiopic/lib/startOfYear.js +0 -11
- package/dist/esm/ethiopic/utils/EthiopicDate.d.ts +0 -17
- package/dist/esm/ethiopic/utils/EthiopicDate.js +0 -1
- package/dist/esm/ethiopic/utils/daysInMonth.d.ts +0 -13
- package/dist/esm/ethiopic/utils/daysInMonth.js +0 -19
- package/dist/esm/ethiopic/utils/index.d.ts +0 -6
- package/dist/esm/ethiopic/utils/index.js +0 -6
- package/dist/esm/ethiopic/utils/isEthiopicDateValid.d.ts +0 -2
- package/dist/esm/ethiopic/utils/isEthiopicDateValid.js +0 -12
- package/dist/esm/ethiopic/utils/isEthiopicLeapYear.d.ts +0 -7
- package/dist/esm/ethiopic/utils/isEthiopicLeapYear.js +0 -9
- package/dist/esm/ethiopic/utils/toEthiopicDate.d.ts +0 -17
- package/dist/esm/ethiopic/utils/toEthiopicDate.js +0 -50
- package/dist/esm/ethiopic/utils/toGeezNumerals.d.ts +0 -8
- package/dist/esm/ethiopic/utils/toGeezNumerals.js +0 -48
- package/dist/esm/ethiopic/utils/toGregorianDate.d.ts +0 -9
- package/dist/esm/ethiopic/utils/toGregorianDate.js +0 -55
- package/dist/esm/hebrew/index.d.ts +0 -26
- package/dist/esm/hebrew/index.js +0 -33
- package/dist/esm/hebrew/lib/addMonths.d.ts +0 -1
- package/dist/esm/hebrew/lib/addMonths.js +0 -12
- package/dist/esm/hebrew/lib/addYears.d.ts +0 -1
- package/dist/esm/hebrew/lib/addYears.js +0 -9
- package/dist/esm/hebrew/lib/differenceInCalendarMonths.d.ts +0 -1
- package/dist/esm/hebrew/lib/differenceInCalendarMonths.js +0 -7
- package/dist/esm/hebrew/lib/eachMonthOfInterval.d.ts +0 -2
- package/dist/esm/hebrew/lib/eachMonthOfInterval.js +0 -20
- package/dist/esm/hebrew/lib/eachYearOfInterval.d.ts +0 -2
- package/dist/esm/hebrew/lib/eachYearOfInterval.js +0 -16
- package/dist/esm/hebrew/lib/endOfMonth.d.ts +0 -1
- package/dist/esm/hebrew/lib/endOfMonth.js +0 -7
- package/dist/esm/hebrew/lib/endOfYear.d.ts +0 -1
- package/dist/esm/hebrew/lib/endOfYear.js +0 -8
- package/dist/esm/hebrew/lib/findMonthIndexByCode.d.ts +0 -1
- package/dist/esm/hebrew/lib/findMonthIndexByCode.js +0 -10
- package/dist/esm/hebrew/lib/format.d.ts +0 -3
- package/dist/esm/hebrew/lib/format.js +0 -149
- package/dist/esm/hebrew/lib/getMonth.d.ts +0 -1
- package/dist/esm/hebrew/lib/getMonth.js +0 -4
- package/dist/esm/hebrew/lib/getYear.d.ts +0 -1
- package/dist/esm/hebrew/lib/getYear.js +0 -4
- package/dist/esm/hebrew/lib/index.d.ts +0 -17
- package/dist/esm/hebrew/lib/index.js +0 -17
- package/dist/esm/hebrew/lib/isSameMonth.d.ts +0 -1
- package/dist/esm/hebrew/lib/isSameMonth.js +0 -6
- package/dist/esm/hebrew/lib/isSameYear.d.ts +0 -1
- package/dist/esm/hebrew/lib/isSameYear.js +0 -4
- package/dist/esm/hebrew/lib/newDate.d.ts +0 -1
- package/dist/esm/hebrew/lib/newDate.js +0 -4
- package/dist/esm/hebrew/lib/setMonth.d.ts +0 -1
- package/dist/esm/hebrew/lib/setMonth.js +0 -9
- package/dist/esm/hebrew/lib/setYear.d.ts +0 -1
- package/dist/esm/hebrew/lib/setYear.js +0 -28
- package/dist/esm/hebrew/lib/startOfMonth.d.ts +0 -1
- package/dist/esm/hebrew/lib/startOfMonth.js +0 -5
- package/dist/esm/hebrew/lib/startOfYear.d.ts +0 -1
- package/dist/esm/hebrew/lib/startOfYear.js +0 -5
- package/dist/esm/hebrew/utils/calendarMath.d.ts +0 -17
- package/dist/esm/hebrew/utils/calendarMath.js +0 -130
- package/dist/esm/hebrew/utils/constants.d.ts +0 -13
- package/dist/esm/hebrew/utils/constants.js +0 -33
- package/dist/esm/hebrew/utils/dateConversion.d.ts +0 -5
- package/dist/esm/hebrew/utils/dateConversion.js +0 -70
- package/dist/esm/hebrew/utils/serial.d.ts +0 -9
- package/dist/esm/hebrew/utils/serial.js +0 -70
- package/dist/esm/hijri/index.d.ts +0 -28
- package/dist/esm/hijri/index.js +0 -49
- package/dist/esm/hijri/lib/addMonths.d.ts +0 -1
- package/dist/esm/hijri/lib/addMonths.js +0 -6
- package/dist/esm/hijri/lib/addYears.d.ts +0 -1
- package/dist/esm/hijri/lib/addYears.js +0 -6
- package/dist/esm/hijri/lib/differenceInCalendarMonths.d.ts +0 -1
- package/dist/esm/hijri/lib/differenceInCalendarMonths.js +0 -7
- package/dist/esm/hijri/lib/eachMonthOfInterval.d.ts +0 -2
- package/dist/esm/hijri/lib/eachMonthOfInterval.js +0 -26
- package/dist/esm/hijri/lib/eachYearOfInterval.d.ts +0 -2
- package/dist/esm/hijri/lib/eachYearOfInterval.js +0 -16
- package/dist/esm/hijri/lib/endOfMonth.d.ts +0 -1
- package/dist/esm/hijri/lib/endOfMonth.js +0 -11
- package/dist/esm/hijri/lib/endOfYear.d.ts +0 -1
- package/dist/esm/hijri/lib/endOfYear.js +0 -11
- package/dist/esm/hijri/lib/fallbackLocaleData.d.ts +0 -5
- package/dist/esm/hijri/lib/fallbackLocaleData.js +0 -105
- package/dist/esm/hijri/lib/format.d.ts +0 -3
- package/dist/esm/hijri/lib/format.js +0 -146
- package/dist/esm/hijri/lib/getMonth.d.ts +0 -1
- package/dist/esm/hijri/lib/getMonth.js +0 -4
- package/dist/esm/hijri/lib/getYear.d.ts +0 -1
- package/dist/esm/hijri/lib/getYear.js +0 -4
- package/dist/esm/hijri/lib/index.d.ts +0 -17
- package/dist/esm/hijri/lib/index.js +0 -17
- package/dist/esm/hijri/lib/isSameMonth.d.ts +0 -1
- package/dist/esm/hijri/lib/isSameMonth.js +0 -7
- package/dist/esm/hijri/lib/isSameYear.d.ts +0 -1
- package/dist/esm/hijri/lib/isSameYear.js +0 -6
- package/dist/esm/hijri/lib/newDate.d.ts +0 -1
- package/dist/esm/hijri/lib/newDate.js +0 -4
- package/dist/esm/hijri/lib/setMonth.d.ts +0 -1
- package/dist/esm/hijri/lib/setMonth.js +0 -24
- package/dist/esm/hijri/lib/setYear.d.ts +0 -1
- package/dist/esm/hijri/lib/setYear.js +0 -12
- package/dist/esm/hijri/lib/startOfMonth.d.ts +0 -1
- package/dist/esm/hijri/lib/startOfMonth.js +0 -9
- package/dist/esm/hijri/lib/startOfYear.d.ts +0 -1
- package/dist/esm/hijri/lib/startOfYear.js +0 -9
- package/dist/esm/hijri/utils/conversion.d.ts +0 -5
- package/dist/esm/hijri/utils/conversion.js +0 -36
- package/dist/esm/hijri/utils/daysInMonth.d.ts +0 -1
- package/dist/esm/hijri/utils/daysInMonth.js +0 -21
- package/dist/esm/hijri/utils/range.d.ts +0 -21
- package/dist/esm/hijri/utils/range.js +0 -96
- package/dist/esm/hijri/utils/types.d.ts +0 -5
- package/dist/esm/hijri/utils/types.js +0 -1
- package/dist/esm/locale/en-US-jalali.d.ts +0 -6
- package/dist/esm/locale/en-US-jalali.js +0 -38
- package/dist/esm/locale/fa-IR-jalali.d.ts +0 -6
- package/dist/esm/locale/fa-IR-jalali.js +0 -38
- package/dist/esm/noonJalaliDateLib.d.ts +0 -9
- package/dist/esm/noonJalaliDateLib.js +0 -110
- package/dist/esm/persian.d.ts +0 -71
- package/dist/esm/persian.js +0 -65
- package/hebrew.d.ts +0 -1
- package/hebrew.js +0 -2
- package/hijri.d.ts +0 -1
- package/hijri.js +0 -2
- package/persian.d.ts +0 -1
- package/persian.js +0 -2
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.setYear = setYear;
|
|
4
|
-
const daysInMonth_js_1 = require("../utils/daysInMonth.js");
|
|
5
|
-
const index_js_1 = require("../utils/index.js");
|
|
6
|
-
/**
|
|
7
|
-
* Set year
|
|
8
|
-
*
|
|
9
|
-
* @param {Date} date - The original date
|
|
10
|
-
* @param {number} year - The year to set
|
|
11
|
-
* @returns {Date} The new date with the year set
|
|
12
|
-
*/
|
|
13
|
-
function setYear(date, year) {
|
|
14
|
-
const { month, day } = (0, index_js_1.toEthiopicDate)(date);
|
|
15
|
-
// Check if the day is valid in the new year (handles leap year changes)
|
|
16
|
-
const maxDays = (0, daysInMonth_js_1.daysInMonth)(month, year);
|
|
17
|
-
const newDay = Math.min(day, maxDays);
|
|
18
|
-
return (0, index_js_1.toGregorianDate)({ year, month, day: newDay });
|
|
19
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.startOfDay = startOfDay;
|
|
4
|
-
const index_js_1 = require("../utils/index.js");
|
|
5
|
-
/**
|
|
6
|
-
* Start of day
|
|
7
|
-
*
|
|
8
|
-
* @param {Date} date - The original date
|
|
9
|
-
* @returns {Date} The start of the day
|
|
10
|
-
*/
|
|
11
|
-
function startOfDay(date) {
|
|
12
|
-
const { year, month, day } = (0, index_js_1.toEthiopicDate)(date);
|
|
13
|
-
return (0, index_js_1.toGregorianDate)({ year, month, day });
|
|
14
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.startOfMonth = startOfMonth;
|
|
4
|
-
const index_js_1 = require("../utils/index.js");
|
|
5
|
-
/**
|
|
6
|
-
* Start of month
|
|
7
|
-
*
|
|
8
|
-
* @param {Date} date - The original date
|
|
9
|
-
* @returns {Date} The start of the month
|
|
10
|
-
*/
|
|
11
|
-
function startOfMonth(date) {
|
|
12
|
-
const { year, month } = (0, index_js_1.toEthiopicDate)(date);
|
|
13
|
-
return (0, index_js_1.toGregorianDate)({ year, month, day: 1 });
|
|
14
|
-
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { type StartOfWeekOptions } from "date-fns";
|
|
2
|
-
/**
|
|
3
|
-
* Start of week
|
|
4
|
-
*
|
|
5
|
-
* @param {Date} date - The original date
|
|
6
|
-
* @param {StartOfWeekOptions} [options] - The options object
|
|
7
|
-
* @returns {Date} The start of the week
|
|
8
|
-
*/
|
|
9
|
-
export declare function startOfWeek(date: Date, options?: StartOfWeekOptions): Date;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.startOfWeek = startOfWeek;
|
|
4
|
-
const date_fns_1 = require("date-fns");
|
|
5
|
-
/**
|
|
6
|
-
* Start of week
|
|
7
|
-
*
|
|
8
|
-
* @param {Date} date - The original date
|
|
9
|
-
* @param {StartOfWeekOptions} [options] - The options object
|
|
10
|
-
* @returns {Date} The start of the week
|
|
11
|
-
*/
|
|
12
|
-
function startOfWeek(date, options) {
|
|
13
|
-
const weekStartsOn = options?.weekStartsOn ?? 1; // Default to Monday (1)
|
|
14
|
-
return (0, date_fns_1.startOfWeek)(date, { weekStartsOn: weekStartsOn });
|
|
15
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.startOfYear = startOfYear;
|
|
4
|
-
const index_js_1 = require("../utils/index.js");
|
|
5
|
-
/**
|
|
6
|
-
* Start of year
|
|
7
|
-
*
|
|
8
|
-
* @param {Date} date - The original date
|
|
9
|
-
* @returns {Date} The start of the year
|
|
10
|
-
*/
|
|
11
|
-
function startOfYear(date) {
|
|
12
|
-
const { year } = (0, index_js_1.toEthiopicDate)(date);
|
|
13
|
-
return (0, index_js_1.toGregorianDate)({ year, month: 1, day: 1 });
|
|
14
|
-
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Represents a date in the Ethiopic calendar system.
|
|
3
|
-
*
|
|
4
|
-
* The Ethiopic calendar has:
|
|
5
|
-
*
|
|
6
|
-
* - 13 months
|
|
7
|
-
* - 12 months of 30 days each
|
|
8
|
-
* - A 13th month (Pagume) of 5 or 6 days
|
|
9
|
-
*/
|
|
10
|
-
export interface EthiopicDate {
|
|
11
|
-
/** The Ethiopic year */
|
|
12
|
-
year: number;
|
|
13
|
-
/** The month number (1-13) */
|
|
14
|
-
month: number;
|
|
15
|
-
/** The day of the month (1-30, or 1-5/6 for month 13) */
|
|
16
|
-
day: number;
|
|
17
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Returns the number of days in the specified month of the Ethiopic calendar.
|
|
3
|
-
*
|
|
4
|
-
* In the Ethiopic calendar:
|
|
5
|
-
*
|
|
6
|
-
* - Months 1-12 have 30 days each
|
|
7
|
-
* - Month 13 (Pagume) has 5 days in regular years, 6 days in leap years
|
|
8
|
-
*
|
|
9
|
-
* @param month - The month number (1-13)
|
|
10
|
-
* @param year - The Ethiopic year
|
|
11
|
-
* @returns The number of days in the specified month
|
|
12
|
-
*/
|
|
13
|
-
export declare function daysInMonth(month: number, year: number): number;
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.daysInMonth = daysInMonth;
|
|
4
|
-
const isEthiopicLeapYear_js_1 = require("./isEthiopicLeapYear.js");
|
|
5
|
-
/**
|
|
6
|
-
* Returns the number of days in the specified month of the Ethiopic calendar.
|
|
7
|
-
*
|
|
8
|
-
* In the Ethiopic calendar:
|
|
9
|
-
*
|
|
10
|
-
* - Months 1-12 have 30 days each
|
|
11
|
-
* - Month 13 (Pagume) has 5 days in regular years, 6 days in leap years
|
|
12
|
-
*
|
|
13
|
-
* @param month - The month number (1-13)
|
|
14
|
-
* @param year - The Ethiopic year
|
|
15
|
-
* @returns The number of days in the specified month
|
|
16
|
-
*/
|
|
17
|
-
function daysInMonth(month, year) {
|
|
18
|
-
if (month === 13) {
|
|
19
|
-
return (0, isEthiopicLeapYear_js_1.isEthiopicLeapYear)(year) ? 6 : 5;
|
|
20
|
-
}
|
|
21
|
-
return 30;
|
|
22
|
-
}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./daysInMonth.js"), exports);
|
|
18
|
-
__exportStar(require("./EthiopicDate.js"), exports);
|
|
19
|
-
__exportStar(require("./isEthiopicLeapYear.js"), exports);
|
|
20
|
-
__exportStar(require("./toEthiopicDate.js"), exports);
|
|
21
|
-
__exportStar(require("./toGeezNumerals.js"), exports);
|
|
22
|
-
__exportStar(require("./toGregorianDate.js"), exports);
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.isEthiopicDateValid = isEthiopicDateValid;
|
|
4
|
-
const daysInMonth_js_1 = require("./daysInMonth.js");
|
|
5
|
-
function isEthiopicDateValid(date) {
|
|
6
|
-
if (date.month < 1)
|
|
7
|
-
return false;
|
|
8
|
-
if (date.day < 1)
|
|
9
|
-
return false;
|
|
10
|
-
if (date.month > 13)
|
|
11
|
-
return false;
|
|
12
|
-
if (date.day > (0, daysInMonth_js_1.daysInMonth)(date.month, date.year))
|
|
13
|
-
return false;
|
|
14
|
-
return true;
|
|
15
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* Checks if a given Ethiopic year is a leap year.
|
|
4
|
-
*
|
|
5
|
-
* @param year - The Ethiopic year.
|
|
6
|
-
* @returns True if the year is a leap year; otherwise, false.
|
|
7
|
-
*/
|
|
8
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
-
exports.isEthiopicLeapYear = isEthiopicLeapYear;
|
|
10
|
-
function isEthiopicLeapYear(year) {
|
|
11
|
-
return year % 4 === 3;
|
|
12
|
-
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import type { EthiopicDate } from "./EthiopicDate.js";
|
|
2
|
-
/**
|
|
3
|
-
* Calculates the number of days between January 1, 0001 and the given date.
|
|
4
|
-
*
|
|
5
|
-
* @param date - A JavaScript Date object to calculate days from
|
|
6
|
-
* @returns The number of days since January 1, 0001. Returns 0 if the input is
|
|
7
|
-
* not a valid Date.
|
|
8
|
-
*/
|
|
9
|
-
export declare function getDayNoGregorian(date: Date): number;
|
|
10
|
-
/**
|
|
11
|
-
* Converts a Gregorian date to an Ethiopic date.
|
|
12
|
-
*
|
|
13
|
-
* @param gregorianDate - A JavaScript Date object representing the Gregorian
|
|
14
|
-
* date.
|
|
15
|
-
* @returns An EthiopicDate object.
|
|
16
|
-
*/
|
|
17
|
-
export declare function toEthiopicDate(gregorianDate: Date): EthiopicDate;
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getDayNoGregorian = getDayNoGregorian;
|
|
4
|
-
exports.toEthiopicDate = toEthiopicDate;
|
|
5
|
-
const date_fns_1 = require("date-fns");
|
|
6
|
-
/**
|
|
7
|
-
* Calculates the number of days between January 1, 0001 and the given date.
|
|
8
|
-
*
|
|
9
|
-
* @param date - A JavaScript Date object to calculate days from
|
|
10
|
-
* @returns The number of days since January 1, 0001. Returns 0 if the input is
|
|
11
|
-
* not a valid Date.
|
|
12
|
-
*/
|
|
13
|
-
function getDayNoGregorian(date) {
|
|
14
|
-
if (!(date instanceof Date)) {
|
|
15
|
-
return 0;
|
|
16
|
-
}
|
|
17
|
-
// Create the start date as January 1, 0001 in the LOCAL timezone.
|
|
18
|
-
const adStart = new Date(0);
|
|
19
|
-
adStart.setFullYear(1, 0, 1);
|
|
20
|
-
adStart.setHours(0, 0, 0, 0);
|
|
21
|
-
// Calculate the number of days between the two dates, then add 1.
|
|
22
|
-
const dayNumber = (0, date_fns_1.differenceInCalendarDays)(date, adStart) + 1;
|
|
23
|
-
return dayNumber;
|
|
24
|
-
}
|
|
25
|
-
function createEthiopicDate(dn) {
|
|
26
|
-
const num = Math.floor(dn / 1461);
|
|
27
|
-
const num2 = dn % 1461;
|
|
28
|
-
const num3 = Math.floor(num2 / 365);
|
|
29
|
-
const num4 = num2 % 365;
|
|
30
|
-
if (num2 !== 1460) {
|
|
31
|
-
return {
|
|
32
|
-
year: num * 4 + num3,
|
|
33
|
-
month: Math.floor(num4 / 30) + 1,
|
|
34
|
-
day: (num4 % 30) + 1,
|
|
35
|
-
};
|
|
36
|
-
}
|
|
37
|
-
else {
|
|
38
|
-
return {
|
|
39
|
-
year: num * 4 + num3 - 1,
|
|
40
|
-
month: 13,
|
|
41
|
-
day: 6,
|
|
42
|
-
};
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
/**
|
|
46
|
-
* Converts a Gregorian date to an Ethiopic date.
|
|
47
|
-
*
|
|
48
|
-
* @param gregorianDate - A JavaScript Date object representing the Gregorian
|
|
49
|
-
* date.
|
|
50
|
-
* @returns An EthiopicDate object.
|
|
51
|
-
*/
|
|
52
|
-
function toEthiopicDate(gregorianDate) {
|
|
53
|
-
return createEthiopicDate(getDayNoGregorian(gregorianDate) - 2431);
|
|
54
|
-
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Converts a number to Geez (Ethiopic) numerals.
|
|
3
|
-
*
|
|
4
|
-
* @param num - The number to convert
|
|
5
|
-
* @returns The number in Geez numerals
|
|
6
|
-
* @throws {Error} When input is 0 (Geez has no zero representation)
|
|
7
|
-
*/
|
|
8
|
-
export declare function toGeezNumerals(num: number): string;
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.toGeezNumerals = toGeezNumerals;
|
|
4
|
-
/**
|
|
5
|
-
* Converts a number to Geez (Ethiopic) numerals.
|
|
6
|
-
*
|
|
7
|
-
* @param num - The number to convert
|
|
8
|
-
* @returns The number in Geez numerals
|
|
9
|
-
* @throws {Error} When input is 0 (Geez has no zero representation)
|
|
10
|
-
*/
|
|
11
|
-
function toGeezNumerals(num) {
|
|
12
|
-
const geezDigits = ["፩", "፪", "፫", "፬", "፭", "፮", "፯", "፰", "፱"];
|
|
13
|
-
const geezTens = ["፲", "፳", "፴", "፵", "፶", "፷", "፸", "፹", "፺"];
|
|
14
|
-
const geezHundreds = "፻";
|
|
15
|
-
const geezThousands = "፼";
|
|
16
|
-
if (num === 0)
|
|
17
|
-
return "-";
|
|
18
|
-
if (num < 0)
|
|
19
|
-
return `-${toGeezNumerals(-num)}`;
|
|
20
|
-
let result = "";
|
|
21
|
-
let remaining = num;
|
|
22
|
-
// Handle thousands (10,000 and above)
|
|
23
|
-
if (remaining >= 10000) {
|
|
24
|
-
const thousandsValue = Math.floor(remaining / 10000);
|
|
25
|
-
result +=
|
|
26
|
-
thousandsValue === 1
|
|
27
|
-
? geezThousands
|
|
28
|
-
: toGeezNumerals(thousandsValue) + geezThousands;
|
|
29
|
-
remaining %= 10000;
|
|
30
|
-
}
|
|
31
|
-
// Handle hundreds (100 - 9,900)
|
|
32
|
-
if (remaining >= 100) {
|
|
33
|
-
const hundredsValue = Math.floor(remaining / 100);
|
|
34
|
-
result +=
|
|
35
|
-
hundredsValue === 1
|
|
36
|
-
? geezHundreds
|
|
37
|
-
: toGeezNumerals(hundredsValue) + geezHundreds;
|
|
38
|
-
remaining %= 100;
|
|
39
|
-
}
|
|
40
|
-
// Handle tens (10 - 90)
|
|
41
|
-
if (remaining >= 10) {
|
|
42
|
-
const tensValue = Math.floor(remaining / 10);
|
|
43
|
-
result += geezTens[tensValue - 1];
|
|
44
|
-
remaining %= 10;
|
|
45
|
-
}
|
|
46
|
-
// Handle ones (1 - 9)
|
|
47
|
-
if (remaining > 0) {
|
|
48
|
-
result += geezDigits[remaining - 1];
|
|
49
|
-
}
|
|
50
|
-
return result;
|
|
51
|
-
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import type { EthiopicDate } from "./EthiopicDate.js";
|
|
2
|
-
export declare function getDayNoEthiopian(etDate: EthiopicDate): number;
|
|
3
|
-
/**
|
|
4
|
-
* Converts an Ethiopic date to a Gregorian date.
|
|
5
|
-
*
|
|
6
|
-
* @param ethiopicDate - An EthiopicDate object.
|
|
7
|
-
* @returns A JavaScript Date object representing the Gregorian date.
|
|
8
|
-
*/
|
|
9
|
-
export declare function toGregorianDate(ethiopicDate: EthiopicDate): Date;
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getDayNoEthiopian = getDayNoEthiopian;
|
|
4
|
-
exports.toGregorianDate = toGregorianDate;
|
|
5
|
-
const date_fns_1 = require("date-fns");
|
|
6
|
-
const isEthiopicDateValid_js_1 = require("./isEthiopicDateValid.js");
|
|
7
|
-
function getDayNoEthiopian(etDate) {
|
|
8
|
-
const num = Math.floor(etDate.year / 4);
|
|
9
|
-
const num2 = etDate.year % 4;
|
|
10
|
-
return num * 1461 + num2 * 365 + (etDate.month - 1) * 30 + etDate.day - 1;
|
|
11
|
-
}
|
|
12
|
-
function gregorianDateFromDayNo(dayNum) {
|
|
13
|
-
let year = 1, month = 1, day;
|
|
14
|
-
const num400 = Math.floor(dayNum / 146097); // number of full 400-year periods
|
|
15
|
-
dayNum %= 146097;
|
|
16
|
-
if (dayNum === 0) {
|
|
17
|
-
return new Date(400 * num400, 12 - 1, 31);
|
|
18
|
-
}
|
|
19
|
-
const num100 = Math.min(Math.floor(dayNum / 36524), 3); // number of full 100-year periods, but not more than 3
|
|
20
|
-
dayNum -= num100 * 36524;
|
|
21
|
-
if (dayNum === 0) {
|
|
22
|
-
return new Date(400 * num400 + 100 * num100, 12 - 1, 31);
|
|
23
|
-
}
|
|
24
|
-
const num4 = Math.floor(dayNum / 1461); // number of full 4-year periods
|
|
25
|
-
dayNum %= 1461;
|
|
26
|
-
if (dayNum === 0) {
|
|
27
|
-
return new Date(400 * num400 + 100 * num100 + 4 * num4, 12 - 1, 31);
|
|
28
|
-
}
|
|
29
|
-
const num1 = Math.min(Math.floor(dayNum / 365), 3); // number of full years, but not more than 3
|
|
30
|
-
dayNum -= num1 * 365;
|
|
31
|
-
if (dayNum === 0) {
|
|
32
|
-
return new Date(400 * num400 + 100 * num100 + 4 * num4 + num1, 12 - 1, 31);
|
|
33
|
-
}
|
|
34
|
-
year += 400 * num400 + 100 * num100 + 4 * num4 + num1;
|
|
35
|
-
while (dayNum > 0) {
|
|
36
|
-
const tempDate = new Date(year, month - 1);
|
|
37
|
-
const daysInMonth = (0, date_fns_1.getDaysInMonth)(tempDate);
|
|
38
|
-
if (dayNum <= daysInMonth) {
|
|
39
|
-
day = dayNum;
|
|
40
|
-
break;
|
|
41
|
-
}
|
|
42
|
-
dayNum -= daysInMonth;
|
|
43
|
-
month++;
|
|
44
|
-
}
|
|
45
|
-
// Remember in JavaScript Date object, months are 0-based.
|
|
46
|
-
return new Date(year, month - 1, day);
|
|
47
|
-
}
|
|
48
|
-
/**
|
|
49
|
-
* Converts an Ethiopic date to a Gregorian date.
|
|
50
|
-
*
|
|
51
|
-
* @param ethiopicDate - An EthiopicDate object.
|
|
52
|
-
* @returns A JavaScript Date object representing the Gregorian date.
|
|
53
|
-
*/
|
|
54
|
-
function toGregorianDate(ethiopicDate) {
|
|
55
|
-
if (!(0, isEthiopicDateValid_js_1.isEthiopicDateValid)(ethiopicDate)) {
|
|
56
|
-
throw new Error("Invalid Ethiopic date");
|
|
57
|
-
}
|
|
58
|
-
return gregorianDateFromDayNo(getDayNoEthiopian(ethiopicDate) + 2431);
|
|
59
|
-
}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import type { Locale } from "date-fns";
|
|
2
|
-
import React from "react";
|
|
3
|
-
import { DateLib, type DateLibOptions } from "../index.js";
|
|
4
|
-
import type { DayPickerProps } from "../types/props.js";
|
|
5
|
-
/**
|
|
6
|
-
* Render the Hebrew (lunisolar) calendar.
|
|
7
|
-
*
|
|
8
|
-
* Months follow the Hebrew lunisolar cycle with leap years containing Adar I
|
|
9
|
-
* and Adar II. Weeks remain Sunday–Saturday.
|
|
10
|
-
*
|
|
11
|
-
* Defaults:
|
|
12
|
-
*
|
|
13
|
-
* - `locale`: `he`
|
|
14
|
-
* - `dir`: `rtl`
|
|
15
|
-
* - `numerals`: `latn`
|
|
16
|
-
*/
|
|
17
|
-
export declare function DayPicker(props: DayPickerProps & {
|
|
18
|
-
locale?: Locale;
|
|
19
|
-
dir?: DayPickerProps["dir"];
|
|
20
|
-
numerals?: DayPickerProps["numerals"];
|
|
21
|
-
dateLib?: DayPickerProps["dateLib"];
|
|
22
|
-
}): React.JSX.Element;
|
|
23
|
-
/** Returns the date library used in the Hebrew calendar. */
|
|
24
|
-
export declare const getDateLib: (options?: DateLibOptions) => DateLib;
|
|
25
|
-
export { enUS } from "../locale/en-US.js";
|
|
26
|
-
export { he } from "../locale/he.js";
|
package/dist/cjs/hebrew/index.js
DELETED
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
-
var ownKeys = function(o) {
|
|
20
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
-
var ar = [];
|
|
22
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
-
return ar;
|
|
24
|
-
};
|
|
25
|
-
return ownKeys(o);
|
|
26
|
-
};
|
|
27
|
-
return function (mod) {
|
|
28
|
-
if (mod && mod.__esModule) return mod;
|
|
29
|
-
var result = {};
|
|
30
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
-
__setModuleDefault(result, mod);
|
|
32
|
-
return result;
|
|
33
|
-
};
|
|
34
|
-
})();
|
|
35
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
36
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
37
|
-
};
|
|
38
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
exports.he = exports.enUS = exports.getDateLib = void 0;
|
|
40
|
-
exports.DayPicker = DayPicker;
|
|
41
|
-
const react_1 = __importDefault(require("react"));
|
|
42
|
-
const index_js_1 = require("../index.js");
|
|
43
|
-
const he_js_1 = require("../locale/he.js");
|
|
44
|
-
const hebrewDateLib = __importStar(require("./lib/index.js"));
|
|
45
|
-
/**
|
|
46
|
-
* Render the Hebrew (lunisolar) calendar.
|
|
47
|
-
*
|
|
48
|
-
* Months follow the Hebrew lunisolar cycle with leap years containing Adar I
|
|
49
|
-
* and Adar II. Weeks remain Sunday–Saturday.
|
|
50
|
-
*
|
|
51
|
-
* Defaults:
|
|
52
|
-
*
|
|
53
|
-
* - `locale`: `he`
|
|
54
|
-
* - `dir`: `rtl`
|
|
55
|
-
* - `numerals`: `latn`
|
|
56
|
-
*/
|
|
57
|
-
function DayPicker(props) {
|
|
58
|
-
const dateLib = (0, exports.getDateLib)({
|
|
59
|
-
locale: props.locale,
|
|
60
|
-
weekStartsOn: props.broadcastCalendar ? 1 : props.weekStartsOn,
|
|
61
|
-
firstWeekContainsDate: props.firstWeekContainsDate,
|
|
62
|
-
useAdditionalWeekYearTokens: props.useAdditionalWeekYearTokens,
|
|
63
|
-
useAdditionalDayOfYearTokens: props.useAdditionalDayOfYearTokens,
|
|
64
|
-
timeZone: props.timeZone,
|
|
65
|
-
});
|
|
66
|
-
return (react_1.default.createElement(index_js_1.DayPicker, { ...props, locale: props.locale ?? he_js_1.he, numerals: props.numerals ?? "latn", dir: props.dir ?? "rtl", dateLib: dateLib }));
|
|
67
|
-
}
|
|
68
|
-
/** Returns the date library used in the Hebrew calendar. */
|
|
69
|
-
const getDateLib = (options) => {
|
|
70
|
-
return new index_js_1.DateLib(options, hebrewDateLib);
|
|
71
|
-
};
|
|
72
|
-
exports.getDateLib = getDateLib;
|
|
73
|
-
var en_US_js_1 = require("../locale/en-US.js");
|
|
74
|
-
Object.defineProperty(exports, "enUS", { enumerable: true, get: function () { return en_US_js_1.enUS; } });
|
|
75
|
-
var he_js_2 = require("../locale/he.js");
|
|
76
|
-
Object.defineProperty(exports, "he", { enumerable: true, get: function () { return he_js_2.he; } });
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function addMonths(date: Date, amount: number): Date;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.addMonths = addMonths;
|
|
4
|
-
const dateConversion_js_1 = require("../utils/dateConversion.js");
|
|
5
|
-
const serial_js_1 = require("../utils/serial.js");
|
|
6
|
-
function addMonths(date, amount) {
|
|
7
|
-
if (amount === 0) {
|
|
8
|
-
return new Date(date.getTime());
|
|
9
|
-
}
|
|
10
|
-
const hebrew = (0, dateConversion_js_1.toHebrewDate)(date);
|
|
11
|
-
const targetIndex = (0, serial_js_1.monthsSinceEpoch)(hebrew) + amount;
|
|
12
|
-
const target = (0, serial_js_1.monthIndexToHebrewDate)(targetIndex, hebrew.day);
|
|
13
|
-
const day = (0, serial_js_1.clampHebrewDay)(target.year, target.monthIndex, target.day);
|
|
14
|
-
return (0, dateConversion_js_1.toGregorianDate)({ ...target, day });
|
|
15
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function addYears(date: Date, amount: number): Date;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.addYears = addYears;
|
|
4
|
-
const dateConversion_js_1 = require("../utils/dateConversion.js");
|
|
5
|
-
const setYear_js_1 = require("./setYear.js");
|
|
6
|
-
function addYears(date, amount) {
|
|
7
|
-
if (amount === 0) {
|
|
8
|
-
return new Date(date.getTime());
|
|
9
|
-
}
|
|
10
|
-
const hebrew = (0, dateConversion_js_1.toHebrewDate)(date);
|
|
11
|
-
return (0, setYear_js_1.setYear)(date, hebrew.year + amount);
|
|
12
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function differenceInCalendarMonths(dateLeft: Date, dateRight: Date): number;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.differenceInCalendarMonths = differenceInCalendarMonths;
|
|
4
|
-
const dateConversion_js_1 = require("../utils/dateConversion.js");
|
|
5
|
-
const serial_js_1 = require("../utils/serial.js");
|
|
6
|
-
function differenceInCalendarMonths(dateLeft, dateRight) {
|
|
7
|
-
const left = (0, dateConversion_js_1.toHebrewDate)(dateLeft);
|
|
8
|
-
const right = (0, dateConversion_js_1.toHebrewDate)(dateRight);
|
|
9
|
-
return (0, serial_js_1.monthsSinceEpoch)(left) - (0, serial_js_1.monthsSinceEpoch)(right);
|
|
10
|
-
}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.eachMonthOfInterval = eachMonthOfInterval;
|
|
4
|
-
const date_fns_1 = require("date-fns");
|
|
5
|
-
const dateConversion_js_1 = require("../utils/dateConversion.js");
|
|
6
|
-
const serial_js_1 = require("../utils/serial.js");
|
|
7
|
-
function eachMonthOfInterval(interval) {
|
|
8
|
-
const startDate = (0, date_fns_1.toDate)(interval.start);
|
|
9
|
-
const endDate = (0, date_fns_1.toDate)(interval.end);
|
|
10
|
-
if (endDate.getTime() < startDate.getTime()) {
|
|
11
|
-
return [];
|
|
12
|
-
}
|
|
13
|
-
const startHebrew = (0, dateConversion_js_1.toHebrewDate)(startDate);
|
|
14
|
-
const endHebrew = (0, dateConversion_js_1.toHebrewDate)(endDate);
|
|
15
|
-
const startIndex = (0, serial_js_1.monthsSinceEpoch)(startHebrew);
|
|
16
|
-
const endIndex = (0, serial_js_1.monthsSinceEpoch)(endHebrew);
|
|
17
|
-
const months = [];
|
|
18
|
-
for (let index = startIndex; index <= endIndex; index += 1) {
|
|
19
|
-
const hebrew = (0, serial_js_1.monthIndexToHebrewDate)(index, 1);
|
|
20
|
-
months.push((0, dateConversion_js_1.toGregorianDate)(hebrew));
|
|
21
|
-
}
|
|
22
|
-
return months;
|
|
23
|
-
}
|