@internationalized/date 3.12.0 → 3.12.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.
Files changed (165) hide show
  1. package/dist/index.cjs +113 -0
  2. package/dist/index.cjs.map +1 -0
  3. package/dist/index.js +45 -0
  4. package/dist/index.js.map +1 -0
  5. package/dist/index.mjs +45 -0
  6. package/dist/index.mjs.map +1 -0
  7. package/dist/{CalendarDate.main.js → private/CalendarDate.cjs} +102 -120
  8. package/dist/private/CalendarDate.cjs.map +1 -0
  9. package/dist/{CalendarDate.mjs → private/CalendarDate.js} +65 -65
  10. package/dist/private/CalendarDate.js.map +1 -0
  11. package/dist/{CalendarDate.module.js → private/CalendarDate.mjs} +99 -117
  12. package/dist/private/CalendarDate.mjs.map +1 -0
  13. package/dist/{DateFormatter.main.js → private/DateFormatter.cjs} +27 -27
  14. package/dist/private/DateFormatter.cjs.map +1 -0
  15. package/dist/{DateFormatter.module.js → private/DateFormatter.js} +23 -23
  16. package/dist/{DateFormatter.module.js.map → private/DateFormatter.js.map} +1 -1
  17. package/dist/{DateFormatter.mjs → private/DateFormatter.mjs} +27 -27
  18. package/dist/private/DateFormatter.mjs.map +1 -0
  19. package/dist/{BuddhistCalendar.main.js → private/calendars/BuddhistCalendar.cjs} +13 -13
  20. package/dist/{BuddhistCalendar.main.js.map → private/calendars/BuddhistCalendar.cjs.map} +1 -1
  21. package/dist/{BuddhistCalendar.module.js → private/calendars/BuddhistCalendar.js} +13 -13
  22. package/dist/{BuddhistCalendar.module.js.map → private/calendars/BuddhistCalendar.js.map} +1 -1
  23. package/dist/{BuddhistCalendar.mjs → private/calendars/BuddhistCalendar.mjs} +13 -13
  24. package/dist/private/calendars/BuddhistCalendar.mjs.map +1 -0
  25. package/dist/{EthiopicCalendar.main.js → private/calendars/EthiopicCalendar.cjs} +32 -32
  26. package/dist/{EthiopicCalendar.main.js.map → private/calendars/EthiopicCalendar.cjs.map} +1 -1
  27. package/dist/{EthiopicCalendar.module.js → private/calendars/EthiopicCalendar.js} +30 -30
  28. package/dist/{EthiopicCalendar.module.js.map → private/calendars/EthiopicCalendar.js.map} +1 -1
  29. package/dist/{EthiopicCalendar.mjs → private/calendars/EthiopicCalendar.mjs} +30 -30
  30. package/dist/private/calendars/EthiopicCalendar.mjs.map +1 -0
  31. package/dist/{GregorianCalendar.main.js → private/calendars/GregorianCalendar.cjs} +31 -31
  32. package/dist/{GregorianCalendar.main.js.map → private/calendars/GregorianCalendar.cjs.map} +1 -1
  33. package/dist/{GregorianCalendar.module.js → private/calendars/GregorianCalendar.js} +27 -27
  34. package/dist/{GregorianCalendar.module.js.map → private/calendars/GregorianCalendar.js.map} +1 -1
  35. package/dist/{GregorianCalendar.mjs → private/calendars/GregorianCalendar.mjs} +27 -27
  36. package/dist/private/calendars/GregorianCalendar.mjs.map +1 -0
  37. package/dist/{HebrewCalendar.main.js → private/calendars/HebrewCalendar.cjs} +44 -44
  38. package/dist/{HebrewCalendar.main.js.map → private/calendars/HebrewCalendar.cjs.map} +1 -1
  39. package/dist/{HebrewCalendar.module.js → private/calendars/HebrewCalendar.js} +44 -44
  40. package/dist/{HebrewCalendar.module.js.map → private/calendars/HebrewCalendar.js.map} +1 -1
  41. package/dist/{HebrewCalendar.mjs → private/calendars/HebrewCalendar.mjs} +44 -44
  42. package/dist/private/calendars/HebrewCalendar.mjs.map +1 -0
  43. package/dist/{IndianCalendar.main.js → private/calendars/IndianCalendar.cjs} +20 -20
  44. package/dist/{IndianCalendar.main.js.map → private/calendars/IndianCalendar.cjs.map} +1 -1
  45. package/dist/{IndianCalendar.module.js → private/calendars/IndianCalendar.js} +20 -20
  46. package/dist/{IndianCalendar.module.js.map → private/calendars/IndianCalendar.js.map} +1 -1
  47. package/dist/{IndianCalendar.mjs → private/calendars/IndianCalendar.mjs} +20 -20
  48. package/dist/private/calendars/IndianCalendar.mjs.map +1 -0
  49. package/dist/private/calendars/IslamicCalendar.cjs +168 -0
  50. package/dist/private/calendars/IslamicCalendar.cjs.map +1 -0
  51. package/dist/private/calendars/IslamicCalendar.js +161 -0
  52. package/dist/{IslamicCalendar.module.js.map → private/calendars/IslamicCalendar.js.map} +1 -1
  53. package/dist/private/calendars/IslamicCalendar.mjs +161 -0
  54. package/dist/private/calendars/IslamicCalendar.mjs.map +1 -0
  55. package/dist/{JapaneseCalendar.main.js → private/calendars/JapaneseCalendar.cjs} +37 -37
  56. package/dist/{JapaneseCalendar.main.js.map → private/calendars/JapaneseCalendar.cjs.map} +1 -1
  57. package/dist/{JapaneseCalendar.module.js → private/calendars/JapaneseCalendar.js} +37 -37
  58. package/dist/{JapaneseCalendar.module.js.map → private/calendars/JapaneseCalendar.js.map} +1 -1
  59. package/dist/{JapaneseCalendar.mjs → private/calendars/JapaneseCalendar.mjs} +37 -37
  60. package/dist/private/calendars/JapaneseCalendar.mjs.map +1 -0
  61. package/dist/{PersianCalendar.main.js → private/calendars/PersianCalendar.cjs} +13 -13
  62. package/dist/{PersianCalendar.main.js.map → private/calendars/PersianCalendar.cjs.map} +1 -1
  63. package/dist/{PersianCalendar.module.js → private/calendars/PersianCalendar.js} +13 -13
  64. package/dist/{PersianCalendar.module.js.map → private/calendars/PersianCalendar.js.map} +1 -1
  65. package/dist/{PersianCalendar.mjs → private/calendars/PersianCalendar.mjs} +13 -13
  66. package/dist/private/calendars/PersianCalendar.mjs.map +1 -0
  67. package/dist/{TaiwanCalendar.main.js → private/calendars/TaiwanCalendar.cjs} +20 -20
  68. package/dist/{TaiwanCalendar.main.js.map → private/calendars/TaiwanCalendar.cjs.map} +1 -1
  69. package/dist/private/calendars/TaiwanCalendar.js +75 -0
  70. package/dist/{TaiwanCalendar.module.js.map → private/calendars/TaiwanCalendar.js.map} +1 -1
  71. package/dist/{TaiwanCalendar.mjs → private/calendars/TaiwanCalendar.mjs} +20 -20
  72. package/dist/private/calendars/TaiwanCalendar.mjs.map +1 -0
  73. package/dist/{conversion.main.js → private/conversion.cjs} +85 -85
  74. package/dist/{conversion.main.js.map → private/conversion.cjs.map} +1 -1
  75. package/dist/{conversion.module.js → private/conversion.js} +71 -71
  76. package/dist/{conversion.module.js.map → private/conversion.js.map} +1 -1
  77. package/dist/{conversion.mjs → private/conversion.mjs} +71 -71
  78. package/dist/private/conversion.mjs.map +1 -0
  79. package/dist/private/createCalendar.cjs +69 -0
  80. package/dist/{createCalendar.main.js.map → private/createCalendar.cjs.map} +1 -1
  81. package/dist/private/createCalendar.js +64 -0
  82. package/dist/{createCalendar.module.js.map → private/createCalendar.js.map} +1 -1
  83. package/dist/private/createCalendar.mjs +64 -0
  84. package/dist/private/createCalendar.mjs.map +1 -0
  85. package/dist/{manipulation.main.js → private/manipulation.cjs} +106 -109
  86. package/dist/private/manipulation.cjs.map +1 -0
  87. package/dist/{manipulation.mjs → private/manipulation.js} +88 -88
  88. package/dist/{manipulation.module.js.map → private/manipulation.js.map} +1 -1
  89. package/dist/{manipulation.module.js → private/manipulation.mjs} +93 -96
  90. package/dist/private/manipulation.mjs.map +1 -0
  91. package/dist/private/queries.cjs +359 -0
  92. package/dist/private/queries.cjs.map +1 -0
  93. package/dist/private/queries.js +326 -0
  94. package/dist/private/queries.js.map +1 -0
  95. package/dist/private/queries.mjs +324 -0
  96. package/dist/private/queries.mjs.map +1 -0
  97. package/dist/private/string.cjs +181 -0
  98. package/dist/private/string.cjs.map +1 -0
  99. package/dist/{string.mjs → private/string.js} +64 -64
  100. package/dist/{string.module.js.map → private/string.js.map} +1 -1
  101. package/dist/private/string.mjs +166 -0
  102. package/dist/private/string.mjs.map +1 -0
  103. package/dist/{utils.main.js → private/utils.cjs} +3 -3
  104. package/dist/{utils.main.js.map → private/utils.cjs.map} +1 -1
  105. package/dist/{utils.module.js → private/utils.js} +3 -3
  106. package/dist/{utils.module.js.map → private/utils.js.map} +1 -1
  107. package/dist/{utils.mjs → private/utils.mjs} +3 -3
  108. package/dist/private/utils.mjs.map +1 -0
  109. package/dist/{weekStartData.main.js → private/weekStartData.cjs} +3 -3
  110. package/dist/{weekStartData.main.js.map → private/weekStartData.cjs.map} +1 -1
  111. package/dist/{weekStartData.module.js → private/weekStartData.js} +3 -3
  112. package/dist/{weekStartData.module.js.map → private/weekStartData.js.map} +1 -1
  113. package/dist/{weekStartData.mjs → private/weekStartData.mjs} +3 -3
  114. package/dist/private/weekStartData.mjs.map +1 -0
  115. package/dist/types/src/CalendarDate.d.ts +177 -0
  116. package/dist/types/src/DateFormatter.d.ts +21 -0
  117. package/dist/types/src/calendars/BuddhistCalendar.d.ts +16 -0
  118. package/dist/types/src/calendars/EthiopicCalendar.d.ts +45 -0
  119. package/dist/types/src/calendars/GregorianCalendar.d.ts +25 -0
  120. package/dist/types/src/calendars/HebrewCalendar.d.ts +21 -0
  121. package/dist/types/src/calendars/IndianCalendar.d.ts +17 -0
  122. package/dist/types/src/calendars/IslamicCalendar.d.ts +48 -0
  123. package/dist/types/src/calendars/JapaneseCalendar.d.ts +21 -0
  124. package/dist/types/src/calendars/PersianCalendar.d.ts +19 -0
  125. package/dist/types/src/calendars/TaiwanCalendar.d.ts +19 -0
  126. package/dist/types/src/conversion.d.ts +42 -0
  127. package/dist/types/src/createCalendar.d.ts +3 -0
  128. package/dist/types/src/index.d.ts +17 -0
  129. package/dist/types/src/manipulation.d.ts +25 -0
  130. package/dist/types/src/queries.d.ts +87 -0
  131. package/dist/types/src/string.d.ts +35 -0
  132. package/dist/types/src/types.d.ts +132 -0
  133. package/dist/types/src/utils.d.ts +4 -0
  134. package/dist/types/src/weekStartData.d.ts +97 -0
  135. package/package.json +26 -11
  136. package/src/CalendarDate.ts +2 -0
  137. package/src/index.ts +1 -0
  138. package/src/queries.ts +1 -3
  139. package/dist/CalendarDate.main.js.map +0 -1
  140. package/dist/CalendarDate.module.js.map +0 -1
  141. package/dist/DateFormatter.main.js.map +0 -1
  142. package/dist/IslamicCalendar.main.js +0 -168
  143. package/dist/IslamicCalendar.main.js.map +0 -1
  144. package/dist/IslamicCalendar.mjs +0 -161
  145. package/dist/IslamicCalendar.module.js +0 -161
  146. package/dist/TaiwanCalendar.module.js +0 -75
  147. package/dist/createCalendar.main.js +0 -69
  148. package/dist/createCalendar.mjs +0 -64
  149. package/dist/createCalendar.module.js +0 -64
  150. package/dist/import.mjs +0 -45
  151. package/dist/main.js +0 -113
  152. package/dist/main.js.map +0 -1
  153. package/dist/manipulation.main.js.map +0 -1
  154. package/dist/module.js +0 -45
  155. package/dist/module.js.map +0 -1
  156. package/dist/queries.main.js +0 -361
  157. package/dist/queries.main.js.map +0 -1
  158. package/dist/queries.mjs +0 -326
  159. package/dist/queries.module.js +0 -326
  160. package/dist/queries.module.js.map +0 -1
  161. package/dist/string.main.js +0 -190
  162. package/dist/string.main.js.map +0 -1
  163. package/dist/string.module.js +0 -175
  164. package/dist/types.d.ts +0 -672
  165. package/dist/types.d.ts.map +0 -1
@@ -0,0 +1 @@
1
+ {"mappings":";;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;AAWD,SAAS,gCAAU,IAAW;IAC5B,IAAI,WAAqB,OAAO,IAAI,CAAC,EAAE,KAAK,WACxC,KAAK,KAAK,KACV,IAAI,CAAA,GAAA,2CAAgB;IAExB,IAAI;IACJ,IAAI,OAAO,IAAI,CAAC,EAAE,KAAK,UACrB,MAAM,KAAK,KAAK;SACX;QACL,IAAI,OAAO,SAAS,OAAO;QAC3B,MAAM,IAAI,CAAC,KAAK,MAAM,GAAG,EAAE;IAC7B;IAEA,IAAI,OAAO,KAAK,KAAK;IACrB,IAAI,QAAQ,KAAK,KAAK;IACtB,IAAI,MAAM,KAAK,KAAK;IAEpB,OAAO;QAAC;QAAU;QAAK;QAAM;QAAO;KAAI;AAC1C;AAGO,MAAM;IACX,oFAAoF;IACpF,2FAA2F;IAC3F,0EAA0E;IAC1E,aAAa;IACb,CAAA,IAAK,CAAC;IAoBN,YAAY,GAAG,IAAW,CAAE;QAC1B,IAAI,CAAC,UAAU,KAAK,MAAM,OAAO,IAAI,GAAG,gCAAU;QAClD,IAAI,C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mB;QACjB,OAAO,CAAA,GAAA,+CAAoB,EAAE,IAAI;IACnC;IAEC,8DAA8D,GAC/D,mBAA2B;QACzB,OAAO,IAAI,CAAC,MAAM,GAAG,WAAW;IAClC;IAEA,yJAAyJ,GACzJ,QAAQ,CAAkD,EAAU;QAClE,6BAA6B;QAC7B,OAAO,IAAI,CAAC,MAAM,GAAG,OAAO,KAAK,CAAA,GAAA,iCAAM,EAAE,GAAG,IAAI,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO;IAC7E;AACF","sources":["packages/@internationalized/date/src/CalendarDate.ts"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {add, addTime, addZoned, constrain, constrainTime, cycleDate, cycleTime, cycleZoned, set, setTime, setZoned, subtract, subtractTime, subtractZoned} from './manipulation';\nimport {AnyCalendarDate, AnyTime, Calendar, CycleOptions, CycleTimeOptions, DateDuration, DateField, DateFields, DateTimeDuration, Disambiguation, TimeDuration, TimeField, TimeFields} from './types';\nimport {compareDate, compareTime} from './queries';\nimport {dateTimeToString, dateToString, timeToString, zonedDateTimeToString} from './string';\nimport {GregorianCalendar} from './calendars/GregorianCalendar';\nimport {toCalendarDateTime, toDate, toZoned, zonedToDate} from './conversion';\n\nexport type DateValue = CalendarDate | CalendarDateTime | ZonedDateTime;\n\nfunction shiftArgs(args: any[]) {\n let calendar: Calendar = typeof args[0] === 'object'\n ? args.shift()\n : new GregorianCalendar();\n\n let era: string;\n if (typeof args[0] === 'string') {\n era = args.shift();\n } else {\n let eras = calendar.getEras();\n era = eras[eras.length - 1];\n }\n\n let year = args.shift();\n let month = args.shift();\n let day = args.shift();\n\n return [calendar, era, year, month, day];\n}\n\n/** A CalendarDate represents a date without any time components in a specific calendar system. */\nexport class CalendarDate {\n // This prevents TypeScript from allowing other types with the same fields to match.\n // i.e. a ZonedDateTime should not be be passable to a parameter that expects CalendarDate.\n // If that behavior is desired, use the AnyCalendarDate interface instead.\n // @ts-ignore\n #type;\n /** The calendar system associated with this date, e.g. Gregorian. */\n public readonly calendar: Calendar;\n /** The calendar era for this date, e.g. \"BC\" or \"AD\". */\n public readonly era: string;\n /** The year of this date within the era. */\n public readonly year: number;\n /**\n * The month number within the year. Note that some calendar systems such as Hebrew\n * may have a variable number of months per year. Therefore, month numbers may not\n * always correspond to the same month names in different years.\n */\n public readonly month: number;\n /** The day number within the month. */\n public readonly day: number;\n\n constructor(year: number, month: number, day: number);\n constructor(era: string, year: number, month: number, day: number);\n constructor(calendar: Calendar, year: number, month: number, day: number);\n constructor(calendar: Calendar, era: string, year: number, month: number, day: number);\n constructor(...args: any[]) {\n let [calendar, era, year, month, day] = shiftArgs(args);\n this.calendar = calendar;\n this.era = era;\n this.year = year;\n this.month = month;\n this.day = day;\n\n constrain(this);\n }\n\n /** Returns a copy of this date. */\n copy(): CalendarDate {\n if (this.era) {\n return new CalendarDate(this.calendar, this.era, this.year, this.month, this.day);\n } else {\n return new CalendarDate(this.calendar, this.year, this.month, this.day);\n }\n }\n\n /** Returns a new `CalendarDate` with the given duration added to it. */\n add(duration: DateDuration): CalendarDate {\n return add(this, duration);\n }\n\n /** Returns a new `CalendarDate` with the given duration subtracted from it. */\n subtract(duration: DateDuration): CalendarDate {\n return subtract(this, duration);\n }\n\n /** Returns a new `CalendarDate` with the given fields set to the provided values. Other fields will be constrained accordingly. */\n set(fields: DateFields): CalendarDate {\n return set(this, fields);\n }\n\n /**\n * Returns a new `CalendarDate` with the given field adjusted by a specified amount.\n * When the resulting value reaches the limits of the field, it wraps around.\n */\n cycle(field: DateField, amount: number, options?: CycleOptions): CalendarDate {\n return cycleDate(this, field, amount, options);\n }\n\n /** Converts the date to a native JavaScript Date object, with the time set to midnight in the given time zone. */\n toDate(timeZone: string): Date {\n return toDate(this, timeZone);\n }\n\n /** Converts the date to an ISO 8601 formatted string. */\n toString(): string {\n return dateToString(this);\n }\n\n /** Compares this date with another. A negative result indicates that this date is before the given one, and a positive date indicates that it is after. */\n compare(b: AnyCalendarDate): number {\n return compareDate(this, b);\n }\n}\n\n/** A Time represents a clock time without any date components. */\nexport class Time {\n // This prevents TypeScript from allowing other types with the same fields to match.\n // @ts-ignore\n #type;\n /** The hour, numbered from 0 to 23. */\n public readonly hour: number;\n /** The minute in the hour. */\n public readonly minute: number;\n /** The second in the minute. */\n public readonly second: number;\n /** The millisecond in the second. */\n public readonly millisecond: number;\n\n constructor(\n hour: number = 0,\n minute: number = 0,\n second: number = 0,\n millisecond: number = 0\n ) {\n this.hour = hour;\n this.minute = minute;\n this.second = second;\n this.millisecond = millisecond;\n constrainTime(this);\n }\n\n /** Returns a copy of this time. */\n copy(): Time {\n return new Time(this.hour, this.minute, this.second, this.millisecond);\n }\n\n /** Returns a new `Time` with the given duration added to it. */\n add(duration: TimeDuration): Time {\n return addTime(this, duration);\n }\n\n /** Returns a new `Time` with the given duration subtracted from it. */\n subtract(duration: TimeDuration): Time {\n return subtractTime(this, duration);\n }\n\n /** Returns a new `Time` with the given fields set to the provided values. Other fields will be constrained accordingly. */\n set(fields: TimeFields): Time {\n return setTime(this, fields);\n }\n\n /**\n * Returns a new `Time` with the given field adjusted by a specified amount.\n * When the resulting value reaches the limits of the field, it wraps around.\n */\n cycle(field: TimeField, amount: number, options?: CycleTimeOptions): Time {\n return cycleTime(this, field, amount, options);\n }\n\n /** Converts the time to an ISO 8601 formatted string. */\n toString(): string {\n return timeToString(this);\n }\n\n /** Compares this time with another. A negative result indicates that this time is before the given one, and a positive time indicates that it is after. */\n compare(b: AnyTime): number {\n return compareTime(this, b);\n }\n}\n\n/** A CalendarDateTime represents a date and time without a time zone, in a specific calendar system. */\nexport class CalendarDateTime {\n // This prevents TypeScript from allowing other types with the same fields to match.\n // @ts-ignore\n #type;\n /** The calendar system associated with this date, e.g. Gregorian. */\n public readonly calendar: Calendar;\n /** The calendar era for this date, e.g. \"BC\" or \"AD\". */\n public readonly era: string;\n /** The year of this date within the era. */\n public readonly year: number;\n /**\n * The month number within the year. Note that some calendar systems such as Hebrew\n * may have a variable number of months per year. Therefore, month numbers may not\n * always correspond to the same month names in different years.\n */\n public readonly month: number;\n /** The day number within the month. */\n public readonly day: number;\n /** The hour in the day, numbered from 0 to 23. */\n public readonly hour: number;\n /** The minute in the hour. */\n public readonly minute: number;\n /** The second in the minute. */\n public readonly second: number;\n /** The millisecond in the second. */\n public readonly millisecond: number;\n\n constructor(year: number, month: number, day: number, hour?: number, minute?: number, second?: number, millisecond?: number);\n constructor(era: string, year: number, month: number, day: number, hour?: number, minute?: number, second?: number, millisecond?: number);\n constructor(calendar: Calendar, year: number, month: number, day: number, hour?: number, minute?: number, second?: number, millisecond?: number);\n constructor(calendar: Calendar, era: string, year: number, month: number, day: number, hour?: number, minute?: number, second?: number, millisecond?: number);\n constructor(...args: any[]) {\n let [calendar, era, year, month, day] = shiftArgs(args);\n this.calendar = calendar;\n this.era = era;\n this.year = year;\n this.month = month;\n this.day = day;\n this.hour = args.shift() || 0;\n this.minute = args.shift() || 0;\n this.second = args.shift() || 0;\n this.millisecond = args.shift() || 0;\n\n constrain(this);\n }\n\n /** Returns a copy of this date. */\n copy(): CalendarDateTime {\n if (this.era) {\n return new CalendarDateTime(this.calendar, this.era, this.year, this.month, this.day, this.hour, this.minute, this.second, this.millisecond);\n } else {\n return new CalendarDateTime(this.calendar, this.year, this.month, this.day, this.hour, this.minute, this.second, this.millisecond);\n }\n }\n\n /** Returns a new `CalendarDateTime` with the given duration added to it. */\n add(duration: DateTimeDuration): CalendarDateTime {\n return add(this, duration);\n }\n\n /** Returns a new `CalendarDateTime` with the given duration subtracted from it. */\n subtract(duration: DateTimeDuration): CalendarDateTime {\n return subtract(this, duration);\n }\n\n /** Returns a new `CalendarDateTime` with the given fields set to the provided values. Other fields will be constrained accordingly. */\n set(fields: DateFields & TimeFields): CalendarDateTime {\n return set(setTime(this, fields), fields);\n }\n\n /**\n * Returns a new `CalendarDateTime` with the given field adjusted by a specified amount.\n * When the resulting value reaches the limits of the field, it wraps around.\n */\n cycle(field: DateField | TimeField, amount: number, options?: CycleTimeOptions): CalendarDateTime {\n switch (field) {\n case 'era':\n case 'year':\n case 'month':\n case 'day':\n return cycleDate(this, field, amount, options);\n default:\n return cycleTime(this, field, amount, options);\n }\n }\n\n /** Converts the date to a native JavaScript Date object in the given time zone. */\n toDate(timeZone: string, disambiguation?: Disambiguation): Date {\n return toDate(this, timeZone, disambiguation);\n }\n\n /** Converts the date to an ISO 8601 formatted string. */\n toString(): string {\n return dateTimeToString(this);\n }\n\n /** Compares this date with another. A negative result indicates that this date is before the given one, and a positive date indicates that it is after. */\n compare(b: CalendarDate | CalendarDateTime | ZonedDateTime): number {\n let res = compareDate(this, b);\n if (res === 0) {\n return compareTime(this, toCalendarDateTime(b));\n }\n\n return res;\n }\n}\n\n/** A ZonedDateTime represents a date and time in a specific time zone and calendar system. */\nexport class ZonedDateTime {\n // This prevents TypeScript from allowing other types with the same fields to match.\n // @ts-ignore\n #type;\n /** The calendar system associated with this date, e.g. Gregorian. */\n public readonly calendar: Calendar;\n /** The calendar era for this date, e.g. \"BC\" or \"AD\". */\n public readonly era: string;\n /** The year of this date within the era. */\n public readonly year: number;\n /**\n * The month number within the year. Note that some calendar systems such as Hebrew\n * may have a variable number of months per year. Therefore, month numbers may not\n * always correspond to the same month names in different years.\n */\n public readonly month: number;\n /** The day number within the month. */\n public readonly day: number;\n /** The hour in the day, numbered from 0 to 23. */\n public readonly hour: number;\n /** The minute in the hour. */\n public readonly minute: number;\n /** The second in the minute. */\n public readonly second: number;\n /** The millisecond in the second. */\n public readonly millisecond: number;\n /** The IANA time zone identifier that this date and time is represented in. */\n public readonly timeZone: string;\n /** The UTC offset for this time, in milliseconds. */\n public readonly offset: number;\n\n constructor(year: number, month: number, day: number, timeZone: string, offset: number, hour?: number, minute?: number, second?: number, millisecond?: number);\n constructor(era: string, year: number, month: number, day: number, timeZone: string, offset: number, hour?: number, minute?: number, second?: number, millisecond?: number);\n constructor(calendar: Calendar, year: number, month: number, day: number, timeZone: string, offset: number, hour?: number, minute?: number, second?: number, millisecond?: number);\n constructor(calendar: Calendar, era: string, year: number, month: number, day: number, timeZone: string, offset: number, hour?: number, minute?: number, second?: number, millisecond?: number);\n constructor(...args: any[]) {\n let [calendar, era, year, month, day] = shiftArgs(args);\n let timeZone = args.shift();\n let offset = args.shift();\n this.calendar = calendar;\n this.era = era;\n this.year = year;\n this.month = month;\n this.day = day;\n this.timeZone = timeZone;\n this.offset = offset;\n this.hour = args.shift() || 0;\n this.minute = args.shift() || 0;\n this.second = args.shift() || 0;\n this.millisecond = args.shift() || 0;\n\n constrain(this);\n }\n\n /** Returns a copy of this date. */\n copy(): ZonedDateTime {\n if (this.era) {\n return new ZonedDateTime(this.calendar, this.era, this.year, this.month, this.day, this.timeZone, this.offset, this.hour, this.minute, this.second, this.millisecond);\n } else {\n return new ZonedDateTime(this.calendar, this.year, this.month, this.day, this.timeZone, this.offset, this.hour, this.minute, this.second, this.millisecond);\n }\n }\n\n /** Returns a new `ZonedDateTime` with the given duration added to it. */\n add(duration: DateTimeDuration): ZonedDateTime {\n return addZoned(this, duration);\n }\n\n /** Returns a new `ZonedDateTime` with the given duration subtracted from it. */\n subtract(duration: DateTimeDuration): ZonedDateTime {\n return subtractZoned(this, duration);\n }\n\n /** Returns a new `ZonedDateTime` with the given fields set to the provided values. Other fields will be constrained accordingly. */\n set(fields: DateFields & TimeFields, disambiguation?: Disambiguation): ZonedDateTime {\n return setZoned(this, fields, disambiguation);\n }\n\n /**\n * Returns a new `ZonedDateTime` with the given field adjusted by a specified amount.\n * When the resulting value reaches the limits of the field, it wraps around.\n */\n cycle(field: DateField | TimeField, amount: number, options?: CycleTimeOptions): ZonedDateTime {\n return cycleZoned(this, field, amount, options);\n }\n\n /** Converts the date to a native JavaScript Date object. */\n toDate(): Date {\n return zonedToDate(this);\n }\n\n /** Converts the date to an ISO 8601 formatted string, including the UTC offset and time zone identifier. */\n toString(): string {\n return zonedDateTimeToString(this);\n }\n\n /** Converts the date to an ISO 8601 formatted string in UTC. */\n toAbsoluteString(): string {\n return this.toDate().toISOString();\n }\n\n /** Compares this date with another. A negative result indicates that this date is before the given one, and a positive date indicates that it is after. */\n compare(b: CalendarDate | CalendarDateTime | ZonedDateTime): number {\n // TODO: Is this a bad idea??\n return this.toDate().getTime() - toZoned(b, this.timeZone).toDate().getTime();\n }\n}\n"],"names":[],"version":3,"file":"CalendarDate.cjs.map"}
@@ -1,9 +1,9 @@
1
- import {add as $735220c2d4774dd3$export$e16d8520af44a096, addTime as $735220c2d4774dd3$export$7ed87b6bc2506470, addZoned as $735220c2d4774dd3$export$96b1d28349274637, constrain as $735220c2d4774dd3$export$c4e2ecac49351ef2, constrainTime as $735220c2d4774dd3$export$7555de1e070510cb, cycleDate as $735220c2d4774dd3$export$d52ced6badfb9a4c, cycleTime as $735220c2d4774dd3$export$dd02b3e0007dfe28, cycleZoned as $735220c2d4774dd3$export$9a297d111fc86b79, set as $735220c2d4774dd3$export$adaa4cf7ef1b65be, setTime as $735220c2d4774dd3$export$e5d5e1c1822b6e56, setZoned as $735220c2d4774dd3$export$31b5430eb18be4f8, subtract as $735220c2d4774dd3$export$4e2d2ead65e5f7e3, subtractTime as $735220c2d4774dd3$export$fe34d3a381cd7501, subtractZoned as $735220c2d4774dd3$export$6814caac34ca03c7} from "./manipulation.mjs";
2
- import {compareDate as $14e0f24ef4ac5c92$export$68781ddf31c0090f, compareTime as $14e0f24ef4ac5c92$export$c19a80a9721b80f6} from "./queries.mjs";
3
- import {dateTimeToString as $fae977aafc393c5c$export$4223de14708adc63, dateToString as $fae977aafc393c5c$export$60dfd74aa96791bd, timeToString as $fae977aafc393c5c$export$f59dee82248f5ad4, zonedDateTimeToString as $fae977aafc393c5c$export$bf79f1ebf4b18792} from "./string.mjs";
4
- import {GregorianCalendar as $3b62074eb05584b2$export$80ee6245ec4f29ec} from "./GregorianCalendar.mjs";
5
- import {toCalendarDateTime as $11d87f3f76e88657$export$b21e0b124e224484, toDate as $11d87f3f76e88657$export$e67a095c620b86fe, toZoned as $11d87f3f76e88657$export$84c95a83c799e074, zonedToDate as $11d87f3f76e88657$export$83aac07b4c37b25} from "./conversion.mjs";
6
- import {_ as $aksy1$_} from "@swc/helpers/_/_class_private_field_init";
1
+ import {add as $13bd2ffe0df4e09c$export$e16d8520af44a096, addTime as $13bd2ffe0df4e09c$export$7ed87b6bc2506470, addZoned as $13bd2ffe0df4e09c$export$96b1d28349274637, constrain as $13bd2ffe0df4e09c$export$c4e2ecac49351ef2, constrainTime as $13bd2ffe0df4e09c$export$7555de1e070510cb, cycleDate as $13bd2ffe0df4e09c$export$d52ced6badfb9a4c, cycleTime as $13bd2ffe0df4e09c$export$dd02b3e0007dfe28, cycleZoned as $13bd2ffe0df4e09c$export$9a297d111fc86b79, set as $13bd2ffe0df4e09c$export$adaa4cf7ef1b65be, setTime as $13bd2ffe0df4e09c$export$e5d5e1c1822b6e56, setZoned as $13bd2ffe0df4e09c$export$31b5430eb18be4f8, subtract as $13bd2ffe0df4e09c$export$4e2d2ead65e5f7e3, subtractTime as $13bd2ffe0df4e09c$export$fe34d3a381cd7501, subtractZoned as $13bd2ffe0df4e09c$export$6814caac34ca03c7} from "./manipulation.js";
2
+ import {compareDate as $8daeb11568269f24$export$68781ddf31c0090f, compareTime as $8daeb11568269f24$export$c19a80a9721b80f6} from "./queries.js";
3
+ import {dateTimeToString as $7dccf15509582627$export$4223de14708adc63, dateToString as $7dccf15509582627$export$60dfd74aa96791bd, timeToString as $7dccf15509582627$export$f59dee82248f5ad4, zonedDateTimeToString as $7dccf15509582627$export$bf79f1ebf4b18792} from "./string.js";
4
+ import {GregorianCalendar as $f25df78da1f6b40f$export$80ee6245ec4f29ec} from "./calendars/GregorianCalendar.js";
5
+ import {toCalendarDateTime as $e83297bd1a9e3ddc$export$b21e0b124e224484, toDate as $e83297bd1a9e3ddc$export$e67a095c620b86fe, toZoned as $e83297bd1a9e3ddc$export$84c95a83c799e074, zonedToDate as $e83297bd1a9e3ddc$export$83aac07b4c37b25} from "./conversion.js";
6
+ import {_ as $iHuWX$_} from "@swc/helpers/_/_class_private_field_init";
7
7
 
8
8
  /*
9
9
  * Copyright 2020 Adobe. All rights reserved.
@@ -21,8 +21,8 @@ import {_ as $aksy1$_} from "@swc/helpers/_/_class_private_field_init";
21
21
 
22
22
 
23
23
 
24
- function $35ea8db9cb2ccb90$var$shiftArgs(args) {
25
- let calendar = typeof args[0] === 'object' ? args.shift() : new (0, $3b62074eb05584b2$export$80ee6245ec4f29ec)();
24
+ function $9a4e222e1bd2b190$var$shiftArgs(args) {
25
+ let calendar = typeof args[0] === 'object' ? args.shift() : new (0, $f25df78da1f6b40f$export$80ee6245ec4f29ec)();
26
26
  let era;
27
27
  if (typeof args[0] === 'string') era = args.shift();
28
28
  else {
@@ -44,80 +44,80 @@ var // This prevents TypeScript from allowing other types with the same fields t
44
44
  // i.e. a ZonedDateTime should not be be passable to a parameter that expects CalendarDate.
45
45
  // If that behavior is desired, use the AnyCalendarDate interface instead.
46
46
  // @ts-ignore
47
- $35ea8db9cb2ccb90$var$_type = /*#__PURE__*/ new WeakMap();
48
- class $35ea8db9cb2ccb90$export$99faa760c7908e4f {
47
+ $9a4e222e1bd2b190$var$_type = /*#__PURE__*/ new WeakMap();
48
+ class $9a4e222e1bd2b190$export$99faa760c7908e4f {
49
49
  /** Returns a copy of this date. */ copy() {
50
- if (this.era) return new $35ea8db9cb2ccb90$export$99faa760c7908e4f(this.calendar, this.era, this.year, this.month, this.day);
51
- else return new $35ea8db9cb2ccb90$export$99faa760c7908e4f(this.calendar, this.year, this.month, this.day);
50
+ if (this.era) return new $9a4e222e1bd2b190$export$99faa760c7908e4f(this.calendar, this.era, this.year, this.month, this.day);
51
+ else return new $9a4e222e1bd2b190$export$99faa760c7908e4f(this.calendar, this.year, this.month, this.day);
52
52
  }
53
53
  /** Returns a new `CalendarDate` with the given duration added to it. */ add(duration) {
54
- return (0, $735220c2d4774dd3$export$e16d8520af44a096)(this, duration);
54
+ return (0, $13bd2ffe0df4e09c$export$e16d8520af44a096)(this, duration);
55
55
  }
56
56
  /** Returns a new `CalendarDate` with the given duration subtracted from it. */ subtract(duration) {
57
- return (0, $735220c2d4774dd3$export$4e2d2ead65e5f7e3)(this, duration);
57
+ return (0, $13bd2ffe0df4e09c$export$4e2d2ead65e5f7e3)(this, duration);
58
58
  }
59
59
  /** Returns a new `CalendarDate` with the given fields set to the provided values. Other fields will be constrained accordingly. */ set(fields) {
60
- return (0, $735220c2d4774dd3$export$adaa4cf7ef1b65be)(this, fields);
60
+ return (0, $13bd2ffe0df4e09c$export$adaa4cf7ef1b65be)(this, fields);
61
61
  }
62
62
  /**
63
63
  * Returns a new `CalendarDate` with the given field adjusted by a specified amount.
64
64
  * When the resulting value reaches the limits of the field, it wraps around.
65
65
  */ cycle(field, amount, options) {
66
- return (0, $735220c2d4774dd3$export$d52ced6badfb9a4c)(this, field, amount, options);
66
+ return (0, $13bd2ffe0df4e09c$export$d52ced6badfb9a4c)(this, field, amount, options);
67
67
  }
68
68
  /** Converts the date to a native JavaScript Date object, with the time set to midnight in the given time zone. */ toDate(timeZone) {
69
- return (0, $11d87f3f76e88657$export$e67a095c620b86fe)(this, timeZone);
69
+ return (0, $e83297bd1a9e3ddc$export$e67a095c620b86fe)(this, timeZone);
70
70
  }
71
71
  /** Converts the date to an ISO 8601 formatted string. */ toString() {
72
- return (0, $fae977aafc393c5c$export$60dfd74aa96791bd)(this);
72
+ return (0, $7dccf15509582627$export$60dfd74aa96791bd)(this);
73
73
  }
74
74
  /** Compares this date with another. A negative result indicates that this date is before the given one, and a positive date indicates that it is after. */ compare(b) {
75
- return (0, $14e0f24ef4ac5c92$export$68781ddf31c0090f)(this, b);
75
+ return (0, $8daeb11568269f24$export$68781ddf31c0090f)(this, b);
76
76
  }
77
77
  constructor(...args){
78
- (0, $aksy1$_)(this, $35ea8db9cb2ccb90$var$_type, {
78
+ (0, $iHuWX$_)(this, $9a4e222e1bd2b190$var$_type, {
79
79
  writable: true,
80
80
  value: void 0
81
81
  });
82
- let [calendar, era, year, month, day] = $35ea8db9cb2ccb90$var$shiftArgs(args);
82
+ let [calendar, era, year, month, day] = $9a4e222e1bd2b190$var$shiftArgs(args);
83
83
  this.calendar = calendar;
84
84
  this.era = era;
85
85
  this.year = year;
86
86
  this.month = month;
87
87
  this.day = day;
88
- (0, $735220c2d4774dd3$export$c4e2ecac49351ef2)(this);
88
+ (0, $13bd2ffe0df4e09c$export$c4e2ecac49351ef2)(this);
89
89
  }
90
90
  }
91
91
  var // This prevents TypeScript from allowing other types with the same fields to match.
92
92
  // @ts-ignore
93
- $35ea8db9cb2ccb90$var$_type1 = /*#__PURE__*/ new WeakMap();
94
- class $35ea8db9cb2ccb90$export$680ea196effce5f {
93
+ $9a4e222e1bd2b190$var$_type1 = /*#__PURE__*/ new WeakMap();
94
+ class $9a4e222e1bd2b190$export$680ea196effce5f {
95
95
  /** Returns a copy of this time. */ copy() {
96
- return new $35ea8db9cb2ccb90$export$680ea196effce5f(this.hour, this.minute, this.second, this.millisecond);
96
+ return new $9a4e222e1bd2b190$export$680ea196effce5f(this.hour, this.minute, this.second, this.millisecond);
97
97
  }
98
98
  /** Returns a new `Time` with the given duration added to it. */ add(duration) {
99
- return (0, $735220c2d4774dd3$export$7ed87b6bc2506470)(this, duration);
99
+ return (0, $13bd2ffe0df4e09c$export$7ed87b6bc2506470)(this, duration);
100
100
  }
101
101
  /** Returns a new `Time` with the given duration subtracted from it. */ subtract(duration) {
102
- return (0, $735220c2d4774dd3$export$fe34d3a381cd7501)(this, duration);
102
+ return (0, $13bd2ffe0df4e09c$export$fe34d3a381cd7501)(this, duration);
103
103
  }
104
104
  /** Returns a new `Time` with the given fields set to the provided values. Other fields will be constrained accordingly. */ set(fields) {
105
- return (0, $735220c2d4774dd3$export$e5d5e1c1822b6e56)(this, fields);
105
+ return (0, $13bd2ffe0df4e09c$export$e5d5e1c1822b6e56)(this, fields);
106
106
  }
107
107
  /**
108
108
  * Returns a new `Time` with the given field adjusted by a specified amount.
109
109
  * When the resulting value reaches the limits of the field, it wraps around.
110
110
  */ cycle(field, amount, options) {
111
- return (0, $735220c2d4774dd3$export$dd02b3e0007dfe28)(this, field, amount, options);
111
+ return (0, $13bd2ffe0df4e09c$export$dd02b3e0007dfe28)(this, field, amount, options);
112
112
  }
113
113
  /** Converts the time to an ISO 8601 formatted string. */ toString() {
114
- return (0, $fae977aafc393c5c$export$f59dee82248f5ad4)(this);
114
+ return (0, $7dccf15509582627$export$f59dee82248f5ad4)(this);
115
115
  }
116
116
  /** Compares this time with another. A negative result indicates that this time is before the given one, and a positive time indicates that it is after. */ compare(b) {
117
- return (0, $14e0f24ef4ac5c92$export$c19a80a9721b80f6)(this, b);
117
+ return (0, $8daeb11568269f24$export$c19a80a9721b80f6)(this, b);
118
118
  }
119
119
  constructor(hour = 0, minute = 0, second = 0, millisecond = 0){
120
- (0, $aksy1$_)(this, $35ea8db9cb2ccb90$var$_type1, {
120
+ (0, $iHuWX$_)(this, $9a4e222e1bd2b190$var$_type1, {
121
121
  writable: true,
122
122
  value: void 0
123
123
  });
@@ -125,25 +125,25 @@ class $35ea8db9cb2ccb90$export$680ea196effce5f {
125
125
  this.minute = minute;
126
126
  this.second = second;
127
127
  this.millisecond = millisecond;
128
- (0, $735220c2d4774dd3$export$7555de1e070510cb)(this);
128
+ (0, $13bd2ffe0df4e09c$export$7555de1e070510cb)(this);
129
129
  }
130
130
  }
131
131
  var // This prevents TypeScript from allowing other types with the same fields to match.
132
132
  // @ts-ignore
133
- $35ea8db9cb2ccb90$var$_type2 = /*#__PURE__*/ new WeakMap();
134
- class $35ea8db9cb2ccb90$export$ca871e8dbb80966f {
133
+ $9a4e222e1bd2b190$var$_type2 = /*#__PURE__*/ new WeakMap();
134
+ class $9a4e222e1bd2b190$export$ca871e8dbb80966f {
135
135
  /** Returns a copy of this date. */ copy() {
136
- if (this.era) return new $35ea8db9cb2ccb90$export$ca871e8dbb80966f(this.calendar, this.era, this.year, this.month, this.day, this.hour, this.minute, this.second, this.millisecond);
137
- else return new $35ea8db9cb2ccb90$export$ca871e8dbb80966f(this.calendar, this.year, this.month, this.day, this.hour, this.minute, this.second, this.millisecond);
136
+ if (this.era) return new $9a4e222e1bd2b190$export$ca871e8dbb80966f(this.calendar, this.era, this.year, this.month, this.day, this.hour, this.minute, this.second, this.millisecond);
137
+ else return new $9a4e222e1bd2b190$export$ca871e8dbb80966f(this.calendar, this.year, this.month, this.day, this.hour, this.minute, this.second, this.millisecond);
138
138
  }
139
139
  /** Returns a new `CalendarDateTime` with the given duration added to it. */ add(duration) {
140
- return (0, $735220c2d4774dd3$export$e16d8520af44a096)(this, duration);
140
+ return (0, $13bd2ffe0df4e09c$export$e16d8520af44a096)(this, duration);
141
141
  }
142
142
  /** Returns a new `CalendarDateTime` with the given duration subtracted from it. */ subtract(duration) {
143
- return (0, $735220c2d4774dd3$export$4e2d2ead65e5f7e3)(this, duration);
143
+ return (0, $13bd2ffe0df4e09c$export$4e2d2ead65e5f7e3)(this, duration);
144
144
  }
145
145
  /** Returns a new `CalendarDateTime` with the given fields set to the provided values. Other fields will be constrained accordingly. */ set(fields) {
146
- return (0, $735220c2d4774dd3$export$adaa4cf7ef1b65be)((0, $735220c2d4774dd3$export$e5d5e1c1822b6e56)(this, fields), fields);
146
+ return (0, $13bd2ffe0df4e09c$export$adaa4cf7ef1b65be)((0, $13bd2ffe0df4e09c$export$e5d5e1c1822b6e56)(this, fields), fields);
147
147
  }
148
148
  /**
149
149
  * Returns a new `CalendarDateTime` with the given field adjusted by a specified amount.
@@ -154,28 +154,28 @@ class $35ea8db9cb2ccb90$export$ca871e8dbb80966f {
154
154
  case 'year':
155
155
  case 'month':
156
156
  case 'day':
157
- return (0, $735220c2d4774dd3$export$d52ced6badfb9a4c)(this, field, amount, options);
157
+ return (0, $13bd2ffe0df4e09c$export$d52ced6badfb9a4c)(this, field, amount, options);
158
158
  default:
159
- return (0, $735220c2d4774dd3$export$dd02b3e0007dfe28)(this, field, amount, options);
159
+ return (0, $13bd2ffe0df4e09c$export$dd02b3e0007dfe28)(this, field, amount, options);
160
160
  }
161
161
  }
162
162
  /** Converts the date to a native JavaScript Date object in the given time zone. */ toDate(timeZone, disambiguation) {
163
- return (0, $11d87f3f76e88657$export$e67a095c620b86fe)(this, timeZone, disambiguation);
163
+ return (0, $e83297bd1a9e3ddc$export$e67a095c620b86fe)(this, timeZone, disambiguation);
164
164
  }
165
165
  /** Converts the date to an ISO 8601 formatted string. */ toString() {
166
- return (0, $fae977aafc393c5c$export$4223de14708adc63)(this);
166
+ return (0, $7dccf15509582627$export$4223de14708adc63)(this);
167
167
  }
168
168
  /** Compares this date with another. A negative result indicates that this date is before the given one, and a positive date indicates that it is after. */ compare(b) {
169
- let res = (0, $14e0f24ef4ac5c92$export$68781ddf31c0090f)(this, b);
170
- if (res === 0) return (0, $14e0f24ef4ac5c92$export$c19a80a9721b80f6)(this, (0, $11d87f3f76e88657$export$b21e0b124e224484)(b));
169
+ let res = (0, $8daeb11568269f24$export$68781ddf31c0090f)(this, b);
170
+ if (res === 0) return (0, $8daeb11568269f24$export$c19a80a9721b80f6)(this, (0, $e83297bd1a9e3ddc$export$b21e0b124e224484)(b));
171
171
  return res;
172
172
  }
173
173
  constructor(...args){
174
- (0, $aksy1$_)(this, $35ea8db9cb2ccb90$var$_type2, {
174
+ (0, $iHuWX$_)(this, $9a4e222e1bd2b190$var$_type2, {
175
175
  writable: true,
176
176
  value: void 0
177
177
  });
178
- let [calendar, era, year, month, day] = $35ea8db9cb2ccb90$var$shiftArgs(args);
178
+ let [calendar, era, year, month, day] = $9a4e222e1bd2b190$var$shiftArgs(args);
179
179
  this.calendar = calendar;
180
180
  this.era = era;
181
181
  this.year = year;
@@ -185,51 +185,51 @@ class $35ea8db9cb2ccb90$export$ca871e8dbb80966f {
185
185
  this.minute = args.shift() || 0;
186
186
  this.second = args.shift() || 0;
187
187
  this.millisecond = args.shift() || 0;
188
- (0, $735220c2d4774dd3$export$c4e2ecac49351ef2)(this);
188
+ (0, $13bd2ffe0df4e09c$export$c4e2ecac49351ef2)(this);
189
189
  }
190
190
  }
191
191
  var // This prevents TypeScript from allowing other types with the same fields to match.
192
192
  // @ts-ignore
193
- $35ea8db9cb2ccb90$var$_type3 = /*#__PURE__*/ new WeakMap();
194
- class $35ea8db9cb2ccb90$export$d3b7288e7994edea {
193
+ $9a4e222e1bd2b190$var$_type3 = /*#__PURE__*/ new WeakMap();
194
+ class $9a4e222e1bd2b190$export$d3b7288e7994edea {
195
195
  /** Returns a copy of this date. */ copy() {
196
- if (this.era) return new $35ea8db9cb2ccb90$export$d3b7288e7994edea(this.calendar, this.era, this.year, this.month, this.day, this.timeZone, this.offset, this.hour, this.minute, this.second, this.millisecond);
197
- else return new $35ea8db9cb2ccb90$export$d3b7288e7994edea(this.calendar, this.year, this.month, this.day, this.timeZone, this.offset, this.hour, this.minute, this.second, this.millisecond);
196
+ if (this.era) return new $9a4e222e1bd2b190$export$d3b7288e7994edea(this.calendar, this.era, this.year, this.month, this.day, this.timeZone, this.offset, this.hour, this.minute, this.second, this.millisecond);
197
+ else return new $9a4e222e1bd2b190$export$d3b7288e7994edea(this.calendar, this.year, this.month, this.day, this.timeZone, this.offset, this.hour, this.minute, this.second, this.millisecond);
198
198
  }
199
199
  /** Returns a new `ZonedDateTime` with the given duration added to it. */ add(duration) {
200
- return (0, $735220c2d4774dd3$export$96b1d28349274637)(this, duration);
200
+ return (0, $13bd2ffe0df4e09c$export$96b1d28349274637)(this, duration);
201
201
  }
202
202
  /** Returns a new `ZonedDateTime` with the given duration subtracted from it. */ subtract(duration) {
203
- return (0, $735220c2d4774dd3$export$6814caac34ca03c7)(this, duration);
203
+ return (0, $13bd2ffe0df4e09c$export$6814caac34ca03c7)(this, duration);
204
204
  }
205
205
  /** Returns a new `ZonedDateTime` with the given fields set to the provided values. Other fields will be constrained accordingly. */ set(fields, disambiguation) {
206
- return (0, $735220c2d4774dd3$export$31b5430eb18be4f8)(this, fields, disambiguation);
206
+ return (0, $13bd2ffe0df4e09c$export$31b5430eb18be4f8)(this, fields, disambiguation);
207
207
  }
208
208
  /**
209
209
  * Returns a new `ZonedDateTime` with the given field adjusted by a specified amount.
210
210
  * When the resulting value reaches the limits of the field, it wraps around.
211
211
  */ cycle(field, amount, options) {
212
- return (0, $735220c2d4774dd3$export$9a297d111fc86b79)(this, field, amount, options);
212
+ return (0, $13bd2ffe0df4e09c$export$9a297d111fc86b79)(this, field, amount, options);
213
213
  }
214
214
  /** Converts the date to a native JavaScript Date object. */ toDate() {
215
- return (0, $11d87f3f76e88657$export$83aac07b4c37b25)(this);
215
+ return (0, $e83297bd1a9e3ddc$export$83aac07b4c37b25)(this);
216
216
  }
217
217
  /** Converts the date to an ISO 8601 formatted string, including the UTC offset and time zone identifier. */ toString() {
218
- return (0, $fae977aafc393c5c$export$bf79f1ebf4b18792)(this);
218
+ return (0, $7dccf15509582627$export$bf79f1ebf4b18792)(this);
219
219
  }
220
220
  /** Converts the date to an ISO 8601 formatted string in UTC. */ toAbsoluteString() {
221
221
  return this.toDate().toISOString();
222
222
  }
223
223
  /** Compares this date with another. A negative result indicates that this date is before the given one, and a positive date indicates that it is after. */ compare(b) {
224
224
  // TODO: Is this a bad idea??
225
- return this.toDate().getTime() - (0, $11d87f3f76e88657$export$84c95a83c799e074)(b, this.timeZone).toDate().getTime();
225
+ return this.toDate().getTime() - (0, $e83297bd1a9e3ddc$export$84c95a83c799e074)(b, this.timeZone).toDate().getTime();
226
226
  }
227
227
  constructor(...args){
228
- (0, $aksy1$_)(this, $35ea8db9cb2ccb90$var$_type3, {
228
+ (0, $iHuWX$_)(this, $9a4e222e1bd2b190$var$_type3, {
229
229
  writable: true,
230
230
  value: void 0
231
231
  });
232
- let [calendar, era, year, month, day] = $35ea8db9cb2ccb90$var$shiftArgs(args);
232
+ let [calendar, era, year, month, day] = $9a4e222e1bd2b190$var$shiftArgs(args);
233
233
  let timeZone = args.shift();
234
234
  let offset = args.shift();
235
235
  this.calendar = calendar;
@@ -243,10 +243,10 @@ class $35ea8db9cb2ccb90$export$d3b7288e7994edea {
243
243
  this.minute = args.shift() || 0;
244
244
  this.second = args.shift() || 0;
245
245
  this.millisecond = args.shift() || 0;
246
- (0, $735220c2d4774dd3$export$c4e2ecac49351ef2)(this);
246
+ (0, $13bd2ffe0df4e09c$export$c4e2ecac49351ef2)(this);
247
247
  }
248
248
  }
249
249
 
250
250
 
251
- export {$35ea8db9cb2ccb90$export$99faa760c7908e4f as CalendarDate, $35ea8db9cb2ccb90$export$680ea196effce5f as Time, $35ea8db9cb2ccb90$export$ca871e8dbb80966f as CalendarDateTime, $35ea8db9cb2ccb90$export$d3b7288e7994edea as ZonedDateTime};
252
- //# sourceMappingURL=CalendarDate.module.js.map
251
+ export {$9a4e222e1bd2b190$export$99faa760c7908e4f as CalendarDate, $9a4e222e1bd2b190$export$680ea196effce5f as Time, $9a4e222e1bd2b190$export$ca871e8dbb80966f as CalendarDateTime, $9a4e222e1bd2b190$export$d3b7288e7994edea as ZonedDateTime};
252
+ //# sourceMappingURL=CalendarDate.js.map
@@ -0,0 +1 @@
1
+ {"mappings":";;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;AAWD,SAAS,gCAAU,IAAW;IAC5B,IAAI,WAAqB,OAAO,IAAI,CAAC,EAAE,KAAK,WACxC,KAAK,KAAK,KACV,IAAI,CAAA,GAAA,yCAAgB;IAExB,IAAI;IACJ,IAAI,OAAO,IAAI,CAAC,EAAE,KAAK,UACrB,MAAM,KAAK,KAAK;SACX;QACL,IAAI,OAAO,SAAS,OAAO;QAC3B,MAAM,IAAI,CAAC,KAAK,MAAM,GAA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AAI,CAAC,MAAM,GAAG,OAAO,KAAK,CAAA,GAAA,yCAAM,EAAE,GAAG,IAAI,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO;IAC7E;IAtEA,YAAY,GAAG,IAAW,CAAE;QAhC5B,oBAAA;;mBAAA,KAAA;;QAiCE,IAAI,CAAC,UAAU,KAAK,MAAM,OAAO,IAAI,GAAG,gCAAU;QAClD,IAAI,WAAW,KAAK,KAAK;QACzB,IAAI,SAAS,KAAK,KAAK;QACvB,IAAI,CAAC,QAAQ,GAAG;QAChB,IAAI,CAAC,GAAG,GAAG;QACX,IAAI,CAAC,IAAI,GAAG;QACZ,IAAI,CAAC,KAAK,GAAG;QACb,IAAI,CAAC,GAAG,GAAG;QACX,IAAI,CAAC,QAAQ,GAAG;QAChB,IAAI,CAAC,MAAM,GAAG;QACd,IAAI,CAAC,IAAI,GAAG,KAAK,KAAK,MAAM;QAC5B,IAAI,CAAC,MAAM,GAAG,KAAK,KAAK,MAAM;QAC9B,IAAI,CAAC,MAAM,GAAG,KAAK,KAAK,MAAM;QAC9B,IAAI,CAAC,WAAW,GAAG,KAAK,KAAK,MAAM;QAEnC,CAAA,GAAA,yCAAQ,EAAE,IAAI;IAChB;AAsDF","sources":["packages/@internationalized/date/src/CalendarDate.ts"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {add, addTime, addZoned, constrain, constrainTime, cycleDate, cycleTime, cycleZoned, set, setTime, setZoned, subtract, subtractTime, subtractZoned} from './manipulation';\nimport {AnyCalendarDate, AnyTime, Calendar, CycleOptions, CycleTimeOptions, DateDuration, DateField, DateFields, DateTimeDuration, Disambiguation, TimeDuration, TimeField, TimeFields} from './types';\nimport {compareDate, compareTime} from './queries';\nimport {dateTimeToString, dateToString, timeToString, zonedDateTimeToString} from './string';\nimport {GregorianCalendar} from './calendars/GregorianCalendar';\nimport {toCalendarDateTime, toDate, toZoned, zonedToDate} from './conversion';\n\nexport type DateValue = CalendarDate | CalendarDateTime | ZonedDateTime;\n\nfunction shiftArgs(args: any[]) {\n let calendar: Calendar = typeof args[0] === 'object'\n ? args.shift()\n : new GregorianCalendar();\n\n let era: string;\n if (typeof args[0] === 'string') {\n era = args.shift();\n } else {\n let eras = calendar.getEras();\n era = eras[eras.length - 1];\n }\n\n let year = args.shift();\n let month = args.shift();\n let day = args.shift();\n\n return [calendar, era, year, month, day];\n}\n\n/** A CalendarDate represents a date without any time components in a specific calendar system. */\nexport class CalendarDate {\n // This prevents TypeScript from allowing other types with the same fields to match.\n // i.e. a ZonedDateTime should not be be passable to a parameter that expects CalendarDate.\n // If that behavior is desired, use the AnyCalendarDate interface instead.\n // @ts-ignore\n #type;\n /** The calendar system associated with this date, e.g. Gregorian. */\n public readonly calendar: Calendar;\n /** The calendar era for this date, e.g. \"BC\" or \"AD\". */\n public readonly era: string;\n /** The year of this date within the era. */\n public readonly year: number;\n /**\n * The month number within the year. Note that some calendar systems such as Hebrew\n * may have a variable number of months per year. Therefore, month numbers may not\n * always correspond to the same month names in different years.\n */\n public readonly month: number;\n /** The day number within the month. */\n public readonly day: number;\n\n constructor(year: number, month: number, day: number);\n constructor(era: string, year: number, month: number, day: number);\n constructor(calendar: Calendar, year: number, month: number, day: number);\n constructor(calendar: Calendar, era: string, year: number, month: number, day: number);\n constructor(...args: any[]) {\n let [calendar, era, year, month, day] = shiftArgs(args);\n this.calendar = calendar;\n this.era = era;\n this.year = year;\n this.month = month;\n this.day = day;\n\n constrain(this);\n }\n\n /** Returns a copy of this date. */\n copy(): CalendarDate {\n if (this.era) {\n return new CalendarDate(this.calendar, this.era, this.year, this.month, this.day);\n } else {\n return new CalendarDate(this.calendar, this.year, this.month, this.day);\n }\n }\n\n /** Returns a new `CalendarDate` with the given duration added to it. */\n add(duration: DateDuration): CalendarDate {\n return add(this, duration);\n }\n\n /** Returns a new `CalendarDate` with the given duration subtracted from it. */\n subtract(duration: DateDuration): CalendarDate {\n return subtract(this, duration);\n }\n\n /** Returns a new `CalendarDate` with the given fields set to the provided values. Other fields will be constrained accordingly. */\n set(fields: DateFields): CalendarDate {\n return set(this, fields);\n }\n\n /**\n * Returns a new `CalendarDate` with the given field adjusted by a specified amount.\n * When the resulting value reaches the limits of the field, it wraps around.\n */\n cycle(field: DateField, amount: number, options?: CycleOptions): CalendarDate {\n return cycleDate(this, field, amount, options);\n }\n\n /** Converts the date to a native JavaScript Date object, with the time set to midnight in the given time zone. */\n toDate(timeZone: string): Date {\n return toDate(this, timeZone);\n }\n\n /** Converts the date to an ISO 8601 formatted string. */\n toString(): string {\n return dateToString(this);\n }\n\n /** Compares this date with another. A negative result indicates that this date is before the given one, and a positive date indicates that it is after. */\n compare(b: AnyCalendarDate): number {\n return compareDate(this, b);\n }\n}\n\n/** A Time represents a clock time without any date components. */\nexport class Time {\n // This prevents TypeScript from allowing other types with the same fields to match.\n // @ts-ignore\n #type;\n /** The hour, numbered from 0 to 23. */\n public readonly hour: number;\n /** The minute in the hour. */\n public readonly minute: number;\n /** The second in the minute. */\n public readonly second: number;\n /** The millisecond in the second. */\n public readonly millisecond: number;\n\n constructor(\n hour: number = 0,\n minute: number = 0,\n second: number = 0,\n millisecond: number = 0\n ) {\n this.hour = hour;\n this.minute = minute;\n this.second = second;\n this.millisecond = millisecond;\n constrainTime(this);\n }\n\n /** Returns a copy of this time. */\n copy(): Time {\n return new Time(this.hour, this.minute, this.second, this.millisecond);\n }\n\n /** Returns a new `Time` with the given duration added to it. */\n add(duration: TimeDuration): Time {\n return addTime(this, duration);\n }\n\n /** Returns a new `Time` with the given duration subtracted from it. */\n subtract(duration: TimeDuration): Time {\n return subtractTime(this, duration);\n }\n\n /** Returns a new `Time` with the given fields set to the provided values. Other fields will be constrained accordingly. */\n set(fields: TimeFields): Time {\n return setTime(this, fields);\n }\n\n /**\n * Returns a new `Time` with the given field adjusted by a specified amount.\n * When the resulting value reaches the limits of the field, it wraps around.\n */\n cycle(field: TimeField, amount: number, options?: CycleTimeOptions): Time {\n return cycleTime(this, field, amount, options);\n }\n\n /** Converts the time to an ISO 8601 formatted string. */\n toString(): string {\n return timeToString(this);\n }\n\n /** Compares this time with another. A negative result indicates that this time is before the given one, and a positive time indicates that it is after. */\n compare(b: AnyTime): number {\n return compareTime(this, b);\n }\n}\n\n/** A CalendarDateTime represents a date and time without a time zone, in a specific calendar system. */\nexport class CalendarDateTime {\n // This prevents TypeScript from allowing other types with the same fields to match.\n // @ts-ignore\n #type;\n /** The calendar system associated with this date, e.g. Gregorian. */\n public readonly calendar: Calendar;\n /** The calendar era for this date, e.g. \"BC\" or \"AD\". */\n public readonly era: string;\n /** The year of this date within the era. */\n public readonly year: number;\n /**\n * The month number within the year. Note that some calendar systems such as Hebrew\n * may have a variable number of months per year. Therefore, month numbers may not\n * always correspond to the same month names in different years.\n */\n public readonly month: number;\n /** The day number within the month. */\n public readonly day: number;\n /** The hour in the day, numbered from 0 to 23. */\n public readonly hour: number;\n /** The minute in the hour. */\n public readonly minute: number;\n /** The second in the minute. */\n public readonly second: number;\n /** The millisecond in the second. */\n public readonly millisecond: number;\n\n constructor(year: number, month: number, day: number, hour?: number, minute?: number, second?: number, millisecond?: number);\n constructor(era: string, year: number, month: number, day: number, hour?: number, minute?: number, second?: number, millisecond?: number);\n constructor(calendar: Calendar, year: number, month: number, day: number, hour?: number, minute?: number, second?: number, millisecond?: number);\n constructor(calendar: Calendar, era: string, year: number, month: number, day: number, hour?: number, minute?: number, second?: number, millisecond?: number);\n constructor(...args: any[]) {\n let [calendar, era, year, month, day] = shiftArgs(args);\n this.calendar = calendar;\n this.era = era;\n this.year = year;\n this.month = month;\n this.day = day;\n this.hour = args.shift() || 0;\n this.minute = args.shift() || 0;\n this.second = args.shift() || 0;\n this.millisecond = args.shift() || 0;\n\n constrain(this);\n }\n\n /** Returns a copy of this date. */\n copy(): CalendarDateTime {\n if (this.era) {\n return new CalendarDateTime(this.calendar, this.era, this.year, this.month, this.day, this.hour, this.minute, this.second, this.millisecond);\n } else {\n return new CalendarDateTime(this.calendar, this.year, this.month, this.day, this.hour, this.minute, this.second, this.millisecond);\n }\n }\n\n /** Returns a new `CalendarDateTime` with the given duration added to it. */\n add(duration: DateTimeDuration): CalendarDateTime {\n return add(this, duration);\n }\n\n /** Returns a new `CalendarDateTime` with the given duration subtracted from it. */\n subtract(duration: DateTimeDuration): CalendarDateTime {\n return subtract(this, duration);\n }\n\n /** Returns a new `CalendarDateTime` with the given fields set to the provided values. Other fields will be constrained accordingly. */\n set(fields: DateFields & TimeFields): CalendarDateTime {\n return set(setTime(this, fields), fields);\n }\n\n /**\n * Returns a new `CalendarDateTime` with the given field adjusted by a specified amount.\n * When the resulting value reaches the limits of the field, it wraps around.\n */\n cycle(field: DateField | TimeField, amount: number, options?: CycleTimeOptions): CalendarDateTime {\n switch (field) {\n case 'era':\n case 'year':\n case 'month':\n case 'day':\n return cycleDate(this, field, amount, options);\n default:\n return cycleTime(this, field, amount, options);\n }\n }\n\n /** Converts the date to a native JavaScript Date object in the given time zone. */\n toDate(timeZone: string, disambiguation?: Disambiguation): Date {\n return toDate(this, timeZone, disambiguation);\n }\n\n /** Converts the date to an ISO 8601 formatted string. */\n toString(): string {\n return dateTimeToString(this);\n }\n\n /** Compares this date with another. A negative result indicates that this date is before the given one, and a positive date indicates that it is after. */\n compare(b: CalendarDate | CalendarDateTime | ZonedDateTime): number {\n let res = compareDate(this, b);\n if (res === 0) {\n return compareTime(this, toCalendarDateTime(b));\n }\n\n return res;\n }\n}\n\n/** A ZonedDateTime represents a date and time in a specific time zone and calendar system. */\nexport class ZonedDateTime {\n // This prevents TypeScript from allowing other types with the same fields to match.\n // @ts-ignore\n #type;\n /** The calendar system associated with this date, e.g. Gregorian. */\n public readonly calendar: Calendar;\n /** The calendar era for this date, e.g. \"BC\" or \"AD\". */\n public readonly era: string;\n /** The year of this date within the era. */\n public readonly year: number;\n /**\n * The month number within the year. Note that some calendar systems such as Hebrew\n * may have a variable number of months per year. Therefore, month numbers may not\n * always correspond to the same month names in different years.\n */\n public readonly month: number;\n /** The day number within the month. */\n public readonly day: number;\n /** The hour in the day, numbered from 0 to 23. */\n public readonly hour: number;\n /** The minute in the hour. */\n public readonly minute: number;\n /** The second in the minute. */\n public readonly second: number;\n /** The millisecond in the second. */\n public readonly millisecond: number;\n /** The IANA time zone identifier that this date and time is represented in. */\n public readonly timeZone: string;\n /** The UTC offset for this time, in milliseconds. */\n public readonly offset: number;\n\n constructor(year: number, month: number, day: number, timeZone: string, offset: number, hour?: number, minute?: number, second?: number, millisecond?: number);\n constructor(era: string, year: number, month: number, day: number, timeZone: string, offset: number, hour?: number, minute?: number, second?: number, millisecond?: number);\n constructor(calendar: Calendar, year: number, month: number, day: number, timeZone: string, offset: number, hour?: number, minute?: number, second?: number, millisecond?: number);\n constructor(calendar: Calendar, era: string, year: number, month: number, day: number, timeZone: string, offset: number, hour?: number, minute?: number, second?: number, millisecond?: number);\n constructor(...args: any[]) {\n let [calendar, era, year, month, day] = shiftArgs(args);\n let timeZone = args.shift();\n let offset = args.shift();\n this.calendar = calendar;\n this.era = era;\n this.year = year;\n this.month = month;\n this.day = day;\n this.timeZone = timeZone;\n this.offset = offset;\n this.hour = args.shift() || 0;\n this.minute = args.shift() || 0;\n this.second = args.shift() || 0;\n this.millisecond = args.shift() || 0;\n\n constrain(this);\n }\n\n /** Returns a copy of this date. */\n copy(): ZonedDateTime {\n if (this.era) {\n return new ZonedDateTime(this.calendar, this.era, this.year, this.month, this.day, this.timeZone, this.offset, this.hour, this.minute, this.second, this.millisecond);\n } else {\n return new ZonedDateTime(this.calendar, this.year, this.month, this.day, this.timeZone, this.offset, this.hour, this.minute, this.second, this.millisecond);\n }\n }\n\n /** Returns a new `ZonedDateTime` with the given duration added to it. */\n add(duration: DateTimeDuration): ZonedDateTime {\n return addZoned(this, duration);\n }\n\n /** Returns a new `ZonedDateTime` with the given duration subtracted from it. */\n subtract(duration: DateTimeDuration): ZonedDateTime {\n return subtractZoned(this, duration);\n }\n\n /** Returns a new `ZonedDateTime` with the given fields set to the provided values. Other fields will be constrained accordingly. */\n set(fields: DateFields & TimeFields, disambiguation?: Disambiguation): ZonedDateTime {\n return setZoned(this, fields, disambiguation);\n }\n\n /**\n * Returns a new `ZonedDateTime` with the given field adjusted by a specified amount.\n * When the resulting value reaches the limits of the field, it wraps around.\n */\n cycle(field: DateField | TimeField, amount: number, options?: CycleTimeOptions): ZonedDateTime {\n return cycleZoned(this, field, amount, options);\n }\n\n /** Converts the date to a native JavaScript Date object. */\n toDate(): Date {\n return zonedToDate(this);\n }\n\n /** Converts the date to an ISO 8601 formatted string, including the UTC offset and time zone identifier. */\n toString(): string {\n return zonedDateTimeToString(this);\n }\n\n /** Converts the date to an ISO 8601 formatted string in UTC. */\n toAbsoluteString(): string {\n return this.toDate().toISOString();\n }\n\n /** Compares this date with another. A negative result indicates that this date is before the given one, and a positive date indicates that it is after. */\n compare(b: CalendarDate | CalendarDateTime | ZonedDateTime): number {\n // TODO: Is this a bad idea??\n return this.toDate().getTime() - toZoned(b, this.timeZone).toDate().getTime();\n }\n}\n"],"names":[],"version":3,"file":"CalendarDate.js.map"}