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,74 +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
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
-
exports.faIRJalali = void 0;
|
|
37
|
-
const dateFnsJalali = __importStar(require("date-fns-jalali"));
|
|
38
|
-
const locale_1 = require("date-fns-jalali/locale");
|
|
39
|
-
const DateLib_js_1 = require("../classes/DateLib.js");
|
|
40
|
-
/**
|
|
41
|
-
* Persian (Iran) locale for the Jalali (Persian) calendar, extended with
|
|
42
|
-
* DayPicker-specific translations.
|
|
43
|
-
*/
|
|
44
|
-
exports.faIRJalali = {
|
|
45
|
-
...locale_1.faIR,
|
|
46
|
-
labels: {
|
|
47
|
-
labelDayButton: (date, modifiers, options, dateLib) => {
|
|
48
|
-
const lib = dateLib ?? new DateLib_js_1.DateLib(options, dateFnsJalali);
|
|
49
|
-
let label = lib.format(date, "PPPP");
|
|
50
|
-
if (modifiers.today)
|
|
51
|
-
label = `امروز، ${label}`;
|
|
52
|
-
if (modifiers.selected)
|
|
53
|
-
label = `${label}، انتخاب شده`;
|
|
54
|
-
return label;
|
|
55
|
-
},
|
|
56
|
-
labelMonthDropdown: "ماه را انتخاب کنید",
|
|
57
|
-
labelNext: "رفتن به ماه بعد",
|
|
58
|
-
labelPrevious: "رفتن به ماه قبل",
|
|
59
|
-
labelWeekNumber: (weekNumber) => `هفته ${weekNumber}`,
|
|
60
|
-
labelYearDropdown: "سال را انتخاب کنید",
|
|
61
|
-
labelGrid: (date, options, dateLib) => (dateLib ?? new DateLib_js_1.DateLib(options, dateFnsJalali)).formatMonthYear(date),
|
|
62
|
-
labelGridcell: (date, modifiers, options, dateLib) => {
|
|
63
|
-
const lib = dateLib ?? new DateLib_js_1.DateLib(options, dateFnsJalali);
|
|
64
|
-
let label = lib.format(date, "PPPP");
|
|
65
|
-
if (modifiers?.today) {
|
|
66
|
-
label = `امروز، ${label}`;
|
|
67
|
-
}
|
|
68
|
-
return label;
|
|
69
|
-
},
|
|
70
|
-
labelNav: "نوار ناوبری",
|
|
71
|
-
labelWeekNumberHeader: "شماره هفته",
|
|
72
|
-
labelWeekday: (date, options, dateLib) => (dateLib ?? new DateLib_js_1.DateLib(options, dateFnsJalali)).format(date, "cccc"),
|
|
73
|
-
},
|
|
74
|
-
};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import type { DateLib } from "./classes/DateLib.js";
|
|
2
|
-
import type { CreateNoonOverridesOptions } from "./noonDateLib.js";
|
|
3
|
-
/**
|
|
4
|
-
* Jalali-aware version of {@link createNoonDateLibOverrides}.
|
|
5
|
-
*
|
|
6
|
-
* Keeps all calendar math at noon in the target time zone while deferring to
|
|
7
|
-
* `date-fns-jalali` for calendar logic.
|
|
8
|
-
*/
|
|
9
|
-
export declare function createJalaliNoonOverrides(timeZone: string, options?: CreateNoonOverridesOptions): Partial<typeof DateLib.prototype>;
|
|
@@ -1,113 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.createJalaliNoonOverrides = createJalaliNoonOverrides;
|
|
4
|
-
const tz_1 = require("@date-fns/tz");
|
|
5
|
-
const date_fns_jalali_1 = require("date-fns-jalali");
|
|
6
|
-
/**
|
|
7
|
-
* Jalali-aware version of {@link createNoonDateLibOverrides}.
|
|
8
|
-
*
|
|
9
|
-
* Keeps all calendar math at noon in the target time zone while deferring to
|
|
10
|
-
* `date-fns-jalali` for calendar logic.
|
|
11
|
-
*/
|
|
12
|
-
function createJalaliNoonOverrides(timeZone, options = {}) {
|
|
13
|
-
const { weekStartsOn, locale } = options;
|
|
14
|
-
const fallbackWeekStartsOn = (weekStartsOn ??
|
|
15
|
-
locale?.options?.weekStartsOn ??
|
|
16
|
-
6);
|
|
17
|
-
// Keep all internal math anchored at noon in the target zone to avoid
|
|
18
|
-
// historical second-level offsets from crossing midnight.
|
|
19
|
-
const toNoonTZDate = (date) => {
|
|
20
|
-
const normalizedDate = typeof date === "number" || typeof date === "string"
|
|
21
|
-
? new Date(date)
|
|
22
|
-
: date;
|
|
23
|
-
return new tz_1.TZDate(normalizedDate.getFullYear(), normalizedDate.getMonth(), normalizedDate.getDate(), 12, 0, 0, timeZone);
|
|
24
|
-
};
|
|
25
|
-
// Represent the target-zone calendar date in the host zone so date-fns-jalali
|
|
26
|
-
// (which is not time-zone aware) can operate on stable wall times.
|
|
27
|
-
const toCalendarDate = (date) => {
|
|
28
|
-
const zoned = toNoonTZDate(date);
|
|
29
|
-
return new Date(zoned.getFullYear(), zoned.getMonth(), zoned.getDate(), 12, 0, 0, 0);
|
|
30
|
-
};
|
|
31
|
-
return {
|
|
32
|
-
today: () => toNoonTZDate(tz_1.TZDate.tz(timeZone)),
|
|
33
|
-
newDate: (year, monthIndex, date) => new tz_1.TZDate(year, monthIndex, date, 12, 0, 0, timeZone),
|
|
34
|
-
startOfDay: (date) => {
|
|
35
|
-
return toNoonTZDate(date);
|
|
36
|
-
},
|
|
37
|
-
startOfWeek: (date, options) => {
|
|
38
|
-
const weekStartsOnValue = (options?.weekStartsOn ??
|
|
39
|
-
fallbackWeekStartsOn);
|
|
40
|
-
const start = (0, date_fns_jalali_1.startOfWeek)(toCalendarDate(date), {
|
|
41
|
-
weekStartsOn: weekStartsOnValue,
|
|
42
|
-
});
|
|
43
|
-
return toNoonTZDate(start);
|
|
44
|
-
},
|
|
45
|
-
startOfISOWeek: (date) => {
|
|
46
|
-
const start = (0, date_fns_jalali_1.startOfISOWeek)(toCalendarDate(date));
|
|
47
|
-
return toNoonTZDate(start);
|
|
48
|
-
},
|
|
49
|
-
startOfMonth: (date) => {
|
|
50
|
-
const start = (0, date_fns_jalali_1.startOfMonth)(toCalendarDate(date));
|
|
51
|
-
return toNoonTZDate(start);
|
|
52
|
-
},
|
|
53
|
-
startOfYear: (date) => {
|
|
54
|
-
const start = (0, date_fns_jalali_1.startOfYear)(toCalendarDate(date));
|
|
55
|
-
return toNoonTZDate(start);
|
|
56
|
-
},
|
|
57
|
-
endOfWeek: (date, options) => {
|
|
58
|
-
const weekStartsOnValue = (options?.weekStartsOn ??
|
|
59
|
-
fallbackWeekStartsOn);
|
|
60
|
-
const end = (0, date_fns_jalali_1.endOfWeek)(toCalendarDate(date), {
|
|
61
|
-
weekStartsOn: weekStartsOnValue,
|
|
62
|
-
});
|
|
63
|
-
return toNoonTZDate(end);
|
|
64
|
-
},
|
|
65
|
-
endOfISOWeek: (date) => {
|
|
66
|
-
const end = (0, date_fns_jalali_1.endOfISOWeek)(toCalendarDate(date));
|
|
67
|
-
return toNoonTZDate(end);
|
|
68
|
-
},
|
|
69
|
-
endOfMonth: (date) => {
|
|
70
|
-
const end = (0, date_fns_jalali_1.endOfMonth)(toCalendarDate(date));
|
|
71
|
-
return toNoonTZDate(end);
|
|
72
|
-
},
|
|
73
|
-
endOfYear: (date) => {
|
|
74
|
-
const end = (0, date_fns_jalali_1.endOfYear)(toCalendarDate(date));
|
|
75
|
-
return toNoonTZDate(end);
|
|
76
|
-
},
|
|
77
|
-
eachMonthOfInterval: (interval) => {
|
|
78
|
-
return (0, date_fns_jalali_1.eachMonthOfInterval)({
|
|
79
|
-
start: toCalendarDate(interval.start),
|
|
80
|
-
end: toCalendarDate(interval.end),
|
|
81
|
-
}).map((date) => toNoonTZDate(date));
|
|
82
|
-
},
|
|
83
|
-
addDays: (date, amount) => toNoonTZDate((0, date_fns_jalali_1.addDays)(toCalendarDate(date), amount)),
|
|
84
|
-
addWeeks: (date, amount) => toNoonTZDate((0, date_fns_jalali_1.addWeeks)(toCalendarDate(date), amount)),
|
|
85
|
-
addMonths: (date, amount) => toNoonTZDate((0, date_fns_jalali_1.addMonths)(toCalendarDate(date), amount)),
|
|
86
|
-
addYears: (date, amount) => toNoonTZDate((0, date_fns_jalali_1.addYears)(toCalendarDate(date), amount)),
|
|
87
|
-
eachYearOfInterval: (interval) => {
|
|
88
|
-
return (0, date_fns_jalali_1.eachYearOfInterval)({
|
|
89
|
-
start: toCalendarDate(interval.start),
|
|
90
|
-
end: toCalendarDate(interval.end),
|
|
91
|
-
}).map((date) => toNoonTZDate(date));
|
|
92
|
-
},
|
|
93
|
-
getWeek: (date, options) => {
|
|
94
|
-
const base = toCalendarDate(date);
|
|
95
|
-
return (0, date_fns_jalali_1.getWeek)(base, {
|
|
96
|
-
weekStartsOn: options?.weekStartsOn ?? fallbackWeekStartsOn,
|
|
97
|
-
firstWeekContainsDate: options?.firstWeekContainsDate ??
|
|
98
|
-
locale?.options?.firstWeekContainsDate ??
|
|
99
|
-
1,
|
|
100
|
-
});
|
|
101
|
-
},
|
|
102
|
-
differenceInCalendarDays: (dateLeft, dateRight) => {
|
|
103
|
-
const left = toCalendarDate(dateLeft);
|
|
104
|
-
const right = toCalendarDate(dateRight);
|
|
105
|
-
return (0, date_fns_jalali_1.differenceInCalendarDays)(left, right);
|
|
106
|
-
},
|
|
107
|
-
differenceInCalendarMonths: (dateLeft, dateRight) => {
|
|
108
|
-
const left = toCalendarDate(dateLeft);
|
|
109
|
-
const right = toCalendarDate(dateRight);
|
|
110
|
-
return (0, date_fns_jalali_1.differenceInCalendarMonths)(left, right);
|
|
111
|
-
},
|
|
112
|
-
};
|
|
113
|
-
}
|
package/dist/cjs/persian.d.ts
DELETED
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import type { DayPickerLocale } from "./classes/DateLib.js";
|
|
3
|
-
import { DateLib, type DateLibOptions } from "./index.js";
|
|
4
|
-
import type { DayPickerProps } from "./types/props.js";
|
|
5
|
-
/** Persian (Iran) Jalali locale with DayPicker labels. */
|
|
6
|
-
export declare const faIR: DayPickerLocale;
|
|
7
|
-
/** English (US) Jalali locale with DayPicker labels. */
|
|
8
|
-
export declare const enUS: DayPickerLocale;
|
|
9
|
-
/**
|
|
10
|
-
* Renders the Persian calendar using the DayPicker component.
|
|
11
|
-
*
|
|
12
|
-
* @defaultValue
|
|
13
|
-
* - `locale`: `faIR`
|
|
14
|
-
* - `dir`: `rtl`
|
|
15
|
-
* - `dateLib`: `jalaliDateLib` from `date-fns-jalali`
|
|
16
|
-
* - `numerals`: `arabext` (Eastern Arabic-Indic)
|
|
17
|
-
* @param props - The props for the Persian calendar, including locale, text
|
|
18
|
-
* direction, date library, and numeral system.
|
|
19
|
-
* @returns The Persian calendar component.
|
|
20
|
-
* @see https://daypicker.dev/docs/localization#persian-calendar
|
|
21
|
-
*/
|
|
22
|
-
export declare function DayPicker(props: DayPickerProps & {
|
|
23
|
-
/**
|
|
24
|
-
* The locale to use in the calendar.
|
|
25
|
-
*
|
|
26
|
-
* @default `faIR`
|
|
27
|
-
*/
|
|
28
|
-
locale?: DayPickerLocale;
|
|
29
|
-
/**
|
|
30
|
-
* The direction of the text in the calendar.
|
|
31
|
-
*
|
|
32
|
-
* @default `rtl`
|
|
33
|
-
*/
|
|
34
|
-
dir?: DayPickerProps["dir"];
|
|
35
|
-
/**
|
|
36
|
-
* The date library to use in the calendar.
|
|
37
|
-
*
|
|
38
|
-
* @default `jalaliDateLib` from `date-fns-jalali`
|
|
39
|
-
*/
|
|
40
|
-
dateLib?: DayPickerProps["dateLib"];
|
|
41
|
-
/**
|
|
42
|
-
* The numeral system to use when formatting dates.
|
|
43
|
-
*
|
|
44
|
-
* - `latn`: Latin (Western Arabic)
|
|
45
|
-
* - `arab`: Arabic-Indic
|
|
46
|
-
* - `arabext`: Eastern Arabic-Indic (Persian)
|
|
47
|
-
* - `deva`: Devanagari
|
|
48
|
-
* - `beng`: Bengali
|
|
49
|
-
* - `guru`: Gurmukhi
|
|
50
|
-
* - `gujr`: Gujarati
|
|
51
|
-
* - `orya`: Oriya
|
|
52
|
-
* - `tamldec`: Tamil
|
|
53
|
-
* - `telu`: Telugu
|
|
54
|
-
* - `knda`: Kannada
|
|
55
|
-
* - `mlym`: Malayalam
|
|
56
|
-
*
|
|
57
|
-
* @defaultValue `arabext` Eastern Arabic-Indic (Persian)
|
|
58
|
-
* @see https://daypicker.dev/docs/translation#numeral-systems
|
|
59
|
-
*/
|
|
60
|
-
numerals?: DayPickerProps["numerals"];
|
|
61
|
-
}): React.JSX.Element;
|
|
62
|
-
/**
|
|
63
|
-
* Returns the date library used in the Persian calendar.
|
|
64
|
-
*
|
|
65
|
-
* @param options - Optional configuration for the date library.
|
|
66
|
-
* @returns The date library instance.
|
|
67
|
-
*/
|
|
68
|
-
export declare const getDateLib: (options?: DateLibOptions & {
|
|
69
|
-
noonSafe?: boolean;
|
|
70
|
-
overrides?: DayPickerProps["dateLib"];
|
|
71
|
-
}) => DateLib;
|
package/dist/cjs/persian.js
DELETED
|
@@ -1,106 +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.getDateLib = exports.enUS = exports.faIR = void 0;
|
|
40
|
-
exports.DayPicker = DayPicker;
|
|
41
|
-
const dateFnsJalali = __importStar(require("date-fns-jalali"));
|
|
42
|
-
const react_1 = __importDefault(require("react"));
|
|
43
|
-
const index_js_1 = require("./index.js");
|
|
44
|
-
const en_US_jalali_js_1 = require("./locale/en-US-jalali.js");
|
|
45
|
-
const fa_IR_jalali_js_1 = require("./locale/fa-IR-jalali.js");
|
|
46
|
-
const noonJalaliDateLib_js_1 = require("./noonJalaliDateLib.js");
|
|
47
|
-
/** Persian (Iran) Jalali locale with DayPicker labels. */
|
|
48
|
-
exports.faIR = fa_IR_jalali_js_1.faIRJalali;
|
|
49
|
-
/** English (US) Jalali locale with DayPicker labels. */
|
|
50
|
-
exports.enUS = en_US_jalali_js_1.enUSJalali;
|
|
51
|
-
/**
|
|
52
|
-
* Renders the Persian calendar using the DayPicker component.
|
|
53
|
-
*
|
|
54
|
-
* @defaultValue
|
|
55
|
-
* - `locale`: `faIR`
|
|
56
|
-
* - `dir`: `rtl`
|
|
57
|
-
* - `dateLib`: `jalaliDateLib` from `date-fns-jalali`
|
|
58
|
-
* - `numerals`: `arabext` (Eastern Arabic-Indic)
|
|
59
|
-
* @param props - The props for the Persian calendar, including locale, text
|
|
60
|
-
* direction, date library, and numeral system.
|
|
61
|
-
* @returns The Persian calendar component.
|
|
62
|
-
* @see https://daypicker.dev/docs/localization#persian-calendar
|
|
63
|
-
*/
|
|
64
|
-
function DayPicker(props) {
|
|
65
|
-
const { locale: localeProp, dir, dateLib: dateLibProp, numerals, noonSafe, ...restProps } = props;
|
|
66
|
-
const dateLib = (0, exports.getDateLib)({
|
|
67
|
-
locale: localeProp,
|
|
68
|
-
weekStartsOn: props.broadcastCalendar ? 1 : props.weekStartsOn,
|
|
69
|
-
firstWeekContainsDate: props.firstWeekContainsDate,
|
|
70
|
-
useAdditionalWeekYearTokens: props.useAdditionalWeekYearTokens,
|
|
71
|
-
useAdditionalDayOfYearTokens: props.useAdditionalDayOfYearTokens,
|
|
72
|
-
timeZone: props.timeZone,
|
|
73
|
-
numerals: numerals ?? "arabext",
|
|
74
|
-
noonSafe,
|
|
75
|
-
overrides: dateLibProp,
|
|
76
|
-
});
|
|
77
|
-
const locale = localeProp ?? exports.faIR;
|
|
78
|
-
return (react_1.default.createElement(index_js_1.DayPicker, { ...restProps, locale: locale, numerals: numerals ?? "arabext", dir: dir ?? "rtl", dateLib: dateLib, formatters: {
|
|
79
|
-
formatWeekdayName: (date, _options, lib) => {
|
|
80
|
-
const activeLib = lib ?? dateLib;
|
|
81
|
-
const isPersian = activeLib.options.locale?.code?.startsWith("fa");
|
|
82
|
-
return activeLib.format(date, isPersian ? "ccccc" : "cccccc");
|
|
83
|
-
},
|
|
84
|
-
...props.formatters,
|
|
85
|
-
} }));
|
|
86
|
-
}
|
|
87
|
-
/**
|
|
88
|
-
* Returns the date library used in the Persian calendar.
|
|
89
|
-
*
|
|
90
|
-
* @param options - Optional configuration for the date library.
|
|
91
|
-
* @returns The date library instance.
|
|
92
|
-
*/
|
|
93
|
-
const getDateLib = (options) => {
|
|
94
|
-
const { noonSafe, overrides, ...dateLibOptions } = options ?? {};
|
|
95
|
-
const baseOverrides = noonSafe && dateLibOptions.timeZone
|
|
96
|
-
? {
|
|
97
|
-
...dateFnsJalali,
|
|
98
|
-
...(0, noonJalaliDateLib_js_1.createJalaliNoonOverrides)(dateLibOptions.timeZone, {
|
|
99
|
-
weekStartsOn: dateLibOptions.weekStartsOn,
|
|
100
|
-
locale: dateLibOptions.locale,
|
|
101
|
-
}),
|
|
102
|
-
}
|
|
103
|
-
: dateFnsJalali;
|
|
104
|
-
return new index_js_1.DateLib(dateLibOptions, { ...baseOverrides, ...overrides });
|
|
105
|
-
};
|
|
106
|
-
exports.getDateLib = getDateLib;
|
|
@@ -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
|
-
export declare const th: import("../index.js").DayPickerLocale;
|
|
6
|
-
export declare const enUS: import("../index.js").DayPickerLocale;
|
|
7
|
-
/**
|
|
8
|
-
* Render the Buddhist (Thai) calendar.
|
|
9
|
-
*
|
|
10
|
-
* Months/weeks are Gregorian; displayed year is Buddhist Era (BE = CE + 543).
|
|
11
|
-
* Thai digits are used by default.
|
|
12
|
-
*
|
|
13
|
-
* Defaults:
|
|
14
|
-
*
|
|
15
|
-
* - `locale`: `th`
|
|
16
|
-
* - `dir`: `ltr`
|
|
17
|
-
* - `numerals`: `thai`
|
|
18
|
-
*/
|
|
19
|
-
export declare function DayPicker(props: DayPickerProps & {
|
|
20
|
-
locale?: Locale;
|
|
21
|
-
dir?: DayPickerProps["dir"];
|
|
22
|
-
numerals?: DayPickerProps["numerals"];
|
|
23
|
-
dateLib?: DayPickerProps["dateLib"];
|
|
24
|
-
}): React.JSX.Element;
|
|
25
|
-
/** Returns the date library used in the Buddhist calendar. */
|
|
26
|
-
export declare const getDateLib: (options?: DateLibOptions) => DateLib;
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { DateLib, DayPicker as DayPickerComponent, } from "../index.js";
|
|
3
|
-
import { enUS as enUSLocale } from "../locale/en-US.js";
|
|
4
|
-
import { th as thLocale } from "../locale/th.js";
|
|
5
|
-
import { format as originalBuddhistFormat } from "./lib/format.js";
|
|
6
|
-
// Adapter to match DateLib's format signature without using `any`.
|
|
7
|
-
const buddhistFormat = (date, formatStr, options) => {
|
|
8
|
-
return originalBuddhistFormat(date, formatStr, options);
|
|
9
|
-
};
|
|
10
|
-
export const th = thLocale;
|
|
11
|
-
export const enUS = enUSLocale;
|
|
12
|
-
/**
|
|
13
|
-
* Render the Buddhist (Thai) calendar.
|
|
14
|
-
*
|
|
15
|
-
* Months/weeks are Gregorian; displayed year is Buddhist Era (BE = CE + 543).
|
|
16
|
-
* Thai digits are used by default.
|
|
17
|
-
*
|
|
18
|
-
* Defaults:
|
|
19
|
-
*
|
|
20
|
-
* - `locale`: `th`
|
|
21
|
-
* - `dir`: `ltr`
|
|
22
|
-
* - `numerals`: `thai`
|
|
23
|
-
*/
|
|
24
|
-
export function DayPicker(props) {
|
|
25
|
-
const dateLib = getDateLib({
|
|
26
|
-
locale: props.locale ?? th,
|
|
27
|
-
weekStartsOn: props.broadcastCalendar ? 1 : props.weekStartsOn,
|
|
28
|
-
firstWeekContainsDate: props.firstWeekContainsDate,
|
|
29
|
-
useAdditionalWeekYearTokens: props.useAdditionalWeekYearTokens,
|
|
30
|
-
useAdditionalDayOfYearTokens: props.useAdditionalDayOfYearTokens,
|
|
31
|
-
timeZone: props.timeZone,
|
|
32
|
-
});
|
|
33
|
-
return (React.createElement(DayPickerComponent, { ...props, locale: props.locale ?? th, numerals: props.numerals ?? "thai", dir: props.dir ?? "ltr", dateLib: dateLib }));
|
|
34
|
-
}
|
|
35
|
-
/** Returns the date library used in the Buddhist calendar. */
|
|
36
|
-
export const getDateLib = (options) => {
|
|
37
|
-
return new DateLib(options, {
|
|
38
|
-
format: buddhistFormat,
|
|
39
|
-
});
|
|
40
|
-
};
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { format as dfFormat } from "date-fns";
|
|
2
|
-
/** Format override adding +543 to year tokens for Buddhist Era (BE). */
|
|
3
|
-
export function format(date, formatStr, options) {
|
|
4
|
-
const beYear = date.getFullYear() + 543;
|
|
5
|
-
switch (formatStr) {
|
|
6
|
-
case "LLLL y":
|
|
7
|
-
case "LLLL yyyy":
|
|
8
|
-
return `${dfFormat(date, "LLLL", options)} ${beYear}`;
|
|
9
|
-
case "LLLL":
|
|
10
|
-
return dfFormat(date, "LLLL", options);
|
|
11
|
-
case "yyyy":
|
|
12
|
-
return String(beYear).padStart(4, "0");
|
|
13
|
-
case "y":
|
|
14
|
-
return String(beYear);
|
|
15
|
-
case "yyyy-MM":
|
|
16
|
-
return `${beYear}-${dfFormat(date, "MM", options)}`;
|
|
17
|
-
case "yyyy-MM-dd":
|
|
18
|
-
return `${beYear}-${dfFormat(date, "MM", options)}-${dfFormat(date, "dd", options)}`;
|
|
19
|
-
case "PPP":
|
|
20
|
-
case "PPPP": {
|
|
21
|
-
const raw = dfFormat(date, formatStr, options);
|
|
22
|
-
return raw.replace(/(.*)(\d{4})(?!.*\d)/, (_m, pre) => `${pre}${beYear}`);
|
|
23
|
-
}
|
|
24
|
-
default:
|
|
25
|
-
return dfFormat(date, formatStr, options);
|
|
26
|
-
}
|
|
27
|
-
}
|
|
@@ -1,44 +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 Ethiopic calendar.
|
|
7
|
-
*
|
|
8
|
-
* Defaults:
|
|
9
|
-
*
|
|
10
|
-
* - `locale`: `am-ET` (Amharic) via an Intl-backed date-fns locale
|
|
11
|
-
* - `numerals`: `geez` (Ethiopic digits)
|
|
12
|
-
*
|
|
13
|
-
* Notes:
|
|
14
|
-
*
|
|
15
|
-
* - Weekday names are taken from `Intl.DateTimeFormat(locale.code)`.
|
|
16
|
-
* - Month names are Amharic by default; they switch to Latin transliteration when
|
|
17
|
-
* `locale.code` starts with `en` or when `numerals` is `latn`.
|
|
18
|
-
* - Time tokens like `hh:mm a` are formatted via `Intl.DateTimeFormat` using the
|
|
19
|
-
* provided `locale`.
|
|
20
|
-
*
|
|
21
|
-
* @see https://daypicker.dev/docs/localization#ethiopic-calendar
|
|
22
|
-
*/
|
|
23
|
-
export declare function DayPicker(props: DayPickerProps & {
|
|
24
|
-
/**
|
|
25
|
-
* The locale to use in the calendar.
|
|
26
|
-
*
|
|
27
|
-
* @default `am-ET`
|
|
28
|
-
*/
|
|
29
|
-
locale?: Locale;
|
|
30
|
-
/**
|
|
31
|
-
* The numeral system to use when formatting dates.
|
|
32
|
-
*
|
|
33
|
-
* - `latn`: Latin (Western Arabic)
|
|
34
|
-
* - `geez`: Ge'ez (Ethiopic numerals)
|
|
35
|
-
*
|
|
36
|
-
* @defaultValue `geez` (Ethiopic numerals)
|
|
37
|
-
* @see https://daypicker.dev/docs/translation#numeral-systems
|
|
38
|
-
*/
|
|
39
|
-
numerals?: DayPickerProps["numerals"];
|
|
40
|
-
}): React.JSX.Element;
|
|
41
|
-
/** Returns the date library used in the calendar. */
|
|
42
|
-
export declare const getDateLib: (options?: DateLibOptions) => DateLib;
|
|
43
|
-
export { amET } from "../locale/am-ET.js";
|
|
44
|
-
export { enUS } from "../locale/en-US.js";
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { DateLib, DayPicker as DayPickerComponent, } from "../index.js";
|
|
3
|
-
import amET from "../locale/am-ET.js";
|
|
4
|
-
import * as ethiopicDateLib from "./lib/index.js";
|
|
5
|
-
/**
|
|
6
|
-
* Render the Ethiopic calendar.
|
|
7
|
-
*
|
|
8
|
-
* Defaults:
|
|
9
|
-
*
|
|
10
|
-
* - `locale`: `am-ET` (Amharic) via an Intl-backed date-fns locale
|
|
11
|
-
* - `numerals`: `geez` (Ethiopic digits)
|
|
12
|
-
*
|
|
13
|
-
* Notes:
|
|
14
|
-
*
|
|
15
|
-
* - Weekday names are taken from `Intl.DateTimeFormat(locale.code)`.
|
|
16
|
-
* - Month names are Amharic by default; they switch to Latin transliteration when
|
|
17
|
-
* `locale.code` starts with `en` or when `numerals` is `latn`.
|
|
18
|
-
* - Time tokens like `hh:mm a` are formatted via `Intl.DateTimeFormat` using the
|
|
19
|
-
* provided `locale`.
|
|
20
|
-
*
|
|
21
|
-
* @see https://daypicker.dev/docs/localization#ethiopic-calendar
|
|
22
|
-
*/
|
|
23
|
-
export function DayPicker(props) {
|
|
24
|
-
return (React.createElement(DayPickerComponent, { ...props, locale: props.locale ?? amET, numerals: props.numerals ?? "geez",
|
|
25
|
-
// Pass overrides, not a DateLib instance
|
|
26
|
-
dateLib: ethiopicDateLib }));
|
|
27
|
-
}
|
|
28
|
-
/** Returns the date library used in the calendar. */
|
|
29
|
-
export const getDateLib = (options) => {
|
|
30
|
-
return new DateLib(options, ethiopicDateLib);
|
|
31
|
-
};
|
|
32
|
-
// Export a minimal Amharic (Ethiopia) date-fns locale that uses Intl
|
|
33
|
-
export { amET } from "../locale/am-ET.js";
|
|
34
|
-
export { enUS } from "../locale/en-US.js";
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Adds the specified number of months to the given Ethiopian date. Handles
|
|
3
|
-
* month overflow and year boundaries correctly.
|
|
4
|
-
*
|
|
5
|
-
* @param date - The starting gregorian date
|
|
6
|
-
* @param amount - The number of months to add (can be negative)
|
|
7
|
-
* @returns A new gregorian date with the months added
|
|
8
|
-
*/
|
|
9
|
-
export declare function addMonths(date: Date, amount: number): Date;
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { daysInMonth } from "../utils/daysInMonth.js";
|
|
2
|
-
import { toEthiopicDate, toGregorianDate } from "../utils/index.js";
|
|
3
|
-
/**
|
|
4
|
-
* Adds the specified number of months to the given Ethiopian date. Handles
|
|
5
|
-
* month overflow and year boundaries correctly.
|
|
6
|
-
*
|
|
7
|
-
* @param date - The starting gregorian date
|
|
8
|
-
* @param amount - The number of months to add (can be negative)
|
|
9
|
-
* @returns A new gregorian date with the months added
|
|
10
|
-
*/
|
|
11
|
-
export function addMonths(date, amount) {
|
|
12
|
-
const { year, month, day } = toEthiopicDate(date);
|
|
13
|
-
let newMonth = month + amount;
|
|
14
|
-
const yearAdjustment = Math.floor((newMonth - 1) / 13);
|
|
15
|
-
newMonth = ((newMonth - 1) % 13) + 1;
|
|
16
|
-
if (newMonth < 1) {
|
|
17
|
-
newMonth += 13;
|
|
18
|
-
}
|
|
19
|
-
const newYear = year + yearAdjustment;
|
|
20
|
-
// Adjust day if it exceeds the month length
|
|
21
|
-
const monthLength = daysInMonth(newMonth, newYear);
|
|
22
|
-
const newDay = Math.min(day, monthLength);
|
|
23
|
-
return toGregorianDate({ year: newYear, month: newMonth, day: newDay });
|
|
24
|
-
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Adds the specified number of years to the given Ethiopian date. Handles leap
|
|
3
|
-
* year transitions for Pagume month.
|
|
4
|
-
*
|
|
5
|
-
* @param date - The starting gregorian date
|
|
6
|
-
* @param amount - The number of years to add (can be negative)
|
|
7
|
-
* @returns A new gregorian date with the years added
|
|
8
|
-
*/
|
|
9
|
-
export declare function addYears(date: Date, amount: number): Date;
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { isEthiopicLeapYear, toEthiopicDate, toGregorianDate, } from "../utils/index.js";
|
|
2
|
-
/**
|
|
3
|
-
* Adds the specified number of years to the given Ethiopian date. Handles leap
|
|
4
|
-
* year transitions for Pagume month.
|
|
5
|
-
*
|
|
6
|
-
* @param date - The starting gregorian date
|
|
7
|
-
* @param amount - The number of years to add (can be negative)
|
|
8
|
-
* @returns A new gregorian date with the years added
|
|
9
|
-
*/
|
|
10
|
-
export function addYears(date, amount) {
|
|
11
|
-
const etDate = toEthiopicDate(date);
|
|
12
|
-
const day = isEthiopicLeapYear(etDate.year) &&
|
|
13
|
-
etDate.month === 13 &&
|
|
14
|
-
etDate.day === 6 &&
|
|
15
|
-
amount % 4 !== 0
|
|
16
|
-
? 5
|
|
17
|
-
: etDate.day;
|
|
18
|
-
return toGregorianDate({
|
|
19
|
-
month: etDate.month,
|
|
20
|
-
day: day,
|
|
21
|
-
year: etDate.year + amount,
|
|
22
|
-
});
|
|
23
|
-
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Difference in calendar months
|
|
3
|
-
*
|
|
4
|
-
* @param {Date} dateLeft - The later date
|
|
5
|
-
* @param {Date} dateRight - The earlier date
|
|
6
|
-
* @returns {number} The number of calendar months between the two dates
|
|
7
|
-
*/
|
|
8
|
-
export declare function differenceInCalendarMonths(dateLeft: Date, dateRight: Date): number;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { toEthiopicDate } from "../utils/index.js";
|
|
2
|
-
/**
|
|
3
|
-
* Difference in calendar months
|
|
4
|
-
*
|
|
5
|
-
* @param {Date} dateLeft - The later date
|
|
6
|
-
* @param {Date} dateRight - The earlier date
|
|
7
|
-
* @returns {number} The number of calendar months between the two dates
|
|
8
|
-
*/
|
|
9
|
-
export function differenceInCalendarMonths(dateLeft, dateRight) {
|
|
10
|
-
const ethiopicLeft = toEthiopicDate(dateLeft);
|
|
11
|
-
const ethiopicRight = toEthiopicDate(dateRight);
|
|
12
|
-
return ((ethiopicLeft.year - ethiopicRight.year) * 13 +
|
|
13
|
-
(ethiopicLeft.month - ethiopicRight.month));
|
|
14
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import type { Interval } from "date-fns";
|
|
2
|
-
/**
|
|
3
|
-
* Each month of an interval
|
|
4
|
-
*
|
|
5
|
-
* @param {Object} interval - The interval object
|
|
6
|
-
* @param {Date} interval.start - The start date of the interval
|
|
7
|
-
* @param {Date} interval.end - The end date of the interval
|
|
8
|
-
* @returns {Date[]} An array of dates representing the start of each month in
|
|
9
|
-
* the interval
|
|
10
|
-
*/
|
|
11
|
-
export declare function eachMonthOfInterval(interval: Interval): Date[];
|