prometeo-design-system 2.8.8 → 2.9.1
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/dist/{components/Avatar/Avatar.js → Avatar.es.js} +24 -24
- package/dist/{components/Button/Button.js → Button.es.js} +55 -55
- package/dist/{components/CardProfile/CardProfile.js → CardProfile-CsytJlKZ.js} +94 -68
- package/dist/CardProfile.es.js +5 -0
- package/dist/{components/CheckBox/CheckBox.js → CheckBox.es.js} +25 -25
- package/dist/DatePicker.es.js +3441 -0
- package/dist/DialogModal.es.js +75 -0
- package/dist/DrawerDesktop.es.js +192 -0
- package/dist/DrawerMobile.es.js +242 -0
- package/dist/DropZone.es.js +87 -0
- package/dist/{components/FAB/FAButton.js → FAButton.es.js} +5 -5
- package/dist/Header.es.js +32 -0
- package/dist/HelperComponent-g_xuKWzK.js +24 -0
- package/dist/Icons-DtFC5DJ7.js +1079 -0
- package/dist/Icons.es.js +5 -0
- package/dist/{components/Image/Image.js → Image.es.js} +32 -32
- package/dist/ImageGallery-Ckxg9OIC.js +317 -0
- package/dist/{components/Image/useImageGallery.js → ImageGallery.es.js} +2 -0
- package/dist/Input-Cck37DpG.js +240 -0
- package/dist/Input.es.js +4 -0
- package/dist/InputMultiple.es.js +263 -0
- package/dist/LayoutGeneric-CbaoatQB.js +26 -0
- package/dist/LayoutGeneric.es.js +4 -0
- package/dist/Logo.es.js +9 -0
- package/dist/{components/Menu/MenuComposable.js → Menu.es.js} +13 -12
- package/dist/OtpInput.es.js +301 -0
- package/dist/{components/Pagination/Pagination.js → Pagination.es.js} +32 -32
- package/dist/{components/ProfilePictureUpload/ProfilePictureUpload.js → ProfilePictureUpload.es.js} +57 -56
- package/dist/ProgressBar.es.js +70 -0
- package/dist/{components/RadioButton/RadioButton.js → RadioButton.es.js} +36 -35
- package/dist/{components/SegmentedButton/SegmentedButton.js → SegmentedButton.es.js} +38 -37
- package/dist/Select-BD5FTxVw.js +1100 -0
- package/dist/Select.es.js +4 -0
- package/dist/SelectSearch.es.js +237 -0
- package/dist/{components/Skeleton/Skeleton.js → Skeleton.es.js} +18 -16
- package/dist/Spinner.es.js +52 -0
- package/dist/{components/Steps/Steps.js → Steps.es.js} +62 -61
- package/dist/{components/SwipeContainer/SwipeContainer.js → SwipeContainer.es.js} +68 -68
- package/dist/{components/Switch/Switch.js → Switch.es.js} +18 -17
- package/dist/{components/TabLinks/TabLinks.js → TabLinks.es.js} +11 -11
- package/dist/{components/Table/Table.js → Table.es.js} +41 -38
- package/dist/{components/TextArea/TextArea.js → TextArea.es.js} +26 -24
- package/dist/{components/Toaster/Toaster.js → Toast.es.js} +48 -48
- package/dist/ToastProvider.es.js +6 -0
- package/dist/Tooltip.es.js +62 -0
- package/dist/{lib/cn.js → cn-B6yFEsav.js} +2 -2
- package/dist/{node_modules/class-variance-authority/dist/index.js → index-BOQuZ0gG.js} +9 -10
- package/dist/index.d.ts +12 -16
- package/dist/jsx-runtime-DKDX3adD.js +281 -0
- package/dist/prometeo-design-system.css +1 -1
- package/dist/prometeo-design-system.es.js +1002 -0
- package/dist/{hooks/useDragScroll.js → useDragScroll-CHN9OMwn.js} +1 -1
- package/package.json +120 -116
- package/src/styles/base.css +464 -473
- package/dist/Avatar.js +0 -4
- package/dist/Button.js +0 -4
- package/dist/CardProfile.js +0 -5
- package/dist/CheckBox.js +0 -4
- package/dist/DatePicker.js +0 -5
- package/dist/DialogModal.js +0 -6
- package/dist/DrawerDesktop.js +0 -6
- package/dist/DrawerMobile.js +0 -6
- package/dist/DropZone.js +0 -5
- package/dist/FAButton.js +0 -4
- package/dist/Header.js +0 -4
- package/dist/Icons/Icons.js +0 -1055
- package/dist/Icons.js +0 -5
- package/dist/Image.js +0 -4
- package/dist/ImageGallery.js +0 -6
- package/dist/Input.js +0 -4
- package/dist/InputMultiple.js +0 -5
- package/dist/LayoutGeneric.js +0 -4
- package/dist/Logo.js +0 -4
- package/dist/Menu.js +0 -5
- package/dist/OtpInput.js +0 -4
- package/dist/Pagination.js +0 -4
- package/dist/ProfilePictureUpload.js +0 -5
- package/dist/ProgressBar.js +0 -4
- package/dist/RadioButton.js +0 -5
- package/dist/SegmentedButton.js +0 -5
- package/dist/Select.js +0 -4
- package/dist/SelectSearch.js +0 -4
- package/dist/Skeleton.js +0 -5
- package/dist/Spinner.js +0 -4
- package/dist/Steps.js +0 -5
- package/dist/SwipeContainer.js +0 -4
- package/dist/Switch.js +0 -5
- package/dist/TabLinks.js +0 -4
- package/dist/Table.js +0 -11
- package/dist/TextArea.js +0 -4
- package/dist/Toast.js +0 -5
- package/dist/ToastProvider.js +0 -4
- package/dist/Tooltip.js +0 -4
- package/dist/components/Autocomplete/useAutocomplete.js +0 -143
- package/dist/components/DatePicker/DatePicker.js +0 -396
- package/dist/components/Dialog/Dialog.js +0 -60
- package/dist/components/Dialog/useDialogControl.js +0 -18
- package/dist/components/Drawer/DrawerDesktop.js +0 -179
- package/dist/components/Drawer/DrawerMobile.js +0 -219
- package/dist/components/Drawer/useDrawerDesktop.js +0 -18
- package/dist/components/Drawer/useDrawerMobile.js +0 -27
- package/dist/components/DropZone/DropZone.js +0 -86
- package/dist/components/DropZone/useFileDropzone.js +0 -24
- package/dist/components/Header/Header.js +0 -32
- package/dist/components/Image/GalleryPreview.js +0 -40
- package/dist/components/Image/ImageGallery.js +0 -68
- package/dist/components/Image/LightBox.js +0 -223
- package/dist/components/Input/Input.js +0 -219
- package/dist/components/InputMultiple/InputMultiple.js +0 -262
- package/dist/components/Layout/LayoutGeneric.js +0 -13
- package/dist/components/Logo/Logo.js +0 -9
- package/dist/components/OtpInput/OtpInput.js +0 -112
- package/dist/components/ProgressBar/ProgressBar.js +0 -70
- package/dist/components/Select/Select.js +0 -1005
- package/dist/components/SelectSearch/SelectSearch.js +0 -101
- package/dist/components/Shared/Chip.js +0 -55
- package/dist/components/Shared/HelperComponent.js +0 -24
- package/dist/components/Sidebar/SecondaryBar/SecondaryBar.js +0 -62
- package/dist/components/Sidebar/SecondaryBar/hooks/useSecondaryBarAnimation.js +0 -59
- package/dist/components/Sidebar/SidebarComposable.js +0 -84
- package/dist/components/Sidebar/components/NavigationLink.js +0 -34
- package/dist/components/Sidebar/components/badge.js +0 -33
- package/dist/components/Sidebar/components/changue-account.js +0 -31
- package/dist/components/Sidebar/components/collapse-button.js +0 -18
- package/dist/components/Sidebar/components/company-logo.js +0 -12
- package/dist/components/Sidebar/components/nav-actions.js +0 -98
- package/dist/components/Sidebar/components/nav-links.js +0 -100
- package/dist/components/Sidebar/context/SidebarContext.js +0 -19
- package/dist/components/Sidebar/hooks/SidebarProvider.js +0 -33
- package/dist/components/Sidebar/hooks/useNavBarActions.js +0 -9
- package/dist/components/Sidebar/hooks/useNavBarCollapse.js +0 -11
- package/dist/components/Sidebar/hooks/useSidebarHook.js +0 -13
- package/dist/components/Sidebar/ui/useNavbarAnimation.js +0 -326
- package/dist/components/Spinner/Spinner.js +0 -52
- package/dist/components/TabSwitch/TabSwitch.js +0 -57
- package/dist/components/Toaster/ToastProvider.js +0 -6
- package/dist/components/Tooltip/Tootip.js +0 -62
- package/dist/hooks/useClickOutside.js +0 -24
- package/dist/hooks/useLabelBackground.js +0 -25
- package/dist/index.js +0 -127
- package/dist/lib/utils.js +0 -54
- package/dist/node_modules/@date-fns/tz/date/index.js +0 -61
- package/dist/node_modules/@date-fns/tz/date/mini.js +0 -69
- package/dist/node_modules/@date-fns/tz/tzName/index.js +0 -11
- package/dist/node_modules/@date-fns/tz/tzOffset/index.js +0 -22
- package/dist/node_modules/date-fns/_lib/addLeadingZeros.js +0 -7
- package/dist/node_modules/date-fns/_lib/defaultOptions.js +0 -7
- package/dist/node_modules/date-fns/_lib/format/formatters.js +0 -583
- package/dist/node_modules/date-fns/_lib/format/lightFormatters.js +0 -59
- package/dist/node_modules/date-fns/_lib/format/longFormatters.js +0 -52
- package/dist/node_modules/date-fns/_lib/getTimezoneOffsetInMilliseconds.js +0 -18
- package/dist/node_modules/date-fns/_lib/normalizeDates.js +0 -11
- package/dist/node_modules/date-fns/_lib/normalizeInterval.js +0 -8
- package/dist/node_modules/date-fns/_lib/protectedTokens.js +0 -20
- package/dist/node_modules/date-fns/addDays.js +0 -10
- package/dist/node_modules/date-fns/addMonths.js +0 -20
- package/dist/node_modules/date-fns/addWeeks.js +0 -8
- package/dist/node_modules/date-fns/addYears.js +0 -8
- package/dist/node_modules/date-fns/constants.js +0 -6
- package/dist/node_modules/date-fns/constructFrom.js +0 -8
- package/dist/node_modules/date-fns/differenceInCalendarDays.js +0 -16
- package/dist/node_modules/date-fns/differenceInCalendarMonths.js +0 -13
- package/dist/node_modules/date-fns/eachMonthOfInterval.js +0 -17
- package/dist/node_modules/date-fns/eachYearOfInterval.js +0 -17
- package/dist/node_modules/date-fns/endOfISOWeek.js +0 -8
- package/dist/node_modules/date-fns/endOfMonth.js +0 -9
- package/dist/node_modules/date-fns/endOfWeek.js +0 -10
- package/dist/node_modules/date-fns/endOfYear.js +0 -9
- package/dist/node_modules/date-fns/format.js +0 -58
- package/dist/node_modules/date-fns/getDayOfYear.js +0 -11
- package/dist/node_modules/date-fns/getDaysInMonth.js +0 -10
- package/dist/node_modules/date-fns/getISOWeek.js +0 -12
- package/dist/node_modules/date-fns/getISOWeekYear.js +0 -15
- package/dist/node_modules/date-fns/getMonth.js +0 -8
- package/dist/node_modules/date-fns/getWeek.js +0 -12
- package/dist/node_modules/date-fns/getWeekYear.js +0 -16
- package/dist/node_modules/date-fns/getYear.js +0 -8
- package/dist/node_modules/date-fns/isAfter.js +0 -8
- package/dist/node_modules/date-fns/isBefore.js +0 -8
- package/dist/node_modules/date-fns/isDate.js +0 -7
- package/dist/node_modules/date-fns/isSameDay.js +0 -14
- package/dist/node_modules/date-fns/isSameMonth.js +0 -13
- package/dist/node_modules/date-fns/isSameYear.js +0 -13
- package/dist/node_modules/date-fns/isValid.js +0 -9
- package/dist/node_modules/date-fns/locale/_lib/buildFormatLongFn.js +0 -9
- package/dist/node_modules/date-fns/locale/_lib/buildLocalizeFn.js +0 -18
- package/dist/node_modules/date-fns/locale/_lib/buildMatchFn.js +0 -31
- package/dist/node_modules/date-fns/locale/_lib/buildMatchPatternFn.js +0 -15
- package/dist/node_modules/date-fns/locale/en-US/_lib/formatDistance.js +0 -70
- package/dist/node_modules/date-fns/locale/en-US/_lib/formatLong.js +0 -33
- package/dist/node_modules/date-fns/locale/en-US/_lib/formatRelative.js +0 -11
- package/dist/node_modules/date-fns/locale/en-US/_lib/localize.js +0 -155
- package/dist/node_modules/date-fns/locale/en-US/_lib/match.js +0 -110
- package/dist/node_modules/date-fns/locale/en-US.js +0 -21
- package/dist/node_modules/date-fns/locale/es/_lib/formatDistance.js +0 -70
- package/dist/node_modules/date-fns/locale/es/_lib/formatLong.js +0 -33
- package/dist/node_modules/date-fns/locale/es/_lib/formatRelative.js +0 -18
- package/dist/node_modules/date-fns/locale/es/_lib/localize.js +0 -143
- package/dist/node_modules/date-fns/locale/es/_lib/match.js +0 -116
- package/dist/node_modules/date-fns/locale/es.js +0 -21
- package/dist/node_modules/date-fns/max.js +0 -14
- package/dist/node_modules/date-fns/min.js +0 -14
- package/dist/node_modules/date-fns/setMonth.js +0 -13
- package/dist/node_modules/date-fns/setYear.js +0 -10
- package/dist/node_modules/date-fns/startOfDay.js +0 -9
- package/dist/node_modules/date-fns/startOfISOWeek.js +0 -8
- package/dist/node_modules/date-fns/startOfISOWeekYear.js +0 -11
- package/dist/node_modules/date-fns/startOfMonth.js +0 -9
- package/dist/node_modules/date-fns/startOfWeek.js +0 -10
- package/dist/node_modules/date-fns/startOfWeekYear.js +0 -12
- package/dist/node_modules/date-fns/startOfYear.js +0 -9
- package/dist/node_modules/date-fns/toDate.js +0 -8
- package/dist/node_modules/input-otp/dist/index.js +0 -194
- package/dist/node_modules/react-day-picker/dist/esm/DayPicker.js +0 -227
- package/dist/node_modules/react-day-picker/dist/esm/UI.js +0 -22
- package/dist/node_modules/react-day-picker/dist/esm/classes/CalendarDay.js +0 -19
- package/dist/node_modules/react-day-picker/dist/esm/classes/CalendarMonth.js +0 -8
- package/dist/node_modules/react-day-picker/dist/esm/classes/CalendarWeek.js +0 -8
- package/dist/node_modules/react-day-picker/dist/esm/classes/DateLib.js +0 -147
- package/dist/node_modules/react-day-picker/dist/esm/components/Button.js +0 -7
- package/dist/node_modules/react-day-picker/dist/esm/components/CaptionLabel.js +0 -7
- package/dist/node_modules/react-day-picker/dist/esm/components/Chevron.js +0 -18
- package/dist/node_modules/react-day-picker/dist/esm/components/Day.js +0 -8
- package/dist/node_modules/react-day-picker/dist/esm/components/DayButton.js +0 -10
- package/dist/node_modules/react-day-picker/dist/esm/components/Dropdown.js +0 -19
- package/dist/node_modules/react-day-picker/dist/esm/components/DropdownNav.js +0 -7
- package/dist/node_modules/react-day-picker/dist/esm/components/Footer.js +0 -7
- package/dist/node_modules/react-day-picker/dist/esm/components/Month.js +0 -8
- package/dist/node_modules/react-day-picker/dist/esm/components/MonthCaption.js +0 -8
- package/dist/node_modules/react-day-picker/dist/esm/components/MonthGrid.js +0 -7
- package/dist/node_modules/react-day-picker/dist/esm/components/Months.js +0 -7
- package/dist/node_modules/react-day-picker/dist/esm/components/MonthsDropdown.js +0 -9
- package/dist/node_modules/react-day-picker/dist/esm/components/Nav.js +0 -27
- package/dist/node_modules/react-day-picker/dist/esm/components/NextMonthButton.js +0 -9
- package/dist/node_modules/react-day-picker/dist/esm/components/Option.js +0 -7
- package/dist/node_modules/react-day-picker/dist/esm/components/PreviousMonthButton.js +0 -9
- package/dist/node_modules/react-day-picker/dist/esm/components/Root.js +0 -8
- package/dist/node_modules/react-day-picker/dist/esm/components/Select.js +0 -7
- package/dist/node_modules/react-day-picker/dist/esm/components/Week.js +0 -8
- package/dist/node_modules/react-day-picker/dist/esm/components/WeekNumber.js +0 -8
- package/dist/node_modules/react-day-picker/dist/esm/components/WeekNumberHeader.js +0 -7
- package/dist/node_modules/react-day-picker/dist/esm/components/Weekday.js +0 -7
- package/dist/node_modules/react-day-picker/dist/esm/components/Weekdays.js +0 -11
- package/dist/node_modules/react-day-picker/dist/esm/components/Weeks.js +0 -7
- package/dist/node_modules/react-day-picker/dist/esm/components/YearsDropdown.js +0 -9
- package/dist/node_modules/react-day-picker/dist/esm/components/custom-components.js +0 -54
- package/dist/node_modules/react-day-picker/dist/esm/formatters/formatCaption.js +0 -9
- package/dist/node_modules/react-day-picker/dist/esm/formatters/formatDay.js +0 -7
- package/dist/node_modules/react-day-picker/dist/esm/formatters/formatMonthDropdown.js +0 -7
- package/dist/node_modules/react-day-picker/dist/esm/formatters/formatWeekNumber.js +0 -7
- package/dist/node_modules/react-day-picker/dist/esm/formatters/formatWeekNumberHeader.js +0 -6
- package/dist/node_modules/react-day-picker/dist/esm/formatters/formatWeekdayName.js +0 -7
- package/dist/node_modules/react-day-picker/dist/esm/formatters/formatYearDropdown.js +0 -9
- package/dist/node_modules/react-day-picker/dist/esm/formatters/index.js +0 -18
- package/dist/node_modules/react-day-picker/dist/esm/helpers/calculateFocusTarget.js +0 -19
- package/dist/node_modules/react-day-picker/dist/esm/helpers/createGetModifiers.js +0 -42
- package/dist/node_modules/react-day-picker/dist/esm/helpers/endOfBroadcastWeek.js +0 -9
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getBroadcastWeeksInMonth.js +0 -7
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getClassNamesForModifiers.js +0 -7
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getComponents.js +0 -10
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getDataAttributes.js +0 -16
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getDates.js +0 -21
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getDays.js +0 -10
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getDefaultClassNames.js +0 -16
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getDisplayMonths.js +0 -13
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getFocusableDate.js +0 -15
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getFormatters.js +0 -10
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getInitialMonth.js +0 -13
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getMonthOptions.js +0 -13
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getMonths.js +0 -24
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getNavMonth.js +0 -13
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getNextFocus.js +0 -12
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getNextMonth.js +0 -12
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getPreviousMonth.js +0 -12
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getStyleForModifiers.js +0 -13
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getWeekdays.js +0 -11
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getWeeks.js +0 -7
- package/dist/node_modules/react-day-picker/dist/esm/helpers/getYearOptions.js +0 -16
- package/dist/node_modules/react-day-picker/dist/esm/helpers/startOfBroadcastWeek.js +0 -7
- package/dist/node_modules/react-day-picker/dist/esm/helpers/useControlledValue.js +0 -8
- package/dist/node_modules/react-day-picker/dist/esm/labels/index.js +0 -26
- package/dist/node_modules/react-day-picker/dist/esm/labels/labelDayButton.js +0 -10
- package/dist/node_modules/react-day-picker/dist/esm/labels/labelGrid.js +0 -9
- package/dist/node_modules/react-day-picker/dist/esm/labels/labelGridcell.js +0 -8
- package/dist/node_modules/react-day-picker/dist/esm/labels/labelMonthDropdown.js +0 -6
- package/dist/node_modules/react-day-picker/dist/esm/labels/labelNav.js +0 -6
- package/dist/node_modules/react-day-picker/dist/esm/labels/labelNext.js +0 -6
- package/dist/node_modules/react-day-picker/dist/esm/labels/labelPrevious.js +0 -6
- package/dist/node_modules/react-day-picker/dist/esm/labels/labelWeekNumber.js +0 -6
- package/dist/node_modules/react-day-picker/dist/esm/labels/labelWeekNumberHeader.js +0 -6
- package/dist/node_modules/react-day-picker/dist/esm/labels/labelWeekday.js +0 -7
- package/dist/node_modules/react-day-picker/dist/esm/labels/labelYearDropdown.js +0 -6
- package/dist/node_modules/react-day-picker/dist/esm/selection/useMulti.js +0 -21
- package/dist/node_modules/react-day-picker/dist/esm/selection/useRange.js +0 -18
- package/dist/node_modules/react-day-picker/dist/esm/selection/useSingle.js +0 -15
- package/dist/node_modules/react-day-picker/dist/esm/useAnimation.js +0 -56
- package/dist/node_modules/react-day-picker/dist/esm/useCalendar.js +0 -44
- package/dist/node_modules/react-day-picker/dist/esm/useDayPicker.js +0 -12
- package/dist/node_modules/react-day-picker/dist/esm/useFocus.js +0 -23
- package/dist/node_modules/react-day-picker/dist/esm/useSelection.js +0 -19
- package/dist/node_modules/react-day-picker/dist/esm/utils/addToRange.js +0 -32
- package/dist/node_modules/react-day-picker/dist/esm/utils/dateMatchModifiers.js +0 -26
- package/dist/node_modules/react-day-picker/dist/esm/utils/rangeContainsDayOfWeek.js +0 -15
- package/dist/node_modules/react-day-picker/dist/esm/utils/rangeContainsModifiers.js +0 -28
- package/dist/node_modules/react-day-picker/dist/esm/utils/rangeIncludesDate.js +0 -9
- package/dist/node_modules/react-day-picker/dist/esm/utils/rangeOverlaps.js +0 -8
- package/dist/node_modules/react-day-picker/dist/esm/utils/typeguards.js +0 -26
- package/dist/useDevice.js +0 -4
- /package/dist/{hooks/useDevice.js → useDevice.es.js} +0 -0
|
@@ -1,583 +0,0 @@
|
|
|
1
|
-
import { getDayOfYear as m } from "../../getDayOfYear.js";
|
|
2
|
-
import { getISOWeek as g } from "../../getISOWeek.js";
|
|
3
|
-
import { getISOWeekYear as w } from "../../getISOWeekYear.js";
|
|
4
|
-
import { getWeek as b } from "../../getWeek.js";
|
|
5
|
-
import { getWeekYear as x } from "../../getWeekYear.js";
|
|
6
|
-
import { addLeadingZeros as i } from "../addLeadingZeros.js";
|
|
7
|
-
import { lightFormatters as u } from "./lightFormatters.js";
|
|
8
|
-
const s = {
|
|
9
|
-
midnight: "midnight",
|
|
10
|
-
noon: "noon",
|
|
11
|
-
morning: "morning",
|
|
12
|
-
afternoon: "afternoon",
|
|
13
|
-
evening: "evening",
|
|
14
|
-
night: "night"
|
|
15
|
-
}, L = {
|
|
16
|
-
// Era
|
|
17
|
-
G: function(n, r, e) {
|
|
18
|
-
const t = n.getFullYear() > 0 ? 1 : 0;
|
|
19
|
-
switch (r) {
|
|
20
|
-
// AD, BC
|
|
21
|
-
case "G":
|
|
22
|
-
case "GG":
|
|
23
|
-
case "GGG":
|
|
24
|
-
return e.era(t, { width: "abbreviated" });
|
|
25
|
-
// A, B
|
|
26
|
-
case "GGGGG":
|
|
27
|
-
return e.era(t, { width: "narrow" });
|
|
28
|
-
// Anno Domini, Before Christ
|
|
29
|
-
case "GGGG":
|
|
30
|
-
default:
|
|
31
|
-
return e.era(t, { width: "wide" });
|
|
32
|
-
}
|
|
33
|
-
},
|
|
34
|
-
// Year
|
|
35
|
-
y: function(n, r, e) {
|
|
36
|
-
if (r === "yo") {
|
|
37
|
-
const t = n.getFullYear(), a = t > 0 ? t : 1 - t;
|
|
38
|
-
return e.ordinalNumber(a, { unit: "year" });
|
|
39
|
-
}
|
|
40
|
-
return u.y(n, r);
|
|
41
|
-
},
|
|
42
|
-
// Local week-numbering year
|
|
43
|
-
Y: function(n, r, e, t) {
|
|
44
|
-
const a = x(n, t), o = a > 0 ? a : 1 - a;
|
|
45
|
-
if (r === "YY") {
|
|
46
|
-
const h = o % 100;
|
|
47
|
-
return i(h, 2);
|
|
48
|
-
}
|
|
49
|
-
return r === "Yo" ? e.ordinalNumber(o, { unit: "year" }) : i(o, r.length);
|
|
50
|
-
},
|
|
51
|
-
// ISO week-numbering year
|
|
52
|
-
R: function(n, r) {
|
|
53
|
-
const e = w(n);
|
|
54
|
-
return i(e, r.length);
|
|
55
|
-
},
|
|
56
|
-
// Extended year. This is a single number designating the year of this calendar system.
|
|
57
|
-
// The main difference between `y` and `u` localizers are B.C. years:
|
|
58
|
-
// | Year | `y` | `u` |
|
|
59
|
-
// |------|-----|-----|
|
|
60
|
-
// | AC 1 | 1 | 1 |
|
|
61
|
-
// | BC 1 | 1 | 0 |
|
|
62
|
-
// | BC 2 | 2 | -1 |
|
|
63
|
-
// Also `yy` always returns the last two digits of a year,
|
|
64
|
-
// while `uu` pads single digit years to 2 characters and returns other years unchanged.
|
|
65
|
-
u: function(n, r) {
|
|
66
|
-
const e = n.getFullYear();
|
|
67
|
-
return i(e, r.length);
|
|
68
|
-
},
|
|
69
|
-
// Quarter
|
|
70
|
-
Q: function(n, r, e) {
|
|
71
|
-
const t = Math.ceil((n.getMonth() + 1) / 3);
|
|
72
|
-
switch (r) {
|
|
73
|
-
// 1, 2, 3, 4
|
|
74
|
-
case "Q":
|
|
75
|
-
return String(t);
|
|
76
|
-
// 01, 02, 03, 04
|
|
77
|
-
case "QQ":
|
|
78
|
-
return i(t, 2);
|
|
79
|
-
// 1st, 2nd, 3rd, 4th
|
|
80
|
-
case "Qo":
|
|
81
|
-
return e.ordinalNumber(t, { unit: "quarter" });
|
|
82
|
-
// Q1, Q2, Q3, Q4
|
|
83
|
-
case "QQQ":
|
|
84
|
-
return e.quarter(t, {
|
|
85
|
-
width: "abbreviated",
|
|
86
|
-
context: "formatting"
|
|
87
|
-
});
|
|
88
|
-
// 1, 2, 3, 4 (narrow quarter; could be not numerical)
|
|
89
|
-
case "QQQQQ":
|
|
90
|
-
return e.quarter(t, {
|
|
91
|
-
width: "narrow",
|
|
92
|
-
context: "formatting"
|
|
93
|
-
});
|
|
94
|
-
// 1st quarter, 2nd quarter, ...
|
|
95
|
-
case "QQQQ":
|
|
96
|
-
default:
|
|
97
|
-
return e.quarter(t, {
|
|
98
|
-
width: "wide",
|
|
99
|
-
context: "formatting"
|
|
100
|
-
});
|
|
101
|
-
}
|
|
102
|
-
},
|
|
103
|
-
// Stand-alone quarter
|
|
104
|
-
q: function(n, r, e) {
|
|
105
|
-
const t = Math.ceil((n.getMonth() + 1) / 3);
|
|
106
|
-
switch (r) {
|
|
107
|
-
// 1, 2, 3, 4
|
|
108
|
-
case "q":
|
|
109
|
-
return String(t);
|
|
110
|
-
// 01, 02, 03, 04
|
|
111
|
-
case "qq":
|
|
112
|
-
return i(t, 2);
|
|
113
|
-
// 1st, 2nd, 3rd, 4th
|
|
114
|
-
case "qo":
|
|
115
|
-
return e.ordinalNumber(t, { unit: "quarter" });
|
|
116
|
-
// Q1, Q2, Q3, Q4
|
|
117
|
-
case "qqq":
|
|
118
|
-
return e.quarter(t, {
|
|
119
|
-
width: "abbreviated",
|
|
120
|
-
context: "standalone"
|
|
121
|
-
});
|
|
122
|
-
// 1, 2, 3, 4 (narrow quarter; could be not numerical)
|
|
123
|
-
case "qqqqq":
|
|
124
|
-
return e.quarter(t, {
|
|
125
|
-
width: "narrow",
|
|
126
|
-
context: "standalone"
|
|
127
|
-
});
|
|
128
|
-
// 1st quarter, 2nd quarter, ...
|
|
129
|
-
case "qqqq":
|
|
130
|
-
default:
|
|
131
|
-
return e.quarter(t, {
|
|
132
|
-
width: "wide",
|
|
133
|
-
context: "standalone"
|
|
134
|
-
});
|
|
135
|
-
}
|
|
136
|
-
},
|
|
137
|
-
// Month
|
|
138
|
-
M: function(n, r, e) {
|
|
139
|
-
const t = n.getMonth();
|
|
140
|
-
switch (r) {
|
|
141
|
-
case "M":
|
|
142
|
-
case "MM":
|
|
143
|
-
return u.M(n, r);
|
|
144
|
-
// 1st, 2nd, ..., 12th
|
|
145
|
-
case "Mo":
|
|
146
|
-
return e.ordinalNumber(t + 1, { unit: "month" });
|
|
147
|
-
// Jan, Feb, ..., Dec
|
|
148
|
-
case "MMM":
|
|
149
|
-
return e.month(t, {
|
|
150
|
-
width: "abbreviated",
|
|
151
|
-
context: "formatting"
|
|
152
|
-
});
|
|
153
|
-
// J, F, ..., D
|
|
154
|
-
case "MMMMM":
|
|
155
|
-
return e.month(t, {
|
|
156
|
-
width: "narrow",
|
|
157
|
-
context: "formatting"
|
|
158
|
-
});
|
|
159
|
-
// January, February, ..., December
|
|
160
|
-
case "MMMM":
|
|
161
|
-
default:
|
|
162
|
-
return e.month(t, { width: "wide", context: "formatting" });
|
|
163
|
-
}
|
|
164
|
-
},
|
|
165
|
-
// Stand-alone month
|
|
166
|
-
L: function(n, r, e) {
|
|
167
|
-
const t = n.getMonth();
|
|
168
|
-
switch (r) {
|
|
169
|
-
// 1, 2, ..., 12
|
|
170
|
-
case "L":
|
|
171
|
-
return String(t + 1);
|
|
172
|
-
// 01, 02, ..., 12
|
|
173
|
-
case "LL":
|
|
174
|
-
return i(t + 1, 2);
|
|
175
|
-
// 1st, 2nd, ..., 12th
|
|
176
|
-
case "Lo":
|
|
177
|
-
return e.ordinalNumber(t + 1, { unit: "month" });
|
|
178
|
-
// Jan, Feb, ..., Dec
|
|
179
|
-
case "LLL":
|
|
180
|
-
return e.month(t, {
|
|
181
|
-
width: "abbreviated",
|
|
182
|
-
context: "standalone"
|
|
183
|
-
});
|
|
184
|
-
// J, F, ..., D
|
|
185
|
-
case "LLLLL":
|
|
186
|
-
return e.month(t, {
|
|
187
|
-
width: "narrow",
|
|
188
|
-
context: "standalone"
|
|
189
|
-
});
|
|
190
|
-
// January, February, ..., December
|
|
191
|
-
case "LLLL":
|
|
192
|
-
default:
|
|
193
|
-
return e.month(t, { width: "wide", context: "standalone" });
|
|
194
|
-
}
|
|
195
|
-
},
|
|
196
|
-
// Local week of year
|
|
197
|
-
w: function(n, r, e, t) {
|
|
198
|
-
const a = b(n, t);
|
|
199
|
-
return r === "wo" ? e.ordinalNumber(a, { unit: "week" }) : i(a, r.length);
|
|
200
|
-
},
|
|
201
|
-
// ISO week of year
|
|
202
|
-
I: function(n, r, e) {
|
|
203
|
-
const t = g(n);
|
|
204
|
-
return r === "Io" ? e.ordinalNumber(t, { unit: "week" }) : i(t, r.length);
|
|
205
|
-
},
|
|
206
|
-
// Day of the month
|
|
207
|
-
d: function(n, r, e) {
|
|
208
|
-
return r === "do" ? e.ordinalNumber(n.getDate(), { unit: "date" }) : u.d(n, r);
|
|
209
|
-
},
|
|
210
|
-
// Day of year
|
|
211
|
-
D: function(n, r, e) {
|
|
212
|
-
const t = m(n);
|
|
213
|
-
return r === "Do" ? e.ordinalNumber(t, { unit: "dayOfYear" }) : i(t, r.length);
|
|
214
|
-
},
|
|
215
|
-
// Day of week
|
|
216
|
-
E: function(n, r, e) {
|
|
217
|
-
const t = n.getDay();
|
|
218
|
-
switch (r) {
|
|
219
|
-
// Tue
|
|
220
|
-
case "E":
|
|
221
|
-
case "EE":
|
|
222
|
-
case "EEE":
|
|
223
|
-
return e.day(t, {
|
|
224
|
-
width: "abbreviated",
|
|
225
|
-
context: "formatting"
|
|
226
|
-
});
|
|
227
|
-
// T
|
|
228
|
-
case "EEEEE":
|
|
229
|
-
return e.day(t, {
|
|
230
|
-
width: "narrow",
|
|
231
|
-
context: "formatting"
|
|
232
|
-
});
|
|
233
|
-
// Tu
|
|
234
|
-
case "EEEEEE":
|
|
235
|
-
return e.day(t, {
|
|
236
|
-
width: "short",
|
|
237
|
-
context: "formatting"
|
|
238
|
-
});
|
|
239
|
-
// Tuesday
|
|
240
|
-
case "EEEE":
|
|
241
|
-
default:
|
|
242
|
-
return e.day(t, {
|
|
243
|
-
width: "wide",
|
|
244
|
-
context: "formatting"
|
|
245
|
-
});
|
|
246
|
-
}
|
|
247
|
-
},
|
|
248
|
-
// Local day of week
|
|
249
|
-
e: function(n, r, e, t) {
|
|
250
|
-
const a = n.getDay(), o = (a - t.weekStartsOn + 8) % 7 || 7;
|
|
251
|
-
switch (r) {
|
|
252
|
-
// Numerical value (Nth day of week with current locale or weekStartsOn)
|
|
253
|
-
case "e":
|
|
254
|
-
return String(o);
|
|
255
|
-
// Padded numerical value
|
|
256
|
-
case "ee":
|
|
257
|
-
return i(o, 2);
|
|
258
|
-
// 1st, 2nd, ..., 7th
|
|
259
|
-
case "eo":
|
|
260
|
-
return e.ordinalNumber(o, { unit: "day" });
|
|
261
|
-
case "eee":
|
|
262
|
-
return e.day(a, {
|
|
263
|
-
width: "abbreviated",
|
|
264
|
-
context: "formatting"
|
|
265
|
-
});
|
|
266
|
-
// T
|
|
267
|
-
case "eeeee":
|
|
268
|
-
return e.day(a, {
|
|
269
|
-
width: "narrow",
|
|
270
|
-
context: "formatting"
|
|
271
|
-
});
|
|
272
|
-
// Tu
|
|
273
|
-
case "eeeeee":
|
|
274
|
-
return e.day(a, {
|
|
275
|
-
width: "short",
|
|
276
|
-
context: "formatting"
|
|
277
|
-
});
|
|
278
|
-
// Tuesday
|
|
279
|
-
case "eeee":
|
|
280
|
-
default:
|
|
281
|
-
return e.day(a, {
|
|
282
|
-
width: "wide",
|
|
283
|
-
context: "formatting"
|
|
284
|
-
});
|
|
285
|
-
}
|
|
286
|
-
},
|
|
287
|
-
// Stand-alone local day of week
|
|
288
|
-
c: function(n, r, e, t) {
|
|
289
|
-
const a = n.getDay(), o = (a - t.weekStartsOn + 8) % 7 || 7;
|
|
290
|
-
switch (r) {
|
|
291
|
-
// Numerical value (same as in `e`)
|
|
292
|
-
case "c":
|
|
293
|
-
return String(o);
|
|
294
|
-
// Padded numerical value
|
|
295
|
-
case "cc":
|
|
296
|
-
return i(o, r.length);
|
|
297
|
-
// 1st, 2nd, ..., 7th
|
|
298
|
-
case "co":
|
|
299
|
-
return e.ordinalNumber(o, { unit: "day" });
|
|
300
|
-
case "ccc":
|
|
301
|
-
return e.day(a, {
|
|
302
|
-
width: "abbreviated",
|
|
303
|
-
context: "standalone"
|
|
304
|
-
});
|
|
305
|
-
// T
|
|
306
|
-
case "ccccc":
|
|
307
|
-
return e.day(a, {
|
|
308
|
-
width: "narrow",
|
|
309
|
-
context: "standalone"
|
|
310
|
-
});
|
|
311
|
-
// Tu
|
|
312
|
-
case "cccccc":
|
|
313
|
-
return e.day(a, {
|
|
314
|
-
width: "short",
|
|
315
|
-
context: "standalone"
|
|
316
|
-
});
|
|
317
|
-
// Tuesday
|
|
318
|
-
case "cccc":
|
|
319
|
-
default:
|
|
320
|
-
return e.day(a, {
|
|
321
|
-
width: "wide",
|
|
322
|
-
context: "standalone"
|
|
323
|
-
});
|
|
324
|
-
}
|
|
325
|
-
},
|
|
326
|
-
// ISO day of week
|
|
327
|
-
i: function(n, r, e) {
|
|
328
|
-
const t = n.getDay(), a = t === 0 ? 7 : t;
|
|
329
|
-
switch (r) {
|
|
330
|
-
// 2
|
|
331
|
-
case "i":
|
|
332
|
-
return String(a);
|
|
333
|
-
// 02
|
|
334
|
-
case "ii":
|
|
335
|
-
return i(a, r.length);
|
|
336
|
-
// 2nd
|
|
337
|
-
case "io":
|
|
338
|
-
return e.ordinalNumber(a, { unit: "day" });
|
|
339
|
-
// Tue
|
|
340
|
-
case "iii":
|
|
341
|
-
return e.day(t, {
|
|
342
|
-
width: "abbreviated",
|
|
343
|
-
context: "formatting"
|
|
344
|
-
});
|
|
345
|
-
// T
|
|
346
|
-
case "iiiii":
|
|
347
|
-
return e.day(t, {
|
|
348
|
-
width: "narrow",
|
|
349
|
-
context: "formatting"
|
|
350
|
-
});
|
|
351
|
-
// Tu
|
|
352
|
-
case "iiiiii":
|
|
353
|
-
return e.day(t, {
|
|
354
|
-
width: "short",
|
|
355
|
-
context: "formatting"
|
|
356
|
-
});
|
|
357
|
-
// Tuesday
|
|
358
|
-
case "iiii":
|
|
359
|
-
default:
|
|
360
|
-
return e.day(t, {
|
|
361
|
-
width: "wide",
|
|
362
|
-
context: "formatting"
|
|
363
|
-
});
|
|
364
|
-
}
|
|
365
|
-
},
|
|
366
|
-
// AM or PM
|
|
367
|
-
a: function(n, r, e) {
|
|
368
|
-
const a = n.getHours() / 12 >= 1 ? "pm" : "am";
|
|
369
|
-
switch (r) {
|
|
370
|
-
case "a":
|
|
371
|
-
case "aa":
|
|
372
|
-
return e.dayPeriod(a, {
|
|
373
|
-
width: "abbreviated",
|
|
374
|
-
context: "formatting"
|
|
375
|
-
});
|
|
376
|
-
case "aaa":
|
|
377
|
-
return e.dayPeriod(a, {
|
|
378
|
-
width: "abbreviated",
|
|
379
|
-
context: "formatting"
|
|
380
|
-
}).toLowerCase();
|
|
381
|
-
case "aaaaa":
|
|
382
|
-
return e.dayPeriod(a, {
|
|
383
|
-
width: "narrow",
|
|
384
|
-
context: "formatting"
|
|
385
|
-
});
|
|
386
|
-
case "aaaa":
|
|
387
|
-
default:
|
|
388
|
-
return e.dayPeriod(a, {
|
|
389
|
-
width: "wide",
|
|
390
|
-
context: "formatting"
|
|
391
|
-
});
|
|
392
|
-
}
|
|
393
|
-
},
|
|
394
|
-
// AM, PM, midnight, noon
|
|
395
|
-
b: function(n, r, e) {
|
|
396
|
-
const t = n.getHours();
|
|
397
|
-
let a;
|
|
398
|
-
switch (t === 12 ? a = s.noon : t === 0 ? a = s.midnight : a = t / 12 >= 1 ? "pm" : "am", r) {
|
|
399
|
-
case "b":
|
|
400
|
-
case "bb":
|
|
401
|
-
return e.dayPeriod(a, {
|
|
402
|
-
width: "abbreviated",
|
|
403
|
-
context: "formatting"
|
|
404
|
-
});
|
|
405
|
-
case "bbb":
|
|
406
|
-
return e.dayPeriod(a, {
|
|
407
|
-
width: "abbreviated",
|
|
408
|
-
context: "formatting"
|
|
409
|
-
}).toLowerCase();
|
|
410
|
-
case "bbbbb":
|
|
411
|
-
return e.dayPeriod(a, {
|
|
412
|
-
width: "narrow",
|
|
413
|
-
context: "formatting"
|
|
414
|
-
});
|
|
415
|
-
case "bbbb":
|
|
416
|
-
default:
|
|
417
|
-
return e.dayPeriod(a, {
|
|
418
|
-
width: "wide",
|
|
419
|
-
context: "formatting"
|
|
420
|
-
});
|
|
421
|
-
}
|
|
422
|
-
},
|
|
423
|
-
// in the morning, in the afternoon, in the evening, at night
|
|
424
|
-
B: function(n, r, e) {
|
|
425
|
-
const t = n.getHours();
|
|
426
|
-
let a;
|
|
427
|
-
switch (t >= 17 ? a = s.evening : t >= 12 ? a = s.afternoon : t >= 4 ? a = s.morning : a = s.night, r) {
|
|
428
|
-
case "B":
|
|
429
|
-
case "BB":
|
|
430
|
-
case "BBB":
|
|
431
|
-
return e.dayPeriod(a, {
|
|
432
|
-
width: "abbreviated",
|
|
433
|
-
context: "formatting"
|
|
434
|
-
});
|
|
435
|
-
case "BBBBB":
|
|
436
|
-
return e.dayPeriod(a, {
|
|
437
|
-
width: "narrow",
|
|
438
|
-
context: "formatting"
|
|
439
|
-
});
|
|
440
|
-
case "BBBB":
|
|
441
|
-
default:
|
|
442
|
-
return e.dayPeriod(a, {
|
|
443
|
-
width: "wide",
|
|
444
|
-
context: "formatting"
|
|
445
|
-
});
|
|
446
|
-
}
|
|
447
|
-
},
|
|
448
|
-
// Hour [1-12]
|
|
449
|
-
h: function(n, r, e) {
|
|
450
|
-
if (r === "ho") {
|
|
451
|
-
let t = n.getHours() % 12;
|
|
452
|
-
return t === 0 && (t = 12), e.ordinalNumber(t, { unit: "hour" });
|
|
453
|
-
}
|
|
454
|
-
return u.h(n, r);
|
|
455
|
-
},
|
|
456
|
-
// Hour [0-23]
|
|
457
|
-
H: function(n, r, e) {
|
|
458
|
-
return r === "Ho" ? e.ordinalNumber(n.getHours(), { unit: "hour" }) : u.H(n, r);
|
|
459
|
-
},
|
|
460
|
-
// Hour [0-11]
|
|
461
|
-
K: function(n, r, e) {
|
|
462
|
-
const t = n.getHours() % 12;
|
|
463
|
-
return r === "Ko" ? e.ordinalNumber(t, { unit: "hour" }) : i(t, r.length);
|
|
464
|
-
},
|
|
465
|
-
// Hour [1-24]
|
|
466
|
-
k: function(n, r, e) {
|
|
467
|
-
let t = n.getHours();
|
|
468
|
-
return t === 0 && (t = 24), r === "ko" ? e.ordinalNumber(t, { unit: "hour" }) : i(t, r.length);
|
|
469
|
-
},
|
|
470
|
-
// Minute
|
|
471
|
-
m: function(n, r, e) {
|
|
472
|
-
return r === "mo" ? e.ordinalNumber(n.getMinutes(), { unit: "minute" }) : u.m(n, r);
|
|
473
|
-
},
|
|
474
|
-
// Second
|
|
475
|
-
s: function(n, r, e) {
|
|
476
|
-
return r === "so" ? e.ordinalNumber(n.getSeconds(), { unit: "second" }) : u.s(n, r);
|
|
477
|
-
},
|
|
478
|
-
// Fraction of second
|
|
479
|
-
S: function(n, r) {
|
|
480
|
-
return u.S(n, r);
|
|
481
|
-
},
|
|
482
|
-
// Timezone (ISO-8601. If offset is 0, output is always `'Z'`)
|
|
483
|
-
X: function(n, r, e) {
|
|
484
|
-
const t = n.getTimezoneOffset();
|
|
485
|
-
if (t === 0)
|
|
486
|
-
return "Z";
|
|
487
|
-
switch (r) {
|
|
488
|
-
// Hours and optional minutes
|
|
489
|
-
case "X":
|
|
490
|
-
return f(t);
|
|
491
|
-
// Hours, minutes and optional seconds without `:` delimiter
|
|
492
|
-
// Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
|
|
493
|
-
// so this token always has the same output as `XX`
|
|
494
|
-
case "XXXX":
|
|
495
|
-
case "XX":
|
|
496
|
-
return c(t);
|
|
497
|
-
// Hours, minutes and optional seconds with `:` delimiter
|
|
498
|
-
// Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
|
|
499
|
-
// so this token always has the same output as `XXX`
|
|
500
|
-
case "XXXXX":
|
|
501
|
-
case "XXX":
|
|
502
|
-
// Hours and minutes with `:` delimiter
|
|
503
|
-
default:
|
|
504
|
-
return c(t, ":");
|
|
505
|
-
}
|
|
506
|
-
},
|
|
507
|
-
// Timezone (ISO-8601. If offset is 0, output is `'+00:00'` or equivalent)
|
|
508
|
-
x: function(n, r, e) {
|
|
509
|
-
const t = n.getTimezoneOffset();
|
|
510
|
-
switch (r) {
|
|
511
|
-
// Hours and optional minutes
|
|
512
|
-
case "x":
|
|
513
|
-
return f(t);
|
|
514
|
-
// Hours, minutes and optional seconds without `:` delimiter
|
|
515
|
-
// Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
|
|
516
|
-
// so this token always has the same output as `xx`
|
|
517
|
-
case "xxxx":
|
|
518
|
-
case "xx":
|
|
519
|
-
return c(t);
|
|
520
|
-
// Hours, minutes and optional seconds with `:` delimiter
|
|
521
|
-
// Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
|
|
522
|
-
// so this token always has the same output as `xxx`
|
|
523
|
-
case "xxxxx":
|
|
524
|
-
case "xxx":
|
|
525
|
-
// Hours and minutes with `:` delimiter
|
|
526
|
-
default:
|
|
527
|
-
return c(t, ":");
|
|
528
|
-
}
|
|
529
|
-
},
|
|
530
|
-
// Timezone (GMT)
|
|
531
|
-
O: function(n, r, e) {
|
|
532
|
-
const t = n.getTimezoneOffset();
|
|
533
|
-
switch (r) {
|
|
534
|
-
// Short
|
|
535
|
-
case "O":
|
|
536
|
-
case "OO":
|
|
537
|
-
case "OOO":
|
|
538
|
-
return "GMT" + d(t, ":");
|
|
539
|
-
// Long
|
|
540
|
-
case "OOOO":
|
|
541
|
-
default:
|
|
542
|
-
return "GMT" + c(t, ":");
|
|
543
|
-
}
|
|
544
|
-
},
|
|
545
|
-
// Timezone (specific non-location)
|
|
546
|
-
z: function(n, r, e) {
|
|
547
|
-
const t = n.getTimezoneOffset();
|
|
548
|
-
switch (r) {
|
|
549
|
-
// Short
|
|
550
|
-
case "z":
|
|
551
|
-
case "zz":
|
|
552
|
-
case "zzz":
|
|
553
|
-
return "GMT" + d(t, ":");
|
|
554
|
-
// Long
|
|
555
|
-
case "zzzz":
|
|
556
|
-
default:
|
|
557
|
-
return "GMT" + c(t, ":");
|
|
558
|
-
}
|
|
559
|
-
},
|
|
560
|
-
// Seconds timestamp
|
|
561
|
-
t: function(n, r, e) {
|
|
562
|
-
const t = Math.trunc(+n / 1e3);
|
|
563
|
-
return i(t, r.length);
|
|
564
|
-
},
|
|
565
|
-
// Milliseconds timestamp
|
|
566
|
-
T: function(n, r, e) {
|
|
567
|
-
return i(+n, r.length);
|
|
568
|
-
}
|
|
569
|
-
};
|
|
570
|
-
function d(n, r = "") {
|
|
571
|
-
const e = n > 0 ? "-" : "+", t = Math.abs(n), a = Math.trunc(t / 60), o = t % 60;
|
|
572
|
-
return o === 0 ? e + String(a) : e + String(a) + r + i(o, 2);
|
|
573
|
-
}
|
|
574
|
-
function f(n, r) {
|
|
575
|
-
return n % 60 === 0 ? (n > 0 ? "-" : "+") + i(Math.abs(n) / 60, 2) : c(n, r);
|
|
576
|
-
}
|
|
577
|
-
function c(n, r = "") {
|
|
578
|
-
const e = n > 0 ? "-" : "+", t = Math.abs(n), a = i(Math.trunc(t / 60), 2), o = i(t % 60, 2);
|
|
579
|
-
return e + a + r + o;
|
|
580
|
-
}
|
|
581
|
-
export {
|
|
582
|
-
L as formatters
|
|
583
|
-
};
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
import { addLeadingZeros as n } from "../addLeadingZeros.js";
|
|
2
|
-
const g = {
|
|
3
|
-
// Year
|
|
4
|
-
y(e, t) {
|
|
5
|
-
const r = e.getFullYear(), a = r > 0 ? r : 1 - r;
|
|
6
|
-
return n(t === "yy" ? a % 100 : a, t.length);
|
|
7
|
-
},
|
|
8
|
-
// Month
|
|
9
|
-
M(e, t) {
|
|
10
|
-
const r = e.getMonth();
|
|
11
|
-
return t === "M" ? String(r + 1) : n(r + 1, 2);
|
|
12
|
-
},
|
|
13
|
-
// Day of the month
|
|
14
|
-
d(e, t) {
|
|
15
|
-
return n(e.getDate(), t.length);
|
|
16
|
-
},
|
|
17
|
-
// AM or PM
|
|
18
|
-
a(e, t) {
|
|
19
|
-
const r = e.getHours() / 12 >= 1 ? "pm" : "am";
|
|
20
|
-
switch (t) {
|
|
21
|
-
case "a":
|
|
22
|
-
case "aa":
|
|
23
|
-
return r.toUpperCase();
|
|
24
|
-
case "aaa":
|
|
25
|
-
return r;
|
|
26
|
-
case "aaaaa":
|
|
27
|
-
return r[0];
|
|
28
|
-
case "aaaa":
|
|
29
|
-
default:
|
|
30
|
-
return r === "am" ? "a.m." : "p.m.";
|
|
31
|
-
}
|
|
32
|
-
},
|
|
33
|
-
// Hour [1-12]
|
|
34
|
-
h(e, t) {
|
|
35
|
-
return n(e.getHours() % 12 || 12, t.length);
|
|
36
|
-
},
|
|
37
|
-
// Hour [0-23]
|
|
38
|
-
H(e, t) {
|
|
39
|
-
return n(e.getHours(), t.length);
|
|
40
|
-
},
|
|
41
|
-
// Minute
|
|
42
|
-
m(e, t) {
|
|
43
|
-
return n(e.getMinutes(), t.length);
|
|
44
|
-
},
|
|
45
|
-
// Second
|
|
46
|
-
s(e, t) {
|
|
47
|
-
return n(e.getSeconds(), t.length);
|
|
48
|
-
},
|
|
49
|
-
// Fraction of second
|
|
50
|
-
S(e, t) {
|
|
51
|
-
const r = t.length, a = e.getMilliseconds(), s = Math.trunc(
|
|
52
|
-
a * Math.pow(10, r - 3)
|
|
53
|
-
);
|
|
54
|
-
return n(s, t.length);
|
|
55
|
-
}
|
|
56
|
-
};
|
|
57
|
-
export {
|
|
58
|
-
g as lightFormatters
|
|
59
|
-
};
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
const s = (t, e) => {
|
|
2
|
-
switch (t) {
|
|
3
|
-
case "P":
|
|
4
|
-
return e.date({ width: "short" });
|
|
5
|
-
case "PP":
|
|
6
|
-
return e.date({ width: "medium" });
|
|
7
|
-
case "PPP":
|
|
8
|
-
return e.date({ width: "long" });
|
|
9
|
-
case "PPPP":
|
|
10
|
-
default:
|
|
11
|
-
return e.date({ width: "full" });
|
|
12
|
-
}
|
|
13
|
-
}, c = (t, e) => {
|
|
14
|
-
switch (t) {
|
|
15
|
-
case "p":
|
|
16
|
-
return e.time({ width: "short" });
|
|
17
|
-
case "pp":
|
|
18
|
-
return e.time({ width: "medium" });
|
|
19
|
-
case "ppp":
|
|
20
|
-
return e.time({ width: "long" });
|
|
21
|
-
case "pppp":
|
|
22
|
-
default:
|
|
23
|
-
return e.time({ width: "full" });
|
|
24
|
-
}
|
|
25
|
-
}, P = (t, e) => {
|
|
26
|
-
const d = t.match(/(P+)(p+)?/) || [], a = d[1], r = d[2];
|
|
27
|
-
if (!r)
|
|
28
|
-
return s(t, e);
|
|
29
|
-
let i;
|
|
30
|
-
switch (a) {
|
|
31
|
-
case "P":
|
|
32
|
-
i = e.dateTime({ width: "short" });
|
|
33
|
-
break;
|
|
34
|
-
case "PP":
|
|
35
|
-
i = e.dateTime({ width: "medium" });
|
|
36
|
-
break;
|
|
37
|
-
case "PPP":
|
|
38
|
-
i = e.dateTime({ width: "long" });
|
|
39
|
-
break;
|
|
40
|
-
case "PPPP":
|
|
41
|
-
default:
|
|
42
|
-
i = e.dateTime({ width: "full" });
|
|
43
|
-
break;
|
|
44
|
-
}
|
|
45
|
-
return i.replace("{{date}}", s(a, e)).replace("{{time}}", c(r, e));
|
|
46
|
-
}, h = {
|
|
47
|
-
p: c,
|
|
48
|
-
P
|
|
49
|
-
};
|
|
50
|
-
export {
|
|
51
|
-
h as longFormatters
|
|
52
|
-
};
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { toDate as o } from "../toDate.js";
|
|
2
|
-
function l(t) {
|
|
3
|
-
const e = o(t), n = new Date(
|
|
4
|
-
Date.UTC(
|
|
5
|
-
e.getFullYear(),
|
|
6
|
-
e.getMonth(),
|
|
7
|
-
e.getDate(),
|
|
8
|
-
e.getHours(),
|
|
9
|
-
e.getMinutes(),
|
|
10
|
-
e.getSeconds(),
|
|
11
|
-
e.getMilliseconds()
|
|
12
|
-
)
|
|
13
|
-
);
|
|
14
|
-
return n.setUTCFullYear(e.getFullYear()), +t - +n;
|
|
15
|
-
}
|
|
16
|
-
export {
|
|
17
|
-
l as getTimezoneOffsetInMilliseconds
|
|
18
|
-
};
|