{"version":3,"file":"js-joda.esm.js","sources":["../src/errors.js","../src/assert.js","../src/MathUtil.js","../src/Enum.js","../src/temporal/TemporalAmount.js","../src/temporal/TemporalUnit.js","../src/Duration.js","../src/YearConstants.js","../src/temporal/ChronoUnit.js","../src/temporal/TemporalField.js","../src/temporal/ValueRange.js","../src/temporal/ChronoField.js","../src/temporal/TemporalQueries.js","../src/temporal/TemporalAccessor.js","../src/temporal/TemporalQuery.js","../src/DayOfWeek.js","../src/Month.js","../src/Period.js","../src/format/ParsePosition.js","../src/format/EnumMap.js","../src/format/ResolverStyle.js","../src/temporal/Temporal.js","../src/chrono/ChronoLocalDate.js","../src/StringUtil.js","../src/ZoneId.js","../src/zone/ZoneRules.js","../src/ZoneOffset.js","../src/format/DateTimeBuilder.js","../src/format/DateTimeParseContext.js","../src/format/DateTimePrintContext.js","../src/temporal/IsoFields.js","../src/format/DecimalStyle.js","../src/format/SignStyle.js","../src/format/TextStyle.js","../src/format/parser/CharLiteralPrinterParser.js","../src/format/parser/CompositePrinterParser.js","../src/format/parser/FractionPrinterParser.js","../src/format/parser/NumberPrinterParser.js","../src/format/parser/OffsetIdPrinterParser.js","../src/format/parser/PadPrinterParserDecorator.js","../src/format/parser/SettingsParser.js","../src/format/parser/StringLiteralPrinterParser.js","../src/zone/ZoneRulesProvider.js","../src/ZoneRegion.js","../src/format/parser/ZoneIdPrinterParser.js","../src/format/DateTimeFormatterBuilder.js","../src/format/StringBuilder.js","../src/format/DateTimeFormatter.js","../src/MonthDay.js","../src/YearMonth.js","../src/Year.js","../src/temporal/TemporalAdjuster.js","../src/temporal/TemporalAdjusters.js","../src/chrono/IsoChronology.js","../src/OffsetTime.js","../src/chrono/ChronoZonedDateTime.js","../src/ZonedDateTime.js","../src/OffsetDateTime.js","../src/LocalDate.js","../src/chrono/ChronoLocalDateTime.js","../src/LocalDateTime.js","../src/LocalTime.js","../src/Instant.js","../src/Clock.js","../src/zone/ZoneOffsetTransition.js","../src/temporal/TemporalQueriesFactory.js","../src/zone/SystemDefaultZoneRules.js","../src/zone/SystemDefaultZoneId.js","../src/ZoneIdFactory.js","../src/_init.js","../src/convert.js","../src/nativeJs.js","../src/use.js","../src/js-joda.js"],"sourcesContent":["/**\n * @copyright (c) 2016, Philipp Thürwächter & Pattrick Hüper\n * @license BSD-3-Clause (see LICENSE in the root directory of this source tree)\n */\n\nfunction createErrorType(name, init, superErrorClass = Error) {\n function JsJodaException(message) {\n if (!Error.captureStackTrace) {\n this.stack = (new Error()).stack;\n } else {\n Error.captureStackTrace(this, this.constructor);\n }\n this.message = message;\n init && init.apply(this, arguments);\n this.toString = function () {\n return `${this.name}: ${this.message}`;\n };\n }\n JsJodaException.prototype = Object.create(superErrorClass.prototype);\n JsJodaException.prototype.name = name;\n JsJodaException.prototype.constructor = JsJodaException;\n return JsJodaException;\n}\n\nexport const DateTimeException = createErrorType('DateTimeException', messageWithCause);\nexport const DateTimeParseException = createErrorType('DateTimeParseException', messageForDateTimeParseException);\nexport const UnsupportedTemporalTypeException = createErrorType('UnsupportedTemporalTypeException', null, DateTimeException);\nexport const ArithmeticException = createErrorType('ArithmeticException');\nexport const IllegalArgumentException = createErrorType('IllegalArgumentException');\nexport const IllegalStateException = createErrorType('IllegalStateException');\nexport const NullPointerException = createErrorType('NullPointerException');\n\nfunction messageWithCause(message, cause = null) {\n let msg = message || this.name;\n if (cause !== null && cause instanceof Error) {\n msg += `\\n-------\\nCaused by: ${cause.stack}\\n-------\\n`;\n }\n this.message = msg;\n}\n\nfunction messageForDateTimeParseException(message, text = '', index = 0, cause = null) {\n let msg = message || this.name;\n msg += `: ${text}, at index: ${index}`;\n if (cause !== null && cause instanceof Error) {\n msg += `\\n-------\\nCaused by: ${cause.stack}\\n-------\\n`;\n }\n this.message = msg;\n this.parsedString = () => {\n return text;\n };\n this.errorIndex = () => {\n return index;\n };\n}\n","/**\n * @copyright (c) 2016, Philipp Thürwächter & Pattrick Hüper\n * @license BSD-3-Clause (see LICENSE in the root directory of this source tree)\n */\nimport { NullPointerException, IllegalArgumentException } from './errors';\n\n/**\n * @private\n *\n * @param assertion\n * @param msg\n * @param error\n */\nexport function assert(assertion, msg, error) {\n if(!assertion){\n if (error) {\n throw new error(msg);\n } else {\n throw new Error(msg);\n }\n }\n}\n\n/**\n * @private\n *\n * @param value\n * @param parameterName\n * @returns {*}\n */\nexport function requireNonNull(value, parameterName) {\n if (value == null) {\n throw new NullPointerException(`${parameterName} must not be null`);\n }\n return value;\n}\n\n/**\n * @private\n *\n * @param value\n * @param _class\n * @param parameterName\n * @returns {_class}\n */\nexport function requireInstance(value, _class, parameterName) {\n if (!(value instanceof _class)) {\n throw new IllegalArgumentException(`${parameterName} must be an instance of ${_class.name ? _class.name : _class}${value && value.constructor && value.constructor.name ? `, but is ${value.constructor.name}` : ''}`);\n }\n return value;\n}\n\n/**\n * @private\n *\n * @param methodName\n */\nexport function abstractMethodFail(methodName){\n throw new TypeError(`abstract method \"${methodName}\" is not implemented`);\n}\n","/**\n * @copyright (c) 2016, Philipp Thürwächter & Pattrick Hüper\n * @copyright (c) 2007-present, Stephen Colebourne & Michael Nascimento Santos\n * @license BSD-3-Clause (see LICENSE in the root directory of this source tree)\n */\nimport { ArithmeticException } from './errors';\n\nexport const MAX_SAFE_INTEGER = 9007199254740991;\nexport const MIN_SAFE_INTEGER = -9007199254740991;\n\n/**\n * Math helper with static function for integer operations\n */\nexport class MathUtil {\n /**\n *\n * @param {number} x\n * @param {number} y\n * @returns {number}\n */\n static intDiv(x, y) {\n let r = x/y;\n r = MathUtil.roundDown(r);\n return MathUtil.safeZero(r);\n }\n\n /**\n *\n * @param {number} x\n * @param {number} y\n * @returns {number}\n */\n static intMod(x, y) {\n let r = x - MathUtil.intDiv(x, y) * y;\n r = MathUtil.roundDown(r);\n return MathUtil.safeZero(r);\n }\n\n /**\n *\n * @param {number} r\n * @returns {number}\n */\n static roundDown(r){\n if (r < 0) {\n return Math.ceil(r);\n } else {\n return Math.floor(r);\n }\n }\n\n /**\n *\n * @param {number} x\n * @param {number} y\n * @returns {number}\n */\n static floorDiv(x, y){\n const r = Math.floor(x / y);\n return MathUtil.safeZero(r);\n }\n\n /**\n *\n * @param {number} x\n * @param {number} y\n * @returns {number}\n */\n static floorMod(x, y){\n const r = x - MathUtil.floorDiv(x, y) * y;\n return MathUtil.safeZero(r);\n }\n\n /**\n *\n * @param {number} x\n * @param {number} y\n * @returns {number}\n */\n static safeAdd(x, y) {\n MathUtil.verifyInt(x);\n MathUtil.verifyInt(y);\n if (x === 0) {\n return MathUtil.safeZero(y);\n }\n if (y === 0) {\n return MathUtil.safeZero(x);\n }\n const r = MathUtil.safeToInt(x + y);\n if (r === x || r === y) {\n throw new ArithmeticException('Invalid addition beyond MAX_SAFE_INTEGER!');\n }\n return r;\n }\n\n /**\n *\n * @param {number} x\n * @param {number} y\n * @returns {number}\n */\n static safeSubtract(x, y) {\n MathUtil.verifyInt(x);\n MathUtil.verifyInt(y);\n if (x === 0 && y === 0) {\n return 0;\n } else if (x === 0) {\n return MathUtil.safeZero(-1 * y);\n } else if (y === 0) {\n return MathUtil.safeZero(x);\n }\n return MathUtil.safeToInt(x - y);\n }\n\n /**\n *\n * @param {number} x\n * @param {number} y\n * @returns {number}\n */\n static safeMultiply(x, y) {\n MathUtil.verifyInt(x);\n MathUtil.verifyInt(y);\n if (x === 1) {\n return MathUtil.safeZero(y);\n }\n if (y === 1) {\n return MathUtil.safeZero(x);\n }\n if (x === 0 || y === 0) {\n return 0;\n }\n const r = MathUtil.safeToInt(x * y);\n if (r / y !== x || (x === MIN_SAFE_INTEGER && y === -1) || (y === MIN_SAFE_INTEGER && x === -1)) {\n throw new ArithmeticException(`Multiplication overflows: ${x} * ${y}`);\n }\n return r;\n }\n\n /**\n *\n * @param {number} value\n * @returns {number}\n */\n static parseInt(value) {\n const r = parseInt(value);\n return MathUtil.safeToInt(r);\n }\n\n /**\n *\n * @param {number} value\n * @returns {number}\n */\n static safeToInt(value) {\n MathUtil.verifyInt(value);\n return MathUtil.safeZero(value);\n }\n\n /**\n *\n * @param {number} value\n */\n static verifyInt(value){\n if (value == null) {\n throw new ArithmeticException(`Invalid value: '${value}', using null or undefined as argument`);\n }\n if (isNaN(value)) {\n throw new ArithmeticException('Invalid int value, using NaN as argument');\n }\n if ((value % 1) !== 0) {\n throw new ArithmeticException(`Invalid value: '${value}' is a float`);\n }\n if (value > MAX_SAFE_INTEGER || value < MIN_SAFE_INTEGER) {\n throw new ArithmeticException(`Calculation overflows an int: ${value}`);\n }\n }\n\n /**\n * convert -0 to 0 and int as string to a number ( '1' -> 1 )\n *\n * @param {number} value\n * @returns {number}\n */\n static safeZero(value){\n return value === 0 ? 0 : +value;\n }\n\n /**\n * Compares two Numbers.\n *\n * @param {number} a the first value\n * @param {number} b the second value\n * @return {number} the result\n */\n static compareNumbers(a, b) {\n if (a < b) {\n return -1;\n }\n if (a > b) {\n return 1;\n }\n return 0;\n }\n\n // convert to small integer for v8 optimisation\n static smi(int) {\n return ((int >>> 1) & 0x40000000) | (int & 0xBFFFFFFF);\n }\n\n // calculate 32 bit hash of a number and convert to SMI\n static hash(number) {\n if (number !== number || number === Infinity) {\n return 0;\n }\n let result = number;\n while (number > 0xFFFFFFFF) {\n number /= 0xFFFFFFFF;\n result ^= number;\n }\n return MathUtil.smi(result);\n }\n\n // default hashCode calculation for a number sequence as mentioned by Joshua Bloch\n static hashCode(...numbers) {\n let result = 17;\n for (const n of numbers) {\n result = (result << 5) - result + MathUtil.hash(n);\n }\n return MathUtil.hash(result);\n }\n}\n\nMathUtil.MAX_SAFE_INTEGER = MAX_SAFE_INTEGER;\nMathUtil.MIN_SAFE_INTEGER = MIN_SAFE_INTEGER;\n\n","/**\n * @copyright (c) 2016, Philipp Thürwächter & Pattrick Hüper\n * @license BSD-3-Clause (see LICENSE in the root directory of this source tree)\n */\n/***\n * Base class for a pseudo enum\n */\nexport class Enum {\n constructor(name){\n this._name = name;\n }\n\n equals(other){\n return this === other;\n }\n\n toString() {\n return this._name;\n }\n\n /**\n * toJSON() use by JSON.stringify\n * delegates to toString()\n *\n * @return {string}\n */\n toJSON() {\n return this.toString();\n }\n}\n","/*\n * @copyright (c) 2016, Philipp Thürwächter & Pattrick Hüper\n * @copyright (c) 2007-present, Stephen Colebourne & Michael Nascimento Santos\n * @license BSD-3-Clause (see LICENSE in the root directory of this source tree)\n */\n\nimport { abstractMethodFail } from '../assert';\n\n/**\n * Framework-level interface defining an amount of time, such as\n * \"6 hours\", \"8 days\" or \"2 years and 3 months\".\n *\n * This is the base interface type for amounts of time.\n * An amount is distinct from a date or time-of-day in that it is not tied\n * to any specific point on the time-line.\n *\n * The amount can be thought of as a {@link Map} of {@link TemporalUnit} to\n * `long`, exposed via {@link getUnits} and {@link get}.\n * A simple case might have a single unit-value pair, such as \"6 hours\".\n * A more complex case may have multiple unit-value pairs, such as\n * \"7 years, 3 months and 5 days\".\n *\n * There are two common implementations.\n * {@link Period} is a date-based implementation, storing years, months and days.\n * {@link Duration} is a time-based implementation, storing seconds and nanoseconds,\n * but providing some access using other duration based units such as minutes,\n * hours and fixed 24-hour days.\n *\n * This interface is a framework-level interface that should not be widely\n * used in application code. Instead, applications should create and pass\n * around instances of concrete types, such as {@link Period} and {@link Duration}.\n *\n * @interface\n */\nexport class TemporalAmount {\n /**\n * Returns the value of the requested unit.\n * The units returned from {@link getUnits} uniquely define the\n * value of the {@link TemporalAmount}. A value must be returned\n * for each unit listed in {@link getUnits}.\n *\n * @implSpec\n * Implementations may declare support for units not listed by {@link getUnits}.\n * Typically, the implementation would define additional units\n * as conversions for the convenience of developers.\n *\n * @param {TemporalUnit} unit - the {@link TemporalUnit} for which to return the value\n * @return {number} the long value of the unit\n * @throws DateTimeException if a value for the unit cannot be obtained\n * @throws UnsupportedTemporalTypeException if the {@link unit} is not supported\n */\n // eslint-disable-next-line no-unused-vars\n get(unit) {\n abstractMethodFail('get');\n }\n \n /**\n * Returns the list of units uniquely defining the value of this TemporalAmount.\n * The list of {@link TemporalUnits} is defined by the implementation class.\n * The list is a snapshot of the units at the time {@link getUnits}\n * is called and is not mutable.\n * The units are ordered from longest duration to the shortest duration\n * of the unit.\n *\n * @implSpec\n * The list of units completely and uniquely represents the\n * state of the object without omissions, overlaps or duplication.\n * The units are in order from longest duration to shortest.\n *\n * @return {TemporalUnit[]} the List of {@link TemporalUnits}; not null\n */\n units() {\n abstractMethodFail('units');\n }\n \n /**\n * Adds to the specified temporal object.\n *\n * Adds the amount to the specified temporal object using the logic\n * encapsulated in the implementing class.\n *\n * There are two equivalent ways of using this method.\n * The first is to invoke this method directly.\n * The second is to use {@link Temporal#plus}:\n *
\n     *   // These two lines are equivalent, but the second approach is recommended\n     *   dateTime = amount.addTo(dateTime);\n     *   dateTime = dateTime.plus(adder);\n     * 
\n * It is recommended to use the second approach, {@link plus},\n * as it is a lot clearer to read in code.\n *\n * @implSpec\n * The implementation must take the input object and add to it.\n * The implementation defines the logic of the addition and is responsible for\n * documenting that logic. It may use any method on {@link Temporal} to\n * query the temporal object and perform the addition.\n * The returned object must have the same observable type as the input object\n *\n * The input object must not be altered.\n * Instead, an adjusted copy of the original must be returned.\n * This provides equivalent, safe behavior for immutable and mutable temporal objects.\n *\n * The input temporal object may be in a calendar system other than ISO.\n * Implementations may choose to document compatibility with other calendar systems,\n * or reject non-ISO temporal objects by querying the chronology (see {@link TemporalQueries#chronology}).\n *\n * This method may be called from multiple threads in parallel.\n * It must be thread-safe when invoked.\n *\n * @param {Temporal} temporal - the temporal object to add the amount to, not null\n * @return {Temporal} an object of the same observable type with the addition made, not null\n * @throws DateTimeException if unable to add\n * @throws ArithmeticException if numeric overflow occurs\n */\n // eslint-disable-next-line no-unused-vars\n addTo(temporal) {\n abstractMethodFail('addTo');\n }\n \n /**\n * Subtracts this object from the specified temporal object.\n *\n * Subtracts the amount from the specified temporal object using the logic\n * encapsulated in the implementing class.\n *\n * There are two equivalent ways of using this method.\n * The first is to invoke this method directly.\n * The second is to use {@link Temporal#minus}:\n *
\n     *   // these two lines are equivalent, but the second approach is recommended\n     *   dateTime = amount.subtractFrom(dateTime);\n     *   dateTime = dateTime.minus(amount);\n     * 
\n * It is recommended to use the second approach, {@link minus},\n * as it is a lot clearer to read in code.\n *\n * @implSpec\n * The implementation must take the input object and subtract from it.\n * The implementation defines the logic of the subtraction and is responsible for\n * documenting that logic. It may use any method on {@link Temporal} to\n * query the temporal object and perform the subtraction.\n * The returned object must have the same observable type as the input object\n *\n * The input object must not be altered.\n * Instead, an adjusted copy of the original must be returned.\n * This provides equivalent, safe behavior for immutable and mutable temporal objects.\n *\n * The input temporal object may be in a calendar system other than ISO.\n * Implementations may choose to document compatibility with other calendar systems,\n * or reject non-ISO temporal objects by querying the chronology (see {@link TemporalQueries#chronology}).\n *\n * This method may be called from multiple threads in parallel.\n * It must be thread-safe when invoked.\n *\n * @param {Temporal} temporal - the temporal object to subtract the amount from, not null\n * @return {Temporal} an object of the same observable type with the subtraction made, not null\n * @throws DateTimeException if unable to subtract\n * @throws ArithmeticException if numeric overflow occurs\n */\n // eslint-disable-next-line no-unused-vars\n subtractFrom(temporal) {\n abstractMethodFail('subtractFrom');\n }\n \n}\n\nif (typeof Symbol !== 'undefined' && Symbol.toPrimitive) {\n TemporalAmount.prototype[Symbol.toPrimitive] = function (hint) {\n // hint could be 'number', 'string' or 'default'. Only 'number'\n // should throw and 'default' is treated as 'string'.\n if (hint !== 'number') {\n return this.toString();\n }\n\n throw new TypeError(\n 'A conversion from TemporalAmount to a number is not allowed. ' +\n 'To compare use the methods .equals(), .compareTo(), .isBefore() ' +\n 'or one that is more suitable to your use case.'\n );\n };\n}\n","/*\n * @copyright (c) 2016, Philipp Thürwächter & Pattrick Hüper\n * @copyright (c) 2007-present, Stephen Colebourne & Michael Nascimento Santos\n * @license BSD-3-Clause (see LICENSE in the root directory of this source tree)\n */\n\nimport { abstractMethodFail } from '../assert';\n\n/**\n * A unit of date-time, such as Days or Hours.\n *\n * Measurement of time is built on units, such as years, months, days, hours, minutes and seconds.\n * Implementations of this interface represent those units.\n *\n * An instance of this interface represents the unit itself, rather than an amount of the unit.\n * See {@link Period} for a class that represents an amount in terms of the common units.\n *\n * The most commonly used units are defined in {@link ChronoUnit}.\n * Further units are supplied in {@link IsoFields}.\n * Units can also be written by application code by implementing this interface.\n *\n * The unit works using double dispatch. Client code calls methods on a date-time like\n * {@link LocalDateTime} which check if the unit is a {@link ChronoUnit}.\n * If it is, then the date-time must handle it.\n * Otherwise, the method call is re-dispatched to the matching method in this interface.\n *\n * @interface\n */\nexport class TemporalUnit {\n /**\n * Gets the duration of this unit, which may be an estimate.\n *\n * All units return a duration measured in standard nanoseconds from this method.\n * The duration will be positive and non-zero.\n * For example, an hour has a duration of `60 * 60 * 1,000,000,000 ns`.\n *\n * Some units may return an accurate duration while others return an estimate.\n * For example, days have an estimated duration due to the possibility of\n * daylight saving time changes.\n * To determine if the duration is an estimate, use {@link isDurationEstimated}.\n *\n * @return {Duration} the duration of this unit, which may be an estimate.\n */\n duration() {\n abstractMethodFail('duration');\n }\n\n /**\n * Checks if the duration of the unit is an estimate.\n *\n * All units have a duration, however the duration is not always accurate.\n * For example, days have an estimated duration due to the possibility of\n * daylight saving time changes.\n * This method returns true if the duration is an estimate and false if it is\n * accurate. Note that accurate/estimated ignores leap seconds.\n *\n * @return {boolean} `true` if the duration is estimated, `false` if accurate.\n */\n isDurationEstimated() {\n abstractMethodFail('isDurationEstimated');\n }\n\n /**\n * Checks if this unit is date-based.\n *\n * @return {boolean} `true` if date unit, `false` if a time unit.\n */\n isDateBased() {\n abstractMethodFail('isDateBased');\n }\n\n /**\n * Checks if this unit is time-based.\n *\n * @return {boolean} `true` if time unit, `false` if a date unit.\n */\n isTimeBased() {\n abstractMethodFail('isTimeBased');\n }\n\n //-----------------------------------------------------------------------\n /**\n * Checks if this unit is supported by the specified temporal object.\n *\n * This checks that the implementing date-time can add/subtract this unit.\n * This can be used to avoid throwing an exception.\n *\n * @param {!Temporal} temporal the temporal object to check.\n * @return {boolean} `true` if the unit is supported.\n */\n // eslint-disable-next-line no-unused-vars\n isSupportedBy(temporal) {\n abstractMethodFail('isSupportedBy');\n }\n\n /**\n * Returns a copy of the specified temporal object with the specified period added.\n *\n * The period added is a multiple of this unit. For example, this method\n * could be used to add \"3 days\" to a date by calling this method on the\n * instance representing \"days\", passing the date and the period \"3\".\n * The period to be added may be negative, which is equivalent to subtraction.\n *\n * There are two equivalent ways of using this method.\n * The first is to invoke this method directly.\n * The second is to use {@link Temporal#plus}:\n *
\n     *   // these two lines are equivalent, but the second approach is recommended\n     *   temporal = thisUnit.doPlus(temporal);\n     *   temporal = temporal.plus(thisUnit);\n     * 
\n * It is recommended to use the second approach, {@link plus},\n * as it is a lot clearer to read in code.\n *\n * Implementations should perform any queries or calculations using the units\n * available in {@link ChronoUnit} or the fields available in {@link ChronoField}.\n * If the field is not supported a {@link DateTimeException} must be thrown.\n *\n * Implementations must not alter the specified temporal object.\n * Instead, an adjusted copy of the original must be returned.\n * This provides equivalent, safe behavior for immutable and mutable implementations.\n *\n * @param {!Temporal} dateTime the temporal object to adjust.\n * @param {number} periodToAdd the period of this unit to add, positive or negative.\n * @return {Temporal} the adjusted temporal object.\n * @throws DateTimeException if the period cannot be added.\n */\n // eslint-disable-next-line no-unused-vars\n addTo(dateTime, periodToAdd) {\n abstractMethodFail('addTo');\n }\n\n //-----------------------------------------------------------------------\n /**\n * Calculates the period in terms of this unit between two temporal objects of the same type.\n *\n * This calculates the period between two temporals in terms of this unit.\n * The start and end points are supplied as temporal objects and must be of the same type.\n * The result will be negative if the end is before the start.\n * For example, the period in hours between two temporal objects can be calculated\n * using {@link HOURS.between}.\n *\n * The calculation returns a whole number, representing the number of complete units between the two temporals.\n * For example, the period in hours between the times 11:30 and 13:29 will only be\n * one hour as it is one minute short of two hours.\n *\n * There are two equivalent ways of using this method.\n * The first is to invoke this method directly.\n * The second is to use {@link Temporal#until}:\n *
\n     *   // these two lines are equivalent\n     *   between = thisUnit.between(start, end);\n     *   between = start.until(end, thisUnit);\n     * 
\n * The choice should be made based on which makes the code more readable.\n *\n * For example, this method allows the number of days between two dates to be calculated:\n *
\n     *   long daysBetween = DAYS.between(start, end);\n     *   // or alternatively\n     *   long daysBetween = start.until(end, DAYS);\n     * 
\n * Implementations should perform any queries or calculations using the units available in\n * {@link ChronoUnit} or the fields available in {@link ChronoField}.\n * If the unit is not supported a {@link DateTimeException} must be thrown.\n * Implementations must not alter the specified temporal objects.\n *\n * @param {!Temporal} temporal1 the base temporal object.\n * @param {!Temporal} temporal2 the other temporal object.\n * @return {number} the period between temporal1 and temporal2 in terms of this unit;\n * positive if temporal2 is later than temporal1, negative if earlier.\n * @throws DateTimeException if the period cannot be calculated.\n * @throws ArithmeticException if numeric overflow occurs.\n */\n // eslint-disable-next-line no-unused-vars\n between(temporal1, temporal2) {\n abstractMethodFail('between');\n }\n}\n","/**\n * @copyright (c) 2016, Philipp Thürwächter & Pattrick Hüper\n * @copyright (c) 2007-present, Stephen Colebourne & Michael Nascimento Santos\n * @license BSD-3-Clause (see LICENSE in the root directory of this source tree)\n */\nimport { requireNonNull, requireInstance } from './assert';\nimport { ArithmeticException, DateTimeParseException, UnsupportedTemporalTypeException } from './errors';\nimport { MathUtil, MAX_SAFE_INTEGER, MIN_SAFE_INTEGER } from './MathUtil';\n\nimport { ChronoField } from './temporal/ChronoField';\nimport { ChronoUnit } from './temporal/ChronoUnit';\nimport { TemporalAmount } from './temporal/TemporalAmount';\nimport { TemporalUnit } from './temporal/TemporalUnit';\n\nimport { LocalTime } from './LocalTime';\n\n/**\n * A time-based amount of time, such as '34.5 seconds'.\n *\n * This class models a quantity or amount of time in terms of seconds and nanoseconds.\n * It can be accessed using other duration-based units, such as minutes and hours.\n * In addition, the {@link ChronoUnit#DAYS} unit can be used and is treated as\n * exactly equal to 24 hours, thus ignoring daylight savings effects.\n * See {@link Period} for the date-based equivalent to this class.\n *\n * A physical duration could be of infinite length.\n * For practicality, the duration is stored with constraints similar to {@link Instant}.\n * The duration uses nanosecond resolution with a maximum value of the seconds that can\n * be held in a `long`. This is greater than the current estimated age of the universe.\n *\n * The range of a duration requires the storage of a number larger than a `long`.\n * To achieve this, the class stores a `long` representing seconds and an `int`\n * representing nanosecond-of-second, which will always be between 0 and 999,999,999.\n *\n * The duration is measured in \"seconds\", but these are not necessarily identical to\n * the scientific \"SI second\" definition based on atomic clocks.\n * This difference only impacts durations measured near a leap-second and should not affect\n * most applications.\n * See {@link Instant} for a discussion as to the meaning of the second and time-scales.\n *\n * ### Static properties of Class {@link Duration}\n *\n * Duration.ZERO\n *\n * Constant for a duration of zero.\n *\n */\nexport class Duration extends TemporalAmount /*implements TemporalAmount, Comparable, Serializable */ {\n\n /**\n * Constructs an instance of {@link Duration} using seconds and nanoseconds.\n *\n * @param {Number} seconds - the length of the duration in seconds, positive or negative\n * @param {Number} nanos - the nanoseconds within the second, from 0 to 999,999,999\n * @private\n */\n constructor(seconds, nanos) {\n super();\n this._seconds = MathUtil.safeToInt(seconds);\n this._nanos = MathUtil.safeToInt(nanos);\n }\n\n //-----------------------------------------------------------------------\n /**\n * Obtains an instance of {@link Duration} from a number of standard 24 hour days.\n *\n * The seconds are calculated based on the standard definition of a day,\n * where each day is 86400 seconds which implies a 24 hour day.\n * The nanosecond in second field is set to zero.\n *\n * @param {Number} days - the number of days, positive or negative\n * @return {!Duration}\n * @throws ArithmeticException if the input days exceeds the capacity of {@link Duration}\n */\n static ofDays(days) {\n return Duration._create(MathUtil.safeMultiply(days, LocalTime.SECONDS_PER_DAY), 0);\n }\n\n /**\n * Obtains an instance of {@link Duration} from a number of standard hours.\n *\n * The seconds are calculated based on the standard definition of an hour,\n * where each hour is 3600 seconds.\n * The nanosecond in second field is set to zero.\n *\n * @param {Number} hours - the number of hours, positive or negative\n * @return {!Duration}\n * @throws ArithmeticException if the input hours exceeds the capacity of {@link Duration}\n */\n static ofHours(hours) {\n return Duration._create(MathUtil.safeMultiply(hours, LocalTime.SECONDS_PER_HOUR), 0);\n }\n\n /**\n * Obtains an instance of {@link Duration} from a number of standard minutes.\n *\n * The seconds are calculated based on the standard definition of a minute,\n * where each minute is 60 seconds.\n * The nanosecond in second field is set to zero.\n *\n * @param {Number} minutes - the number of minutes, positive or negative\n * @return {!Duration}\n * @throws ArithmeticException if the input minutes exceeds the capacity of {@link Duration}\n */\n static ofMinutes(minutes) {\n return Duration._create(MathUtil.safeMultiply(minutes, LocalTime.SECONDS_PER_MINUTE), 0);\n }\n\n //-----------------------------------------------------------------------\n /**\n * Obtains an instance of {@link Duration} from a number of seconds\n * and an adjustment in nanoseconds.\n *\n * This method allows an arbitrary number of nanoseconds to be passed in.\n * The factory will alter the values of the second and nanosecond in order\n * to ensure that the stored nanosecond is in the range 0 to 999,999,999.\n * For example, the following will result in the exactly the same duration:\n *
\n     *  Duration.ofSeconds(3, 1);\n     *  Duration.ofSeconds(4, -999_999_999);\n     *  Duration.ofSeconds(2, 1000_000_001);\n     * 
\n *\n * @param {Number} seconds - the number of seconds, positive or negative\n * @param {Number} nanoAdjustment the nanosecond adjustment to the number of seconds, positive or negative\n * @return {!Duration}\n * @throws ArithmeticException if the adjustment causes the seconds to exceed the capacity of {@link Duration}\n */\n static ofSeconds(seconds, nanoAdjustment = 0) {\n const secs = MathUtil.safeAdd(seconds, MathUtil.floorDiv(nanoAdjustment, LocalTime.NANOS_PER_SECOND));\n const nos = MathUtil.floorMod(nanoAdjustment, LocalTime.NANOS_PER_SECOND);\n return Duration._create(secs, nos);\n }\n\n //-----------------------------------------------------------------------\n /**\n * Obtains an instance of {@link Duration} from a number of milliseconds.\n *\n * The seconds and nanoseconds are extracted from the specified milliseconds.\n *\n * @param {Number} millis - the number of milliseconds, positive or negative\n * @return {!Duration}\n */\n static ofMillis(millis) {\n let secs = MathUtil.intDiv(millis, 1000);\n let mos = MathUtil.intMod(millis, 1000);\n if (mos < 0) {\n mos += 1000;\n secs--;\n }\n return Duration._create(secs, mos * 1000000);\n }\n\n //-----------------------------------------------------------------------\n /**\n * Obtains an instance of {@link Duration} from a number of nanoseconds.\n *\n * The seconds and nanoseconds are extracted from the specified nanoseconds.\n *\n * @param {Number} nanos - the number of nanoseconds, positive or negative\n * @return {!Duration}\n */\n static ofNanos(nanos) {\n let secs = MathUtil.intDiv(nanos, LocalTime.NANOS_PER_SECOND);\n let nos = MathUtil.intMod(nanos, LocalTime.NANOS_PER_SECOND);\n if (nos < 0) {\n nos += LocalTime.NANOS_PER_SECOND;\n secs--;\n }\n return this._create(secs, nos);\n }\n\n //-----------------------------------------------------------------------\n /**\n * Obtains an instance of {@link Duration} from a duration in the specified unit.\n *\n * The parameters represent the two parts of a phrase like '6 Hours'. For example:\n *
\n     *  Duration.of(3, SECONDS);\n     *  Duration.of(465, HOURS);\n     * 
\n * Only a subset of units are accepted by this method.\n * The unit must either have an exact duration (see {@link TemporalUnit#isDurationEstimated}) or\n * be {@link ChronoUnit#DAYS} which is treated as 24 hours. Other units throw an exception.\n *\n * @param {Number} amount - the amount of the duration, measured in terms of the unit, positive or negative\n * @param {TemporalUnit} unit - the unit that the duration is measured in, must have an exact duration, not null\n * @return {!Duration}\n * @throws DateTimeException if the period unit has an estimated duration\n * @throws ArithmeticException if a numeric overflow occurs\n */\n static of(amount, unit) {\n return Duration.ZERO.plus(amount, unit);\n }\n\n //-----------------------------------------------------------------------\n /**\n * Obtains an instance of {@link Duration} from an amount.\n *\n * This obtains a duration based on the specified amount.\n * A TemporalAmount represents an amount of time, which may be date-based\n * or time-based, which this factory extracts to a duration.\n *\n * The conversion loops around the set of units from the amount and uses\n * the duration of the unit to calculate the total Duration.\n * Only a subset of units are accepted by this method.\n * The unit must either have an exact duration or be ChronoUnit.DAYS which\n * is treated as 24 hours. If any other units are found then an exception is thrown.\n *\n * @param {TemporalAmount} amount - the temporal amount to convert, not null\n * @return {Duration} the resulting duration, not null\n * @throws DateTimeException if the amount cannot be converted\n * @throws ArithmeticException if a numeric overflow occurs\n */\n static from(amount) {\n requireNonNull(amount, 'amount');\n requireInstance(amount, TemporalAmount);\n let duration = Duration.ZERO;\n amount.units().forEach((unit) => {\n duration = duration.plus(amount.get(unit), unit);\n });\n return duration;\n }\n\n /**\n * Obtains an instance of {@link Duration} representing the duration between two instants.\n *\n * Obtains a {@link Duration} representing the duration between two instants.\n * This calculates the duration between two temporal objects of the same type.\n * The difference in seconds is calculated using {@link Temporal#until}.\n * The difference in nanoseconds is calculated using by querying the\n * {@link ChronoField#NANO_OF_SECOND} field.\n *\n * The result of this method can be a negative period if the end is before the start.\n * To guarantee to obtain a positive duration call abs() on the result.\n *\n * @param {Temporal} startInclusive - the start instant, inclusive, not null\n * @param {Temporal} endExclusive - the end instant, exclusive, not null\n * @return {!Duration}\n * @throws DateTimeException if the seconds between the temporals cannot be obtained\n * @throws ArithmeticException if the calculation exceeds the capacity of {@link Duration}\n */\n static between(startInclusive, endExclusive) {\n requireNonNull(startInclusive, 'startInclusive');\n requireNonNull(endExclusive, 'endExclusive');\n let secs = startInclusive.until(endExclusive, ChronoUnit.SECONDS);\n let nanos = 0;\n if (startInclusive.isSupported(ChronoField.NANO_OF_SECOND) && endExclusive.isSupported(ChronoField.NANO_OF_SECOND)) {\n try {\n const startNos = startInclusive.getLong(ChronoField.NANO_OF_SECOND);\n nanos = endExclusive.getLong(ChronoField.NANO_OF_SECOND) - startNos;\n if (secs > 0 && nanos < 0) {\n nanos += LocalTime.NANOS_PER_SECOND;\n } else if (secs < 0 && nanos > 0) {\n nanos -= LocalTime.NANOS_PER_SECOND;\n } else if (secs === 0 && nanos !== 0) {\n // two possible meanings for result, so recalculate secs\n const adjustedEnd = endExclusive.with(ChronoField.NANO_OF_SECOND, startNos);\n secs = startInclusive.until(adjustedEnd, ChronoUnit.SECONDS);\n }\n } catch (e) {\n // ignore and only use seconds\n }\n }\n return this.ofSeconds(secs, nanos);\n }\n\n //-----------------------------------------------------------------------\n /**\n * Obtains a {@link Duration} from a text string such as {@link PnDTnHnMn.nS}.\n *\n * This will parse a textual representation of a duration, including the\n * string produced by {@link toString}. The formats accepted are based\n * on the ISO-8601 duration format {@link PnDTnHnMn.nS} with days\n * considered to be exactly 24 hours.\n *\n * The string starts with an optional sign, denoted by the ASCII negative\n * or positive symbol. If negative, the whole period is negated.\n * The ASCII letter \"P\" is next in upper or lower case.\n * There are then four sections, each consisting of a number and a suffix.\n * The sections have suffixes in ASCII of \"D\", \"H\", \"M\" and \"S\" for\n * days, hours, minutes and seconds, accepted in upper or lower case.\n * The suffixes must occur in order. The ASCII letter \"T\" must occur before\n * the first occurrence, if any, of an hour, minute or second section.\n * At least one of the four sections must be present, and if \"T\" is present\n * there must be at least one section after the \"T\".\n * The number part of each section must consist of one or more ASCII digits.\n * The number may be prefixed by the ASCII negative or positive symbol.\n * The number of days, hours and minutes must parse to a `long`.\n * The number of seconds must parse to a `long` with optional fraction.\n * The decimal point may be either a dot or a comma.\n * The fractional part may have from zero to 9 digits.\n *\n * The leading plus/minus sign, and negative values for other units are\n * not part of the ISO-8601 standard.\n *\n * Examples:\n *
\n     *    \"PT20.345S\" -> parses as \"20.345 seconds\"\n     *    \"PT15M\"     -> parses as \"15 minutes\" (where a minute is 60 seconds)\n     *    \"PT10H\"     -> parses as \"10 hours\" (where an hour is 3600 seconds)\n     *    \"P2D\"       -> parses as \"2 days\" (where a day is 24 hours or 86400 seconds)\n     *    \"P2DT3H4M\"  -> parses as \"2 days, 3 hours and 4 minutes\"\n     *    \"P-6H3M\"    -> parses as \"-6 hours and +3 minutes\"\n     *    \"-P6H3M\"    -> parses as \"-6 hours and -3 minutes\"\n     *    \"-P-6H+3M\"  -> parses as \"+6 hours and -3 minutes\"\n     * 
\n *\n * @param {String} text - the text to parse, not null\n * @return {Duration} the parsed duration, not null\n * @throws DateTimeParseException if the text cannot be parsed to a duration\n */\n static parse(text) {\n requireNonNull(text, 'text');\n /**\n * The pattern for parsing.\n */\n const PATTERN = new RegExp('([-+]?)P(?:([-+]?[0-9]+)D)?(T(?:([-+]?[0-9]+)H)?(?:([-+]?[0-9]+)M)?(?:([-+]?[0-9]+)(?:[.,]([0-9]{0,9}))?S)?)?', 'i');\n const matches = PATTERN.exec(text);\n if (matches !== null) {\n // check for letter T but no time sections\n if ('T' === matches[3] === false) {\n const negate = '-' === matches[1];\n const dayMatch = matches[2];\n const hourMatch = matches[4];\n const minuteMatch = matches[5];\n const secondMatch = matches[6];\n const fractionMatch = matches[7];\n if (dayMatch != null || hourMatch != null || minuteMatch != null || secondMatch != null) {\n const daysAsSecs = Duration._parseNumber(text, dayMatch, LocalTime.SECONDS_PER_DAY, 'days');\n const hoursAsSecs = Duration._parseNumber(text, hourMatch, LocalTime.SECONDS_PER_HOUR, 'hours');\n const minsAsSecs = Duration._parseNumber(text, minuteMatch, LocalTime.SECONDS_PER_MINUTE, 'minutes');\n const seconds = Duration._parseNumber(text, secondMatch, 1, 'seconds');\n const negativeSecs = secondMatch != null && secondMatch.charAt(0) === '-';\n const nanos = Duration._parseFraction(text, fractionMatch, negativeSecs ? -1 : 1);\n try {\n return Duration._create(negate, daysAsSecs, hoursAsSecs, minsAsSecs, seconds, nanos);\n } catch (ex) {\n throw new DateTimeParseException('Text cannot be parsed to a Duration: overflow', text, 0, ex);\n }\n }\n }\n }\n throw new DateTimeParseException('Text cannot be parsed to a Duration', text, 0);\n }\n\n static _parseNumber(text, parsed, multiplier, errorText) {\n // regex limits to [-+]?[0-9]+\n if (parsed == null) {\n return 0;\n }\n try {\n if (parsed[0] === '+') {\n parsed = parsed.substring(1);\n }\n return MathUtil.safeMultiply(parseFloat(parsed), multiplier);\n } catch (ex) {\n throw new DateTimeParseException(`Text cannot be parsed to a Duration: ${errorText}`, text, 0, ex);\n }\n }\n\n static _parseFraction(text, parsed, negate) {\n // regex limits to [0-9]{0,9}\n if (parsed == null || parsed.length === 0) {\n return 0;\n }\n parsed = (`${parsed}000000000`).substring(0, 9);\n return parseFloat(parsed) * negate;\n }\n\n //-----------------------------------------------------------------------\n /**\n * to handle function overriding this function accepts any number of arguments, checks their type and delegates to the appropriate\n * function\n *\n * @return {Duration}\n */\n static _create() {\n if (arguments.length <= 2) {\n return Duration._createSecondsNanos(arguments[0], arguments[1]);\n } else {\n return Duration._createNegateDaysHoursMinutesSecondsNanos(arguments[0], arguments[1], arguments[2], arguments[3], arguments[4], arguments[5]);\n }\n }\n\n static _createNegateDaysHoursMinutesSecondsNanos(negate, daysAsSecs, hoursAsSecs, minsAsSecs, secs, nanos) {\n const seconds = MathUtil.safeAdd(daysAsSecs, MathUtil.safeAdd(hoursAsSecs, MathUtil.safeAdd(minsAsSecs, secs)));\n if (negate) {\n return Duration.ofSeconds(seconds, nanos).negated();\n }\n return Duration.ofSeconds(seconds, nanos);\n }\n\n /**\n * Obtains an instance of {@link Duration} using seconds and nanoseconds.\n *\n * @param {Number} seconds - the length of the duration in seconds, positive or negative\n * @param {Number} nanoAdjustment - the nanosecond adjustment within the second, from 0 to 999,999,999\n */\n static _createSecondsNanos(seconds = 0, nanoAdjustment = 0) {\n if (seconds === 0 && nanoAdjustment === 0) {\n return Duration.ZERO;\n }\n return new Duration(seconds, nanoAdjustment);\n }\n\n //-----------------------------------------------------------------------\n /**\n * Gets the value of the requested unit.\n *\n * This returns a value for each of the two supported units,\n * {@link ChronoUnit#SECONDS} and {@link ChronoUnit#NANOS}.\n * All other units throw an exception.\n *\n * @param {TemporalUnit} unit the {@link TemporalUnit} for which to return the value\n * @return {number} the const value of the unit\n * @throws DateTimeException if the unit is not supported\n * @throws UnsupportedTemporalTypeException if the unit is not supported\n */\n get(unit) {\n if (unit === ChronoUnit.SECONDS) {\n return this._seconds;\n } else if (unit === ChronoUnit.NANOS) {\n return this._nanos;\n } else {\n throw new UnsupportedTemporalTypeException(`Unsupported unit: ${unit}`);\n }\n }\n\n units() {\n return [ChronoUnit.SECONDS, ChronoUnit.NANOS];\n }\n\n //-----------------------------------------------------------------------\n /**\n * Checks if this duration is zero length.\n *\n * A {@link Duration} represents a directed distance between two points on\n * the time-line and can therefore be positive, zero or negative.\n * This method checks whether the length is zero.\n *\n * @return {boolean} true if this duration has a total length equal to zero\n */\n isZero() {\n return this._seconds === 0 && this._nanos === 0;\n }\n\n /**\n * Checks if this duration is negative, excluding zero.\n *\n * A {@link Duration} represents a directed distance between two points on\n * the time-line and can therefore be positive, zero or negative.\n * This method checks whether the length is less than zero.\n *\n * @return {boolean} true if this duration has a total length less than zero\n */\n isNegative() {\n return this._seconds < 0;\n }\n\n //-----------------------------------------------------------------------\n /**\n * Gets the number of seconds in this duration.\n *\n * The length of the duration is stored using two fields - seconds and nanoseconds.\n * The nanoseconds part is a value from 0 to 999,999,999 that is an adjustment to\n * the length in seconds.\n * The total duration is defined by calling this method and {@link getNano}.\n *\n * A {@link Duration} represents a directed distance between two points on the time-line.\n * A negative duration is expressed by the negative sign of the seconds part.\n * A duration of -1 nanosecond is stored as -1 seconds plus 999,999,999 nanoseconds.\n *\n * @return {number} the whole seconds part of the length of the duration, positive or negative\n */\n seconds() {\n return this._seconds;\n }\n\n /**\n * Gets the number of nanoseconds within the second in this duration.\n *\n * The length of the duration is stored using two fields - seconds and nanoseconds.\n * The nanoseconds part is a value from 0 to 999,999,999 that is an adjustment to\n * the length in seconds.\n * The total duration is defined by calling this method and {@link getSeconds}.\n *\n * A {@link Duration} represents a directed distance between two points on the time-line.\n * A negative duration is expressed by the negative sign of the seconds part.\n * A duration of -1 nanosecond is stored as -1 seconds plus 999,999,999 nanoseconds.\n *\n * @return {number} the nanoseconds within the second part of the length of the duration, from 0 to 999,999,999\n */\n nano() {\n return this._nanos;\n }\n\n //-----------------------------------------------------------------------\n /**\n * Returns a copy of this duration with the specified amount of seconds.\n *\n * This returns a duration with the specified seconds, retaining the\n * nano-of-second part of this duration.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {Number} seconds - the seconds to represent, may be negative\n * @return {Duration} based on this period with the requested seconds, not null\n */\n withSeconds(seconds) {\n return Duration._create(seconds, this._nanos);\n }\n\n /**\n * Returns a copy of this duration with the specified nano-of-second.\n *\n * This returns a duration with the specified nano-of-second, retaining the\n * seconds part of this duration.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {Number} nanoOfSecond - the nano-of-second to represent, from 0 to 999,999,999\n * @return {Duration} based on this period with the requested nano-of-second, not null\n * @throws DateTimeException if the nano-of-second is invalid\n */\n withNanos(nanoOfSecond) {\n ChronoField.NANO_OF_SECOND.checkValidIntValue(nanoOfSecond);\n return Duration._create(this._seconds, nanoOfSecond);\n }\n\n //-----------------------------------------------------------------------\n /**\n * Returns a copy of this duration with the specified duration added.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {Duration} duration - the duration to add, positive or negative, not null\n * @return {Duration} based on this duration with the specified duration added, not null\n * @throws ArithmeticException if numeric overflow occurs\n */\n plusDuration(duration) {\n requireNonNull(duration, 'duration');\n return this.plus(duration.seconds(), duration.nano());\n }\n\n\n /**\n * function overloading for {@link Duration.plus}\n *\n * if called with 1 arguments, then {@link Duration.plusDuration} is executed.\n *\n * if called with 2 arguments and second argument is an instance of TemporalUnit, then {@link Duration.plusAmountUnit} is executed.\n *\n * Otherwise {@link Duration.plusSecondsNanos} is executed.\n *\n * @param {!(Duration|number)} durationOrNumber\n * @param {!TemporalUnit|number} unitOrNumber\n * @returns {Duration}\n */\n plus(durationOrNumber, unitOrNumber) {\n if (arguments.length === 1) {\n return this.plusDuration(durationOrNumber);\n }\n else if (arguments.length === 2 && unitOrNumber instanceof TemporalUnit) {\n return this.plusAmountUnit(durationOrNumber, unitOrNumber);\n } else {\n return this.plusSecondsNanos(durationOrNumber, unitOrNumber);\n }\n }\n\n /**\n * Returns a copy of this duration with the specified duration added.\n *\n * The duration amount is measured in terms of the specified unit.\n * Only a subset of units are accepted by this method.\n * The unit must either have an exact duration (see {@link TemporalUnit#isDurationEstimated}) or\n * be {@link ChronoUnit#DAYS} which is treated as 24 hours. Other units throw an exception.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {Number} amountToAdd - the amount to add, measured in terms of the unit, positive or negative\n * @param {TemporalUnit} unit - the unit that the amount is measured in, must have an exact duration, not null\n * @return {Duration} based on this duration with the specified duration added, not null\n * @throws UnsupportedTemporalTypeException if the unit is not supported\n * @throws ArithmeticException if numeric overflow occurs\n */\n plusAmountUnit(amountToAdd, unit) {\n requireNonNull(amountToAdd, 'amountToAdd');\n requireNonNull(unit, 'unit');\n if (unit === ChronoUnit.DAYS) {\n return this.plusSecondsNanos(MathUtil.safeMultiply(amountToAdd, LocalTime.SECONDS_PER_DAY), 0);\n }\n if (unit.isDurationEstimated()) {\n throw new UnsupportedTemporalTypeException('Unit must not have an estimated duration');\n }\n if (amountToAdd === 0) {\n return this;\n }\n if (unit instanceof ChronoUnit) {\n switch (unit) {\n case ChronoUnit.NANOS: return this.plusNanos(amountToAdd);\n case ChronoUnit.MICROS: return this.plusSecondsNanos(MathUtil.intDiv(amountToAdd, (1000000 * 1000)) * 1000, MathUtil.intMod(amountToAdd, (1000000 * 1000)) * 1000);\n case ChronoUnit.MILLIS: return this.plusMillis(amountToAdd);\n case ChronoUnit.SECONDS: return this.plusSeconds(amountToAdd);\n }\n return this.plusSecondsNanos(MathUtil.safeMultiply(unit.duration().seconds(), amountToAdd), 0);\n }\n const duration = unit.duration().multipliedBy(amountToAdd);\n return this.plusSecondsNanos(duration.seconds(), duration.nano());\n }\n\n //-----------------------------------------------------------------------\n /**\n * Returns a copy of this duration with the specified duration in 24 hour days added.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {Number} daysToAdd - the days to add, positive or negative\n * @return {Duration} based on this duration with the specified days added, not null\n * @throws ArithmeticException if numeric overflow occurs\n */\n plusDays(daysToAdd) {\n return this.plusSecondsNanos(MathUtil.safeMultiply(daysToAdd, LocalTime.SECONDS_PER_DAY), 0);\n }\n\n /**\n * Returns a copy of this duration with the specified duration in hours added.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {Number} hoursToAdd - the hours to add, positive or negative\n * @return {Duration} based on this duration with the specified hours added, not null\n * @throws ArithmeticException if numeric overflow occurs\n */\n plusHours(hoursToAdd) {\n return this.plusSecondsNanos(MathUtil.safeMultiply(hoursToAdd, LocalTime.SECONDS_PER_HOUR), 0);\n }\n\n /**\n * Returns a copy of this duration with the specified duration in minutes added.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {Number} minutesToAdd - the minutes to add, positive or negative\n * @return {Duration} based on this duration with the specified minutes added, not null\n * @throws ArithmeticException if numeric overflow occurs\n */\n plusMinutes(minutesToAdd) {\n return this.plusSecondsNanos(MathUtil.safeMultiply(minutesToAdd, LocalTime.SECONDS_PER_MINUTE), 0);\n }\n\n /**\n * Returns a copy of this duration with the specified duration in seconds added.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {Number} secondsToAdd - the seconds to add, positive or negative\n * @return {Duration} based on this duration with the specified seconds added, not null\n * @throws ArithmeticException if numeric overflow occurs\n */\n plusSeconds(secondsToAdd) {\n return this.plusSecondsNanos(secondsToAdd, 0);\n }\n\n /**\n * Returns a copy of this duration with the specified duration in milliseconds added.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {Number} millisToAdd - the milliseconds to add, positive or negative\n * @return {Duration} based on this duration with the specified milliseconds added, not null\n * @throws ArithmeticException if numeric overflow occurs\n */\n plusMillis(millisToAdd) {\n return this.plusSecondsNanos(MathUtil.intDiv(millisToAdd, 1000), MathUtil.intMod(millisToAdd, 1000) * 1000000);\n }\n\n /**\n * Returns a copy of this duration with the specified duration in nanoseconds added.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {Number} nanosToAdd - the nanoseconds to add, positive or negative\n * @return {Duration} based on this duration with the specified nanoseconds added, not null\n * @throws ArithmeticException if numeric overflow occurs\n */\n plusNanos(nanosToAdd) {\n return this.plusSecondsNanos(0, nanosToAdd);\n }\n\n /**\n * Returns a copy of this duration with the specified duration added.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {Number} secondsToAdd - the seconds to add, positive or negative\n * @param {Number} nanosToAdd - the nanos to add, positive or negative\n * @return {Duration} based on this duration with the specified seconds added, not null\n * @throws ArithmeticException if numeric overflow occurs\n */\n plusSecondsNanos(secondsToAdd, nanosToAdd) {\n requireNonNull(secondsToAdd, 'secondsToAdd');\n requireNonNull(nanosToAdd, 'nanosToAdd');\n if (secondsToAdd === 0 && nanosToAdd === 0) {\n return this;\n }\n let epochSec = MathUtil.safeAdd(this._seconds, secondsToAdd);\n epochSec = MathUtil.safeAdd(epochSec, MathUtil.intDiv(nanosToAdd, LocalTime.NANOS_PER_SECOND));\n nanosToAdd = MathUtil.intMod(nanosToAdd, LocalTime.NANOS_PER_SECOND);\n const nanoAdjustment = MathUtil.safeAdd(this._nanos, nanosToAdd); // safe int+LocalTime.NANOS_PER_SECOND\n return Duration.ofSeconds(epochSec, nanoAdjustment);\n }\n\n //-----------------------------------------------------------------------\n /**\n * function overloading for {@link Duration.minus}\n *\n * if called with 1 arguments and first argument is an instance of Duration, then {@link Duration.minusDuration} is executed.\n *\n * Otherwise {@link Duration.minusAmountUnit} is executed.\n *\n * @param {!(Duration|number)} durationOrNumber\n * @param {?TemporalUnit} unit\n * @return {Duration}\n */\n minus(durationOrNumber, unit) {\n if (arguments.length === 1) {\n return this.minusDuration(durationOrNumber);\n } else {\n return this.minusAmountUnit(durationOrNumber, unit);\n }\n }\n\n /**\n * Returns a copy of this duration with the specified duration subtracted.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {Duration} duration - the duration to subtract, positive or negative, not null\n * @return {Duration} based on this duration with the specified duration subtracted, not null\n * @throws ArithmeticException if numeric overflow occurs\n */\n minusDuration(duration) {\n requireNonNull(duration, 'duration');\n const secsToSubtract = duration.seconds();\n const nanosToSubtract = duration.nano();\n if (secsToSubtract === MIN_SAFE_INTEGER) {\n return this.plus(MAX_SAFE_INTEGER, -nanosToSubtract);\n }\n return this.plus(-secsToSubtract, -nanosToSubtract);\n }\n\n /**\n * Returns a copy of this duration with the specified duration subtracted.\n *\n * The duration amount is measured in terms of the specified unit.\n * Only a subset of units are accepted by this method.\n * The unit must either have an exact duration (see {@link TemporalUnit#isDurationEstimated}) or\n * be {@link ChronoUnit#DAYS} which is treated as 24 hours. Other units throw an exception.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {Number} amountToSubtract - the amount to subtract, measured in terms of the unit, positive or negative\n * @param {TemporalUnit} unit - the unit that the amount is measured in, must have an exact duration, not null\n * @return {Duration} based on this duration with the specified duration subtracted, not null\n * @throws ArithmeticException if numeric overflow occurs\n */\n minusAmountUnit(amountToSubtract, unit) {\n requireNonNull(amountToSubtract, 'amountToSubtract');\n requireNonNull(unit, 'unit');\n return (amountToSubtract === MIN_SAFE_INTEGER ? this.plusAmountUnit(MAX_SAFE_INTEGER, unit) : this.plusAmountUnit(-amountToSubtract, unit));\n }\n\n //-----------------------------------------------------------------------\n /**\n * Returns a copy of this duration with the specified duration in 24 hour days subtracted.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {Number} daysToSubtract - the days to subtract, positive or negative\n * @return {Duration} based on this duration with the specified days subtracted, not null\n * @throws ArithmeticException if numeric overflow occurs\n */\n minusDays(daysToSubtract) {\n return (daysToSubtract === MIN_SAFE_INTEGER ? this.plusDays(MAX_SAFE_INTEGER) : this.plusDays(-daysToSubtract));\n }\n\n /**\n * Returns a copy of this duration with the specified duration in hours subtracted.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {Number} hoursToSubtract - the hours to subtract, positive or negative\n * @return {Duration} based on this duration with the specified hours subtracted, not null\n * @throws ArithmeticException if numeric overflow occurs\n */\n minusHours(hoursToSubtract) {\n return (hoursToSubtract === MIN_SAFE_INTEGER ? this.plusHours(MAX_SAFE_INTEGER) : this.plusHours(-hoursToSubtract));\n }\n\n /**\n * Returns a copy of this duration with the specified duration in minutes subtracted.\n *\n * The number of hours is multiplied by 60 to obtain the number of seconds to subtract.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {Number} minutesToSubtract - the minutes to subtract, positive or negative\n * @return {Duration} based on this duration with the specified minutes subtracted, not null\n * @throws ArithmeticException if numeric overflow occurs\n */\n minusMinutes(minutesToSubtract) {\n return (minutesToSubtract === MIN_SAFE_INTEGER ? this.plusMinutes(MAX_SAFE_INTEGER) : this.plusMinutes(-minutesToSubtract));\n }\n\n /**\n * Returns a copy of this duration with the specified duration in seconds subtracted.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {Number} secondsToSubtract - the seconds to subtract, positive or negative\n * @return {Duration} based on this duration with the specified seconds subtracted, not null\n * @throws ArithmeticException if numeric overflow occurs\n */\n minusSeconds(secondsToSubtract) {\n return (secondsToSubtract === MIN_SAFE_INTEGER ? this.plusSeconds(MAX_SAFE_INTEGER) : this.plusSeconds(-secondsToSubtract));\n }\n\n /**\n * Returns a copy of this duration with the specified duration in milliseconds subtracted.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {Number} millisToSubtract - the milliseconds to subtract, positive or negative\n * @return {Duration} based on this duration with the specified milliseconds subtracted, not null\n * @throws ArithmeticException if numeric overflow occurs\n */\n minusMillis(millisToSubtract) {\n return (millisToSubtract === MIN_SAFE_INTEGER ? this.plusMillis(MAX_SAFE_INTEGER) : this.plusMillis(-millisToSubtract));\n }\n\n /**\n * Returns a copy of this duration with the specified duration in nanoseconds subtracted.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {Number} nanosToSubtract - the nanoseconds to subtract, positive or negative\n * @return {Duration} based on this duration with the specified nanoseconds subtracted, not null\n * @throws ArithmeticException if numeric overflow occurs\n */\n minusNanos(nanosToSubtract) {\n return (nanosToSubtract === MIN_SAFE_INTEGER ? this.plusNanos(MAX_SAFE_INTEGER) : this.plusNanos(-nanosToSubtract));\n }\n\n //-----------------------------------------------------------------------\n /**\n * Returns a copy of this duration multiplied by the scalar.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {Number} multiplicand - the value to multiply the duration by, positive or negative\n * @return {Duration} based on this duration multiplied by the specified scalar, not null\n * @throws ArithmeticException if numeric overflow occurs\n */\n multipliedBy(multiplicand) {\n if (multiplicand === 0) {\n return Duration.ZERO;\n }\n if (multiplicand === 1) {\n return this;\n }\n let secs = MathUtil.safeMultiply(this._seconds, multiplicand);\n let nos = MathUtil.safeMultiply(this._nanos, multiplicand);\n secs = secs + MathUtil.intDiv(nos, LocalTime.NANOS_PER_SECOND);\n nos = MathUtil.intMod(nos, LocalTime.NANOS_PER_SECOND);\n return Duration.ofSeconds(secs, nos);\n }\n\n /**\n * Returns a copy of this duration divided by the specified value.\n *\n * In opposite to the threeten implementation the division is realized by floating point not by\n * fixed point arithmetic. Expect floating point rounding errors for {@link Duration.dividedBy}.\n *\n * @param {Number} divisor - the value to divide the duration by, positive or negative, not zero\n * @return {Duration} based on this duration divided by the specified divisor, not null\n * @throws ArithmeticException if the divisor is zero or if numeric overflow occurs\n */\n dividedBy(divisor) {\n if (divisor === 0) {\n throw new ArithmeticException('Cannot divide by zero');\n }\n if (divisor === 1) {\n return this;\n }\n const secs = MathUtil.intDiv(this._seconds, divisor);\n const secsMod = MathUtil.roundDown(((this._seconds/ divisor) - secs) * LocalTime.NANOS_PER_SECOND);\n let nos = MathUtil.intDiv(this._nanos, divisor);\n nos = secsMod + nos;\n return Duration.ofSeconds(secs, nos);\n }\n\n //-----------------------------------------------------------------------\n /**\n * Returns a copy of this duration with the length negated.\n *\n * This method swaps the sign of the total length of this duration.\n * For example, {@link PT1.3S} will be returned as {@link PT-1.3S}.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @return {Duration} based on this duration with the amount negated, not null\n * @throws ArithmeticException if numeric overflow occurs\n */\n negated() {\n return this.multipliedBy(-1);\n }\n\n /**\n * Returns a copy of this duration with a positive length.\n *\n * This method returns a positive duration by effectively removing the sign from any negative total length.\n * For example, {@link PT-1.3S} will be returned as {@link PT1.3S}.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @return {Duration} based on this duration with an absolute length, not null\n * @throws ArithmeticException if numeric overflow occurs\n */\n abs() {\n return this.isNegative() ? this.negated() : this;\n }\n\n //-------------------------------------------------------------------------\n /**\n * Adds this duration to the specified temporal object.\n *\n * This returns a temporal object of the same observable type as the input\n * with this duration added.\n *\n * In most cases, it is clearer to reverse the calling pattern by using\n * {@link Temporal#plus}.\n *
\n     *   // these two lines are equivalent, but the second approach is recommended\n     *   dateTime = thisDuration.addTo(dateTime);\n     *   dateTime = dateTime.plus(thisDuration);\n     * 
\n *\n * The calculation will add the seconds, then nanos.\n * Only non-zero amounts will be added.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {Temporal} temporal - the temporal object to adjust, not null\n * @return {Temporal} an object of the same type with the adjustment made, not null\n * @throws DateTimeException if unable to add\n * @throws ArithmeticException if numeric overflow occurs\n */\n addTo(temporal) {\n requireNonNull(temporal, 'temporal');\n if (this._seconds !== 0) {\n temporal = temporal.plus(this._seconds, ChronoUnit.SECONDS);\n }\n if (this._nanos !== 0) {\n temporal = temporal.plus(this._nanos, ChronoUnit.NANOS);\n }\n return temporal;\n }\n\n /**\n * Subtracts this duration from the specified temporal object.\n *\n * This returns a temporal object of the same observable type as the input\n * with this duration subtracted.\n *\n * In most cases, it is clearer to reverse the calling pattern by using\n * {@link Temporal#minus}.\n *
\n     *   // these two lines are equivalent, but the second approach is recommended\n     *   dateTime = thisDuration.subtractFrom(dateTime);\n     *   dateTime = dateTime.minus(thisDuration);\n     * 
\n *\n * The calculation will subtract the seconds, then nanos.\n * Only non-zero amounts will be added.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {Temporal} temporal - the temporal object to adjust, not null\n * @return {Temporal} an object of the same type with the adjustment made, not null\n * @throws DateTimeException if unable to subtract\n * @throws ArithmeticException if numeric overflow occurs\n */\n subtractFrom(temporal) {\n requireNonNull(temporal, 'temporal');\n if (this._seconds !== 0) {\n temporal = temporal.minus(this._seconds, ChronoUnit.SECONDS);\n }\n if (this._nanos !== 0) {\n temporal = temporal.minus(this._nanos, ChronoUnit.NANOS);\n }\n return temporal;\n }\n\n //-----------------------------------------------------------------------\n /**\n * Gets the number of days in this duration.\n *\n * This returns the total number of days in the duration by dividing the\n * number of seconds by 86400.\n * This is based on the standard definition of a day as 24 hours.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @return {number} the number of days in the duration, may be negative\n */\n toDays() {\n return MathUtil.intDiv(this._seconds, LocalTime.SECONDS_PER_DAY);\n }\n\n /**\n * Gets the number of hours in this duration.\n *\n * This returns the total number of hours in the duration by dividing the\n * number of seconds by 3600.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @return {number} the number of hours in the duration, may be negative\n */\n toHours() {\n return MathUtil.intDiv(this._seconds, LocalTime.SECONDS_PER_HOUR);\n }\n\n /**\n * Gets the number of minutes in this duration.\n *\n * This returns the total number of minutes in the duration by dividing the\n * number of seconds by 60.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @return {number} the number of minutes in the duration, may be negative\n */\n toMinutes() {\n return MathUtil.intDiv(this._seconds, LocalTime.SECONDS_PER_MINUTE);\n }\n\n /**\n * Converts this duration to the total length in milliseconds.\n *\n * If this duration is too large to fit in a `long` milliseconds, then an\n * exception is thrown.\n *\n * If this duration has greater than millisecond precision, then the conversion\n * will drop any excess precision information as though the amount in nanoseconds\n * was subject to integer division by one million.\n *\n * @return {number} the total length of the duration in milliseconds\n * @throws ArithmeticException if numeric overflow occurs\n */\n toMillis() {\n let millis = Math.round(MathUtil.safeMultiply(this._seconds, 1000));\n millis = MathUtil.safeAdd(millis, MathUtil.intDiv(this._nanos, 1000000));\n return millis;\n }\n\n /**\n * Converts this duration to the total length in nanoseconds expressed as a `long`.\n *\n * If this duration is too large to fit in a `long` nanoseconds, then an\n * exception is thrown.\n *\n * @return {number} the total length of the duration in nanoseconds\n * @throws ArithmeticException if numeric overflow occurs\n */\n toNanos() {\n let totalNanos = MathUtil.safeMultiply(this._seconds, LocalTime.NANOS_PER_SECOND);\n totalNanos = MathUtil.safeAdd(totalNanos, this._nanos);\n return totalNanos;\n }\n\n //-----------------------------------------------------------------------\n /**\n * Compares this duration to the specified {@link Duration}.\n *\n * The comparison is based on the total length of the durations.\n *\n * @param {Duration} otherDuration - the other duration to compare to, not null\n * @return {number} the comparator value, negative if less, positive if greater\n */\n compareTo(otherDuration) {\n requireNonNull(otherDuration, 'otherDuration');\n requireInstance(otherDuration, Duration, 'otherDuration');\n const cmp = MathUtil.compareNumbers(this._seconds, otherDuration.seconds());\n if (cmp !== 0) {\n return cmp;\n }\n return this._nanos - otherDuration.nano();\n }\n\n //-----------------------------------------------------------------------\n /**\n * Checks if this duration is equal to the specified {@link Duration}.\n *\n * The comparison is based on the total length of the durations.\n *\n * @param {*} otherDuration - the other duration, null returns false\n * @return {boolean} true if the other duration is equal to this one\n */\n equals(otherDuration) {\n if (this === otherDuration) {\n return true;\n }\n if (otherDuration instanceof Duration) {\n return this.seconds() === otherDuration.seconds() &&\n this.nano() === otherDuration.nano();\n }\n return false;\n }\n\n //-----------------------------------------------------------------------\n /**\n * A string representation of this duration using ISO-8601 seconds\n * based representation, such as {@link PT8H6M12.345S}.\n *\n * The format of the returned string will be {@link PTnHnMnS}, where n is\n * the relevant hours, minutes or seconds part of the duration.\n * Any fractional seconds are placed after a decimal point in the seconds section.\n * If a section has a zero value, it is omitted.\n * The hours, minutes and seconds will all have the same sign.\n *\n * Examples:\n *
\n     *    \"20.345 seconds\"                 -> \"PT20.345S\n     *    \"15 minutes\" (15 * 60 seconds)   -> \"PT15M\"\n     *    \"10 hours\" (10 * 3600 seconds)   -> \"PT10H\"\n     *    \"2 days\" (2 * 86400 seconds)     -> \"PT48H\"\n     * 
\n * Note that multiples of 24 hours are not output as days to avoid confusion\n * with {@link Period}.\n *\n * @return {string} an ISO-8601 representation of this duration, not null\n */\n toString() {\n if (this === Duration.ZERO) {\n return 'PT0S';\n }\n const hours = MathUtil.intDiv(this._seconds, LocalTime.SECONDS_PER_HOUR);\n const minutes = MathUtil.intDiv(MathUtil.intMod(this._seconds, LocalTime.SECONDS_PER_HOUR), LocalTime.SECONDS_PER_MINUTE);\n const secs = MathUtil.intMod(this._seconds, LocalTime.SECONDS_PER_MINUTE);\n let rval = 'PT';\n if (hours !== 0) {\n rval += `${hours}H`;\n }\n if (minutes !== 0) {\n rval += `${minutes}M`;\n }\n if (secs === 0 && this._nanos === 0 && rval.length > 2) {\n return rval;\n }\n if (secs < 0 && this._nanos > 0) {\n if (secs === -1) {\n rval += '-0';\n } else {\n rval += secs + 1;\n }\n } else {\n rval += secs;\n }\n if (this._nanos > 0) {\n rval += '.';\n let nanoString;\n if (secs < 0) {\n nanoString = `${2 * LocalTime.NANOS_PER_SECOND - this._nanos}`;\n } else {\n nanoString = `${LocalTime.NANOS_PER_SECOND + this._nanos}`;\n }\n // remove the leading '1'\n nanoString = nanoString.slice(1, nanoString.length);\n rval += nanoString;\n while (rval.charAt(rval.length - 1) === '0') {\n rval = rval.slice(0, rval.length - 1);\n }\n }\n rval += 'S';\n return rval;\n }\n\n /**\n *\n * @return {string} same as {@link Duration.toString}\n */\n toJSON() {\n return this.toString();\n }\n\n}\n\nexport function _init() {\n /**\n * Constant for a duration of zero.\n */\n Duration.ZERO = new Duration(0, 0);\n}\n","/*\n * @copyright (c) 2016, Philipp Thürwächter & Pattrick Hüper\n * @license BSD-3-Clause (see LICENSE.md in the root directory of this source tree)\n */\n\n/**\n * attempt to avoid dependency cycles... define all constants here and they could be used\n * so instead of using e.g. Year.MAX_VALUE we could use YearConstants.MAX_VALUE to avoid the cycle\n */\nexport class YearConstants {}\n\nexport function _init() {\n /**\n * The minimum supported year\n */\n YearConstants.MIN_VALUE = -999999;\n /**\n * The maximum supported year\n */\n YearConstants.MAX_VALUE = 999999;\n}\n","/**\n * @copyright (c) 2016, Philipp Thürwächter & Pattrick Hüper\n * @copyright (c) 2007-present, Stephen Colebourne & Michael Nascimento Santos\n * @license BSD-3-Clause (see LICENSE in the root directory of this source tree)\n */\n\nimport { MathUtil } from '../MathUtil';\n\nimport { Duration } from '../Duration';\nimport { YearConstants } from '../YearConstants';\nimport { TemporalUnit } from './TemporalUnit';\n\n/**\n * A standard set of date periods units.\n *\n * This set of units provide unit-based access to manipulate a date, time or date-time.\n * The standard set of units can be extended by implementing {@link TemporalUnit}.\n *\n * These units are intended to be applicable in multiple calendar systems.\n * For example, most non-ISO calendar systems define units of years, months and days,\n * just with slightly different rules.\n * The documentation of each unit explains how it operates.\n *\n * ### Static properties:\n * \n * - `ChronoUnit.CENTURIES`: Unit that represents the concept of a century. For the ISO calendar\n * system, it is equal to 100 years.\n * \n * - `ChronoUnit.DAYS`: Unit that represents the concept of a day. For the ISO calendar system, it\n * is the standard day from midnight to midnight. The estimated duration of a day is 24 Hours.\n * \n * - `ChronoUnit.DECADES`: Unit that represents the concept of a decade. For the ISO calendar system,\n * it is equal to 10 years.\n * \n * - `ChronoUnit.ERAS`: Unit that represents the concept of an era. The ISO calendar system doesn't\n * have eras thus it is impossible to add an era to a date or date-time. The estimated duration of the\n * era is artificially defined as 1,000,000,000 Years.\n * \n * - `ChronoUnit.FOREVER`: Artificial unit that represents the concept of forever. This is primarily\n * used with {@link TemporalField} to represent unbounded fields such as the year or era. The\n * estimated duration of the era is artificially defined as the largest duration supported by\n * {@link Duration}.\n * \n * - `ChronoUnit.HALF_DAYS`: Unit that represents the concept of half a day, as used in AM/PM. For\n * the ISO calendar system, it is equal to 12 hours.\n *\n * - `ChronoUnit.HOURS`: Unit that represents the concept of an hour. For the ISO calendar system,\n * it is equal to 60 minutes.\n * \n * - `ChronoUnit.MICROS`: Unit that represents the concept of a microsecond. For the ISO calendar\n * system, it is equal to the 1,000,000th part of the second unit.\n * \n * - `ChronoUnit.MILLENNIA`: Unit that represents the concept of a millennium. For the ISO calendar\n * system, it is equal to 1,000 years.\n * \n * - `ChronoUnit.MILLIS`: Unit that represents the concept of a millisecond. For the ISO calendar\n * system, it is equal to the 1000th part of the second unit.\n * \n * - `ChronoUnit.MINUTES`: Unit that represents the concept of a minute. For the ISO calendar system,\n * it is equal to 60 seconds.\n * \n * - `ChronoUnit.MONTHS`: Unit that represents the concept of a month. For the ISO calendar system,\n * the length of the month varies by month-of-year. The estimated duration of a month is one twelfth\n * of 365.2425 Days.\n * \n * - `ChronoUnit.NANOS`: Unit that represents the concept of a nanosecond, the smallest supported unit\n * of time. For the ISO calendar system, it is equal to the 1,000,000,000th part of the second unit.\n * \n * - `ChronoUnit.SECONDS`: Unit that represents the concept of a second. For the ISO calendar system,\n * it is equal to the second in the SI system of units, except around a leap-second.\n * \n * - `ChronoUnit.WEEKS`: Unit that represents the concept of a week. For the ISO calendar system,\n * it is equal to 7 Days.\n * \n * - `ChronoUnit.YEARS`: Unit that represents the concept of a year. For the ISO calendar system, it\n * is equal to 12 months. The estimated duration of a year is 365.2425 Days.\n */\nexport class ChronoUnit extends TemporalUnit {\n\n /**\n *\n * @param {String} name\n * @param {Duration} estimatedDuration\n * @private\n */\n constructor (name, estimatedDuration) {\n super();\n this._name = name;\n this._duration = estimatedDuration;\n }\n\n //-----------------------------------------------------------------------\n /**\n * @return {Duration} the duration of this unit, which may be an estimate.\n */\n duration() {\n return this._duration;\n }\n\n /**\n * @return {boolean} `true` if the duration is estimated, `false` if accurate.\n */\n isDurationEstimated() {\n return this.isDateBased() || this === ChronoUnit.FOREVER;\n }\n\n //-----------------------------------------------------------------------\n /**\n * @return {boolean} `true` if date unit, `false` if a time unit.\n */\n isDateBased() {\n return this.compareTo(ChronoUnit.DAYS) >= 0 && this !== ChronoUnit.FOREVER;\n }\n\n /**\n * Checks if this unit is a time unit.\n *\n * @return {boolean} `true` if time unit, `false` if a date unit.\n */\n isTimeBased() {\n return this.compareTo(ChronoUnit.DAYS) < 0;\n }\n\n //-----------------------------------------------------------------------\n /**\n * @param {!Temporal} temporal the temporal object to check.\n * @return {boolean} `true` if the unit is supported.\n */\n isSupportedBy(temporal) {\n if (this === ChronoUnit.FOREVER) {\n return false;\n }\n /* TODO: classes not implemented yet */\n /*\n if (temporal instanceof ChronoLocalDate) {\n return isDateBased();\n }\n if (temporal instanceof ChronoLocalDateTime || temporal instanceof ChronoZonedDateTime) {\n return true;\n }\n*/\n try {\n temporal.plus(1, this);\n return true;\n } catch (e) {\n try {\n temporal.plus(-1, this);\n return true;\n } catch (e2) {\n return false;\n }\n }\n }\n\n /**\n * @param {!Temporal} temporal the temporal object to adjust.\n * @param {number} amount the period of this unit to add, positive or negative.\n * @return {Temporal} the adjusted temporal object.\n * @throws DateTimeException if the period cannot be added.\n */\n addTo(temporal, amount) {\n return temporal.plus(amount, this);\n }\n\n //-----------------------------------------------------------------------\n /**\n * @param {!Temporal} temporal1 the base temporal object.\n * @param {!Temporal} temporal2 the other temporal object.\n * @return {number} the period between temporal1 and temporal2 in terms of this unit;\n * positive if temporal2 is later than temporal1, negative if earlier.\n * @throws DateTimeException if the period cannot be calculated.\n * @throws ArithmeticException if numeric overflow occurs.\n */\n between(temporal1, temporal2) {\n return temporal1.until(temporal2, this);\n }\n\n //-----------------------------------------------------------------------\n toString() {\n return this._name;\n }\n\n /**\n * Compares this ChronoUnit to the specified {@link TemporalUnit}.\n *\n * The comparison is based on the total length of the durations.\n *\n * @param {!TemporalUnit} other the other unit to compare to.\n * @return the comparator value, negative if less, positive if greater.\n */\n compareTo(other) {\n return this.duration().compareTo(other.duration());\n }\n\n}\n\nexport function _init() {\n /**\n * Unit that represents the concept of a nanosecond, the smallest supported unit of time.\n * For the ISO calendar system, it is equal to the 1,000,000,000th part of the second unit.\n */\n ChronoUnit.NANOS = new ChronoUnit('Nanos', Duration.ofNanos(1));\n /**\n * Unit that represents the concept of a microsecond.\n * For the ISO calendar system, it is equal to the 1,000,000th part of the second unit.\n */\n ChronoUnit.MICROS = new ChronoUnit('Micros', Duration.ofNanos(1000));\n /**\n * Unit that represents the concept of a millisecond.\n * For the ISO calendar system, it is equal to the 1000th part of the second unit.\n */\n ChronoUnit.MILLIS = new ChronoUnit('Millis', Duration.ofNanos(1000000));\n /**\n * Unit that represents the concept of a second.\n * For the ISO calendar system, it is equal to the second in the SI system\n * of units, except around a leap-second.\n */\n ChronoUnit.SECONDS = new ChronoUnit('Seconds', Duration.ofSeconds(1));\n /**\n * Unit that represents the concept of a minute.\n * For the ISO calendar system, it is equal to 60 seconds.\n */\n ChronoUnit.MINUTES = new ChronoUnit('Minutes', Duration.ofSeconds(60));\n /**\n * Unit that represents the concept of an hour.\n * For the ISO calendar system, it is equal to 60 minutes.\n */\n ChronoUnit.HOURS = new ChronoUnit('Hours', Duration.ofSeconds(3600));\n /**\n * Unit that represents the concept of half a day, as used in AM/PM.\n * For the ISO calendar system, it is equal to 12 hours.\n */\n ChronoUnit.HALF_DAYS = new ChronoUnit('HalfDays', Duration.ofSeconds(43200));\n /**\n * Unit that represents the concept of a day.\n * For the ISO calendar system, it is the standard day from midnight to midnight.\n * The estimated duration of a day is 24 hours.\n *\n * When used with other calendar systems it must correspond to the day defined by\n * the rising and setting of the Sun on Earth. It is not required that days begin\n * at midnight - when converting between calendar systems, the date should be\n * equivalent at midday.\n */\n ChronoUnit.DAYS = new ChronoUnit('Days', Duration.ofSeconds(86400));\n /**\n * Unit that represents the concept of a week.\n * For the ISO calendar system, it is equal to 7 days.\n *\n * When used with other calendar systems it must correspond to an integral number of days.\n */\n ChronoUnit.WEEKS = new ChronoUnit('Weeks', Duration.ofSeconds(7 * 86400));\n /**\n * Unit that represents the concept of a month.\n * For the ISO calendar system, the length of the month varies by month-of-year.\n * The estimated duration of a month is one twelfth of 365.2425 days.\n *\n * When used with other calendar systems it must correspond to an integral number of days.\n */\n ChronoUnit.MONTHS = new ChronoUnit('Months', Duration.ofSeconds(31556952 / 12));\n /**\n * Unit that represents the concept of a year.\n * For the ISO calendar system, it is equal to 12 months.\n * The estimated duration of a year is 365.2425 days.\n *\n * When used with other calendar systems it must correspond to an integral number of days\n * or months roughly equal to a year defined by the passage of the Earth around the Sun.\n */\n ChronoUnit.YEARS = new ChronoUnit('Years', Duration.ofSeconds(31556952));\n /**\n * Unit that represents the concept of a decade.\n * For the ISO calendar system, it is equal to 10 years.\n *\n * When used with other calendar systems it must correspond to an integral number of days\n * and is normally an integral number of years.\n */\n ChronoUnit.DECADES = new ChronoUnit('Decades', Duration.ofSeconds(31556952 * 10));\n /**\n * Unit that represents the concept of a century.\n * For the ISO calendar system, it is equal to 100 years.\n *\n * When used with other calendar systems it must correspond to an integral number of days\n * and is normally an integral number of years.\n */\n ChronoUnit.CENTURIES = new ChronoUnit('Centuries', Duration.ofSeconds(31556952 * 100));\n /**\n * Unit that represents the concept of a millennium.\n * For the ISO calendar system, it is equal to 1000 years.\n *\n * When used with other calendar systems it must correspond to an integral number of days\n * and is normally an integral number of years.\n */\n ChronoUnit.MILLENNIA = new ChronoUnit('Millennia', Duration.ofSeconds(31556952 * 1000));\n /**\n * Unit that represents the concept of an era.\n * The ISO calendar system doesn't have eras thus it is impossible to add\n * an era to a date or date-time.\n * The estimated duration of the era is artificially defined as {Year.MAX_VALUE} + 1.\n *\n * When used with other calendar systems there are no restrictions on the unit.\n */\n ChronoUnit.ERAS = new ChronoUnit('Eras', Duration.ofSeconds(31556952 * (YearConstants.MAX_VALUE + 1)));\n /**\n * Artificial unit that represents the concept of forever.\n * This is primarily used with {@link TemporalField} to represent unbounded fields\n * such as the year or era.\n * The estimated duration of the era is artificially defined as the largest duration\n * supported by {@link Duration}.\n */\n ChronoUnit.FOREVER = new ChronoUnit('Forever', Duration.ofSeconds(MathUtil.MAX_SAFE_INTEGER, 999999999));\n}\n","import { abstractMethodFail } from '../assert';\n\n/**\n * @copyright (c) 2016, Philipp Thürwächter & Pattrick Hüper\n * @copyright (c) 2007-present, Stephen Colebourne & Michael Nascimento Santos\n * @license BSD-3-Clause (see LICENSE in the root directory of this source tree)\n */\n\n/**\n * A field of date-time, such as month-of-year or hour-of-minute.\n *\n * Date and time is expressed using fields which partition the time-line into something\n * meaningful for humans. Implementations of this interface represent those fields.\n *\n * The most commonly used units are defined in {@link ChronoField}.\n * Further fields are supplied in {@link IsoFields}, {@link WeekFields} and {@link JulianFields}.\n * Fields can also be written by application code by implementing this interface.\n *\n * The field works using double dispatch. Client code calls methods on a date-time like\n * {@link LocalDateTime} which check if the field is a {@link ChronoField}.\n * If it is, then the date-time must handle it.\n * Otherwise, the method call is re-dispatched to the matching method in this interface.\n *\n * @interface\n */\nexport class TemporalField {\n /**\n * Checks if this field represents a component of a date.\n *\n * @return {boolean} `true` if it is a component of a date, `false` otherwise.\n */\n isDateBased() {\n abstractMethodFail('isDateBased');\n }\n\n /**\n * Checks if this field represents a component of a time.\n *\n * @return {boolean} `true` if it is a component of a time, `false` otherwise.\n */\n isTimeBased() {\n abstractMethodFail('isTimeBased');\n }\n\n /**\n * Gets the unit that the field is measured in.\n *\n * The unit of the field is the period that varies within the range.\n * For example, in the field 'MonthOfYear', the unit is 'Months'.\n * See also {@link rangeUnit}.\n *\n * @return {TemporalUnit} the period unit defining the base unit of the field.\n */\n baseUnit() {\n abstractMethodFail('baseUnit');\n }\n\n /**\n * Gets the range that the field is bound by.\n * \n * The range of the field is the period that the field varies within.\n * For example, in the field 'MonthOfYear', the range is 'Years'.\n * See also {@link baseUnit}.\n * \n * The range is never null. For example, the 'Year' field is shorthand for\n * 'YearOfForever'. It therefore has a unit of 'Years' and a range of 'Forever'.\n *\n * @return {TemporalUnit} the period unit defining the range of the field.\n */\n rangeUnit() {\n abstractMethodFail('rangeUnit');\n }\n\n /**\n * Gets the range of valid values for the field.\n *\n * All fields can be expressed as an integer.\n * This method returns an object that describes the valid range for that value.\n * This method is generally only applicable to the ISO-8601 calendar system.\n *\n * Note that the result only describes the minimum and maximum valid values\n * and it is important not to read too much into them. For example, there\n * could be values within the range that are invalid for the field.\n *\n * @return {ValueRange} the range of valid values for the field.\n */\n range() {\n abstractMethodFail('range');\n }\n\n /**\n * Get the range of valid values for this field using the temporal object to\n * refine the result.\n *\n * This uses the temporal object to find the range of valid values for the field.\n * This is similar to {@link range}, however this method refines the result\n * using the temporal. For example, if the field is {@link DAY_OF_MONTH} the\n * {@link range} method is not accurate as there are four possible month lengths,\n * 28, 29, 30 and 31 days. Using this method with a date allows the range to be\n * accurate, returning just one of those four options.\n *\n * There are two equivalent ways of using this method.\n * The first is to invoke this method directly.\n * The second is to use {@link TemporalAccessor#range}:\n *
\n     *   // these two lines are equivalent, but the second approach is recommended\n     *   temporal = thisField.rangeRefinedBy(temporal);\n     *   temporal = temporal.range(thisField);\n     * 
\n * It is recommended to use the second approach, {@link range},\n * as it is a lot clearer to read in code.\n *\n * Implementations should perform any queries or calculations using the fields\n * available in {@link ChronoField}.\n * If the field is not supported a {@link DateTimeException} must be thrown.\n *\n * @param {!TemporalAccessor} temporal the temporal object used to refine the result.\n * @return {ValueRange} the range of valid values for this field.\n * @throws {DateTimeException} if the range for the field cannot be obtained.\n * \n */\n // eslint-disable-next-line no-unused-vars\n rangeRefinedBy(temporal) {\n abstractMethodFail('rangeRefinedBy');\n }\n\n /**\n * Gets the value of this field from the specified temporal object.\n *\n * This queries the temporal object for the value of this field.\n *\n * There are two equivalent ways of using this method.\n * The first is to invoke this method directly.\n * The second is to use {@link TemporalAccessor#get}:\n *
\n     *   // these two lines are equivalent, but the second approach is recommended\n     *   temporal = thisField.getFrom(temporal);\n     *   temporal = temporal.get(thisField);\n     * 
\n * It is recommended to use the second approach, as it is a lot clearer to read in code.\n *\n * Implementations should perform any queries or calculations using the fields\n * available in {@link ChronoField}.\n * If the field is not supported a {@link DateTimeException} must be thrown.\n *\n * @param {!TemporalAccesor} temporal the temporal object to query.\n * @return {number} the value of this field.\n * @throws {DateTimeException} if a value for the field cannot be obtained.\n */\n // eslint-disable-next-line no-unused-vars\n getFrom(temporal) {\n abstractMethodFail('getFrom');\n }\n\n /**\n * Returns a copy of the specified temporal object with the value of this field set.\n *\n * This returns a new temporal object based on the specified one with the value for\n * this field changed. For example, on a {@link LocalDate}, this could be used to\n * set the year, month or day-of-month.\n * The returned object has the same observable type as the specified object.\n *\n * In some cases, changing a field is not fully defined. For example, if the target object is\n * a date representing the 31st January, then changing the month to February would be unclear.\n * In cases like this, the implementation is responsible for resolving the result.\n * Typically it will choose the previous valid date, which would be the last valid\n * day of February in this example.\n *\n * There are two equivalent ways of using this method.\n * The first is to invoke this method directly.\n * The second is to use {@link Temporal#with}:\n *
\n     *   // these two lines are equivalent, but the second approach is recommended\n     *   temporal = thisField.adjustInto(temporal);\n     *   temporal = temporal.with(thisField);\n     * 
\n * It is recommended to use the second approach, `with(temporal)`,\n * as it is a lot clearer to read in code.\n *\n * Implementations should perform any queries or calculations using the fields\n * available in {@link ChronoField}.\n * If the field is not supported a {@link DateTimeException} must be thrown.\n *\n * Implementations must not alter the specified temporal object.\n * Instead, an adjusted copy of the original must be returned.\n * This provides equivalent, safe behavior for immutable and mutable implementations.\n *\n * @param {!Temporal} temporal the temporal object to adjust.\n * @param {!number} newValue the new value of the field.\n * @return {Temporal} the adjusted temporal object.\n * @throws {DateTimeException} if the field cannot be set.\n */\n // eslint-disable-next-line no-unused-vars\n adjustInto(temporal, newValue) {\n abstractMethodFail('adjustInto');\n }\n\n /**\n * Checks if this field is supported by the temporal object.\n *\n * This determines whether the temporal accessor supports this field.\n * If this returns false, the the temporal cannot be queried for this field.\n *\n * There are two equivalent ways of using this method.\n * The first is to invoke this method directly.\n * The second is to use {@link TemporalAccessor#isSupported}:\n *
\n     *   // these two lines are equivalent, but the second approach is recommended\n     *   temporal = thisField.isSupportedBy(temporal);\n     *   temporal = temporal.isSupported(thisField);\n     * 
\n * It is recommended to use the second approach, `isSupported(temporal)`,\n * as it is a lot clearer to read in code.\n *\n * Implementations should determine whether they are supported using the fields\n * available in {@link ChronoField}.\n *\n * @param {!TemporalAccesor} temporal the temporal object to query.\n * @return {boolean} `true` if the date-time can be queried for this field, `false` if not.\n */\n // eslint-disable-next-line no-unused-vars\n isSupportedBy(temporal) {\n abstractMethodFail('isSupportedBy');\n }\n\n /**\n * @return {string}\n */\n displayName(/* TODO: locale */) {\n abstractMethodFail('displayName');\n }\n\n /**\n * @param {*} other\n * @returns {boolean}\n */\n // eslint-disable-next-line no-unused-vars\n equals(other) {\n abstractMethodFail('equals');\n }\n\n /**\n * @returns {string}\n */\n name() {\n abstractMethodFail('name');\n }\n}\n","/**\n * @copyright (c) 2016, Philipp Thürwächter & Pattrick Hüper\n * @copyright (c) 2007-present, Stephen Colebourne & Michael Nascimento Santos\n * @license BSD-3-Clause (see LICENSE in the root directory of this source tree)\n */\n\nimport { assert } from '../assert';\nimport { DateTimeException, IllegalArgumentException } from '../errors';\nimport { MathUtil } from '../MathUtil';\n\n/**\n * The range of valid values for a date-time field.\n *\n * All TemporalField instances have a valid range of values.\n * For example, the ISO day-of-month runs from 1 to somewhere between 28 and 31.\n * This class captures that valid range.\n *\n * It is important to be aware of the limitations of this class.\n * Only the minimum and maximum values are provided.\n * It is possible for there to be invalid values within the outer range.\n * For example, a weird field may have valid values of 1, 2, 4, 6, 7, thus\n * have a range of '1 - 7', despite that fact that values 3 and 5 are invalid.\n *\n * Instances of this class are not tied to a specific field.\n */\nexport class ValueRange {\n\n /**\n *\n * @param {!number} minSmallest\n * @param {!number} minLargest\n * @param {!number} maxSmallest\n * @param {!number} maxLargest\n * @private\n */\n constructor(minSmallest, minLargest, maxSmallest, maxLargest) {\n assert(!(minSmallest > minLargest), `Smallest minimum value '${minSmallest \n }' must be less than largest minimum value '${minLargest}'`, IllegalArgumentException);\n assert(!(maxSmallest > maxLargest), `Smallest maximum value '${maxSmallest \n }' must be less than largest maximum value '${maxLargest}'`, IllegalArgumentException);\n assert(!(minLargest > maxLargest), `Minimum value '${minLargest \n }' must be less than maximum value '${maxLargest}'`, IllegalArgumentException);\n\n this._minSmallest = minSmallest;\n this._minLargest = minLargest;\n this._maxLargest = maxLargest;\n this._maxSmallest = maxSmallest;\n }\n\n /**\n * Is the value range fixed and fully known.\n *\n * For example, the ISO day-of-month runs from 1 to between 28 and 31.\n * Since there is uncertainty about the maximum value, the range is not fixed.\n * However, for the month of January, the range is always 1 to 31, thus it is fixed.\n *\n * @return {boolean} true if the set of values is fixed\n */\n isFixed() {\n return this._minSmallest === this._minLargest && this._maxSmallest === this._maxLargest;\n }\n\n /**\n *\n * @returns {number}\n */\n minimum(){\n return this._minSmallest;\n }\n\n /**\n *\n * @returns {number}\n */\n largestMinimum(){\n return this._minLargest;\n }\n\n /**\n *\n * @returns {number}\n */\n maximum(){\n return this._maxLargest;\n }\n\n /**\n *\n * @returns {number}\n */\n smallestMaximum(){\n return this._maxSmallest;\n }\n\n /**\n *\n * @returns {boolean}\n */\n isValidValue(value) {\n return (this.minimum() <= value && value <= this.maximum());\n }\n\n /**\n *\n * @param {number} value\n * @param {TemporalField} field\n */\n checkValidValue(value, field) {\n let msg;\n if (!this.isValidValue(value)) {\n if (field != null) {\n msg = `Invalid value for ${field} (valid values ${this.toString()}): ${value}`;\n } else {\n msg = `Invalid value (valid values ${this.toString()}): ${value}`;\n }\n return assert(false, msg, DateTimeException);\n }\n return value;\n }\n\n /**\n * Checks that the specified value is valid and fits in an `int`.\n *\n * This validates that the value is within the valid range of values and that\n * all valid values are within the bounds of an `int`.\n * The field is only used to improve the error message.\n *\n * @param {number} value - the value to check\n * @param {TemporalField} field - the field being checked, may be null\n * @return {number} the value that was passed in\n * @see #isValidIntValue(long)\n */\n checkValidIntValue(value, field) {\n if (this.isValidIntValue(value) === false) {\n throw new DateTimeException(`Invalid int value for ${field}: ${value}`);\n }\n return value;\n }\n\n /**\n * Checks if the value is within the valid range and that all values\n * in the range fit in an `int`.\n *\n * This method combines {@link isIntValue} and {@link isValidValue}.\n *\n * @param {number} value - the value to check\n * @return true if the value is valid and fits in an `int`\n */\n isValidIntValue(value) {\n return this.isIntValue() && this.isValidValue(value);\n }\n\n /**\n * Checks if all values in the range fit in an `int`.\n *\n * This checks that all valid values are within the bounds of an `int`.\n *\n * For example, the ISO month-of-year has values from 1 to 12, which fits in an `int`.\n * By comparison, ISO nano-of-day runs from 1 to 86,400,000,000,000 which does not fit in an `int`.\n *\n * This implementation uses {@link getMinimum} and {@link getMaximum}.\n *\n * @return boolean if a valid value always fits in an `int`\n */\n isIntValue() { // should be isSafeIntegerValue\n return this.minimum() >= MathUtil.MIN_SAFE_INTEGER && this.maximum() <= MathUtil.MAX_SAFE_INTEGER;\n }\n\n /**\n * Checks if this range is equal to another range.\n *\n * The comparison is based on the four values, minimum, largest minimum,\n * smallest maximum and maximum.\n * Only objects of type {@link ValueRange} are compared, other types return false.\n *\n * @param {*} other - the object to check, null returns false\n * @return {boolean} true if this is equal to the other range\n */\n equals(other) {\n if (other === this) {\n return true;\n }\n if (other instanceof ValueRange) {\n return this._minSmallest === other._minSmallest && this._minLargest === other._minLargest &&\n this._maxSmallest === other._maxSmallest && this._maxLargest === other._maxLargest;\n }\n return false;\n }\n\n /**\n * A hash code for this range.\n *\n * @return {number} a suitable hash code\n */\n hashCode() {\n return MathUtil.hashCode(this._minSmallest, this._minLargest, this._maxSmallest, this._maxLargest);\n }\n\n /*\n * Outputs this range as a String.\n *\n * The format will be '{min}/{largestMin} - {smallestMax}/{max}',\n * where the largestMin or smallestMax sections may be omitted, together\n * with associated slash, if they are the same as the min or max.\n *\n * @return {string} a string representation of this range, not null\n */\n toString() {\n let str = this.minimum() + (this.minimum() !== this.largestMinimum() ? `/${this.largestMinimum()}` : '');\n str += ' - ';\n str += this.smallestMaximum() + (this.smallestMaximum() !== this.maximum() ? `/${this.maximum()}` : '');\n return str;\n }\n\n /*\n * called with 2 params: Obtains a fixed value range.\n *\n * This factory obtains a range where the minimum and maximum values are fixed.\n * For example, the ISO month-of-year always runs from 1 to 12.\n *\n * @param min the minimum value\n * @param max the maximum value\n * @return the ValueRange for min, max, not null\n\n * called with 3 params: Obtains a variable value range.\n *\n * This factory obtains a range where the minimum value is fixed and the maximum value may vary.\n * For example, the ISO day-of-month always starts at 1, but ends between 28 and 31.\n *\n * @param min the minimum value\n * @param maxSmallest the smallest maximum value\n * @param maxLargest the largest maximum value\n * @return the ValueRange for min, smallest max, largest max, not null\n\n * called with 4 params: Obtains a fully variable value range.\n *\n * This factory obtains a range where both the minimum and maximum value may vary.\n *\n * @param minSmallest the smallest minimum value\n * @param minLargest the largest minimum value\n * @param maxSmallest the smallest maximum value\n * @param maxLargest the largest maximum value\n *\n * @return {ValueRange} the ValueRange for smallest min, largest min, smallest max, largest max, not null\n */\n static of() {\n if (arguments.length === 2) {\n return new ValueRange(arguments[0], arguments[0], arguments[1], arguments[1]);\n } else if (arguments.length === 3) {\n return new ValueRange(arguments[0], arguments[0], arguments[1], arguments[2]);\n } else if (arguments.length === 4) {\n return new ValueRange(arguments[0], arguments[1], arguments[2], arguments[3]);\n } else {\n return assert(false, `Invalid number of arguments ${arguments.length}`, IllegalArgumentException);\n }\n }\n}\n","/**\n * @copyright (c) 2016, Philipp Thürwächter & Pattrick Hüper\n * @copyright (c) 2007-present, Stephen Colebourne & Michael Nascimento Santos\n * @license BSD-3-Clause (see LICENSE in the root directory of this source tree)\n */\n\nimport { MAX_SAFE_INTEGER, MIN_SAFE_INTEGER } from '../MathUtil';\n\nimport { ChronoUnit } from './ChronoUnit';\nimport { TemporalField } from './TemporalField';\nimport { ValueRange } from './ValueRange';\nimport { YearConstants } from '../YearConstants';\n\n/**\n * A standard set of fields.\n *\n * This set of fields provide field-based access to manipulate a date, time or date-time.\n * The standard set of fields can be extended by implementing {@link TemporalField}.\n *\n * These fields are intended to be applicable in multiple calendar systems.\n * For example, most non-ISO calendar systems define dates as a year, month and day,\n * just with slightly different rules.\n * The documentation of each field explains how it operates.\n *\n * ### Static properties:\n *\n * - `ChronoField.ALIGNED_DAY_OF_WEEK_IN_MONTH`: This represents concept of the count of\n * days within the period of a week where the weeks are aligned to the start of the month.\n * This field is typically used with `ALIGNED_WEEK_OF_MONTH`.\n * \n * - `ChronoField.ALIGNED_DAY_OF_WEEK_IN_YEAR`: This represents concept of the count of days\n * within the period of a week where the weeks are aligned to the start of the year.\n * This field is typically used with `ALIGNED_WEEK_OF_YEAR`.\n * \n * - `ChronoField.ALIGNED_WEEK_OF_MONTH`: This represents concept of the count of weeks within\n * the period of a month where the weeks are aligned to the start of the month. This field\n * is typically used with `ALIGNED_DAY_OF_WEEK_IN_MONTH`.\n * \n * - `ChronoField.ALIGNED_WEEK_OF_YEAR`: This represents concept of the count of weeks within\n * the period of a year where the weeks are aligned to the start of the year. This field\n * is typically used with `ALIGNED_DAY_OF_WEEK_IN_YEAR`.\n * \n * - `ChronoField.AMPM_OF_DAY`: This counts the AM/PM within the day, from 0 (AM) to 1 (PM).\n * \n * - `ChronoField.CLOCK_HOUR_OF_AMPM`: This counts the hour within the AM/PM, from 1 to 12.\n * This is the hour that would be observed on a standard 12-hour analog wall clock.\n * \n * - `ChronoField.CLOCK_HOUR_OF_DAY`: This counts the hour within the AM/PM, from 1 to 24.\n * This is the hour that would be observed on a 24-hour analog wall clock.\n * \n * - `ChronoField.DAY_OF_MONTH`: This represents the concept of the day within the month.\n * In the default ISO calendar system, this has values from 1 to 31 in most months.\n * April, June, September, November have days from 1 to 30, while February has days from\n * 1 to 28, or 29 in a leap year.\n * \n * - `ChronoField.DAY_OF_WEEK`: This represents the standard concept of the day of the week.\n * In the default ISO calendar system, this has values from Monday (1) to Sunday (7).\n * The {@link DayOfWeek} class can be used to interpret the result.\n * \n * - `ChronoField.DAY_OF_YEAR`: This represents the concept of the day within the year.\n * In the default ISO calendar system, this has values from 1 to 365 in standard years and\n * 1 to 366 in leap years.\n * \n * - `ChronoField.EPOCH_DAY`: This field is the sequential count of days where\n * 1970-01-01 (ISO) is zero. Note that this uses the local time-line, ignoring offset and\n * time-zone.\n * \n * - `ChronoField.ERA`: This represents the concept of the era, which is the largest\n * division of the time-line. This field is typically used with `YEAR_OF_ERA`.\n * \n * In the default ISO calendar system, there are two eras defined, 'BCE' and 'CE'. The era\n * 'CE' is the one currently in use and year-of-era runs from 1 to the maximum value.\n * The era 'BCE' is the previous era, and the year-of-era runs backwards.\n * \n * - `ChronoField.HOUR_OF_AMPM`: This counts the hour within the AM/PM, from 0 to 11.\n * This is the hour that would be observed on a standard 12-hour digital clock.\n * \n * - `ChronoField.HOUR_OF_DAY`: This counts the hour within the day, from 0 to 23. This is\n * the hour that would be observed on a standard 24-hour digital clock.\n * \n * - `ChronoField.INSTANT_SECONDS`: This represents the concept of the sequential count of\n * seconds where 1970-01-01T00:00Z (ISO) is zero. This field may be used with `NANO_OF_DAY`\n * to represent the fraction of the day.\n * \n * An Instant represents an instantaneous point on the time-line. On their own they have\n * no elements which allow a local date-time to be obtained. Only when paired with an offset\n * or time-zone can the local date or time be found. This field allows the seconds part of\n * the instant to be queried.\n * \n * - `ChronoField.MICRO_OF_DAY`: This counts the microsecond within the day, from 0 to\n * (24 * 60 * 60 * 1,000,000) - 1.\n * \n * This field is used to represent the micro-of-day handling any fraction of the second.\n * Implementations of {@link TemporalAccessor} should provide a value for this field if they\n * can return a value for `SECOND_OF_DAY` filling unknown precision with zero.\n * \n * When this field is used for setting a value, it should behave in the same way as\n * setting `NANO_OF_DAY` with the value multiplied by 1,000.\n * \n * - `ChronoField.MICRO_OF_SECOND`: This counts the microsecond within the second, from 0\n * to 999,999.\n * \n * This field is used to represent the micro-of-second handling any fraction of the second.\n * Implementations of {@link TemporalAccessor} should provide a value for this field if they\n * can return a value for `SECOND_OF_MINUTE`, `SECOND_OF_DAY` or `INSTANT_SECONDS` filling\n * unknown precision with zero.\n * \n * - `ChronoField.MILLI_OF_DAY`: This counts the millisecond within the day, from 0 to\n * (24 * 60 * 60 * 1,000) - 1.\n * \n * This field is used to represent the milli-of-day handling any fraction of the second.\n * Implementations of {@link TemporalAccessor} should provide a value for this field if they\n * can return a value for `SECOND_OF_DAY` filling unknown precision with zero.\n * \n * When this field is used for setting a value, it should behave in the same way as\n * setting `NANO_OF_DAY` with the value multiplied by 1,000,000.\n * \n * - `ChronoField.MILLI_OF_SECOND`: This counts the millisecond within the second, from 0 to\n * 999.\n * \n * This field is used to represent the milli-of-second handling any fraction of the second.\n * Implementations of {@link TemporalAccessor} should provide a value for this field if they can\n * return a value for `SECOND_OF_MINUTE`, `SECOND_OF_DAY` or `INSTANT_SECONDS` filling unknown\n * precision with zero.\n * \n * When this field is used for setting a value, it should behave in the same way as\n * setting `NANO_OF_SECOND` with the value multiplied by 1,000,000.\n * \n * - `ChronoField.MINUTE_OF_DAY`: This counts the minute within the day, from 0 to (24 * 60) - 1.\n * \n * - `ChronoField.MINUTE_OF_HOUR`: This counts the minute within the hour, from 0 to 59.\n * \n * - `ChronoField.MONTH_OF_YEAR`: The month-of-year, such as March. This represents the concept\n * of the month within the year. In the default ISO calendar system, this has values from\n * January (1) to December (12).\n * \n * - `ChronoField.NANO_OF_DAY`: This counts the nanosecond within the day, from 0 to\n * (24 * 60 * 60 * 1,000,000,000) - 1.\n * \n * This field is used to represent the nano-of-day handling any fraction of the second.\n * Implementations of {@link TemporalAccessor} should provide a value for this field if they\n * can return a value for `SECOND_OF_DAY` filling unknown precision with zero.\n * \n * - `ChronoField.NANO_OF_SECOND`: This counts the nanosecond within the second, from 0\n * to 999,999,999.\n * \n * This field is used to represent the nano-of-second handling any fraction of the second.\n * Implementations of {@link TemporalAccessor} should provide a value for this field if they\n * can return a value for `SECOND_OF_MINUTE`, `SECOND_OF_DAY` or `INSTANT_SECONDS` filling\n * unknown precision with zero.\n * \n * When this field is used for setting a value, it should set as much precision as the\n * object stores, using integer division to remove excess precision. For example, if the\n * {@link TemporalAccessor} stores time to millisecond precision, then the nano-of-second must\n * be divided by 1,000,000 before replacing the milli-of-second.\n * \n * - `ChronoField.OFFSET_SECONDS`: This represents the concept of the offset in seconds of\n * local time from UTC/Greenwich.\n * \n * A {@link ZoneOffset} represents the period of time that local time differs from\n * UTC/Greenwich. This is usually a fixed number of hours and minutes. It is equivalent to\n * the total amount of the offset in seconds. For example, during the winter Paris has an\n * offset of +01:00, which is 3600 seconds.\n * \n * - `ChronoField.PROLEPTIC_MONTH`: The proleptic-month, which counts months sequentially\n * from year 0.\n * \n * The first month in year zero has the value zero. The value increase for later months\n * and decrease for earlier ones. Note that this uses the local time-line, ignoring offset\n * and time-zone.\n * \n * - `ChronoField.SECOND_OF_DAY`: This counts the second within the day, from 0 to\n * (24 * 60 * 60) - 1.\n * \n * - `ChronoField.SECOND_OF_MINUTE`: This counts the second within the minute, from 0 to 59.\n * \n * - `ChronoField.YEAR`: The proleptic year, such as 2012. This represents the concept of\n * the year, counting sequentially and using negative numbers. The proleptic year is not\n * interpreted in terms of the era.\n * \n * The standard mental model for a date is based on three concepts - year, month and day.\n * These map onto the `YEAR`, `MONTH_OF_YEAR` and `DAY_OF_MONTH` fields. Note that there is no\n * reference to eras. The full model for a date requires four concepts - era, year, month and\n * day. These map onto the `ERA`, `YEAR_OF_ERA`, `MONTH_OF_YEAR` and `DAY_OF_MONTH` fields.\n * Whether this field or `YEAR_OF_ERA` is used depends on which mental model is being used.\n * \n * - `ChronoField.YEAR_OF_ERA`: This represents the concept of the year within the era. This\n * field is typically used with `ERA`. The standard mental model for a date is based on three\n * concepts - year, month and day. These map onto the `YEAR`, `MONTH_OF_YEAR` and\n * `DAY_OF_MONTH` fields. Note that there is no reference to eras. The full model for a date\n * requires four concepts - era, year, month and day. These map onto the `ERA`, `YEAR_OF_ERA`,\n * `MONTH_OF_YEAR` and `DAY_OF_MONTH` fields. Whether this field or `YEAR` is used depends on\n * which mental model is being used.\n * \n * In the default ISO calendar system, there are two eras defined, 'BCE' and 'CE'.\n * The era 'CE' is the one currently in use and year-of-era runs from 1 to the maximum value.\n * The era 'BCE' is the previous era, and the year-of-era runs backwards.\n * \n * For example, subtracting a year each time yield the following:\n * - year-proleptic 2 = 'CE' year-of-era 2\n * - year-proleptic 1 = 'CE' year-of-era 1\n * - year-proleptic 0 = 'BCE' year-of-era 1\n * - year-proleptic -1 = 'BCE' year-of-era 2\n * \n * Note that the ISO-8601 standard does not actually define eras. Note also that the\n * ISO eras do not align with the well-known AD/BC eras due to the change between the Julian\n * and Gregorian calendar systems.\n */\nexport class ChronoField extends TemporalField {\n\n /**\n * helper function to get one of the static ChronoField defines by name, needed to resolve ChronoField from EnumMap\n *\n * @param {String} fieldName\n * @return {ChronoField | null}\n * @private\n */\n static byName(fieldName) {\n for (const prop in ChronoField) {\n if (ChronoField[prop]) {\n if ((ChronoField[prop] instanceof ChronoField) && ChronoField[prop].name() === fieldName) {\n return ChronoField[prop];\n }\n }\n }\n }\n\n /**\n *\n * @param {!string} name\n * @param {!TemporalUnit} baseUnit\n * @param {!TemporalUnit} rangeUnit\n * @param {!ValueRange} range\n * @private\n */\n constructor(name, baseUnit, rangeUnit, range) {\n super();\n this._name = name;\n this._baseUnit = baseUnit;\n this._rangeUnit = rangeUnit;\n this._range = range;\n }\n\n /**\n * @return {string}\n */\n name(){\n return this._name;\n }\n\n /**\n * @return {TemporalUnit} the period unit defining the base unit of the field.\n */\n baseUnit(){\n return this._baseUnit;\n }\n\n /**\n * @return {TemporalUnit} the period unit defining the range of the field.\n */\n rangeUnit(){\n return this._rangeUnit;\n }\n\n /**\n * @return {ValueRange} the range of valid values for the field.\n */\n range(){\n return this._range;\n }\n\n /**\n * @returns {string}\n */\n displayName(){\n return this.toString();\n }\n\n /**\n * Checks that the specified value is valid for this field.\n *\n * This validates that the value is within the outer range of valid values\n * returned by {@link range}.\n *\n * This method checks against the range of the field in the ISO-8601 calendar system.\n *\n * @param {!number} value the value to check.\n * @returns {number} the value that was passed in.\n */\n checkValidValue(value) {\n return this.range().checkValidValue(value, this);\n }\n\n /**\n * Checks that the specified value is valid and fits in an `int`.\n *\n * This validates that the value is within the outer range of valid values\n * returned by {@link range}.\n * It also checks that all valid values are within the bounds of an `int`.\n *\n * This method checks against the range of the field in the ISO-8601 calendar system.\n *\n * @param {number} value the value to check.\n * @return {number} the value that was passed in.\n */\n checkValidIntValue(value) {\n return this.range().checkValidIntValue(value, this);\n }\n\n /**\n * @return {boolean} `true` if it is a component of a date, `false` otherwise.\n */\n isDateBased() {\n const dateBased =\n this === ChronoField.DAY_OF_WEEK ||\n this === ChronoField.ALIGNED_DAY_OF_WEEK_IN_MONTH ||\n this === ChronoField.ALIGNED_DAY_OF_WEEK_IN_YEAR ||\n this === ChronoField.DAY_OF_MONTH ||\n this === ChronoField.DAY_OF_YEAR ||\n this === ChronoField.EPOCH_DAY ||\n this === ChronoField.ALIGNED_WEEK_OF_MONTH ||\n this === ChronoField.ALIGNED_WEEK_OF_YEAR ||\n this === ChronoField.MONTH_OF_YEAR ||\n this === ChronoField.PROLEPTIC_MONTH ||\n this === ChronoField.YEAR_OF_ERA ||\n this === ChronoField.YEAR ||\n this === ChronoField.ERA;\n return dateBased;\n }\n\n /**\n * @return {boolean} `true` if it is a component of a time, `false` otherwise.\n */\n isTimeBased() {\n const timeBased =\n this === ChronoField.NANO_OF_SECOND ||\n this === ChronoField.NANO_OF_DAY ||\n this === ChronoField.MICRO_OF_SECOND ||\n this === ChronoField.MICRO_OF_DAY ||\n this === ChronoField.MILLI_OF_SECOND ||\n this === ChronoField.MILLI_OF_DAY ||\n this === ChronoField.SECOND_OF_MINUTE ||\n this === ChronoField.SECOND_OF_DAY ||\n this === ChronoField.MINUTE_OF_HOUR ||\n this === ChronoField.MINUTE_OF_DAY ||\n this === ChronoField.HOUR_OF_AMPM ||\n this === ChronoField.CLOCK_HOUR_OF_AMPM ||\n this === ChronoField.HOUR_OF_DAY ||\n this === ChronoField.CLOCK_HOUR_OF_DAY ||\n this === ChronoField.AMPM_OF_DAY;\n return timeBased;\n }\n\n /**\n * @param {!TemporalAccessor} temporal the temporal object used to refine the result.\n * @return {ValueRange} the range of valid values for this field.\n * @throws {DateTimeException} if the range for the field cannot be obtained.\n */\n rangeRefinedBy(temporal) {\n return temporal.range(this);\n }\n\n \n\n /**\n * @param {!TemporalAccesor} temporal the temporal object to query.\n * @return {number} the value of this field.\n * @throws {DateTimeException} if a value for the field cannot be obtained.\n */\n getFrom(temporal) {\n return temporal.getLong(this);\n }\n\n /**\n * @returns {string}\n */\n toString(){\n return this.name();\n }\n\n /**\n * @param {*} other\n * @returns {boolean}\n */\n equals(other){\n return this === other;\n }\n\n /**\n * @param {!Temporal} temporal the temporal object to adjust.\n * @param {!number} newValue the new value of the field.\n * @return {Temporal} the adjusted temporal object.\n * @throws {DateTimeException} if the field cannot be set.\n */\n adjustInto(temporal, newValue) {\n return temporal.with(this, newValue);\n }\n\n /**\n * @param {!TemporalAccesor} temporal the temporal object to query.\n * @return {boolean} `true` if the date-time can be queried for this field, `false` if not.\n */\n isSupportedBy(temporal) {\n return temporal.isSupported(this);\n }\n}\n\nexport function _init() {\n\n ChronoField.NANO_OF_SECOND = new ChronoField('NanoOfSecond', ChronoUnit.NANOS, ChronoUnit.SECONDS, ValueRange.of(0, 999999999));\n\n ChronoField.NANO_OF_DAY = new ChronoField('NanoOfDay', ChronoUnit.NANOS, ChronoUnit.DAYS, ValueRange.of(0, 86400 * 1000000000 - 1));\n\n ChronoField.MICRO_OF_SECOND = new ChronoField('MicroOfSecond', ChronoUnit.MICROS, ChronoUnit.SECONDS, ValueRange.of(0, 999999));\n\n ChronoField.MICRO_OF_DAY = new ChronoField('MicroOfDay', ChronoUnit.MICROS, ChronoUnit.DAYS, ValueRange.of(0, 86400 * 1000000 - 1));\n\n ChronoField.MILLI_OF_SECOND = new ChronoField('MilliOfSecond', ChronoUnit.MILLIS, ChronoUnit.SECONDS, ValueRange.of(0, 999));\n\n ChronoField.MILLI_OF_DAY = new ChronoField('MilliOfDay', ChronoUnit.MILLIS, ChronoUnit.DAYS, ValueRange.of(0, 86400 * 1000 - 1));\n\n ChronoField.SECOND_OF_MINUTE = new ChronoField('SecondOfMinute', ChronoUnit.SECONDS, ChronoUnit.MINUTES, ValueRange.of(0, 59));\n\n ChronoField.SECOND_OF_DAY = new ChronoField('SecondOfDay', ChronoUnit.SECONDS, ChronoUnit.DAYS, ValueRange.of(0, 86400 - 1));\n\n ChronoField.MINUTE_OF_HOUR = new ChronoField('MinuteOfHour', ChronoUnit.MINUTES, ChronoUnit.HOURS, ValueRange.of(0, 59));\n\n ChronoField.MINUTE_OF_DAY = new ChronoField('MinuteOfDay', ChronoUnit.MINUTES, ChronoUnit.DAYS, ValueRange.of(0, (24 * 60) - 1));\n\n ChronoField.HOUR_OF_AMPM = new ChronoField('HourOfAmPm', ChronoUnit.HOURS, ChronoUnit.HALF_DAYS, ValueRange.of(0, 11));\n\n ChronoField.CLOCK_HOUR_OF_AMPM = new ChronoField('ClockHourOfAmPm', ChronoUnit.HOURS, ChronoUnit.HALF_DAYS, ValueRange.of(1, 12));\n\n ChronoField.HOUR_OF_DAY = new ChronoField('HourOfDay', ChronoUnit.HOURS, ChronoUnit.DAYS, ValueRange.of(0, 23));\n\n ChronoField.CLOCK_HOUR_OF_DAY = new ChronoField('ClockHourOfDay', ChronoUnit.HOURS, ChronoUnit.DAYS, ValueRange.of(1, 24));\n\n ChronoField.AMPM_OF_DAY = new ChronoField('AmPmOfDay', ChronoUnit.HALF_DAYS, ChronoUnit.DAYS, ValueRange.of(0, 1));\n\n ChronoField.DAY_OF_WEEK = new ChronoField('DayOfWeek', ChronoUnit.DAYS, ChronoUnit.WEEKS, ValueRange.of(1, 7));\n\n ChronoField.ALIGNED_DAY_OF_WEEK_IN_MONTH = new ChronoField('AlignedDayOfWeekInMonth', ChronoUnit.DAYS, ChronoUnit.WEEKS, ValueRange.of(1, 7));\n\n ChronoField.ALIGNED_DAY_OF_WEEK_IN_YEAR = new ChronoField('AlignedDayOfWeekInYear', ChronoUnit.DAYS, ChronoUnit.WEEKS, ValueRange.of(1, 7));\n\n ChronoField.DAY_OF_MONTH = new ChronoField('DayOfMonth', ChronoUnit.DAYS, ChronoUnit.MONTHS, ValueRange.of(1, 28, 31), 'day');\n\n ChronoField.DAY_OF_YEAR = new ChronoField('DayOfYear', ChronoUnit.DAYS, ChronoUnit.YEARS, ValueRange.of(1, 365, 366));\n\n ChronoField.EPOCH_DAY = new ChronoField('EpochDay', ChronoUnit.DAYS, ChronoUnit.FOREVER, ValueRange.of(-365961662, 364522971)); // [LocalDate.MIN.toEpochDay() .. LocalDate.MAX.toEpochDay()]\n\n ChronoField.ALIGNED_WEEK_OF_MONTH = new ChronoField('AlignedWeekOfMonth', ChronoUnit.WEEKS, ChronoUnit.MONTHS, ValueRange.of(1, 4, 5));\n\n ChronoField.ALIGNED_WEEK_OF_YEAR = new ChronoField('AlignedWeekOfYear', ChronoUnit.WEEKS, ChronoUnit.YEARS, ValueRange.of(1, 53));\n\n ChronoField.MONTH_OF_YEAR = new ChronoField('MonthOfYear', ChronoUnit.MONTHS, ChronoUnit.YEARS, ValueRange.of(1, 12), 'month');\n\n ChronoField.PROLEPTIC_MONTH = new ChronoField('ProlepticMonth', ChronoUnit.MONTHS, ChronoUnit.FOREVER, ValueRange.of(YearConstants.MIN_VALUE * 12, YearConstants.MAX_VALUE * 12 + 11));\n\n ChronoField.YEAR_OF_ERA = new ChronoField('YearOfEra', ChronoUnit.YEARS, ChronoUnit.FOREVER, ValueRange.of(1, YearConstants.MAX_VALUE, YearConstants.MAX_VALUE + 1));\n\n ChronoField.YEAR = new ChronoField('Year', ChronoUnit.YEARS, ChronoUnit.FOREVER, ValueRange.of(YearConstants.MIN_VALUE, YearConstants.MAX_VALUE), 'year');\n\n ChronoField.ERA = new ChronoField('Era', ChronoUnit.ERAS, ChronoUnit.FOREVER, ValueRange.of(0, 1));\n\n ChronoField.INSTANT_SECONDS = new ChronoField('InstantSeconds', ChronoUnit.SECONDS, ChronoUnit.FOREVER, ValueRange.of(MIN_SAFE_INTEGER, MAX_SAFE_INTEGER));\n\n ChronoField.OFFSET_SECONDS = new ChronoField('OffsetSeconds', ChronoUnit.SECONDS, ChronoUnit.FOREVER, ValueRange.of(-18 * 3600, 18 * 3600));\n\n}\n","/**\n * @copyright (c) 2016, Philipp Thürwächter & Pattrick Hüper\n * @copyright (c) 2007-present, Stephen Colebourne & Michael Nascimento Santos\n * @license BSD-3-Clause (see LICENSE in the root directory of this source tree)\n */\n\n/**\n * Common implementations of {@link TemporalQuery}.\n *\n * This class provides common implementations of {@link TemporalQuery}.\n * These queries are primarily used as optimizations, allowing the internals\n * of other objects to be extracted effectively. Note that application code\n * can also use the {@link from} method on most temporal\n * objects as a method reference matching the query interface, such as\n * {@link LocalDate::from} and {@link ZoneId::from}.\n *\n * There are two equivalent ways of using a {@link TemporalQuery}.\n * The first is to invoke the method on the interface directly.\n * The second is to use {@link TemporalAccessor#query}:\n *
\n *   // these two lines are equivalent, but the second approach is recommended\n *   dateTime = query.queryFrom(dateTime);\n *   dateTime = dateTime.query(query);\n * 
\n * It is recommended to use the second approach, {@link query},\n * as it is a lot clearer to read in code.\n *\n */\nexport class TemporalQueries {\n\n /**\n * A strict query for the {@link ZoneId}.\n *\n * This queries a {@link TemporalAccessor} for the zone.\n * The zone is only returned if the date-time conceptually contains a {@link ZoneId}.\n * It will not be returned if the date-time only conceptually has an {@link ZoneOffset}.\n * Thus a {@link ZonedDateTime} will return the result of\n * {@link getZone}, but an {@link OffsetDateTime} will\n * return null.\n *\n * In most cases, applications should use {@link ZONE} as this query is too strict.\n *\n * The result from JDK classes implementing {@link TemporalAccessor} is as follows:\n * * * {@link LocalDate} returns null\n * * {@link LocalTime} returns null\n * * {@link LocalDateTime} returns null\n * * {@link ZonedDateTime} returns the associated zone\n * * {@link OffsetTime} returns null\n * * {@link OffsetDateTime} returns null\n * * {@link ChronoLocalDate} returns null\n * * {@link ChronoLocalDateTime} returns null\n * * {@link ChronoZonedDateTime} returns the associated zone\n * * {@link Era} returns null\n * * {@link DayOfWeek} returns null\n * * {@link Month} returns null\n * * {@link Year} returns null\n * * {@link YearMonth} returns null\n * * {@link MonthDay} returns null\n * * {@link ZoneOffset} returns null\n * * {@link Instant} returns null\n *\n * @return a query that can obtain the zone ID of a temporal, not null\n */\n static zoneId() {\n return TemporalQueries.ZONE_ID;\n }\n\n /**\n * A query for the {@link Chronology}.\n *\n * This queries a {@link TemporalAccessor} for the chronology.\n * If the target {@link TemporalAccessor} represents a date, or part of a date,\n * then it should return the chronology that the date is expressed in.\n * As a result of this definition, objects only representing time, such as\n * {@link LocalTime}, will return null.\n *\n * The result from js-joda classes implementing {@link TemporalAccessor} is as follows:\n *\n * * {@link LocalDate} returns * {@link IsoChronology.INSTANCE}\n * * {@link LocalTime} returns null (does not represent a date)\n * * {@link LocalDateTime} returns * {@link IsoChronology.INSTANCE}\n * * {@link ZonedDateTime} returns * {@link IsoChronology.INSTANCE}\n * * {@link OffsetTime} returns null (does not represent a date)\n * * {@link OffsetDateTime} returns * {@link IsoChronology.INSTANCE}\n * * {@link ChronoLocalDate} returns the associated chronology\n * * {@link ChronoLocalDateTime} returns the associated chronology\n * * {@link ChronoZonedDateTime} returns the associated chronology\n * * {@link Era} returns the associated chronology\n * * {@link DayOfWeek} returns null (shared across chronologies)\n * * {@link Month} returns * {@link IsoChronology.INSTANCE}\n * * {@link Year} returns * {@link IsoChronology.INSTANCE}\n * * {@link YearMonth} returns * {@link IsoChronology.INSTANCE}\n * * {@link MonthDay} returns null * {@link IsoChronology.INSTANCE}\n * * {@link ZoneOffset} returns null (does not represent a date)\n * * {@link Instant} returns null (does not represent a date)\n *\n * The method {@link Chronology#from} can be used as a\n * {@link TemporalQuery}\n * That method is equivalent to this query, except that it throws an\n * exception if a chronology cannot be obtained.\n *\n * @return {TemporalQuery} a query that can obtain the chronology of a temporal, not null\n */\n static chronology() {\n return TemporalQueries.CHRONO;\n }\n\n /**\n * A query for the smallest supported unit.\n *\n * This queries a {@link TemporalAccessor} for the time precision.\n * If the target {@link TemporalAccessor} represents a consistent or complete date-time,\n * date or time then this must return the smallest precision actually supported.\n * Note that fields such as {@link NANO_OF_DAY} and {@link NANO_OF_SECOND}\n * are defined to always return ignoring the precision, thus this is the only\n * way to find the actual smallest supported unit.\n * For example, were {@link GregorianCalendar} to implement {@link TemporalAccessor}\n * it would return a precision of {@link MILLIS}.\n *\n * The result from js-joda classes implementing {@link TemporalAccessor} is as follows:\n *\n * {@link LocalDate} returns {@link DAYS}\n * {@link LocalTime} returns {@link NANOS}\n * {@link LocalDateTime} returns {@link NANOS}\n * {@link ZonedDateTime} returns {@link NANOS}\n * {@link OffsetTime} returns {@link NANOS}\n * {@link OffsetDateTime} returns {@link NANOS}\n * {@link ChronoLocalDate} returns {@link DAYS}\n * {@link ChronoLocalDateTime} returns {@link NANOS}\n * {@link ChronoZonedDateTime} returns {@link NANOS}\n * {@link Era} returns {@link ERAS}\n * {@link DayOfWeek} returns {@link DAYS}\n * {@link Month} returns {@link MONTHS}\n * {@link Year} returns {@link YEARS}\n * {@link YearMonth} returns {@link MONTHS}\n * {@link MonthDay} returns null (does not represent a complete date or time)\n * {@link ZoneOffset} returns null (does not represent a date or time)\n * {@link Instant} returns {@link NANOS}\n *\n * @return a query that can obtain the precision of a temporal, not null\n */\n static precision() {\n return TemporalQueries.PRECISION;\n }\n\n /**\n * A lenient query for the {@link ZoneId}, falling back to the {@link ZoneOffset}.\n *\n * This queries a {@link TemporalAccessor} for the zone.\n * It first tries to obtain the zone, using {@link zoneId}.\n * If that is not found it tries to obtain the {@link offset}.\n *\n * In most cases, applications should use this query rather than {@link zoneId}.\n *\n * This query examines the {@link ChronoField#OFFSET_SECONDS}\n * field and uses it to create a {@link ZoneOffset}.\n *\n * The method {@link ZoneId#from} can be used as a\n * {@link TemporalQuery} via a method reference, {@link ZoneId::from}.\n * That method is equivalent to this query, except that it throws an\n * exception if a zone cannot be obtained.\n *\n * @return a query that can obtain the zone ID or offset of a temporal, not null\n */\n static zone() {\n return TemporalQueries.ZONE;\n }\n\n /**\n * A query for {@link ZoneOffset} returning null if not found.\n *\n * This returns a {@link TemporalQuery} that can be used to query a temporal\n * object for the offset. The query will return null if the temporal\n * object cannot supply an offset.\n *\n * The query implementation examines the {@link ChronoField#OFFSET_SECONDS}\n * field and uses it to create a {@link ZoneOffset}.\n *\n * The method {@link java.time.ZoneOffset#from} can be used as a\n * {@link TemporalQuery} via a method reference, {@link ZoneOffset::from}.\n * This query and {@link ZoneOffset::from} will return the same result if the\n * temporal object contains an offset. If the temporal object does not contain\n * an offset, then the method reference will throw an exception, whereas this\n * query will return null.\n *\n * @return a query that can obtain the offset of a temporal, not null\n */\n static offset() {\n return TemporalQueries.OFFSET;\n }\n\n /**\n * A query for {@link LocalDate} returning null if not found.\n *\n * This returns a {@link TemporalQuery} that can be used to query a temporal\n * object for the local date. The query will return null if the temporal\n * object cannot supply a local date.\n *\n * The query implementation examines the {@link ChronoField#EPOCH_DAY}\n * field and uses it to create a {@link LocalDate}.\n *\n * @return a query that can obtain the date of a temporal, not null\n */\n static localDate() {\n return TemporalQueries.LOCAL_DATE;\n }\n\n /**\n * A query for {@link LocalTime} returning null if not found.\n *\n * This returns a {@link TemporalQuery} that can be used to query a temporal\n * object for the local time. The query will return null if the temporal\n * object cannot supply a local time.\n *\n * The query implementation examines the {@link ChronoField#NANO_OF_DAY}\n * field and uses it to create a {@link LocalTime}.\n *\n * @return a query that can obtain the time of a temporal, not null\n */\n static localTime() {\n return TemporalQueries.LOCAL_TIME;\n }\n}\n","/**\n * @copyright (c) 2016, Philipp Thürwächter & Pattrick Hüper\n * @copyright (c) 2007-present, Stephen Colebourne & Michael Nascimento Santos\n * @license BSD-3-Clause (see LICENSE in the root directory of this source tree)\n */\n\nimport { UnsupportedTemporalTypeException } from '../errors';\nimport { abstractMethodFail } from '../assert';\n\nimport { ChronoField } from './ChronoField';\nimport { TemporalQueries } from './TemporalQueries';\n\nexport class TemporalAccessor {\n /**\n * Queries this date-time.\n *\n * This queries this date-time using the specified query strategy object.\n *\n * Queries are a key tool for extracting information from date-times.\n * They exists to externalize the process of querying, permitting different\n * approaches, as per the strategy design pattern.\n * Examples might be a query that checks if the date is the day before February 29th\n * in a leap year, or calculates the number of days to your next birthday.\n *\n * The most common query implementations are method references, such as\n * {@link LocalDate::from} and {@link ZoneId::from}.\n * Further implementations are on {@link TemporalQueries}.\n * Queries may also be defined by applications.\n *\n * @implSpec\n * Implementations of this method must behave as follows:\n *
\n        if (query == TemporalQueries.zoneId()\n            || query == TemporalQueries.chronology()\n            || query == TemporalQueries.precision()) {\n                return null;\n        }\n        return query.queryFrom(this);\n     * 
\n *\n * @param {TemporalQuery} query the query to invoke, not null\n * @return the query result, null may be returned (defined by the query)\n * @throws DateTimeException if unable to query\n * @throws ArithmeticException if numeric overflow occurs\n */\n query(query) {\n if (query === TemporalQueries.zoneId()\n || query === TemporalQueries.chronology()\n || query === TemporalQueries.precision()) {\n return null;\n }\n return query.queryFrom(this);\n }\n\n /**\n * Gets the value of the specified field as an `int`.\n *\n * This queries the date-time for the value for the specified field.\n * The returned value will always be within the valid range of values for the field.\n * If the date-time cannot return the value, because the field is unsupported or for\n * some other reason, an exception will be thrown.\n *\n * ### Specification for implementors\n *\n * Implementations must check and handle all fields defined in {@link ChronoField}.\n * If the field is supported and has an `int` range, then the value of\n * the field must be returned.\n * If unsupported, then a {@link DateTimeException} must be thrown.\n *\n * If the field is not a {@link ChronoField}, then the result of this method\n * is obtained by invoking {@link TemporalField.getFrom}\n * passing `this` as the argument.\n *\n * Implementations must not alter either this object.\n *\n * @param {TemporalField} field - the field to get, not null\n * @return {number} the value for the field, within the valid range of values\n * @throws DateTimeException if a value for the field cannot be obtained\n * @throws DateTimeException if the range of valid values for the field exceeds an `int`\n * @throws DateTimeException if the value is outside the range of valid values for the field\n * @throws ArithmeticException if numeric overflow occurs\n */\n get(field) {\n return this.range(field).checkValidIntValue(this.getLong(field), field);\n }\n\n // eslint-disable-next-line no-unused-vars\n getLong(field) {\n abstractMethodFail('getLong');\n }\n\n /**\n * Gets the range of valid values for the specified field.\n *\n * All fields can be expressed as a `long` integer.\n * This method returns an object that describes the valid range for that value.\n * The value of this temporal object is used to enhance the accuracy of the returned range.\n * If the date-time cannot return the range, because the field is unsupported or for\n * some other reason, an exception will be thrown.\n *\n * Note that the result only describes the minimum and maximum valid values\n * and it is important not to read too much into them. For example, there\n * could be values within the range that are invalid for the field.\n *\n * ### Specification for implementors\n *\n * Implementations must check and handle all fields defined in {@link ChronoField}.\n * If the field is supported, then the range of the field must be returned.\n * If unsupported, then a {@link DateTimeException} must be thrown.\n *\n * If the field is not a {@link ChronoField}, then the result of this method\n * is obtained by invoking {@link TemporalField.rangeRefinedBy}\n * passing `this` as the argument.\n *\n * Implementations must not alter either this object.\n *\n * @param {TemporalField} field the field to query the range for, not null\n * @return {ValueRange} the range of valid values for the field, not null\n * @throws DateTimeException if the range for the field cannot be obtained\n */\n range(field) {\n if (field instanceof ChronoField) {\n if (this.isSupported(field)) {\n return field.range();\n }\n throw new UnsupportedTemporalTypeException(`Unsupported field: ${field}`);\n }\n return field.rangeRefinedBy(this);\n }\n\n // eslint-disable-next-line no-unused-vars\n isSupported(field) {\n abstractMethodFail('isSupported');\n }\n}\n","/*\n * @copyright (c) 2016, Philipp Thürwächter & Pattrick Hüper\n * @copyright (c) 2007-present, Stephen Colebourne & Michael Nascimento Santos\n * @license BSD-3-Clause (see LICENSE in the root directory of this source tree)\n */\n\nimport { abstractMethodFail } from '../assert';\nimport { Enum } from '../Enum';\n\n\n/**\n * Strategy for querying a temporal object.\n *\n * Queries are a key tool for extracting information from temporal objects.\n * They exist to externalize the process of querying, permitting different\n * approaches, as per the strategy design pattern.\n * Examples might be a query that checks if the date is the day before February 29th\n * in a leap year, or calculates the number of days to your next birthday.\n *\n * The {@link TemporalField} interface provides another mechanism for querying\n * temporal objects. That interface is limited to returning a `long`.\n * By contrast, queries can return any type.\n *\n * There are two equivalent ways of using a {@link TemporalQuery}.\n * The first is to invoke the method on this interface directly.\n * The second is to use {@link TemporalAccessor#query}:\n *
\n *   // these two lines are equivalent, but the second approach is recommended\n *   temporal = thisQuery.queryFrom(temporal);\n *   temporal = temporal.query(thisQuery);\n * 
\n * It is recommended to use the second approach, {@link query},\n * as it is a lot clearer to read in code.\n *\n * The most common implementations are method references, such as\n * {@link LocalDate::from} and {@link ZoneId::from}.\n * Further implementations are on {@link TemporalQueries}.\n * Queries may also be defined by applications.\n *\n * ### Specification for implementors\n *\n * This interface places no restrictions on the mutability of implementations,\n * however immutability is strongly recommended.\n *\n * @interface\n */\nexport class TemporalQuery extends Enum {\n /**\n * Queries the specified temporal object.\n *\n * This queries the specified temporal object to return an object using the logic\n * encapsulated in the implementing class.\n * Examples might be a query that checks if the date is the day before February 29th\n * in a leap year, or calculates the number of days to your next birthday.\n *\n * There are two equivalent ways of using this method.\n * The first is to invoke this method directly.\n * The second is to use {@link TemporalAccessor#query}:\n *
\n     *   // these two lines are equivalent, but the second approach is recommended\n     *   temporal = thisQuery.queryFrom(temporal);\n     *   temporal = temporal.query(thisQuery);\n     * 
\n * It is recommended to use the second approach, {@link query},\n * as it is a lot clearer to read in code.\n *\n * ### Specification for implementors\n *\n * The implementation must take the input object and query it.\n * The implementation defines the logic of the query and is responsible for\n * documenting that logic.\n * It may use any method on {@link TemporalAccessor} to determine the result.\n * The input object must not be altered.\n *\n * The input temporal object may be in a calendar system other than ISO.\n * Implementations may choose to document compatibility with other calendar systems,\n * or reject non-ISO temporal objects by querying the chronology (see {@link TemporalQueries#chronology}).\n *\n * This method may be called from multiple threads in parallel.\n * It must be thread-safe when invoked.\n *\n * @param {TemporalAccessor} temporal the temporal object to query, not null\n * @return the queried value, may return null to indicate not found\n * @throws DateTimeException if unable to query\n * @throws ArithmeticException if numeric overflow occurs\n */\n // eslint-disable-next-line no-unused-vars\n queryFrom(temporal){\n abstractMethodFail('queryFrom');\n }\n\n}\n\n/**\n * @private\n *\n * Factory to create something similar to the JSR-310 {TemporalQuery} interface, takes a function and returns a new TemporalQuery object that presents that function\n * as the queryFrom() function.\n * @param name for the underlying Enum\n * @param queryFromFunction\n */\nexport function createTemporalQuery(name, queryFromFunction) {\n class ExtendedTemporalQuery extends TemporalQuery {\n\n }\n\n ExtendedTemporalQuery.prototype.queryFrom = queryFromFunction;\n return new ExtendedTemporalQuery(name);\n}\n","/*\n * @copyright (c) 2016, Philipp Thürwächter & Pattrick Hüper\n * @copyright (c) 2007-present, Stephen Colebourne & Michael Nascimento Santos\n * @license BSD-3-Clause (see LICENSE in the root directory of this source tree)\n */\n\nimport { DateTimeException, UnsupportedTemporalTypeException, NullPointerException } from './errors';\nimport { MathUtil } from './MathUtil';\nimport { assert, requireNonNull, requireInstance } from './assert';\n\nimport { ChronoField } from './temporal/ChronoField';\nimport { ChronoUnit } from './temporal/ChronoUnit';\nimport { IllegalArgumentException } from './errors';\nimport { TemporalAccessor } from './temporal/TemporalAccessor';\nimport { TemporalQueries } from './temporal/TemporalQueries';\nimport { createTemporalQuery } from './temporal/TemporalQuery';\n\n/**\n * ### Static properties of Class {@link DayOfWeek}\n *\n * DayOfWeek.MONDAY,\n * DayOfWeek.TUESDAY,\n * DayOfWeek.WEDNESDAY,\n * DayOfWeek.THURSDAY,\n * DayOfWeek.FRIDAY,\n * DayOfWeek.SATURDAY,\n * DayOfWeek.SUNDAY\n *\n */\nexport class DayOfWeek extends TemporalAccessor {\n\n /**\n *\n * @param {number} ordinal\n * @param {string} name\n * @private\n */\n constructor(ordinal, name){\n super();\n this._ordinal = ordinal;\n this._name = name;\n }\n\n /**\n *\n * @returns {number}\n */\n ordinal(){\n return this._ordinal;\n }\n\n /**\n *\n * @returns {string}\n */\n name(){\n return this._name;\n }\n\n /**\n *\n * @returns {DayOfWeek[]}\n */\n static values() {\n return ENUMS.slice();\n }\n\n /**\n *\n * @param {string} name\n * @returns {DayOfWeek}\n */\n static valueOf(name) {\n let ordinal = 0;\n for(ordinal; ordinal < ENUMS.length; ordinal++){\n if(ENUMS[ordinal].name() === name){\n break;\n }\n }\n return DayOfWeek.of(ordinal+1);\n }\n\n /**\n * Obtains an instance of {@link DayOfWeek} from an `int` value.\n *\n * {@link DayOfWeek} is an enum representing the 7 days of the week.\n * This factory allows the enum to be obtained from the `int` value.\n * The `int` value follows the ISO-8601 standard, from 1 (Monday) to 7 (Sunday).\n *\n * @param {!number} dayOfWeek the day-of-week to represent, from 1 (Monday) to 7 (Sunday)\n * @return {DayOfWeek} the day-of-week singleton, not null\n * @throws DateTimeException if the day-of-week is invalid\n */\n static of(dayOfWeek) {\n if (dayOfWeek < 1 || dayOfWeek > 7) {\n throw new DateTimeException(`Invalid value for DayOfWeek: ${dayOfWeek}`);\n }\n return ENUMS[dayOfWeek - 1];\n }\n\n /**\n * Obtains an instance of {@link DayOfWeek} from a temporal object.\n *\n * A {@link TemporalAccessor} represents some form of date and time information.\n * This factory converts the arbitrary temporal object to an instance of {@link DayOfWeek}.\n *\n * The conversion extracts the {@link ChronoField#DAY_OF_WEEK} field.\n *\n * This method matches the signature of the functional interface {@link TemporalQuery}\n * allowing it to be used as a query via method reference, {@link DayOfWeek::from}.\n *\n * @param {TemporalAccessor} temporal - the temporal object to convert, not null\n * @return {DayOfWeek} the day-of-week, not null\n * @throws DateTimeException if unable to convert to a {@link DayOfWeek}\n */\n static from(temporal) {\n assert(temporal != null, 'temporal', NullPointerException);\n if (temporal instanceof DayOfWeek) {\n return temporal;\n }\n try {\n return DayOfWeek.of(temporal.get(ChronoField.DAY_OF_WEEK));\n } catch (ex) {\n if(ex instanceof DateTimeException) {\n throw new DateTimeException(`Unable to obtain DayOfWeek from TemporalAccessor: ${ \n temporal}, type ${temporal.constructor != null ? temporal.constructor.name : ''}`, ex);\n } else {\n throw ex;\n }\n }\n }\n\n /**\n * Gets the day-of-week `int` value.\n *\n * The values are numbered following the ISO-8601 standard, from 1 (Monday) to 7 (Sunday).\n * See {@link WeekFields#dayOfWeek} for localized week-numbering.\n *\n * @return {number} the day-of-week, from 1 (Monday) to 7 (Sunday)\n */\n value() {\n return this._ordinal + 1;\n }\n\n /**\n * Gets the textual representation, such as 'Mon' or 'Friday'.\n *\n * This returns the textual name used to identify the day-of-week.\n * The parameters control the length of the returned text and the locale.\n *\n * If no textual mapping is found then the numeric value (see {@link getValue}) is returned.\n *\n * @param {TextStyle} style - the length of the text required, not null\n * @param {Locale} locale - the locale to use, not null\n * @return {string} the text value of the day-of-week, not null\n */\n // eslint-disable-next-line no-unused-vars\n displayName(style, locale) {\n throw new IllegalArgumentException('Pattern using (localized) text not implemented yet!');\n // return new DateTimeFormatterBuilder().appendText(ChronoField.DAY_OF_WEEK, style).toFormatter(locale).format(this);\n }\n\n /**\n * Checks if the specified field is supported.\n *\n * This checks if this day-of-week can be queried for the specified field.\n * If false, then calling the {@link range} and\n * {@link get} methods will throw an exception.\n *\n * If the field is {@link ChronoField#DAY_OF_WEEK} then\n * this method returns true.\n * All other {@link ChronoField} instances will return false.\n *\n * If the field is not a {@link ChronoField}, then the result of this method\n * is obtained by invoking `TemporalField.isSupportedBy(TemporalAccessor)`\n * passing `this` as the argument.\n * Whether the field is supported is determined by the field.\n *\n * @param {TemporalField} field - the field to check, null returns false\n * @return {boolean} true if the field is supported on this day-of-week, false if not\n */\n isSupported(field) {\n if (field instanceof ChronoField) {\n return field === ChronoField.DAY_OF_WEEK;\n }\n return field != null && field.isSupportedBy(this);\n }\n\n /**\n * Gets the range of valid values for the specified field.\n *\n * The range object expresses the minimum and maximum valid values for a field.\n * This day-of-week is used to enhance the accuracy of the returned range.\n * If it is not possible to return the range, because the field is not supported\n * or for some other reason, an exception is thrown.\n *\n * If the field is {@link ChronoField#DAY_OF_WEEK} then the\n * range of the day-of-week, from 1 to 7, will be returned.\n * All other {@link ChronoField} instances will throw a {@link DateTimeException}.\n *\n * If the field is not a {@link ChronoField}, then the result of this method\n * is obtained by invoking `TemporalField.rangeRefinedBy(TemporalAccessor)`\n * passing `this` as the argument.\n * Whether the range can be obtained is determined by the field.\n *\n * @param {TemporalField} field - the field to query the range for, not null\n * @return {ValueRange} the range of valid values for the field, not null\n * @throws DateTimeException if the range for the field cannot be obtained\n */\n range(field) {\n if (field === ChronoField.DAY_OF_WEEK) {\n return field.range();\n } else if (field instanceof ChronoField) {\n throw new UnsupportedTemporalTypeException(`Unsupported field: ${field}`);\n }\n return field.rangeRefinedBy(this);\n }\n\n /**\n * Gets the value of the specified field from this day-of-week as an `int`.\n *\n * This queries this day-of-week for the value for the specified field.\n * The returned value will always be within the valid range of values for the field.\n * If it is not possible to return the value, because the field is not supported\n * or for some other reason, an exception is thrown.\n *\n * If the field is {@link ChronoField#DAY_OF_WEEK} then the\n * value of the day-of-week, from 1 to 7, will be returned.\n * All other {@link ChronoField} instances will throw a {@link DateTimeException}.\n *\n * If the field is not a {@link ChronoField}, then the result of this method\n * is obtained by invoking {@link TemporalField.getFrom}\n * passing `this` as the argument. Whether the value can be obtained,\n * and what the value represents, is determined by the field.\n *\n * @param {TemporalField} field - the field to get, not null\n * @return {number} the value for the field, within the valid range of values\n * @throws DateTimeException if a value for the field cannot be obtained\n * @throws DateTimeException if the range of valid values for the field exceeds an `int`\n * @throws DateTimeException if the value is outside the range of valid values for the field\n * @throws ArithmeticException if numeric overflow occurs\n */\n get(field) {\n if (field === ChronoField.DAY_OF_WEEK) {\n return this.value();\n }\n return this.range(field).checkValidIntValue(this.getLong(field), field);\n }\n\n /**\n * Gets the value of the specified field from this day-of-week as a `long`.\n *\n * This queries this day-of-week for the value for the specified field.\n * If it is not possible to return the value, because the field is not supported\n * or for some other reason, an exception is thrown.\n *\n * If the field is {@link ChronoField#DAY_OF_WEEK} then the\n * value of the day-of-week, from 1 to 7, will be returned.\n * All other {@link ChronoField} instances will throw a {@link DateTimeException}.\n *\n * If the field is not a {@link ChronoField}, then the result of this method\n * is obtained by invoking {@link TemporalField.getFrom}\n * passing `this` as the argument. Whether the value can be obtained,\n * and what the value represents, is determined by the field.\n *\n * @param {TemporalField} field - the field to get, not null\n * @return {number} the value for the field\n * @throws DateTimeException if a value for the field cannot be obtained\n * @throws ArithmeticException if numeric overflow occurs\n */\n getLong(field) {\n if (field === ChronoField.DAY_OF_WEEK) {\n return this.value();\n } else if (field instanceof ChronoField) {\n throw new UnsupportedTemporalTypeException(`Unsupported field: ${field}`);\n }\n return field.getFrom(this);\n }\n\n //-----------------------------------------------------------------------\n /**\n * Returns the day-of-week that is the specified number of days after this one.\n *\n * The calculation rolls around the end of the week from Sunday to Monday.\n * The specified period may be negative.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {number} days - the days to add, positive or negative\n * @return {DayOfWeek} the resulting day-of-week, not null\n */\n plus(days) {\n const amount = MathUtil.floorMod(days, 7);\n return ENUMS[MathUtil.floorMod(this._ordinal + (amount + 7), 7)];\n }\n\n /**\n * Returns the day-of-week that is the specified number of days before this one.\n *\n * The calculation rolls around the start of the year from Monday to Sunday.\n * The specified period may be negative.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {number} days - the days to subtract, positive or negative\n * @return {DayOfWeek} the resulting day-of-week, not null\n */\n minus(days) {\n return this.plus(-1 * MathUtil.floorMod(days, 7));\n }\n\n //-----------------------------------------------------------------------\n /**\n * Queries this day-of-week using the specified query.\n *\n * This queries this day-of-week using the specified query strategy object.\n * The {@link TemporalQuery} object defines the logic to be used to\n * obtain the result. Read the documentation of the query to understand\n * what the result of this method will be.\n *\n * The result of this method is obtained by invoking the\n * {@link TemporalQuery#queryFrom} method on the\n * specified query passing `this` as the argument.\n *\n * @param {TemporalQuery} query the query to invoke, not null\n * @return {*} the query result, null may be returned (defined by the query)\n * @throws DateTimeException if unable to query (defined by the query)\n * @throws ArithmeticException if numeric overflow occurs (defined by the query)\n */\n query(query) {\n if (query === TemporalQueries.precision()) {\n return ChronoUnit.DAYS;\n } else if (query === TemporalQueries.localDate() || query === TemporalQueries.localTime() || query === TemporalQueries.chronology() ||\n query === TemporalQueries.zone() || query === TemporalQueries.zoneId() || query === TemporalQueries.offset()) {\n return null;\n }\n assert(query != null, 'query', NullPointerException);\n return query.queryFrom(this);\n }\n\n /**\n * Adjusts the specified temporal object to have this day-of-week.\n *\n * This returns a temporal object of the same observable type as the input\n * with the day-of-week changed to be the same as this.\n *\n * The adjustment is equivalent to using {@link Temporal#with}\n * passing {@link ChronoField#DAY_OF_WEEK} as the field.\n * Note that this adjusts forwards or backwards within a Monday to Sunday week.\n * See {@link WeekFields#dayOfWeek} for localized week start days.\n * See {@link TemporalAdjusters} for other adjusters\n * with more control, such as `next(MONDAY)`.\n *\n * In most cases, it is clearer to reverse the calling pattern by using\n * {@link Temporal#with}:\n *
\n     *   // these two lines are equivalent, but the second approach is recommended\n     *   temporal = thisDayOfWeek.adjustInto(temporal);\n     *   temporal = temporal.with(thisDayOfWeek);\n     * 
\n *\n * For example, given a date that is a Wednesday, the following are output:\n *
\n     *   dateOnWed.with(MONDAY);     // two days earlier\n     *   dateOnWed.with(TUESDAY);    // one day earlier\n     *   dateOnWed.with(WEDNESDAY);  // same date\n     *   dateOnWed.with(THURSDAY);   // one day later\n     *   dateOnWed.with(FRIDAY);     // two days later\n     *   dateOnWed.with(SATURDAY);   // three days later\n     *   dateOnWed.with(SUNDAY);     // four days later\n     * 
\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {TemporalAdjusters} temporal the target object to be adjusted, not null\n * @return {Temporal} the adjusted object, not null\n * @throws DateTimeException if unable to make the adjustment\n * @throws ArithmeticException if numeric overflow occurs\n */\n adjustInto(temporal) {\n requireNonNull(temporal, 'temporal');\n return temporal.with(ChronoField.DAY_OF_WEEK, this.value());\n }\n\n /**\n *\n * @returns {boolean}\n */\n equals(other){ \n return this === other;\n }\n\n /**\n *\n * @returns {string}\n */\n toString(){\n return this._name;\n }\n\n /**\n * Compares this DayOfWeek to another DayOfWeek.\n *\n * The comparison is based on the value of the DayOfWeek.\n * It is \"consistent with equals\", as defined by {@link Comparable}.\n *\n * @param {DayOfWeek} other the other year to compare to, not null\n * @return {number} the comparator value, negative if less, positive if greater\n */ \n compareTo(other) {\n requireNonNull(other, 'other');\n requireInstance(other, DayOfWeek, 'other');\n return this._ordinal - other._ordinal;\n }\n\n /**\n * toJSON() use by JSON.stringify\n * delegates to toString()\n *\n * @return {string}\n */\n toJSON() {\n return this.toString();\n }\n}\n\nlet ENUMS;\n\nexport function _init() {\n DayOfWeek.MONDAY = new DayOfWeek(0, 'MONDAY');\n DayOfWeek.TUESDAY = new DayOfWeek(1, 'TUESDAY');\n DayOfWeek.WEDNESDAY = new DayOfWeek(2, 'WEDNESDAY');\n DayOfWeek.THURSDAY = new DayOfWeek(3, 'THURSDAY');\n DayOfWeek.FRIDAY = new DayOfWeek(4, 'FRIDAY');\n DayOfWeek.SATURDAY = new DayOfWeek(5, 'SATURDAY');\n DayOfWeek.SUNDAY = new DayOfWeek(6, 'SUNDAY');\n\n DayOfWeek.FROM = createTemporalQuery('DayOfWeek.FROM', (temporal) => {\n return DayOfWeek.from(temporal);\n });\n\n ENUMS = [\n DayOfWeek.MONDAY,\n DayOfWeek.TUESDAY,\n DayOfWeek.WEDNESDAY,\n DayOfWeek.THURSDAY,\n DayOfWeek.FRIDAY,\n DayOfWeek.SATURDAY,\n DayOfWeek.SUNDAY\n ];\n}\n","/**\n * @copyright (c) 2016, Philipp Thürwächter & Pattrick Hüper\n * @copyright (c) 2007-present, Stephen Colebourne & Michael Nascimento Santos\n * @license BSD-3-Clause (see LICENSE in the root directory of this source tree)\n */\n\nimport { assert, requireNonNull, requireInstance } from './assert';\nimport { MathUtil } from './MathUtil';\n\nimport { ChronoField } from './temporal/ChronoField';\nimport { ChronoUnit } from './temporal/ChronoUnit';\nimport { DateTimeException, IllegalArgumentException, UnsupportedTemporalTypeException } from './errors';\nimport { IsoChronology } from './chrono/IsoChronology';\nimport { TemporalAccessor } from './temporal/TemporalAccessor';\nimport { TemporalQueries } from './temporal/TemporalQueries';\n\n/**\n * A month-of-year, such as 'July'.\n *\n * {@link Month} is representing the 12 months of the year -\n * January, February, March, April, May, June, July, August, September, October,\n * November and December.\n *\n * In addition to the textual name, each month-of-year has an `int` value.\n * The `int` value follows normal usage and the ISO-8601 standard,\n * from 1 (January) to 12 (December). It is recommended that applications use the static values defined by this class\n * rather than the `int` value to ensure code clarity.\n *\n * This class represents a common concept that is found in many calendar systems.\n * As such, this class may be used by any calendar system that has the month-of-year\n * concept defined exactly equivalent to the ISO-8601 calendar system.\n *\n * ### Static properties of Class {@link Month}\n *\n * Month.JANUARY, Month.FEBRUARY, Month.MARCH, Month.APRIL, Month.MAY, Month.JUNE,\n * Month.JULY, Month.AUGUST, Month.SEPTEMBER, Month.OCTOBER, Month.NOVEMBER, Month.DECEMBER\n *\n */\nexport class Month extends TemporalAccessor {\n\n /**\n *\n * @param {number} ordinal\n * @param {string} name\n * @private\n */\n constructor(value, name){\n super();\n this._value = MathUtil.safeToInt(value);\n this._name = name;\n } \n\n /**\n *\n * @return {number} gets the value\n */\n value() {\n return this._value;\n }\n \n /**\n *\n * @returns {number}\n */\n ordinal(){\n return this._value - 1;\n }\n\n /**\n *\n * @returns {string}\n */\n name(){\n return this._name;\n } \n\n /**\n * Gets the textual representation, such as 'Jan' or 'December'.\n *\n * This returns the textual name used to identify the month-of-year.\n * The parameters control the length of the returned text and the locale.\n *\n * If no textual mapping is found then the numeric value (see {@link getValue}) is returned.\n *\n * @param {TextStyle} style - the length of the text required, not null\n * @param {Locale} locale - the locale to use, not null\n * @return {string} the text value of the day-of-week, not null\n */\n // eslint-disable-next-line no-unused-vars\n displayName(style, locale) {\n // TODO:\n throw new IllegalArgumentException('Pattern using (localized) text not implemented yet!');\n }\n\n /**\n * Checks if the specified field is supported.\n *\n * This checks if this month-of-year can be queried for the specified field.\n * If false, then calling the range (see {@link range}) and\n * get (see {@link get}) methods will throw an exception.\n *\n * If the field is MONTH_OF_YEAR (see {@link ChronoField#MONTH_OF_YEAR}) then\n * this method returns true.\n * All other {@link ChronoField} instances will return false.\n *\n * If the field is not a {@link ChronoField}, then the result of this method\n * is obtained by invoking {@link TemporalField.isSupportedBy}\n * passing `this` as the argument.\n * Whether the field is supported is determined by the field.\n *\n * @param {TemporalField} field - the field to check, null returns false\n * @return {boolean} true if the field is supported on this month-of-year, false if not\n */\n isSupported(field) {\n if (null === field) {\n return false;\n }\n if (field instanceof ChronoField) {\n return field === ChronoField.MONTH_OF_YEAR;\n }\n return field != null && field.isSupportedBy(this);\n }\n\n /**\n * Gets the value of the specified field from this month-of-year as an `int`.\n *\n * This queries this month for the value of the specified field.\n * The returned value will always be within the valid range of values for the field.\n * If it is not possible to return the value, because the field is not supported\n * or for some other reason, an exception is thrown.\n *\n * If the field is MONTH_OF_YEAR (see {@link ChronoField#MONTH_OF_YEAR}) then the\n * value of the month-of-year, from 1 to 12, will be returned.\n * All other {@link ChronoField} instances will throw an {@link UnsupportedTemporalTypeException}.\n *\n * If the field is not a {@link ChronoField}, then the result of this method\n * is obtained by invoking {@link TemporalField.getFrom}\n * passing `this` as the argument. Whether the value can be obtained,\n * and what the value represents, is determined by the field.\n *\n * @param {TemporalField} field - the field to get, not null\n * @return {Number} the value for the field, within the valid range of values\n * @throws DateTimeException if a value for the field cannot be obtained or\n * the value is outside the range of valid values for the field\n * @throws UnsupportedTemporalTypeException if the field is not supported or\n * the range of values exceeds an `int`\n * @throws ArithmeticException if numeric overflow occurs\n */\n get(field) {\n if (field === ChronoField.MONTH_OF_YEAR) {\n return this.value();\n }\n return this.range(field).checkValidIntValue(this.getLong(field), field);\n }\n\n /**\n * Gets the value of the specified field from this month-of-year as a `long`.\n *\n * This queries this month for the value of the specified field.\n * If it is not possible to return the value, because the field is not supported\n * or for some other reason, an exception is thrown.\n *\n * If the field is MONTH_OF_YEAR (see {@link ChronoField#MONTH_OF_YEAR}) then the\n * value of the month-of-year, from 1 to 12, will be returned.\n * All other {@link ChronoField} instances will throw an {@link UnsupportedTemporalTypeException}.\n *\n * If the field is not a {@link ChronoField}, then the result of this method\n * is obtained by invoking {@link TemporalField.getFrom}\n * passing `this` as the argument. Whether the value can be obtained,\n * and what the value represents, is determined by the field.\n *\n * @param {TemporalField} field - the field to get, not null\n * @return {Number} the value for the field\n * @throws DateTimeException if a value for the field cannot be obtained\n * @throws UnsupportedTemporalTypeException if the field is not supported\n * @throws ArithmeticException if numeric overflow occurs\n */\n getLong(field) {\n if (field === ChronoField.MONTH_OF_YEAR) {\n return this.value();\n } else if (field instanceof ChronoField) {\n throw new UnsupportedTemporalTypeException(`Unsupported field: ${field}`);\n }\n return field.getFrom(this);\n }\n\n /**\n * Returns the month-of-year that is the specified number of months after this one.\n *\n * The calculation rolls around the end of the year from December to January.\n * The specified period may be negative.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {number} months - the months to add, positive or negative\n * @return {Month} the resulting month, not null\n */\n plus(months) {\n const amount = MathUtil.intMod(months, 12) + 12; // + 12 to make sure negative arguments are positive, the total is \"corrected\" by the next % 12\n let newMonthVal = MathUtil.intMod((this.value() + amount), 12);\n /* December is 12, not 0, but 12 % 12 = 0 */\n newMonthVal = newMonthVal === 0 ? 12 : newMonthVal;\n return Month.of(newMonthVal);\n }\n\n /**\n * Returns the month-of-year that is the specified number of months before this one.\n *\n * The calculation rolls around the start of the year from January to December.\n * The specified period may be negative.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {number} months - the months to subtract, positive or negative\n * @return {Month} the resulting month, not null\n */\n minus(months) {\n return this.plus(-1 * MathUtil.intMod(months, 12));\n }\n\n /**\n * Gets the length of this month in days.\n *\n * This takes a flag to determine whether to return the length for a leap year or not.\n *\n * February has 28 days in a standard year and 29 days in a leap year.\n * April, June, September and November have 30 days.\n * All other months have 31 days.\n *\n * @param {boolean} leapYear - true if the length is required for a leap year\n * @return {number} the length of this month in days, from 28 to 31\n */\n length(leapYear) {\n switch (this) {\n case Month.FEBRUARY:\n return (leapYear ? 29 : 28);\n case Month.APRIL:\n case Month.JUNE:\n case Month.SEPTEMBER:\n case Month.NOVEMBER:\n return 30;\n default:\n return 31;\n }\n }\n\n /**\n * Gets the minimum length of this month in days.\n *\n * February has a minimum length of 28 days.\n * April, June, September and November have 30 days.\n * All other months have 31 days.\n *\n * @return {number} the minimum length of this month in days, from 28 to 31\n */\n minLength() {\n switch (this) {\n case Month.FEBRUARY:\n return 28;\n case Month.APRIL:\n case Month.JUNE:\n case Month.SEPTEMBER:\n case Month.NOVEMBER:\n return 30;\n default:\n return 31;\n }\n }\n\n /**\n * Gets the maximum length of this month in days.\n *\n * February has a maximum length of 29 days.\n * April, June, September and November have 30 days.\n * All other months have 31 days.\n *\n * @return {number} the maximum length of this month in days, from 29 to 31\n */\n maxLength() {\n switch (this) {\n case Month.FEBRUARY:\n return 29;\n case Month.APRIL:\n case Month.JUNE:\n case Month.SEPTEMBER:\n case Month.NOVEMBER:\n return 30;\n default:\n return 31;\n }\n }\n\n /**\n * Gets the day-of-year corresponding to the first day of this month.\n *\n * This returns the day-of-year that this month begins on, using the leap\n * year flag to determine the length of February.\n *\n * @param {boolean} leapYear - true if the length is required for a leap year\n * @return {number} the day of year corresponding to the first day of this month, from 1 to 336\n */\n firstDayOfYear(leapYear) {\n const leap = leapYear ? 1 : 0;\n switch (this) {\n case Month.JANUARY:\n return 1;\n case Month.FEBRUARY:\n return 32;\n case Month.MARCH:\n return 60 + leap;\n case Month.APRIL:\n return 91 + leap;\n case Month.MAY:\n return 121 + leap;\n case Month.JUNE:\n return 152 + leap;\n case Month.JULY:\n return 182 + leap;\n case Month.AUGUST:\n return 213 + leap;\n case Month.SEPTEMBER:\n return 244 + leap;\n case Month.OCTOBER:\n return 274 + leap;\n case Month.NOVEMBER:\n return 305 + leap;\n case Month.DECEMBER:\n default:\n return 335 + leap;\n }\n }\n\n /**\n * Gets the month corresponding to the first month of this quarter.\n *\n * The year can be divided into four quarters.\n * This method returns the first month of the quarter for the base month.\n * January, February and March return January.\n * April, May and June return April.\n * July, August and September return July.\n * October, November and December return October.\n *\n * @return {Month} the first month of the quarter corresponding to this month, not null\n */\n firstMonthOfQuarter() {\n switch (this) {\n case Month.JANUARY:\n case Month.FEBRUARY:\n case Month.MARCH:\n return Month.JANUARY;\n case Month.APRIL:\n case Month.MAY:\n case Month.JUNE:\n return Month.APRIL;\n case Month.JULY:\n case Month.AUGUST:\n case Month.SEPTEMBER:\n return Month.JULY;\n case Month.OCTOBER:\n case Month.NOVEMBER:\n case Month.DECEMBER:\n default:\n return Month.OCTOBER;\n }\n }\n\n /**\n * Queries this month-of-year using the specified query.\n *\n * This queries this month-of-year using the specified query strategy object.\n * The {@link TemporalQuery} object defines the logic to be used to\n * obtain the result. Read the documentation of the query to understand\n * what the result of this method will be.\n *\n * The result of this method is obtained by invoking the\n * {@link TemporalQuery#queryFrom} method on the\n * specified query passing `this` as the argument.\n *\n * @param {TemporalQuery} query - the query to invoke, not null\n * @return {*} the query result, null may be returned (defined by the query)\n * @throws DateTimeException if unable to query (defined by the query)\n * @throws ArithmeticException if numeric overflow occurs (defined by the query)\n */\n query(query) {\n assert(query != null, 'query() parameter must not be null', DateTimeException);\n if (query === TemporalQueries.chronology()) {\n return IsoChronology.INSTANCE;\n } else if (query === TemporalQueries.precision()) {\n return ChronoUnit.MONTHS;\n }\n return super.query(query);\n }\n\n\n\n /**\n * toString implementation... in JDK this is inherited from the Enum class\n *\n * @return {String}\n */\n toString() {\n switch (this) {\n case Month.JANUARY:\n return 'JANUARY';\n case Month.FEBRUARY:\n return 'FEBRUARY';\n case Month.MARCH:\n return 'MARCH';\n case Month.APRIL:\n return 'APRIL';\n case Month.MAY:\n return 'MAY';\n case Month.JUNE:\n return 'JUNE';\n case Month.JULY:\n return 'JULY';\n case Month.AUGUST:\n return 'AUGUST';\n case Month.SEPTEMBER:\n return 'SEPTEMBER';\n case Month.OCTOBER:\n return 'OCTOBER';\n case Month.NOVEMBER:\n return 'NOVEMBER';\n case Month.DECEMBER:\n return 'DECEMBER';\n default:\n return `unknown Month, value: ${this.value()}`;\n }\n }\n\n /**\n * toJSON() use by JSON.stringify\n * delegates to toString()\n *\n * @return {string}\n */\n toJSON() {\n return this.toString();\n }\n\n /**\n * Adjusts the specified temporal object to have this month-of-year.\n *\n * This returns a temporal object of the same observable type as the input\n * with the month-of-year changed to be the same as this.\n *\n * The adjustment is equivalent to using {@link Temporal#with}\n * passing {@link ChronoField#MONTH_OF_YEAR} as the field.\n * If the specified temporal object does not use the ISO calendar system then\n * a {@link DateTimeException} is thrown.\n *\n * In most cases, it is clearer to reverse the calling pattern by using\n * {@link Temporal#with}:\n *
\n     *   // these two lines are equivalent, but the second approach is recommended\n     *   temporal = thisMonth.adjustInto(temporal);\n     *   temporal = temporal.with(thisMonth);\n     * 
\n *\n * For example, given a date in May, the following are output:\n *
\n     *   dateInMay.with(JANUARY);    // four months earlier\n     *   dateInMay.with(APRIL);      // one months earlier\n     *   dateInMay.with(MAY);        // same date\n     *   dateInMay.with(JUNE);       // one month later\n     *   dateInMay.with(DECEMBER);   // seven months later\n     * 
\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {Temporal} temporal - the target object to be adjusted, not null\n * @return {Temporal} the adjusted object, not null\n * @throws DateTimeException if unable to make the adjustment\n * @throws ArithmeticException if numeric overflow occurs\n */\n adjustInto(temporal) {\n /* we support only ISO for now\n if (Chronology.from(temporal).equals(IsoChronology.INSTANCE) === false) {\n throw new DateTimeException('Adjustment only supported on ISO date-time');\n }\n */\n return temporal.with(ChronoField.MONTH_OF_YEAR, this.value());\n }\n \n /**\n * Compares this Month to another Month.\n *\n * The comparison is based on the value of the Month.\n * It is \"consistent with equals\", as defined by {@link Comparable}.\n *\n * @param {Month} other the other year to compare to, not null\n * @return {number} the comparator value, negative if less, positive if greater\n */ \n compareTo(other) {\n requireNonNull(other, 'other');\n requireInstance(other, Month, 'other');\n return this._value - other._value;\n } \n \n /**\n *\n * @returns {boolean}\n */\n equals(other){ \n return this === other;\n }\n\n /**\n *\n * @param {string} name\n * @returns {Month}\n */\n static valueOf(name) {\n let ordinal = 0;\n for(ordinal; ordinal < MONTHS.length; ordinal++){\n if(MONTHS[ordinal].name() === name){\n break;\n }\n }\n return Month.of(ordinal+1);\n }\n \n\n /**\n * replacement for enum values\n * @return {Month[]}\n */\n static values(){\n return MONTHS.slice();\n }\n\n /**\n *\n * @param {number} month\n * @return {Month} not null\n **/\n static of(month) {\n if (month < 1 || month > 12) {\n assert(false, `Invalid value for MonthOfYear: ${month}`, DateTimeException);\n }\n return MONTHS[month-1];\n }\n\n /**\n * Obtains an instance of {@link Month} from a temporal object.\n *\n * This obtains a month based on the specified temporal.\n * A {@link TemporalAccessor} represents an arbitrary set of date and time information,\n * which this factory converts to an instance of {@link Month}.\n *\n * The conversion extracts the MONTH_OF_YEAR (see {@link ChronoField#MONTH_OF_YEAR}) field.\n * The extraction is only permitted if the temporal object has an ISO\n * chronology, or can be converted to a {@link LocalDate}.\n *\n * This method matches the signature of the functional interface {@link TemporalQuery}\n * allowing it to be used in queries via method reference, {@link Month::from}.\n *\n * @param {TemporalAccessor} temporal the temporal object to convert, not null\n * @return {Month} the month-of-year, not null\n * @throws DateTimeException if unable to convert to a {@link Month}\n */\n static from(temporal) {\n if (temporal instanceof Month) {\n return temporal;\n }\n try {\n /* only ISO for now\n if (IsoChronology.INSTANCE.equals(Chronology.from(temporal)) == false) {\n temporal = LocalDate.from(temporal);\n }*/\n return Month.of(temporal.get(ChronoField.MONTH_OF_YEAR));\n } catch (ex) {\n throw new DateTimeException(`Unable to obtain Month from TemporalAccessor: ${ \n temporal} of type ${temporal && temporal.constructor != null ? temporal.constructor.name : ''}`, ex);\n }\n }\n}\n\nlet MONTHS;\n\nexport function _init() {\n Month.JANUARY = new Month(1, 'JANUARY');\n Month.FEBRUARY = new Month(2, 'FEBRUARY');\n Month.MARCH = new Month(3, 'MARCH');\n Month.APRIL = new Month(4, 'APRIL');\n Month.MAY = new Month(5, 'MAY');\n Month.JUNE = new Month(6, 'JUNE');\n Month.JULY = new Month(7, 'JULY');\n Month.AUGUST = new Month(8, 'AUGUST');\n Month.SEPTEMBER = new Month(9, 'SEPTEMBER');\n Month.OCTOBER = new Month(10, 'OCTOBER');\n Month.NOVEMBER = new Month(11, 'NOVEMBER');\n Month.DECEMBER = new Month(12, 'DECEMBER');\n\n MONTHS = [\n Month.JANUARY, Month.FEBRUARY, Month.MARCH, Month.APRIL, Month.MAY, Month.JUNE,\n Month.JULY, Month.AUGUST, Month.SEPTEMBER, Month.OCTOBER, Month.NOVEMBER, Month.DECEMBER\n ];\n}\n","/*\n * @copyright (c) 2016, Philipp Thürwächter & Pattrick Hüper\n * @copyright (c) 2007-present, Stephen Colebourne & Michael Nascimento Santos\n * @license BSD-3-Clause (see LICENSE in the root directory of this source tree)\n */\n\nimport { MathUtil } from './MathUtil';\nimport { requireNonNull, requireInstance } from './assert';\nimport { DateTimeException, UnsupportedTemporalTypeException, ArithmeticException, DateTimeParseException } from './errors';\n\nimport { IsoChronology } from './chrono/IsoChronology';\n\nimport { ChronoUnit } from './temporal/ChronoUnit';\nimport { TemporalAmount } from './temporal/TemporalAmount';\n\nimport { LocalDate } from './LocalDate';\n\n/**\n * The pattern for parsing.\n */\nconst PATTERN = /([-+]?)P(?:([-+]?[0-9]+)Y)?(?:([-+]?[0-9]+)M)?(?:([-+]?[0-9]+)W)?(?:([-+]?[0-9]+)D)?/;\n\n/**\n * A date-based amount of time, such as '2 years, 3 months and 4 days'.\n *\n * This class models a quantity or amount of time in terms of years, months and days.\n * See {@link Duration} for the time-based equivalent to this class.\n *\n * Durations and period differ in their treatment of daylight savings time\n * when added to {@link ZonedDateTime}. A {@link Duration} will add an exact\n * number of seconds, thus a duration of one day is always exactly 24 hours.\n * By contrast, a {@link Period} will add a conceptual day, trying to maintain\n * the local time.\n *\n * For example, consider adding a period of one day and a duration of one day to\n * 18:00 on the evening before a daylight savings gap. The {@link Period} will add\n * the conceptual day and result in a {@link ZonedDateTime} at 18:00 the following day.\n * By contrast, the {@link Duration} will add exactly 24 hours, resulting in a\n * {@link ZonedDateTime} at 19:00 the following day (assuming a one hour DST gap).\n *\n * The supported units of a period are {@link ChronoUnit#YEARS},\n * {@link ChronoUnit#MONTHS} and {@link ChronoUnit#DAYS}.\n * All three fields are always present, but may be set to zero.\n *\n * The period may be used with any calendar system.\n * The meaning of a 'year' or 'month' is only applied when the object is added to a date.\n *\n * The period is modeled as a directed amount of time, meaning that individual parts of the\n * period may be negative.\n *\n * The months and years fields may be normalized (see {@link normalized}).\n * The normalization assumes a 12 month year, so is not appropriate for all calendar systems.\n *\n * ### Static properties of Class {@link Period}\n *\n * Period.ZERO\n *\n * A constant for a period of zero.\n *\n */\nexport class Period extends TemporalAmount /* extends ChronoPeriod */ {\n\n /**\n * do not call the constructor directly\n * use a factory method instead\n *\n * @param {number} years\n * @param {number} months\n * @param {number} days\n * @private\n */\n constructor(years, months, days){\n super();\n \n const _years = MathUtil.safeToInt(years);\n const _months = MathUtil.safeToInt(months);\n const _days = MathUtil.safeToInt(days);\n\n if( _years === 0 && _months === 0 && _days === 0 ){\n if (!Period.ZERO) {\n this._years = _years;\n this._months = _months;\n this._days = _days;\n Period.ZERO = this;\n }\n return Period.ZERO;\n }\n \n /**\n * The number of years.\n */\n this._years = _years;\n /**\n * The number of months.\n */\n this._months = _months;\n /**\n * The number of days.\n */\n this._days = _days;\n }\n\n //-----------------------------------------------------------------------\n /**\n * Obtains a {@link Period} representing a number of years.\n *\n * The resulting period will have the specified years.\n * The months and days units will be zero.\n *\n * @param {number} years - the number of years, positive or negative\n * @return {Period} the period of years, not null\n */\n static ofYears(years) {\n return Period.create(years, 0, 0);\n }\n\n /**\n * Obtains a {@link Period} representing a number of months.\n *\n * The resulting period will have the specified months.\n * The years and days units will be zero.\n *\n * @param {number} months - the number of months, positive or negative\n * @return {Period} the period of months, not null\n */\n static ofMonths(months) {\n return Period.create(0, months, 0);\n }\n\n /**\n * Obtains a {@link Period} representing a number of weeks.\n *\n * The resulting period will have days equal to the weeks multiplied by seven.\n * The years and months units will be zero.\n *\n * @param {number} weeks - the number of weeks, positive or negative\n * @return {Period} the period of days, not null\n */\n static ofWeeks(weeks) {\n return Period.create(0, 0, MathUtil.safeMultiply(weeks, 7));\n }\n\n /**\n * Obtains a {@link Period} representing a number of days.\n *\n * The resulting period will have the specified days.\n * The years and months units will be zero.\n *\n * @param {number} days - the number of days, positive or negative\n * @return {Period} the period of days, not null\n */\n static ofDays(days) {\n return Period.create(0, 0, days);\n }\n\n //-----------------------------------------------------------------------\n /**\n * Obtains a {@link Period} representing a number of years, months and days.\n *\n * This creates an instance based on years, months and days.\n *\n * @param {!number} years - the amount of years, may be negative\n * @param {!number} months - the amount of months, may be negative\n * @param {!number} days - the amount of days, may be negative\n * @return {Period} the period of years, months and days, not null\n */\n static of(years, months, days) {\n return Period.create(years, months, days);\n }\n\n //-----------------------------------------------------------------------\n /**\n * Obtains an instance of {@link Period} from a temporal amount.\n *\n * This obtains a period based on the specified amount.\n * A {@link TemporalAmount} represents an - amount of time, which may be\n * date-based or time-based, which this factory extracts to a {@link Period}.\n *\n * The conversion loops around the set of units from the amount and uses\n * the {@link ChronoUnit#YEARS}, {@link ChronoUnit#MONTHS}\n * and {@link ChronoUnit#DAYS} units to create a period.\n * If any other units are found then an exception is thrown.\n *\n * If the amount is a {@link ChronoPeriod} then it must use the ISO chronology.\n *\n * @param {TemporalAmount} amount - the temporal amount to convert, not null\n * @return {Period} the equivalent period, not null\n * @throws DateTimeException if unable to convert to a {@link Period}\n * @throws ArithmeticException if the amount of years, months or days exceeds an int\n */\n static from(amount) {\n if (amount instanceof Period) {\n return amount;\n }\n /*\n if (amount instanceof ChronoPeriod) {\n if (IsoChronology.INSTANCE !== amount.chronology()) {\n throw new DateTimeException('Period requires ISO chronology: ' + amount);\n }\n }\n*/\n requireNonNull(amount, 'amount');\n let years = 0;\n let months = 0;\n let days = 0;\n const units = amount.units();\n for (let i=0; i\n * 'P2Y' -- Period.ofYears(2)\n * 'P3M' -- Period.ofMonths(3)\n * 'P4W' -- Period.ofWeeks(4)\n * 'P5D' -- Period.ofDays(5)\n * 'P1Y2M3D' -- Period.of(1, 2, 3)\n * 'P1Y2M3W4D' -- Period.of(1, 2, 25)\n * 'P-1Y2M' -- Period.of(-1, 2, 0)\n * '-P1Y2M' -- Period.of(-1, -2, 0)\n * \n *\n * @param {string} text - the text to parse, not null\n * @return {Period} the parsed period, not null\n * @throws DateTimeParseException if the text cannot be parsed to a period\n */\n static parse(text) {\n requireNonNull(text, 'text');\n try {\n return Period._parse(text);\n } catch (ex){\n if(ex instanceof ArithmeticException){\n throw new DateTimeParseException('Text cannot be parsed to a Period', text, 0, ex);\n } else {\n throw ex;\n }\n }\n }\n\n /**\n * because functions that containing a try/ catch block cant be optimized,\n * we put the code in a sub function.\n */\n static _parse(text){\n const matches = PATTERN.exec(text);\n if (matches != null) {\n const negate = '-' === matches[1] ? -1 : 1;\n const yearMatch = matches[2];\n const monthMatch = matches[3];\n const weekMatch = matches[4];\n const dayMatch = matches[5];\n if (yearMatch != null || monthMatch != null || weekMatch != null || dayMatch != null) {\n const years = Period._parseNumber(text, yearMatch, negate);\n const months = Period._parseNumber(text, monthMatch, negate);\n const weeks = Period._parseNumber(text, weekMatch, negate);\n let days = Period._parseNumber(text, dayMatch, negate);\n days = MathUtil.safeAdd(days, MathUtil.safeMultiply(weeks, 7));\n return Period.create(years, months, days);\n }\n }\n throw new DateTimeParseException('Text cannot be parsed to a Period', text, 0);\n }\n\n static _parseNumber(text, str, negate) {\n if (str == null) {\n return 0;\n }\n const val = MathUtil.parseInt(str);\n return MathUtil.safeMultiply(val, negate);\n }\n\n //-----------------------------------------------------------------------\n /**\n * Creates an instance.\n *\n * @param {number} years - the amount\n * @param {number} months - the amount\n * @param {number} days - the amount\n * @return {Duration}\n */\n static create(years, months, days) {\n return new Period(years, months, days);\n }\n\n //-----------------------------------------------------------------------\n /**\n * Gets the list of units, from largest to smallest, that fully define this amount.\n *\n * @returns {ChronoUnit[]} list of units\n */\n units() {\n return [ChronoUnit.YEARS, ChronoUnit.MONTHS, ChronoUnit.DAYS];\n }\n\n /**\n * Gets the chronology that defines the meaning of the supported units.\n *\n * The period is defined by the chronology.\n * It controls the supported units and restricts addition/subtraction\n * to {@link ChronoLocalDate} instances of the same chronology.\n *\n * @return {IsoChronology} the chronology defining the period, not null\n */\n chronology() {\n return IsoChronology.INSTANCE;\n }\n\n /**\n * Gets the value of the requested unit.\n *\n * The supported units are chronology specific.\n * They will typically be {@link ChronoUnit#YEARS},\n * {@link ChronoUnit#MONTHS} and {@link ChronoUnit#DAYS}.\n * Requesting an unsupported unit will throw an exception.\n *\n * @param {TemporalUnit} unit the {@link TemporalUnit} for which to return the value\n * @return {number} the long value of the unit\n * @throws DateTimeException if the unit is not supported\n * @throws UnsupportedTemporalTypeException if the unit is not supported\n */\n get(unit) {\n if (unit === ChronoUnit.YEARS) {\n return this._years;\n }\n if (unit === ChronoUnit.MONTHS) {\n return this._months;\n }\n if (unit === ChronoUnit.DAYS) {\n return this._days;\n }\n throw new UnsupportedTemporalTypeException(`Unsupported unit: ${unit}`);\n }\n\n //-----------------------------------------------------------------------\n /**\n * Checks if all three units of this period are zero.\n *\n * A zero period has the value zero for the years, months and days units.\n *\n * @return {boolean} true if this period is zero-length\n */\n isZero() {\n return (this === Period.ZERO);\n }\n\n /**\n * Checks if any of the three units of this period are negative.\n *\n * This checks whether the years, months or days units are less than zero.\n *\n * @return {boolean} true if any unit of this period is negative\n */\n isNegative() {\n return this._years < 0 || this._months < 0 || this._days < 0;\n }\n\n //-----------------------------------------------------------------------\n /**\n * Gets the amount of years of this period.\n *\n * This returns the years unit.\n *\n * The months unit is not normalized with the years unit.\n * This means that a period of '15 months' is different to a period\n * of '1 year and 3 months'.\n *\n * @return {number} the amount of years of this period, may be negative\n */\n years() {\n return this._years;\n }\n\n /**\n * Gets the amount of months of this period.\n *\n * This returns the months unit.\n *\n * The months unit is not normalized with the years unit.\n * This means that a period of '15 months' is different to a period\n * of '1 year and 3 months'.\n *\n * @return {number} the amount of months of this period, may be negative\n */\n months() {\n return this._months;\n }\n\n /**\n * Gets the amount of days of this period.\n *\n * This returns the days unit.\n *\n * @return {number} the amount of days of this period, may be negative\n */\n days() {\n return this._days;\n }\n\n //-----------------------------------------------------------------------\n /**\n * Returns a copy of this period with the specified amount of years.\n *\n * This sets the amount of the years unit in a copy of this period.\n * The months and days units are unaffected.\n *\n * The months unit is not normalized with the years unit.\n * This means that a period of '15 months' is different to a period\n * of '1 year and 3 months'.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {number} years - the years to represent, may be negative\n * @return {Period} a {@link Period} based on this period with the requested years, not null\n */\n withYears(years) {\n if (years === this._years) {\n return this;\n }\n return Period.create(years, this._months, this._days);\n }\n\n /**\n * Returns a copy of this period with the specified amount of months.\n *\n * This sets the amount of the months unit in a copy of this period.\n * The years and days units are unaffected.\n *\n * The months unit is not normalized with the years unit.\n * This means that a period of '15 months' is different to a period\n * of '1 year and 3 months'.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {number} months - the months to represent, may be negative\n * @return {Period} a {@link Period} based on this period with the requested months, not null\n */\n withMonths(months) {\n if (months === this._months) {\n return this;\n }\n return Period.create(this._years, months, this._days);\n }\n\n /**\n * Returns a copy of this period with the specified amount of days.\n *\n * This sets the amount of the days unit in a copy of this period.\n * The years and months units are unaffected.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {number} days - the days to represent, may be negative\n * @return {Period} a {@link Period} based on this period with the requested days, not null\n */\n withDays(days) {\n if (days === this._days) {\n return this;\n }\n return Period.create(this._years, this._months, days);\n }\n\n //-----------------------------------------------------------------------\n /**\n * Returns a copy of this period with the specified amount added.\n *\n * This input amount is converted to a {@link Period} using {@link from}.\n * This operates separately on the years, months and days.\n *\n * For example, '1 year, 6 months and 3 days' plus '2 years, 2 months and 2 days'\n * returns '3 years, 8 months and 5 days'.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {TemporalAmount} amountToAdd - the period to add, not null\n * @return {Period} a {@link Period} based on this period with the requested period added, not null\n * @throws ArithmeticException if numeric overflow occurs\n */\n plus(amountToAdd) {\n const amount = Period.from(amountToAdd);\n return Period.create(\n MathUtil.safeAdd(this._years, amount._years),\n MathUtil.safeAdd(this._months, amount._months),\n MathUtil.safeAdd(this._days, amount._days));\n }\n\n /**\n * Returns a copy of this period with the specified years added.\n *\n * This adds the amount to the years unit in a copy of this period.\n * The months and days units are unaffected.\n * For example, '1 year, 6 months and 3 days' plus 2 years returns '3 years, 6 months and 3 days'.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {number} yearsToAdd - the years to add, positive or negative\n * @return {Period} a {@link Period} based on this period with the specified years added, not null\n * @throws ArithmeticException if numeric overflow occurs\n */\n plusYears(yearsToAdd) {\n if (yearsToAdd === 0) {\n return this;\n }\n return Period.create(MathUtil.safeToInt(MathUtil.safeAdd(this._years, yearsToAdd)), this._months, this._days);\n }\n\n /**\n * Returns a copy of this period with the specified months added.\n *\n * This adds the amount to the months unit in a copy of this period.\n * The years and days units are unaffected.\n * For example, '1 year, 6 months and 3 days' plus 2 months returns '1 year, 8 months and 3 days'.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {number} monthsToAdd - the months to add, positive or negative\n * @return {Period} a {@link Period} based on this period with the specified months added, not null\n * @throws ArithmeticException if numeric overflow occurs\n */\n plusMonths(monthsToAdd) {\n if (monthsToAdd === 0) {\n return this;\n }\n return Period.create(this._years, MathUtil.safeToInt(MathUtil.safeAdd(this._months, monthsToAdd)), this._days);\n }\n\n /**\n * Returns a copy of this period with the specified days added.\n *\n * This adds the amount to the days unit in a copy of this period.\n * The years and months units are unaffected.\n * For example, '1 year, 6 months and 3 days' plus 2 days returns '1 year, 6 months and 5 days'.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {number} daysToAdd - the days to add, positive or negative\n * @return {Period} a {@link Period} based on this period with the specified days added, not null\n * @throws ArithmeticException if numeric overflow occurs\n */\n plusDays(daysToAdd) {\n if (daysToAdd === 0) {\n return this;\n }\n return Period.create(this._years, this._months, MathUtil.safeToInt(MathUtil.safeAdd(this._days, daysToAdd)));\n }\n\n //-----------------------------------------------------------------------\n /**\n * Returns a copy of this period with the specified amount subtracted.\n *\n * This input amount is converted to a {@link Period} using {@link from}.\n * This operates separately on the years, months and days.\n *\n * For example, '1 year, 6 months and 3 days' minus '2 years, 2 months and 2 days'\n * returns '-1 years, 4 months and 1 day'.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {TemporalAmount} amountToSubtract - the period to subtract, not null\n * @return {Period} a {@link Period} based on this period with the requested period subtracted, not null\n * @throws ArithmeticException if numeric overflow occurs\n */\n minus(amountToSubtract) {\n const amount = Period.from(amountToSubtract);\n return Period.create(\n MathUtil.safeSubtract(this._years, amount._years),\n MathUtil.safeSubtract(this._months, amount._months),\n MathUtil.safeSubtract(this._days, amount._days));\n }\n\n /**\n * Returns a copy of this period with the specified years subtracted.\n *\n * This subtracts the amount from the years unit in a copy of this period.\n * The months and days units are unaffected.\n * For example, '1 year, 6 months and 3 days' minus 2 years returns '-1 years, 6 months and 3 days'.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {number} yearsToSubtract - the years to subtract, positive or negative\n * @return {Period} a {@link Period} based on this period with the specified years subtracted, not null\n * @throws ArithmeticException if numeric overflow occurs\n */\n minusYears(yearsToSubtract) {\n return this.plusYears(-1 * yearsToSubtract);\n }\n\n /**\n * Returns a copy of this period with the specified months subtracted.\n *\n * This subtracts the amount from the months unit in a copy of this period.\n * The years and days units are unaffected.\n * For example, '1 year, 6 months and 3 days' minus 2 months returns '1 year, 4 months and 3 days'.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {number} monthsToSubtract - the years to subtract, positive or negative\n * @return {Period} a {@link Period} based on this period with the specified months subtracted, not null\n * @throws ArithmeticException if numeric overflow occurs\n */\n minusMonths(monthsToSubtract) {\n return this.plusMonths(-1 * monthsToSubtract);\n }\n\n /**\n * Returns a copy of this period with the specified days subtracted.\n *\n * This subtracts the amount from the days unit in a copy of this period.\n * The years and months units are unaffected.\n * For example, '1 year, 6 months and 3 days' minus 2 days returns '1 year, 6 months and 1 day'.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {number} daysToSubtract - the months to subtract, positive or negative\n * @return {Period} a {@link Period} based on this period with the specified days subtracted, not null\n * @throws ArithmeticException if numeric overflow occurs\n */\n minusDays(daysToSubtract) {\n return this.plusDays(-1 * daysToSubtract);\n }\n\n //-----------------------------------------------------------------------\n /**\n * Returns a new instance with each element in this period multiplied\n * by the specified scalar.\n *\n * This simply multiplies each field, years, months, days and normalized time,\n * by the scalar. No normalization is performed.\n *\n * @param {number} scalar - the scalar to multiply by, not null\n * @return {Period} a {@link Period} based on this period with the amounts multiplied by the scalar, not null\n * @throws ArithmeticException if numeric overflow occurs\n */\n multipliedBy(scalar) {\n if (this === Period.ZERO || scalar === 1) {\n return this;\n }\n return Period.create(\n MathUtil.safeMultiply(this._years, scalar),\n MathUtil.safeMultiply(this._months, scalar),\n MathUtil.safeMultiply(this._days, scalar));\n }\n\n /**\n * Returns a new instance with each amount in this period negated.\n *\n * @return {Period} a {@link Period} based on this period with the amounts negated, not null\n * @throws ArithmeticException if numeric overflow occurs\n */\n negated() {\n return this.multipliedBy(-1);\n }\n\n //-----------------------------------------------------------------------\n /**\n * Returns a copy of this period with the years and months normalized\n * using a 12 month year.\n *\n * This normalizes the years and months units, leaving the days unit unchanged.\n * The months unit is adjusted to have an absolute value less than 11,\n * with the years unit being adjusted to compensate. For example, a period of\n * '1 Year and 15 months' will be normalized to '2 years and 3 months'.\n *\n * The sign of the years and months units will be the same after normalization.\n * For example, a period of '1 year and -25 months' will be normalized to\n * '-1 year and -1 month'.\n *\n * This normalization uses a 12 month year which is not valid for all calendar systems.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @return {Period} a {@link Period} based on this period with excess months normalized to years, not null\n * @throws ArithmeticException if numeric overflow occurs\n */\n normalized() {\n const totalMonths = this.toTotalMonths();\n const splitYears = MathUtil.intDiv(totalMonths, 12);\n const splitMonths = MathUtil.intMod(totalMonths, 12); // no overflow\n if (splitYears === this._years && splitMonths === this._months) {\n return this;\n }\n return Period.create(MathUtil.safeToInt(splitYears), splitMonths, this._days);\n }\n\n /**\n * Gets the total number of months in this period using a 12 month year.\n *\n * This returns the total number of months in the period by multiplying the\n * number of years by 12 and adding the number of months.\n *\n * This uses a 12 month year which is not valid for all calendar systems.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @return {number} the total number of months in the period, may be negative\n */\n toTotalMonths() {\n return this._years * 12 + this._months; // no overflow\n }\n\n //-------------------------------------------------------------------------\n /**\n * Adds this period to the specified temporal object.\n *\n * This returns a temporal object of the same observable type as the input\n * with this period added.\n *\n * In most cases, it is clearer to reverse the calling pattern by using\n * {@link Temporal#plus}.\n *
\n     *   // these two lines are equivalent, but the second approach is recommended\n     *   dateTime = thisPeriod.addTo(dateTime);\n     *   dateTime = dateTime.plus(thisPeriod);\n     * 
\n *\n * The calculation will add the years, then months, then days.\n * Only non-zero amounts will be added.\n * If the date-time has a calendar system with a fixed number of months in a\n * year, then the years and months will be combined before being added.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {Temporal} temporal - the temporal object to adjust, not null\n * @return {Temporal} an object of the same type with the adjustment made, not null\n * @throws DateTimeException if unable to add\n * @throws ArithmeticException if numeric overflow occurs\n */\n addTo(temporal) {\n requireNonNull(temporal, 'temporal');\n if (this._years !== 0) {\n if (this._months !== 0) {\n temporal = temporal.plus(this.toTotalMonths(), ChronoUnit.MONTHS);\n } else {\n temporal = temporal.plus(this._years, ChronoUnit.YEARS);\n }\n } else if (this._months !== 0) {\n temporal = temporal.plus(this._months, ChronoUnit.MONTHS);\n }\n if (this._days !== 0) {\n temporal = temporal.plus(this._days, ChronoUnit.DAYS);\n }\n return temporal;\n }\n\n /**\n * Subtracts this period from the specified temporal object.\n *\n * This returns a temporal object of the same observable type as the input\n * with this period subtracted.\n *\n * In most cases, it is clearer to reverse the calling pattern by using\n * {@link Temporal#minus}.\n *
\n     *   // these two lines are equivalent, but the second approach is recommended\n     *   dateTime = thisPeriod.subtractFrom(dateTime);\n     *   dateTime = dateTime.minus(thisPeriod);\n     * 
\n *\n * The calculation operates as follows.\n * First, the chronology of the temporal is checked to ensure it is ISO chronology or null.\n * Second, if the months are zero, the years are added if non-zero, otherwise\n * the combination of years and months is added if non-zero.\n * Finally, any days are added.\n *\n * The calculation will subtract the years, then months, then days.\n * Only non-zero amounts will be subtracted.\n * If the date-time has a calendar system with a fixed number of months in a\n * year, then the years and months will be combined before being subtracted.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {Temporal} temporal - the temporal object to adjust, not null\n * @return {Temporal} an object of the same type with the adjustment made, not null\n * @throws DateTimeException if unable to subtract\n * @throws ArithmeticException if numeric overflow occurs\n */\n subtractFrom(temporal) {\n requireNonNull(temporal, 'temporal');\n if (this._years !== 0) {\n if (this._months !== 0) {\n temporal = temporal.minus(this.toTotalMonths(), ChronoUnit.MONTHS);\n } else {\n temporal = temporal.minus(this._years, ChronoUnit.YEARS);\n }\n } else if (this._months !== 0) {\n temporal = temporal.minus(this._months, ChronoUnit.MONTHS);\n }\n if (this._days !== 0) {\n temporal = temporal.minus(this._days, ChronoUnit.DAYS);\n }\n return temporal;\n }\n\n //-----------------------------------------------------------------------\n /**\n * Checks if this period is equal to another period.\n *\n * The comparison is based on the amounts held in the period.\n * To be equal, the years, months and days units must be individually equal.\n * Note that this means that a period of '15 Months' is not equal to a period\n * of '1 Year and 3 Months'.\n *\n * @param {*} obj - the object to check, null returns false\n * @return {boolean} true if this is equal to the other period\n */\n equals(obj) {\n if (this === obj) {\n return true;\n }\n if (obj instanceof Period) {\n const other = obj;\n return this._years === other._years &&\n this._months === other._months &&\n this._days === other._days;\n }\n return false;\n }\n\n /**\n * A hash code for this period.\n *\n * @return {number} a suitable hash code\n */\n hashCode() {\n return MathUtil.hashCode(this._years, this._months, this._days);\n }\n\n //-----------------------------------------------------------------------\n /**\n * Outputs this period as a string, such as {@link P6Y3M1D}.\n *\n * The output will be in the ISO-8601 period format.\n * A zero period will be represented as zero days, 'P0D'.\n *\n * @return {string} a string representation of this period, not null\n */\n toString() {\n if (this === Period.ZERO) {\n return 'P0D';\n } else {\n let buf = 'P';\n if (this._years !== 0) {\n buf += `${this._years}Y`;\n }\n if (this._months !== 0) {\n buf += `${this._months}M`;\n }\n if (this._days !== 0) {\n buf += `${this._days}D`;\n }\n return buf;\n }\n }\n\n /**\n *\n * @return {string} same as {@link Period.toString}\n */\n toJSON() {\n return this.toString();\n }\n}\n\nexport function _init() {\n /**\n * A constant for a period of zero.\n */\n Period.ofDays(0);\n}\n","/*\n * @copyright (c) 2016, Philipp Thürwächter & Pattrick Hüper\n * @copyright (c) 2007-present, Stephen Colebourne & Michael Nascimento Santos\n * @license BSD-3-Clause (see LICENSE in the root directory of this source tree)\n */\n\n/**\n * @private\n */\nexport class ParsePosition {\n constructor(index) {\n this._index = index;\n this._errorIndex = -1;\n }\n\n getIndex(){\n return this._index;\n }\n\n setIndex(index){\n this._index = index;\n }\n\n getErrorIndex(){\n return this._errorIndex;\n }\n\n setErrorIndex(errorIndex){\n this._errorIndex = errorIndex;\n }\n}\n","/*\n * @copyright (c) 2016, Philipp Thürwächter & Pattrick Hüper\n * @license BSD-3-Clause (see LICENSE in the root directory of this source tree)\n */\n\n/**\n * @private\n */\nexport class EnumMap {\n constructor(){\n this._map = {};\n }\n\n putAll(otherMap){\n for(const key in otherMap._map){\n this._map[key] = otherMap._map[key];\n }\n return this;\n }\n\n containsKey(key){\n // eslint-disable-next-line no-prototype-builtins\n return (this._map.hasOwnProperty(key.name())) && (this.get(key) !== undefined);\n }\n\n get(key) {\n return this._map[key.name()];\n }\n\n put(key, val) {\n return this.set(key, val);\n }\n\n set(key, val) {\n this._map[key.name()] = val;\n return this;\n }\n\n retainAll(keyList){\n const map = {};\n for(let i=0; i\n * date = date.minus(period); // subtract a Period instance\n * date = date.minus(duration); // subtract a Duration instance\n * date = date.minus(workingDays(6)); // example user-written workingDays method\n * \n *\n * Note that calling plus followed by minus is not guaranteed to return the same date-time.\n *\n * ### Specification for implementors\n * Implementations must not alter either this object. Instead, an adjusted copy of the original\n * must be returned. This provides equivalent, safe behavior for immutable and mutable\n * implementations.\n *\n * @param {TemporalAmount} amount - the amount to subtract, not null\n * @return {Temporal} an object of the same type with the specified adjustment made, not null\n * @throws DateTimeException - if the subtraction cannot be made\n * @throws ArithmeticException - if numeric overflow occurs\n */\n _minusAmount(amount) {\n requireNonNull(amount, 'amount');\n requireInstance(amount, TemporalAmount, 'amount');\n return amount.subtractFrom(this);\n }\n\n /**\n * Returns an object of the same type as this object with the specified period subtracted.\n * This method returns a new object based on this one with the specified period subtracted. For example, on a {@link LocalDate}, this could be used to subtract a number of years, months or days. The returned object will have the same observable type as this object.\n *\n * In some cases, changing a field is not fully defined. For example, if the target object is a date representing the 31st March, then subtracting one month would be unclear. In cases like this, the field is responsible for resolving the result. Typically it will choose the previous valid date, which would be the last valid day of February in this example.\n *\n * If the implementation represents a date-time that has boundaries, such {@link as} LocalTime, then the permitted units must include the boundary unit, but no multiples of the boundary unit. For example, {@link LocalTime} must accept `DAYS` but not `WEEKS` or `MONTHS`.\n *\n * ### Specification for implementors\n * Implementations must behave in a manor equivalent to the default method behavior.\n * Implementations must not alter either this object or the specified temporal object. Instead, an adjusted copy of the original must be returned. This provides equivalent, safe behavior for immutable and mutable implementations.\n *\n * @param {number} amountToSubtract - the amount of the specified unit to subtract, may be negative\n * @param {TemporalUnit} unit - the unit of the period to subtract, not null\n * @return {Temporal} an object of the same type with the specified period subtracted, not null\n * @throws DateTimeException - if the unit cannot be subtracted\n * @throws ArithmeticException - if numeric overflow occurs\n */\n _minusUnit(amountToSubtract, unit) {\n requireNonNull(amountToSubtract, 'amountToSubtract');\n requireNonNull(unit, 'unit');\n requireInstance(unit, TemporalUnit, 'unit');\n return this._plusUnit(-amountToSubtract, unit);\n }\n\n /**\n * function overloading for {@link Temporal.plus}\n *\n * Called with 1 (or less) arguments, p1 is expected to be a {@link TemporalAmount} and {@link Temporal.plusAmount} is called.\n *\n * Otherwise {@link Temporal.plusAmountUnit} is called.\n *\n * @param {!(TemporalAmount|number)} amount\n * @param {TemporalUnit} unit\n * @return {Temporal}\n */\n plus(amount, unit) {\n if (arguments.length < 2) {\n return this._plusAmount(amount);\n } else {\n return this._plusUnit(amount, unit);\n }\n }\n\n /**\n * Returns an object of the same type as this object with an amount added.\n * This adjusts this temporal, adding according to the rules of the specified amount. The amount is typically a {@link Period} but may be any other type implementing the {@link TemporalAmount} interface, such as {@link Duration}.\n *\n * Some example code indicating how and why this method is used:\n *\n *
\n     *   date = date.plus(period);                  // add a Period instance\n     *   date = date.plus(duration);                // add a Duration instance\n     *   date = date.plus(workingDays(6));          // example user-written workingDays method\n     * 
\n *\n * Note that calling plus followed by minus is not guaranteed to return the same date-time.\n *\n * ### Specification for implementors\n * Implementations must not alter either this object. Instead, an adjusted copy of the original must be returned. This provides equivalent, safe behavior for immutable and mutable implementations.\n *\n * @param {TemporalAmount} amount - the amount to add, not null\n * @return {Temporal} an object of the same type with the specified adjustment made, not null\n * @throws DateTimeException - if the addition cannot be made\n * @throws ArithmeticException - if numeric overflow occurs\n */\n _plusAmount(amount) {\n requireNonNull(amount, 'amount');\n requireInstance(amount, TemporalAmount, 'amount');\n return amount.addTo(this);\n }\n\n /**\n * Returns an object of the same type as this object with the specified period added.\n * This method returns a new object based on this one with the specified period added. For example, on a {@link LocalDate}, this could be used to add a number of years, months or days. The returned object will have the same observable type as this object.\n *\n * In some cases, changing a field is not fully defined. For example, if the target object is a date representing the 31st January, then adding one month would be unclear. In cases like this, the field is responsible for resolving the result. Typically it will choose the previous valid date, which would be the last valid day of February in this example.\n *\n * If the implementation represents a date-time that has boundaries, such as {@link LocalTime}, then the permitted units must include the boundary unit, but no multiples of the boundary unit. For example, {@link LocalTime} must accept `DAYS` but not `WEEKS` or `MONTHS`.\n *\n * ### Specification for implementors\n * Implementations must check and handle all units defined in {@link ChronoUnit}. If the unit is supported, then the addition must be performed. If unsupported, then a {@link DateTimeException} must be thrown.\n * If the unit is not a {@link ChronoUnit}, then the result of this method is obtained by invoking `TemporalUnit.addTo(Temporal, long)` passing this as the first argument.\n *\n * Implementations must not alter either this object or the specified temporal object. Instead, an adjusted copy of the original must be returned. This provides equivalent, safe behavior for immutable and mutable implementations.\n *\n * @param {number} amountToAdd - the amount of the specified unit to add, may be negative\n * @param {TemporalUnit} unit - the unit of the period to add, not null\n * @return {Temporal} an object of the same type with the specified period added, not null\n * @throws DateTimeException - if the unit cannot be added\n * @throws ArithmeticException - if numeric overflow occurs\n */\n // eslint-disable-next-line no-unused-vars\n _plusUnit(amountToAdd, unit) {\n abstractMethodFail('_plusUnit');\n }\n\n /**\n * Calculates the period between this temporal and another temporal in terms of the specified unit.\n * This calculates the period between two temporals in terms of a single unit. The start and end points are this and the specified temporal. The result will be negative if the end is before the start. For example, the period in hours between two temporal objects can be calculated using `startTime.until(endTime, HOURS)`.\n *\n * The calculation returns a whole number, representing the number of complete units between the two temporals. For example, the period in hours between the times 11:30 and 13:29 will only be one hour as it is one minute short of two hours.\n *\n * There are two equivalent ways of using this method. The first is to invoke this method directly. The second is to use `TemporalUnit.between(Temporal, Temporal)`:\n *\n *
\n     *    // these two lines are equivalent\n     *    between = thisUnit.between(start, end);\n     *    between = start.until(end, thisUnit);\n     * 
\n *\n * The choice should be made based on which makes the code more readable.\n * For example, this method allows the number of days between two dates to be calculated:\n *\n *
\n     *    long daysBetween = DAYS.between(start, end);\n     *    // or alternatively\n     *    long daysBetween = start.until(end, DAYS);\n     * 
\n *\n * ### Specification for implementors\n * Implementations must begin by checking to ensure that the input temporal object is of the same observable type as the implementation. They must then perform the calculation for all instances of {@link ChronoUnit}. A {@link DateTimeException} must be thrown for {@link ChronoUnit} instances that are unsupported.\n * If the unit is not a {@link ChronoUnit}, then the result of this method is obtained by invoking `TemporalUnit.between(Temporal, Temporal)` passing this as the first argument and the input temporal as the second argument.\n *\n * In summary, implementations must behave in a manner equivalent to this code:\n *\n *
\n     *   // check input temporal is the same type as this class\n     *   if (unit instanceof ChronoUnit) {\n     *     // if unit is supported, then calculate and return result\n     *     // else throw DateTimeException for unsupported units\n     *   }\n     *   return unit.between(this, endTemporal);\n     * 
\n *\n * The target object must not be altered by this method.\n *\n * @param {Temporal} endTemporal - the end temporal, of the same type as this object, not null\n * @param {TemporalUnit} unit - the unit to measure the period in, not null\n * @return {number} the amount of the period between this and the end\n * @throws DateTimeException - if the period cannot be calculated\n * @throws ArithmeticException - if numeric overflow occurs\n */\n // eslint-disable-next-line no-unused-vars\n until(endTemporal, unit) {\n abstractMethodFail('until');\n }\n\n /**\n * function overloading for {@link Temporal.with}\n *\n * Called with 1 (or less) arguments, p1 is expected to be a {@link TemporalAdjuster} and {@link Temporal.withAdjuster} is called.\n *\n * Otherwise {@link Temporal.withFieldValue} is called.\n *\n * @param {!(TemporalAdjuster|TemporalField)} adjusterOrField\n * @param {number} newValue\n * @return {Temporal}\n */\n with(adjusterOrField, newValue) {\n if (arguments.length < 2) {\n return this._withAdjuster(adjusterOrField);\n } else {\n return this._withField(adjusterOrField, newValue);\n }\n }\n\n /**\n * Returns an adjusted object of the same type as this object with the adjustment made.\n * This adjusts this date-time according to the rules of the specified adjuster. A simple adjuster might simply set the one of the fields, such as the year field. A more complex adjuster might set the date to the last day of the month. A selection of common adjustments is provided in {@link TemporalAdjusters}. These include finding the \"last day of the month\" and \"next Wednesday\". The adjuster is responsible for handling special cases, such as the varying lengths of month and leap years.\n *\n * Some example code indicating how and why this method is used:\n *\n *
\n     *   date = date.with(Month.JULY);        // most key classes implement TemporalAdjuster\n     *   date = date.with(lastDayOfMonth());  // static import from TemporalAdjusters\n     *   date = date.with(next(WEDNESDAY));   // static import from TemporalAdjusters and DayOfWeek\n     * 
\n *\n * ### Specification for implementors\n * Implementations must not alter either this object. Instead, an adjusted copy of the original must be returned. This provides equivalent, safe behavior for immutable and mutable implementations.\n *\n * @param {TemporalAdjuster} adjuster - the adjuster to use, not null\n * @return {Temporal} an object of the same type with the specified adjustment made, not null\n * @throws DateTimeException - if unable to make the adjustment\n * @throws ArithmeticException - if numeric overflow occurs\n */\n _withAdjuster(adjuster) {\n requireNonNull(adjuster, 'adjuster');\n assert(typeof adjuster.adjustInto === 'function',\n 'adjuster must be a TemporalAdjuster',\n IllegalArgumentException);\n return adjuster.adjustInto(this);\n }\n\n /**\n * Returns an object of the same type as this object with the specified field altered.\n * This returns a new object based on this one with the value for the specified field changed. For example, on a {@link LocalDate}, this could be used to set the year, month or day-of-month. The returned object will have the same observable type as this object.\n *\n * In some cases, changing a field is not fully defined. For example, if the target object is a date representing the 31st January, then changing the month to February would be unclear. In cases like this, the field is responsible for resolving the result. Typically it will choose the previous valid date, which would be the last valid day of February in this example.\n *\n * ### Specification for implementors\n * Implementations must check and handle all fields defined in {@link ChronoField}. If the field is supported, then the adjustment must be performed. If unsupported, then a {@link DateTimeException} must be thrown.\n * If the field is not a {@link ChronoField}, then the result of this method is obtained by invoking `TemporalField.adjustInto(Temporal, long)` passing this as the first argument.\n *\n * Implementations must not alter either this object or the specified temporal object. Instead, an adjusted copy of the original must be returned. This provides equivalent, safe behavior for immutable and mutable implementations.\n *\n * @param {TemporalField} field - the field to set in the result, not null\n * @param {number} newValue - the new value of the field in the result\n * @return {Temporal} an object of the same type with the specified field set, not null\n * @throws DateTimeException - if the field cannot be set\n * @throws ArithmeticException - if numeric overflow occurs\n */\n // eslint-disable-next-line no-unused-vars\n _withField(field, newValue) {\n abstractMethodFail('_withField');\n }\n}\n\nif (typeof Symbol !== 'undefined' && Symbol.toPrimitive) {\n Temporal.prototype[Symbol.toPrimitive] = function (hint) {\n // hint could be 'number', 'string' or 'default'. Only 'number'\n // should throw and 'default' is treated as 'string'.\n if (hint !== 'number') {\n return this.toString();\n }\n\n throw new TypeError(\n 'A conversion from Temporal to a number is not allowed. ' +\n 'To compare use the methods .equals(), .compareTo(), .isBefore() ' +\n 'or one that is more suitable to your use case.'\n );\n };\n}\n","/*\n * @copyright (c) 2016, Philipp Thürwächter & Pattrick Hüper\n * @copyright (c) 2007-present, Stephen Colebourne & Michael Nascimento Santos\n * @license BSD-3-Clause (see LICENSE in the root directory of this source tree)\n */\n\nimport { requireNonNull, requireInstance } from '../assert';\n\nimport { ChronoField } from '../temporal/ChronoField';\nimport { ChronoUnit } from '../temporal/ChronoUnit';\nimport { DateTimeFormatter } from '../format/DateTimeFormatter';\nimport { TemporalQueries } from '../temporal/TemporalQueries';\nimport { Temporal } from '../temporal/Temporal';\n\nimport { LocalDate } from '../LocalDate';\n\n/**\n * A date without time-of-day or time-zone in an arbitrary chronology, intended\n * for advanced globalization use cases.\n *\n * **Most applications should declare method signatures, fields and variables\n * as {@link LocalDate}, not this interface.**\n *\n * A {@link ChronoLocalDate} is the abstract representation of a date where the\n * {@link Chronology}, or calendar system, is pluggable.\n * The date is defined in terms of fields expressed by {@link TemporalField},\n * where most common implementations are defined in {@link ChronoField}.\n * The chronology defines how the calendar system operates and the meaning of\n * the standard fields.\n *\n * #### When to use this interface\n *\n * The design of the API encourages the use of {@link LocalDate} rather than this\n * interface, even in the case where the application needs to deal with multiple\n * calendar systems. The rationale for this is explored in the following documentation.\n *\n * The primary use case where this interface should be used is where the generic\n * type parameter `C` is fully defined as a specific chronology.\n * In that case, the assumptions of that chronology are known at development\n * time and specified in the code.\n *\n * When the chronology is defined in the generic type parameter as ? or otherwise\n * unknown at development time, the rest of the discussion below applies.\n *\n * To emphasize the point, declaring a method signature, field or variable as this\n * interface type can initially seem like the sensible way to globalize an application,\n * however it is usually the wrong approach.\n * As such, it should be considered an application-wide architectural decision to choose\n * to use this interface as opposed to {@link LocalDate}.\n *\n * #### Architectural issues to consider\n *\n * These are some of the points that must be considered before using this interface\n * throughout an application.\n *\n * 1) Applications using this interface, as opposed to using just {@link LocalDate},\n * face a significantly higher probability of bugs. This is because the calendar system\n * in use is not known at development time. A key cause of bugs is where the developer\n * applies assumptions from their day-to-day knowledge of the ISO calendar system\n * to code that is intended to deal with any arbitrary calendar system.\n * The section below outlines how those assumptions can cause problems\n * The primary mechanism for reducing this increased risk of bugs is a strong code review process.\n * This should also be considered a extra cost in maintenance for the lifetime of the code.\n *\n * 2) This interface does not enforce immutability of implementations.\n * While the implementation notes indicate that all implementations must be immutable\n * there is nothing in the code or type system to enforce this. Any method declared\n * to accept a {@link ChronoLocalDate} could therefore be passed a poorly or\n * maliciously written mutable implementation.\n *\n * 3) Applications using this interface must consider the impact of eras.\n * {@link LocalDate} shields users from the concept of eras, by ensuring that `getYear()`\n * returns the proleptic year. That decision ensures that developers can think of\n * {@link LocalDate} instances as consisting of three fields - year, month-of-year and day-of-month.\n * By contrast, users of this interface must think of dates as consisting of four fields -\n * era, year-of-era, month-of-year and day-of-month. The extra era field is frequently\n * forgotten, yet it is of vital importance to dates in an arbitrary calendar system.\n * For example, in the Japanese calendar system, the era represents the reign of an Emperor.\n * Whenever one reign ends and another starts, the year-of-era is reset to one.\n *\n * 4) The only agreed international standard for passing a date between two systems\n * is the ISO-8601 standard which requires the ISO calendar system. Using this interface\n * throughout the application will inevitably lead to the requirement to pass the date\n * across a network or component boundary, requiring an application specific protocol or format.\n *\n * 5) Long term persistence, such as a database, will almost always only accept dates in the\n * ISO-8601 calendar system (or the related Julian-Gregorian). Passing around dates in other\n * calendar systems increases the complications of interacting with persistence.\n *\n * 6) Most of the time, passing a {@link ChronoLocalDate} throughout an application\n * is unnecessary, as discussed in the last section below.\n *\n * #### False assumptions causing bugs in multi-calendar system code\n *\n * As indicated above, there are many issues to consider when try to use and manipulate a\n * date in an arbitrary calendar system. These are some of the key issues.\n *\n * Code that queries the day-of-month and assumes that the value will never be more than\n * 31 is invalid. Some calendar systems have more than 31 days in some months.\n *\n * Code that adds 12 months to a date and assumes that a year has been added is invalid.\n * Some calendar systems have a different number of months, such as 13 in the Coptic or Ethiopic.\n *\n * Code that adds one month to a date and assumes that the month-of-year value will increase\n * by one or wrap to the next year is invalid. Some calendar systems have a variable number\n * of months in a year, such as the Hebrew.\n *\n * Code that adds one month, then adds a second one month and assumes that the day-of-month\n * will remain close to its original value is invalid. Some calendar systems have a large difference\n * between the length of the longest month and the length of the shortest month.\n * For example, the Coptic or Ethiopic have 12 months of 30 days and 1 month of 5 days.\n *\n * Code that adds seven days and assumes that a week has been added is invalid.\n * Some calendar systems have weeks of other than seven days, such as the French Revolutionary.\n *\n * Code that assumes that because the year of `date1` is greater than the year of `date2`\n * then `date1` is after `date2` is invalid. This is invalid for all calendar systems\n * when referring to the year-of-era, and especially untrue of the Japanese calendar system\n * where the year-of-era restarts with the reign of every new Emperor.\n *\n * Code that treats month-of-year one and day-of-month one as the start of the year is invalid.\n * Not all calendar systems start the year when the month value is one.\n *\n * In general, manipulating a date, and even querying a date, is wide open to bugs when the\n * calendar system is unknown at development time. This is why it is essential that code using\n * this interface is subjected to additional code reviews. It is also why an architectural\n * decision to avoid this interface type is usually the correct one.\n *\n * #### Using LocalDate instead\n *\n * The primary alternative to using this interface throughout your application is as follows.\n *\n * * Declare all method signatures referring to dates in terms of {@link LocalDate}.\n * * Either store the chronology (calendar system) in the user profile or lookup the chronology\n * from the user locale.\n * * Convert the ISO {@link LocalDate} to and from the user's preferred calendar system during\n * printing and parsing.\n *\n * This approach treats the problem of globalized calendar systems as a localization issue\n * and confines it to the UI layer. This approach is in keeping with other localization\n * issues in the java platform.\n *\n * As discussed above, performing calculations on a date where the rules of the calendar system\n * are pluggable requires skill and is not recommended.\n * Fortunately, the need to perform calculations on a date in an arbitrary calendar system\n * is extremely rare. For example, it is highly unlikely that the business rules of a library\n * book rental scheme will allow rentals to be for one month, where meaning of the month\n * is dependent on the user's preferred calendar system.\n *\n * A key use case for calculations on a date in an arbitrary calendar system is producing\n * a month-by-month calendar for display and user interaction. Again, this is a UI issue,\n * and use of this interface solely within a few methods of the UI layer may be justified.\n *\n * In any other part of the system, where a date must be manipulated in a calendar system\n * other than ISO, the use case will generally specify the calendar system to use.\n * For example, an application may need to calculate the next Islamic or Hebrew holiday\n * which may require manipulating the date.\n * This kind of use case can be handled as follows:\n *\n * * start from the ISO {@link LocalDate} being passed to the method\n * * convert the date to the alternate calendar system, which for this use case is known\n * rather than arbitrary\n * * perform the calculation\n * * convert back to {@link LocalDate}\n *\n * Developers writing low-level frameworks or libraries should also avoid this interface.\n * Instead, one of the two general purpose access interfaces should be used.\n * Use {@link TemporalAccessor} if read-only access is required, or use {@link Temporal}\n * if read-write access is required.\n *\n * ### Specification for implementors\n *\n * This interface must be implemented with care to ensure other classes operate correctly.\n * All implementations that can be instantiated must be final, immutable and thread-safe.\n * Subclasses should be Serializable wherever possible.\n *\n * Additional calendar systems may be added to the system.\n * See {@link Chronology} for more details.\n *\n * In JDK 8, this is an interface with default methods.\n * Since there are no default methods in JDK 7, an abstract class is used.\n */\nexport class ChronoLocalDate extends Temporal {\n\n isSupported(fieldOrUnit) {\n if (fieldOrUnit instanceof ChronoField) {\n return fieldOrUnit.isDateBased();\n } else if (fieldOrUnit instanceof ChronoUnit) {\n return fieldOrUnit.isDateBased();\n }\n return fieldOrUnit != null && fieldOrUnit.isSupportedBy(this);\n }\n\n query(query) {\n if (query === TemporalQueries.chronology()) {\n return this.chronology();\n } else if (query === TemporalQueries.precision()) {\n return ChronoUnit.DAYS;\n } else if (query === TemporalQueries.localDate()) {\n return LocalDate.ofEpochDay(this.toEpochDay());\n } else if (query === TemporalQueries.localTime() || query === TemporalQueries.zone() ||\n query === TemporalQueries.zoneId() || query === TemporalQueries.offset()) {\n return null;\n }\n return super.query(query);\n }\n\n adjustInto(temporal) {\n return temporal.with(ChronoField.EPOCH_DAY, this.toEpochDay());\n }\n /**\n * Formats this date using the specified formatter.\n *\n * This date will be passed to the formatter to produce a string.\n *\n * The default implementation must behave as follows:\n *
\n     *  return formatter.format(this);\n     * 
\n *\n * @param {DateTimeFormatter} formatter the formatter to use, not null\n * @return {String} the formatted date string, not null\n * @throws DateTimeException if an error occurs during printing\n */\n format(formatter) {\n requireNonNull(formatter, 'formatter');\n requireInstance(formatter, DateTimeFormatter, 'formatter');\n return formatter.format(this);\n }\n}\n","/*\n * @copyright (c) 2016, Philipp Thürwächter & Pattrick Hüper\n * @license BSD-3-Clause (see LICENSE in the root directory of this source tree)\n */\n\nimport { MathUtil } from './MathUtil';\n\n/**\n * @private\n */\nexport class StringUtil {\n\n /**\n *\n * @param {string} text\n * @param {string} pattern\n * @return {boolean}\n */\n static startsWith(text, pattern){\n return text.indexOf(pattern) === 0;\n }\n\n /**\n *\n * @param {string} text\n * @returns {number}\n */\n static hashCode(text) {\n const len = text.length;\n if (len === 0) {\n return 0;\n }\n\n let hash = 0;\n for (let i = 0; i < len; i++) {\n const chr = text.charCodeAt(i);\n hash = ((hash << 5) - hash) + chr;\n hash |= 0; // Convert to 32bit integer\n }\n return MathUtil.smi(hash);\n }\n}\n\n","/*\n * @copyright (c) 2016, Philipp Thürwächter & Pattrick Hüper\n * @copyright (c) 2007-present, Stephen Colebourne & Michael Nascimento Santos\n * @license BSD-3-Clause (see LICENSE in the root directory of this source tree)\n */\n\nimport { abstractMethodFail } from './assert';\nimport { DateTimeException } from './errors';\n\nimport { StringUtil } from './StringUtil';\n\nimport { Instant } from './Instant';\n\nexport class ZoneId {\n /**\n * Gets the system default time-zone.\n *\n * @return {ZoneId} the zone ID, not null\n */\n static systemDefault() {\n // Find implementation at {@link ZoneIdFactory}\n throw new DateTimeException('not supported operation');\n }\n\n /**\n * Gets the set of available zone IDs.\n *\n * This set includes the string form of all available region-based IDs.\n * Offset-based zone IDs are not included in the returned set.\n * The ID can be passed to {@link of} to create a {@link ZoneId}.\n *\n * The set of zone IDs can increase over time, although in a typical application\n * the set of IDs is fixed. Each call to this method is thread-safe.\n *\n * @return {string[]} a modifiable copy of the set of zone IDs, not null\n */\n static getAvailableZoneIds() {\n // Find implementation at {@link ZoneIdFactory}\n throw new DateTimeException('not supported operation');\n }\n\n /**\n * Obtains an instance of {@link ZoneId} from an ID ensuring that the\n * ID is valid and available for use.\n *\n * This method parses the ID producing a {@link ZoneId} or {@link ZoneOffset}.\n * A {@link ZoneOffset} is returned if the ID is 'Z', or starts with '+' or '-'.\n * The result will always be a valid ID for which {@link ZoneRules} can be obtained.\n *\n * Parsing matches the zone ID step by step as follows.\n *\n * * If the zone ID equals 'Z', the result is {@link ZoneOffset.UTC}.\n * * If the zone ID consists of a single letter, the zone ID is invalid\n * and {@link DateTimeException} is thrown.\n * * If the zone ID starts with '+' or '-', the ID is parsed as a\n * {@link ZoneOffset} using {@link ZoneOffset#of}.\n * * If the zone ID equals 'GMT', 'UTC' or 'UT' then the result is a {@link ZoneId}\n * with the same ID and rules equivalent to {@link ZoneOffset.UTC}.\n * * If the zone ID starts with 'UTC+', 'UTC-', 'GMT+', 'GMT-', 'UT+' or 'UT-'\n * then the ID is a prefixed offset-based ID. The ID is split in two, with\n * a two or three letter prefix and a suffix starting with the sign.\n * The suffix is parsed as a {@link ZoneOffset}.\n * The result will be a {@link ZoneId} with the specified UTC/GMT/UT prefix\n * and the normalized offset ID as per {@link ZoneOffset#getId}.\n * The rules of the returned {@link ZoneId} will be equivalent to the\n * parsed {@link ZoneOffset}.\n * * All other IDs are parsed as region-based zone IDs. Region IDs must\n * match the regular expression `[A-Za-z][A-Za-z0-9~/._+-]+`,\n * otherwise a {@link DateTimeException} is thrown. If the zone ID is not\n * in the configured set of IDs, {@link ZoneRulesException} is thrown.\n * The detailed format of the region ID depends on the group supplying the data.\n * The default set of data is supplied by the IANA Time Zone Database (TZDB).\n * This has region IDs of the form '{area}/{city}', such as 'Europe/Paris' or 'America/New_York'.\n * This is compatible with most IDs from {@link java.util.TimeZone}.\n *\n * @param {string} zoneId the time-zone ID, not null\n * @return {ZoneId} the zone ID, not null\n * @throws DateTimeException if the zone ID has an invalid format\n * @throws ZoneRulesException if the zone ID is a region ID that cannot be found\n */\n static of(zoneId) {\n // Find implementation at {@link ZoneIdFactory}\n throw new DateTimeException(`not supported operation${zoneId}`);\n }\n\n /**\n * Obtains an instance of {@link ZoneId} wrapping an offset.\n *\n * If the prefix is 'GMT', 'UTC', or 'UT' a {@link ZoneId}\n * with the prefix and the non-zero offset is returned.\n * If the prefix is empty `''` the {@link ZoneOffset} is returned.\n *\n * @param {string} prefix the time-zone ID, not null\n * @param {ZoneOffset} offset the offset, not null\n * @return {ZoneId} the zone ID, not null\n * @throws IllegalArgumentException if the prefix is not one of\n * 'GMT', 'UTC', or 'UT', or ''\n */\n static ofOffset(prefix, offset) {\n // Find implementation at {@link ZoneIdFactory}\n throw new DateTimeException(`not supported operation${prefix}${offset}`);\n }\n\n\n /**\n * Obtains an instance of {@link ZoneId} from a temporal object.\n *\n * A {@link TemporalAccessor} represents some form of date and time information.\n * This factory converts the arbitrary temporal object to an instance of {@link ZoneId}.\n *\n * The conversion will try to obtain the zone in a way that favours region-based\n * zones over offset-based zones using {@link TemporalQueries#zone}.\n *\n * This method matches the signature of the functional interface {@link TemporalQuery}\n * allowing it to be used in queries via method reference, {@link ZoneId::from}.\n *\n * @param {!TemporalAccessor} temporal - the temporal object to convert, not null\n * @return {ZoneId} the zone ID, not null\n * @throws DateTimeException if unable to convert to a {@link ZoneId}\n */\n static from(temporal) {\n // Find implementation at {@link ZoneIdFactory}\n throw new DateTimeException(`not supported operation${temporal}`);\n }\n\n //-----------------------------------------------------------------------\n /**\n * Gets the unique time-zone ID.\n *\n * This ID uniquely defines this object.\n * The format of an offset based ID is defined by {@link ZoneOffset#getId}.\n *\n * @return {String} the time-zone unique ID, not null\n */\n id(){\n abstractMethodFail('ZoneId.id');\n }\n\n //-----------------------------------------------------------------------\n /**\n * Gets the time-zone rules for this ID allowing calculations to be performed.\n *\n * The rules provide the functionality associated with a time-zone,\n * such as finding the offset for a given instant or local date-time.\n *\n * A time-zone can be invalid if it is deserialized in a Java Runtime which\n * does not have the same rules loaded as the Java Runtime that stored it.\n * In this case, calling this method will throw a {@link ZoneRulesException}.\n *\n * The rules are supplied by {@link ZoneRulesProvider}. An advanced provider may\n * support dynamic updates to the rules without restarting the Java Runtime.\n * If so, then the result of this method may change over time.\n * Each individual call will be still remain thread-safe.\n *\n * {@link ZoneOffset} will always return a set of rules where the offset never changes.\n *\n * @return {!ZoneRules} the rules, not null\n * @throws ZoneRulesException if no rules are available for this ID\n */\n rules(){\n abstractMethodFail('ZoneId.rules');\n }\n\n /**\n * Normalizes the time-zone ID, returning a {@link ZoneOffset} where possible.\n *\n * The returns a normalized {@link ZoneId} that can be used in place of this ID.\n * The result will have {@link ZoneRules} equivalent to those returned by this object,\n * however the ID returned by {@link getId} may be different.\n *\n * The normalization checks if the rules of this {@link ZoneId} have a fixed offset.\n * If they do, then the {@link ZoneOffset} equal to that offset is returned.\n * Otherwise `this` is returned.\n *\n * @return {ZoneId} the time-zone unique ID, not null\n */\n normalized() {\n const rules = this.rules();\n if (rules.isFixedOffset()) {\n return rules.offset(Instant.EPOCH);\n }\n //try {\n //} catch (ZoneRulesException ex) {\n // // ignore invalid objects\n //}\n return this;\n }\n\n //-----------------------------------------------------------------------\n /**\n * Checks if this time-zone ID is equal to another time-zone ID.\n *\n * The comparison is based on the ID.\n *\n * @param {*} other the object to check, null returns false\n * @return {boolean} true if this is equal to the other time-zone ID\n */\n equals(other) {\n if (this === other) {\n return true;\n }\n if (other instanceof ZoneId) {\n return this.id() === other.id();\n }\n return false;\n }\n\n /**\n * A hash code for this time-zone ID.\n *\n * @return {number} a suitable hash code\n */\n hashCode() {\n return StringUtil.hashCode(this.id());\n }\n\n //-----------------------------------------------------------------------\n /**\n * Outputs this zone as a string, using the ID.\n *\n * @return {string} a string representation of this time-zone ID, not null\n */\n toString() {\n return this.id();\n }\n\n /**\n * toJSON() use by JSON.stringify\n * delegates to toString()\n *\n * @return {string}\n */\n toJSON() {\n return this.toString();\n }\n}\n","/*\n * @copyright (c) 2016, Philipp Thürwächter & Pattrick Hüper\n * @copyright (c) 2007-present, Stephen Colebourne & Michael Nascimento Santos\n * @license BSD-3-Clause (see LICENSE in the root directory of this source tree)\n */\n\nimport { requireNonNull, abstractMethodFail } from '../assert';\n\nimport { Duration } from '../Duration';\nimport { Instant } from '../Instant';\n\nexport class ZoneRules {\n\n /**\n * Obtains an instance of {@link ZoneRules} that always uses the same offset.\n *\n * The returned rules always have the same offset.\n *\n * @param {ZoneOffset} offset - the offset, not null\n * @return {ZoneRules} the zone rules, not null\n */\n static of(offset) {\n requireNonNull(offset, 'offset');\n return new Fixed(offset);\n }\n\n\n //-----------------------------------------------------------------------\n /**\n * Checks of the zone rules are fixed, such that the offset never varies.\n *\n * @return {boolean} true if the time-zone is fixed and the offset never changes\n */\n isFixedOffset(){\n abstractMethodFail('ZoneRules.isFixedOffset');\n }\n\n //-----------------------------------------------------------------------\n\n /**\n *\n * @param instantOrLocalDateTime\n * @returns {ZoneOffset}\n */\n offset(instantOrLocalDateTime){\n if(instantOrLocalDateTime instanceof Instant){\n return this.offsetOfInstant(instantOrLocalDateTime);\n } else {\n return this.offsetOfLocalDateTime(instantOrLocalDateTime);\n }\n }\n\n /**\n * Gets the offset applicable at the specified instant in these rules.\n *\n * The mapping from an instant to an offset is simple, there is only\n * one valid offset for each instant.\n * This method returns that offset.\n *\n * @param {Instant} instant - the instant to find the offset for, not null, but null\n * may be ignored if the rules have a single offset for all instants\n * @return {ZoneOffset} the offset, not null\n */\n // eslint-disable-next-line no-unused-vars\n offsetOfInstant(instant){\n abstractMethodFail('ZoneRules.offsetInstant');\n }\n\n /**\n * Gets the offset applicable at the specified epochMilli in these rules.\n *\n * The method is for javascript performance optimisation.\n *\n * @param {number} epochMilli - the epoch millisecond to find the offset for, not null, but null\n * may be ignored if the rules have a single offset for all instants\n * @return {ZoneOffset} the offset, not null\n */\n // eslint-disable-next-line no-unused-vars\n offsetOfEpochMilli(epochMilli){\n abstractMethodFail('ZoneRules.offsetOfEpochMilli');\n }\n\n\n /**\n * Gets a suitable offset for the specified local date-time in these rules.\n *\n * The mapping from a local date-time to an offset is not straightforward.\n * There are three cases:\n *\n * * Normal, with one valid offset. For the vast majority of the year, the normal\n * case applies, where there is a single valid offset for the local date-time.\n * * Gap, with zero valid offsets. This is when clocks jump forward typically\n * due to the spring daylight savings change from \"winter\" to \"summer\".\n * In a gap there are local date-time values with no valid offset.\n * * Overlap, with two valid offsets. This is when clocks are set back typically\n * due to the autumn daylight savings change from \"summer\" to \"winter\".\n * In an overlap there are local date-time values with two valid offsets.\n *\n * Thus, for any given local date-time there can be zero, one or two valid offsets.\n * This method returns the single offset in the Normal case, and in the Gap or Overlap\n * case it returns the offset before the transition.\n *\n * Since, in the case of Gap and Overlap, the offset returned is a \"best\" value, rather\n * than the \"correct\" value, it should be treated with care. Applications that care\n * about the correct offset should use a combination of this method,\n * {@link getValidOffsets} and {@link getTransition}.\n *\n * @param {LocalDateTime} localDateTime - the local date-time to query, not null, but null\n * may be ignored if the rules have a single offset for all instants\n * @return {ZoneOffset} the best available offset for the local date-time, not null\n */\n // eslint-disable-next-line no-unused-vars\n offsetOfLocalDateTime(localDateTime){\n abstractMethodFail('ZoneRules.offsetLocalDateTime');\n }\n\n /**\n * Gets the offset applicable at the specified local date-time in these rules.\n *\n * The mapping from a local date-time to an offset is not straightforward.\n * There are three cases:\n *\n * * Normal, with one valid offset. For the vast majority of the year, the normal\n * case applies, where there is a single valid offset for the local date-time.\n * * Gap, with zero valid offsets. This is when clocks jump forward typically\n * due to the spring daylight savings change from \"winter\" to \"summer\".\n * In a gap there are local date-time values with no valid offset.\n * * Overlap, with two valid offsets. This is when clocks are set back typically\n * due to the autumn daylight savings change from \"summer\" to \"winter\".\n * In an overlap there are local date-time values with two valid offsets.\n *\n * Thus, for any given local date-time there can be zero, one or two valid offsets.\n * This method returns that list of valid offsets, which is a list of size 0, 1 or 2.\n * In the case where there are two offsets, the earlier offset is returned at index 0\n * and the later offset at index 1.\n *\n * There are various ways to handle the conversion from a {@link LocalDateTime}.\n * One technique, using this method, would be:\n *
\n     *  List validOffsets = rules.getOffset(localDT);\n     *  if (validOffsets.size() == 1) {\n     *    // Normal case: only one valid offset\n     *    zoneOffset = validOffsets.get(0);\n     *  } else {\n     *    // Gap or Overlap: determine what to do from transition (which will be non-null)\n     *    ZoneOffsetTransition trans = rules.getTransition(localDT);\n     *  }\n     * 
\n *\n * In theory, it is possible for there to be more than two valid offsets.\n * This would happen if clocks to be put back more than once in quick succession.\n * This has never happened in the history of time-zones and thus has no special handling.\n * However, if it were to happen, then the list would return more than 2 entries.\n *\n * @param {LocalDateTime} localDateTime - the local date-time to query for valid offsets, not null\n * may be ignored if the rules have a single offset for all instants\n * @return {ZoneOffset[]} the list of valid offsets, may be immutable, not null\n */\n // eslint-disable-next-line no-unused-vars\n validOffsets(localDateTime){\n abstractMethodFail('ZoneRules.validOffsets');\n }\n\n /**\n * Gets the offset transition applicable at the specified local date-time in these rules.\n *\n * The mapping from a local date-time to an offset is not straightforward.\n * There are three cases:\n *\n * * Normal, with one valid offset. For the vast majority of the year, the normal\n * case applies, where there is a single valid offset for the local date-time.\n * * Gap, with zero valid offsets. This is when clocks jump forward typically\n * due to the spring daylight savings change from \"winter\" to \"summer\".\n * In a gap there are local date-time values with no valid offset.\n * * Overlap, with two valid offsets. This is when clocks are set back typically\n * due to the autumn daylight savings change from \"summer\" to \"winter\".\n * In an overlap there are local date-time values with two valid offsets.\n *\n * A transition is used to model the cases of a Gap or Overlap.\n * The Normal case will return null.\n *\n * There are various ways to handle the conversion from a {@link LocalDateTime}.\n * One technique, using this method, would be:\n *
\n     *  ZoneOffsetTransition trans = rules.getTransition(localDT);\n     *  if (trans != null) {\n     *    // Gap or Overlap: determine what to do from transition\n     *  } else {\n     *    // Normal case: only one valid offset\n     *    zoneOffset = rule.getOffset(localDT);\n     *  }\n     * 
\n *\n * @param {LocalDateTime} localDateTime the local date-time to query for offset transition, not null, but null\n * may be ignored if the rules have a single offset for all instants\n * @return {ZoneOffsetTransition} the offset transition, null if the local date-time is not in transition\n */\n // eslint-disable-next-line no-unused-vars\n transition(localDateTime){\n abstractMethodFail('ZoneRules.transition');\n }\n\n //-----------------------------------------------------------------------\n /**\n * Gets the standard offset for the specified instant in this zone.\n *\n * This provides access to historic information on how the standard offset\n * has changed over time.\n * The standard offset is the offset before any daylight saving time is applied.\n * This is typically the offset applicable during winter.\n *\n * @param {Instant} instant - the instant to find the offset information for, not null, but null\n * may be ignored if the rules have a single offset for all instants\n * @return {ZoneOffset} the standard offset, not null\n */\n // eslint-disable-next-line no-unused-vars\n standardOffset(instant){\n abstractMethodFail('ZoneRules.standardOffset');\n }\n\n /**\n * Gets the amount of daylight savings in use for the specified instant in this zone.\n *\n * This provides access to historic information on how the amount of daylight\n * savings has changed over time.\n * This is the difference between the standard offset and the actual offset.\n * Typically the amount is zero during winter and one hour during summer.\n * Time-zones are second-based, so the nanosecond part of the duration will be zero.\n *\n * @param {Instant} instant - the instant to find the daylight savings for, not null, but null\n * may be ignored if the rules have a single offset for all instants\n * @return {Duration} the difference between the standard and actual offset, not null\n */\n // eslint-disable-next-line no-unused-vars\n daylightSavings(instant){\n abstractMethodFail('ZoneRules.daylightSavings');\n // default {\n // ZoneOffset standardOffset = getStandardOffset(instant);\n // ZoneOffset actualOffset = getOffset(instant);\n // return actualOffset.toDuration().minus(standardOffset.toDuration()).normalized();\n // }\n }\n\n /**\n * Checks if the specified instant is in daylight savings.\n *\n * This checks if the standard and actual offsets are the same at the specified instant.\n *\n * @param {Instant} instant - the instant to find the offset information for, not null, but null\n * may be ignored if the rules have a single offset for all instants\n * @return {boolean} the standard offset, not null\n */\n // eslint-disable-next-line no-unused-vars\n isDaylightSavings(instant) {\n abstractMethodFail('ZoneRules.isDaylightSavings');\n // default {\n // return (getStandardOffset(instant).equals(getOffset(instant)) == false);\n // }\n }\n\n /**\n * Checks if the offset date-time is valid for these rules.\n *\n * To be valid, the local date-time must not be in a gap and the offset\n * must match the valid offsets.\n *\n * @param {LocalDateTime} localDateTime - the date-time to check, not null, but null\n * may be ignored if the rules have a single offset for all instants\n * @param {ZoneOffset} offset - the offset to check, null returns false\n * @return {boolean} true if the offset date-time is valid for these rules\n */\n // eslint-disable-next-line no-unused-vars\n isValidOffset(localDateTime, offset){\n abstractMethodFail('ZoneRules.isValidOffset');\n }\n\n //-----------------------------------------------------------------------\n /**\n * Gets the next transition after the specified instant.\n *\n * This returns details of the next transition after the specified instant.\n * For example, if the instant represents a point where \"Summer\" daylight savings time\n * applies, then the method will return the transition to the next \"Winter\" time.\n *\n * @param {Instant} instant - the instant to get the next transition after, not null, but null\n * may be ignored if the rules have a single offset for all instants\n * @return {ZoneOffsetTransition} the next transition after the specified instant, null if this is after the last transition\n */\n // eslint-disable-next-line no-unused-vars\n nextTransition(instant){\n abstractMethodFail('ZoneRules.nextTransition');\n }\n\n /**\n * Gets the previous transition before the specified instant.\n *\n * This returns details of the previous transition after the specified instant.\n * For example, if the instant represents a point where \"summer\" daylight saving time\n * applies, then the method will return the transition from the previous \"winter\" time.\n *\n * @param {Instant} instant - the instant to get the previous transition after, not null, but null\n * may be ignored if the rules have a single offset for all instants\n * @return {ZoneOffsetTransition} the previous transition after the specified instant, null if this is before the first transition\n */\n // eslint-disable-next-line no-unused-vars\n previousTransition(instant){\n abstractMethodFail('ZoneRules.previousTransition');\n }\n\n /**\n * Gets the complete list of fully defined transitions.\n *\n * The complete set of transitions for this rules instance is defined by this method\n * and {@link getTransitionRules}. This method returns those transitions that have\n * been fully defined. These are typically historical, but may be in the future.\n *\n * The list will be empty for fixed offset rules and for any time-zone where there has\n * only ever been a single offset. The list will also be empty if the transition rules are unknown.\n *\n * @return {ZoneOffsetTransition[]} an immutable list of fully defined transitions, not null\n */\n transitions(){\n abstractMethodFail('ZoneRules.transitions');\n }\n\n /**\n * Gets the list of transition rules for years beyond those defined in the transition list.\n *\n * The complete set of transitions for this rules instance is defined by this method\n * and {@link getTransitions}. This method returns instances of {@link ZoneOffsetTransitionRule}\n * that define an algorithm for when transitions will occur.\n *\n * For any given {@link ZoneRules}, this list contains the transition rules for years\n * beyond those years that have been fully defined. These rules typically refer to future\n * daylight saving time rule changes.\n *\n * If the zone defines daylight savings into the future, then the list will normally\n * be of size two and hold information about entering and exiting daylight savings.\n * If the zone does not have daylight savings, or information about future changes\n * is uncertain, then the list will be empty.\n *\n * The list will be empty for fixed offset rules and for any time-zone where there is no\n * daylight saving time. The list will also be empty if the transition rules are unknown.\n *\n * @return {ZoneOffsetTransitionRule[]} an immutable list of transition rules, not null\n */\n transitionRules(){\n abstractMethodFail('ZoneRules.transitionRules');\n }\n\n toString(){\n abstractMethodFail('ZoneRules.toString');\n }\n\n /**\n * toJSON() use by JSON.stringify\n * delegates to toString()\n *\n * @return {string}\n */\n toJSON() {\n return this.toString();\n }\n}\n\n\nclass Fixed extends ZoneRules{\n /**\n *\n * @param {ZoneOffset} offset\n * @private\n */\n constructor(offset){\n super();\n this._offset = offset;\n }\n\n isFixedOffset(){\n return true;\n }\n\n offsetOfInstant(){\n return this._offset;\n }\n\n offsetOfEpochMilli(){\n return this._offset;\n }\n\n offsetOfLocalDateTime(){\n return this._offset;\n }\n\n validOffsets(){\n return [this._offset];\n }\n\n transition(){\n return null;\n }\n\n standardOffset(){\n return this._offset;\n }\n\n daylightSavings(){\n return Duration.ZERO;\n }\n\n isDaylightSavings(){\n return false;\n }\n\n /**\n *\n * @param {LocalDateTime} localDateTime\n * @param {ZoneOffset} offset\n * @return {boolean}\n */\n isValidOffset(localDateTime, offset) {\n return this._offset.equals(offset);\n }\n\n nextTransition(){\n return null;\n }\n\n previousTransition(){\n return null;\n }\n\n transitions(){\n return [];\n }\n\n transitionRules(){\n return [];\n }\n\n //-----------------------------------------------------------------------\n /**\n *\n * @param {*} other\n * @returns {boolean}\n */\n equals(other) {\n if (this === other) {\n return true;\n }\n if (other instanceof Fixed) {\n return this._offset.equals(other._offset);\n }\n return false;\n }\n\n /**\n *\n * @returns {string}\n */\n toString() {\n return `FixedRules:${this._offset.toString()}`;\n }\n\n}\n","/**\n * @copyright (c) 2016, Philipp Thürwächter & Pattrick Hüper\n * @copyright (c) 2007-present, Stephen Colebourne & Michael Nascimento Santos\n * @license BSD-3-Clause (see LICENSE in the root directory of this source tree)\n */\n\nimport { requireNonNull } from './assert';\nimport { DateTimeException } from './errors';\nimport { MathUtil } from './MathUtil';\n\nimport { LocalTime } from './LocalTime';\nimport { ZoneId } from './ZoneId';\n\nimport { ChronoField } from './temporal/ChronoField';\nimport { TemporalQueries } from './temporal/TemporalQueries';\n\nimport { ZoneRules } from './zone/ZoneRules';\n\nconst SECONDS_CACHE = {};\nconst ID_CACHE = {};\n\n/**\n *\n * ### Static properties of Class {@link LocalDate}\n *\n * ZoneOffset.MAX_SECONDS = 18 * LocalTime.SECONDS_PER_HOUR;\n *\n * ZoneOffset.UTC = ZoneOffset.ofTotalSeconds(0);\n *\n * ZoneOffset.MIN = ZoneOffset.ofTotalSeconds(-ZoneOffset.MAX_SECONDS);\n *\n * ZoneOffset.MAX = ZoneOffset.ofTotalSeconds(ZoneOffset.MAX_SECONDS);\n *\n */\nexport class ZoneOffset extends ZoneId {\n /**\n *\n * @param {number} totalSeconds\n * @private\n */\n constructor(totalSeconds){\n super();\n ZoneOffset._validateTotalSeconds(totalSeconds);\n this._totalSeconds = MathUtil.safeToInt(totalSeconds);\n this._rules = ZoneRules.of(this);\n this._id = ZoneOffset._buildId(totalSeconds);\n }\n\n /**\n *\n * @returns {number}\n */\n totalSeconds() {\n return this._totalSeconds;\n }\n\n /**\n *\n * @returns {string}\n */\n id() {\n return this._id;\n }\n\n /**\n *\n * @param {number} totalSeconds\n * @returns {string}\n */\n static _buildId(totalSeconds) {\n if (totalSeconds === 0) {\n return 'Z';\n } else {\n const absTotalSeconds = Math.abs(totalSeconds);\n const absHours = MathUtil.intDiv(absTotalSeconds, LocalTime.SECONDS_PER_HOUR);\n const absMinutes = MathUtil.intMod(MathUtil.intDiv(absTotalSeconds, LocalTime.SECONDS_PER_MINUTE), LocalTime.MINUTES_PER_HOUR);\n let buf = `${totalSeconds < 0 ? '-' : '+'\n }${absHours < 10 ? '0' : ''}${absHours\n }${absMinutes < 10 ? ':0' : ':'}${absMinutes}`;\n const absSeconds = MathUtil.intMod(absTotalSeconds, LocalTime.SECONDS_PER_MINUTE);\n if (absSeconds !== 0) {\n buf += (absSeconds < 10 ? ':0' : ':') + (absSeconds);\n }\n return buf;\n }\n }\n\n\n /**\n *\n * @param {number} totalSeconds\n * @private\n */\n static _validateTotalSeconds(totalSeconds){\n if (Math.abs(totalSeconds) > ZoneOffset.MAX_SECONDS) {\n throw new DateTimeException('Zone offset not in valid range: -18:00 to +18:00');\n }\n }\n\n /**\n *\n * @param {number} hours\n * @param {number} minutes\n * @param {number} seconds\n * @private\n */\n static _validate(hours, minutes, seconds) {\n if (hours < -18 || hours > 18) {\n throw new DateTimeException(`Zone offset hours not in valid range: value ${hours \n } is not in the range -18 to 18`);\n }\n if (hours > 0) {\n if (minutes < 0 || seconds < 0) {\n throw new DateTimeException('Zone offset minutes and seconds must be positive because hours is positive');\n }\n } else if (hours < 0) {\n if (minutes > 0 || seconds > 0) {\n throw new DateTimeException('Zone offset minutes and seconds must be negative because hours is negative');\n }\n } else if ((minutes > 0 && seconds < 0) || (minutes < 0 && seconds > 0)) {\n throw new DateTimeException('Zone offset minutes and seconds must have the same sign');\n }\n if (Math.abs(minutes) > 59) {\n throw new DateTimeException(`Zone offset minutes not in valid range: abs(value) ${ \n Math.abs(minutes)} is not in the range 0 to 59`);\n }\n if (Math.abs(seconds) > 59) {\n throw new DateTimeException(`Zone offset seconds not in valid range: abs(value) ${ \n Math.abs(seconds)} is not in the range 0 to 59`);\n }\n if (Math.abs(hours) === 18 && (Math.abs(minutes) > 0 || Math.abs(seconds) > 0)) {\n throw new DateTimeException('Zone offset not in valid range: -18:00 to +18:00');\n }\n }\n\n //-----------------------------------------------------------------------\n /**\n * Obtains an instance of {@link ZoneOffset} using the ID.\n *\n * This method parses the string ID of a {@link ZoneOffset} to\n * return an instance. The parsing accepts all the formats generated by\n * {@link getId}, plus some additional formats:\n *\n * * {@link Z} - for UTC\n * * `+h`\n * * `+hh`\n * * `+hh:mm`\n * * `-hh:mm`\n * * `+hhmm`\n * * `-hhmm`\n * * `+hh:mm:ss`\n * * `-hh:mm:ss`\n * * `+hhmmss`\n * * `-hhmmss`\n *\n * Note that ± means either the plus or minus symbol.\n *\n * The ID of the returned offset will be normalized to one of the formats\n * described by {@link getId}.\n *\n * The maximum supported range is from +18:00 to -18:00 inclusive.\n *\n * @param {string} offsetId the offset ID, not null\n * @return {ZoneOffset} the zone-offset, not null\n * @throws DateTimeException if the offset ID is invalid\n */\n static of(offsetId) {\n requireNonNull(offsetId, 'offsetId');\n // \"Z\" is always in the cache\n const offset = ID_CACHE[offsetId];\n if (offset != null) {\n return offset;\n }\n\n // parse - +h, +hh, +hhmm, +hh:mm, +hhmmss, +hh:mm:ss\n let hours, minutes, seconds;\n switch (offsetId.length) {\n case 2:\n offsetId = `${offsetId[0]}0${offsetId[1]}`; // fallthru\n // eslint-disable-next-line no-fallthrough\n case 3:\n hours = ZoneOffset._parseNumber(offsetId, 1, false);\n minutes = 0;\n seconds = 0;\n break;\n case 5:\n hours = ZoneOffset._parseNumber(offsetId, 1, false);\n minutes = ZoneOffset._parseNumber(offsetId, 3, false);\n seconds = 0;\n break;\n case 6:\n hours = ZoneOffset._parseNumber(offsetId, 1, false);\n minutes = ZoneOffset._parseNumber(offsetId, 4, true);\n seconds = 0;\n break;\n case 7:\n hours = ZoneOffset._parseNumber(offsetId, 1, false);\n minutes = ZoneOffset._parseNumber(offsetId, 3, false);\n seconds = ZoneOffset._parseNumber(offsetId, 5, false);\n break;\n case 9:\n hours = ZoneOffset._parseNumber(offsetId, 1, false);\n minutes = ZoneOffset._parseNumber(offsetId, 4, true);\n seconds = ZoneOffset._parseNumber(offsetId, 7, true);\n break;\n default:\n throw new DateTimeException(`Invalid ID for ZoneOffset, invalid format: ${offsetId}`);\n }\n const first = offsetId[0];\n if (first !== '+' && first !== '-') {\n throw new DateTimeException(`Invalid ID for ZoneOffset, plus/minus not found when expected: ${offsetId}`);\n }\n if (first === '-') {\n return ZoneOffset.ofHoursMinutesSeconds(-hours, -minutes, -seconds);\n } else {\n return ZoneOffset.ofHoursMinutesSeconds(hours, minutes, seconds);\n }\n }\n\n /**\n * Parse a two digit zero-prefixed number.\n *\n * @param {string} offsetId - the offset ID, not null\n * @param {number} pos - the position to parse, valid\n * @param {boolean} precededByColon - should this number be prefixed by a precededByColon\n * @return {number} the parsed number, from 0 to 99\n */\n static _parseNumber(offsetId, pos, precededByColon) {\n if (precededByColon && offsetId[pos - 1] !== ':') {\n throw new DateTimeException(`Invalid ID for ZoneOffset, colon not found when expected: ${offsetId}`);\n }\n const ch1 = offsetId[pos];\n const ch2 = offsetId[pos + 1];\n if (ch1 < '0' || ch1 > '9' || ch2 < '0' || ch2 > '9') {\n throw new DateTimeException(`Invalid ID for ZoneOffset, non numeric characters found: ${offsetId}`);\n }\n return (ch1.charCodeAt(0) - 48) * 10 + (ch2.charCodeAt(0) - 48);\n }\n\n /**\n *\n * @param {number} hours\n * @returns {ZoneOffset}\n */\n static ofHours(hours) {\n return ZoneOffset.ofHoursMinutesSeconds(hours, 0, 0);\n }\n\n /**\n *\n * @param {number} hours\n * @param {number} minutes\n * @returns {ZoneOffset}\n */\n static ofHoursMinutes(hours, minutes) {\n return ZoneOffset.ofHoursMinutesSeconds(hours, minutes, 0);\n }\n\n /**\n *\n * @param {number} hours\n * @param {number} minutes\n * @param {number} seconds\n * @returns {ZoneOffset}\n */\n static ofHoursMinutesSeconds(hours, minutes, seconds) {\n ZoneOffset._validate(hours, minutes, seconds);\n const totalSeconds = hours * LocalTime.SECONDS_PER_HOUR + minutes * LocalTime.SECONDS_PER_MINUTE + seconds;\n return ZoneOffset.ofTotalSeconds(totalSeconds);\n }\n\n /**\n *\n * @param {number} totalMinutes\n * @returns {ZoneOffset}\n */\n static ofTotalMinutes(totalMinutes) {\n const totalSeconds = totalMinutes * LocalTime.SECONDS_PER_MINUTE;\n return ZoneOffset.ofTotalSeconds(totalSeconds);\n }\n\n /**\n *\n * @param {number} totalSeconds\n * @returns {ZoneOffset}\n */\n static ofTotalSeconds(totalSeconds) {\n if (totalSeconds % (15 * LocalTime.SECONDS_PER_MINUTE) === 0) {\n const totalSecs = totalSeconds;\n let result = SECONDS_CACHE[totalSecs];\n if (result == null) {\n result = new ZoneOffset(totalSeconds);\n SECONDS_CACHE[totalSecs] = result;\n ID_CACHE[result.id()] = result;\n }\n return result;\n } else {\n return new ZoneOffset(totalSeconds);\n }\n }\n\n /**\n * Gets the associated time-zone rules.\n *\n * The rules will always return this offset when queried.\n * The implementation class is immutable, thread-safe and serializable.\n *\n * @return {ZoneRules} the rules, not null\n */\n rules() {\n return this._rules;\n }\n\n /**\n * Gets the value of the specified field from this offset as an `int`.\n *\n * This queries this offset for the value for the specified field.\n * The returned value will always be within the valid range of values for the field.\n * If it is not possible to return the value, because the field is not supported\n * or for some other reason, an exception is thrown.\n *\n * If the field is a {@link ChronoField} then the query is implemented here.\n * The {@link OFFSET_SECONDS} field returns the value of the offset.\n * All other {@link ChronoField} instances will throw a {@link DateTimeException}.\n *\n * If the field is not a {@link ChronoField}, then the result of this method\n * is obtained by invoking {@link TemporalField.getFrom}\n * passing `this` as the argument. Whether the value can be obtained,\n * and what the value represents, is determined by the field.\n *\n * @param {TemporalField} field - the field to get, not null\n * @return {number} the value for the field\n * @throws DateTimeException if a value for the field cannot be obtained\n * @throws ArithmeticException if numeric overflow occurs\n */\n get(field) {\n return this.getLong(field);\n }\n\n /**\n * Gets the value of the specified field from this offset as a `long`.\n *\n * This queries this offset for the value for the specified field.\n * If it is not possible to return the value, because the field is not supported\n * or for some other reason, an exception is thrown.\n *\n * If the field is a {@link ChronoField} then the query is implemented here.\n * The {@link OFFSET_SECONDS} field returns the value of the offset.\n * All other {@link ChronoField} instances will throw a {@link DateTimeException}.\n *\n * If the field is not a {@link ChronoField}, then the result of this method\n * is obtained by invoking {@link TemporalField.getFrom}\n * passing `this` as the argument. Whether the value can be obtained,\n * and what the value represents, is determined by the field.\n *\n * @param {TemporalField} field - the field to get, not null\n * @return {number} the value for the field\n * @throws DateTimeException if a value for the field cannot be obtained\n * @throws ArithmeticException if numeric overflow occurs\n */\n getLong(field) {\n if (field === ChronoField.OFFSET_SECONDS) {\n return this._totalSeconds;\n } else if (field instanceof ChronoField) {\n throw new DateTimeException(`Unsupported field: ${field}`);\n }\n return field.getFrom(this);\n }\n\n //-----------------------------------------------------------------------\n /**\n * Queries this offset using the specified query.\n *\n * This queries this offset using the specified query strategy object.\n * The {@link TemporalQuery} object defines the logic to be used to\n * obtain the result. Read the documentation of the query to understand\n * what the result of this method will be.\n *\n * The result of this method is obtained by invoking the\n * {@link TemporalQuery#queryFrom} method on the\n * specified query passing `this` as the argument.\n *\n * @param {TemporalQuery} query - the query to invoke, not null\n * @return {*} the query result, null may be returned (defined by the query)\n * @throws DateTimeException if unable to query (defined by the query)\n * @throws ArithmeticException if numeric overflow occurs (defined by the query)\n */\n query(query) {\n requireNonNull(query, 'query');\n if (query === TemporalQueries.offset() || query === TemporalQueries.zone()) {\n return this;\n } else if (query === TemporalQueries.localDate() || query === TemporalQueries.localTime() ||\n query === TemporalQueries.precision() || query === TemporalQueries.chronology() || query === TemporalQueries.zoneId()) {\n return null;\n }\n return query.queryFrom(this);\n }\n\n /**\n * Adjusts the specified temporal object to have the same offset as this object.\n *\n * This returns a temporal object of the same observable type as the input\n * with the offset changed to be the same as this.\n *\n * The adjustment is equivalent to using {@link Temporal#with}\n * passing {@link ChronoField#OFFSET_SECONDS} as the field.\n *\n * In most cases, it is clearer to reverse the calling pattern by using\n * {@link Temporal#with}:\n *
\n      *   // these two lines are equivalent, but the second approach is recommended\n      *   temporal = thisOffset.adjustInto(temporal);\n      *   temporal = temporal.with(thisOffset);\n      * 
\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {Temporal} temporal - the target object to be adjusted, not null\n * @return {Temporal} the adjusted object, not null\n * @throws DateTimeException if unable to make the adjustment\n * @throws ArithmeticException if numeric overflow occurs\n */\n adjustInto(temporal) {\n return temporal.with(ChronoField.OFFSET_SECONDS, this._totalSeconds);\n }\n\n /**\n * Compares this offset to another offset in descending order.\n *\n * The offsets are compared in the order that they occur for the same time\n * of day around the world. Thus, an offset of `+10:00` comes before an\n * offset of `+09:00` and so on down to `-18:00`.\n *\n * The comparison is \"consistent with equals\", as defined by {@link Comparable}.\n *\n * @param {!ZoneOffset} other - the other date to compare to, not null\n * @return {number} the comparator value, negative if less, positive if greater\n * @throws NullPointerException if {@link other} is null\n */\n compareTo(other) {\n requireNonNull(other, 'other');\n return other._totalSeconds - this._totalSeconds;\n }\n\n\n /**\n * Checks if this offset is equal to another offset.\n *\n * The comparison is based on the amount of the offset in seconds.\n * This is equivalent to a comparison by ID.\n *\n * @param {*} obj - the object to check, null returns false\n * @return {boolean} true if this is equal to the other offset\n */\n equals(obj) {\n if (this === obj) {\n return true;\n }\n if (obj instanceof ZoneOffset) {\n return this._totalSeconds === obj._totalSeconds;\n }\n return false;\n }\n\n /**\n * @return {number}\n */\n hashCode(){\n return this._totalSeconds;\n }\n\n /**\n *\n * @returns {string}\n */\n toString(){\n return this._id;\n }\n}\n\nexport function _init() {\n ZoneOffset.MAX_SECONDS = 18 * LocalTime.SECONDS_PER_HOUR;\n ZoneOffset.UTC = ZoneOffset.ofTotalSeconds(0);\n ZoneOffset.MIN = ZoneOffset.ofTotalSeconds(-ZoneOffset.MAX_SECONDS);\n ZoneOffset.MAX = ZoneOffset.ofTotalSeconds(ZoneOffset.MAX_SECONDS);\n}\n","/*\n * @copyright (c) 2016, Philipp Thürwächter & Pattrick Hüper\n * @copyright (c) 2007-present, Stephen Colebourne & Michael Nascimento Santos\n * @license BSD-3-Clause (see LICENSE in the root directory of this source tree)\n */\n\nimport { requireNonNull } from '../assert';\nimport { DateTimeException } from '../errors';\nimport { MathUtil } from '../MathUtil';\n\nimport { EnumMap } from './EnumMap';\nimport { ResolverStyle } from './ResolverStyle';\n\nimport { IsoChronology } from '../chrono/IsoChronology';\nimport { ChronoLocalDate } from '../chrono/ChronoLocalDate';\nimport { ChronoField } from '../temporal/ChronoField';\nimport { TemporalAccessor } from '../temporal/TemporalAccessor';\nimport { TemporalQueries } from '../temporal/TemporalQueries';\n\nimport { LocalTime } from '../LocalTime';\nimport { LocalDate } from '../LocalDate';\nimport { Period } from '../Period';\n\nimport { ZoneOffset } from '../ZoneOffset';\n\n/**\n * Builder that can holds date and time fields and related date and time objects.\n *\n * The builder is used to hold onto different elements of date and time.\n * It is designed as two separate maps:\n *\n * * from {@link TemporalField} to `long` value, where the value may be\n * outside the valid range for the field\n * * from {@link Class} to {@link TemporalAccessor}, holding larger scale objects\n * like {@link LocalDateTime}.\n *\n * @private\n */\nexport class DateTimeBuilder extends TemporalAccessor {\n\n /**\n * Creates a new instance of the builder with a single field-value.\n *\n * This is equivalent to using {@link addFieldValue} on an empty builder.\n *\n * @param {TemporalField} field - the field to add, not null\n * @param {number} value - the value to add, not null\n * @return {DateTimeBuilder}\n */\n static create(field, value) {\n const dtb = new DateTimeBuilder();\n dtb._addFieldValue(field, value);\n return dtb;\n }\n\n\n constructor(){\n super();\n\n /**\n * The map of other fields.\n */\n this.fieldValues = new EnumMap();\n /**\n * The chronology.\n */\n this.chrono = null;\n /**\n * The zone.\n */\n this.zone = null;\n /**\n * The date.\n */\n this.date = null;\n /**\n * The time.\n */\n this.time = null;\n /**\n * The leap second flag.\n */\n this.leapSecond = false;\n /**\n * The excess days.\n */\n this.excessDays = null;\n }\n\n /**\n *\n * @param {TemporalField} field\n * @return {Number} field value\n */\n getFieldValue0(field) {\n return this.fieldValues.get(field);\n }\n\n /**\n * Adds a field-value pair to the builder.\n *\n * This adds a field to the builder.\n * If the field is not already present, then the field-value pair is added to the map.\n * If the field is already present and it has the same value as that specified, no action occurs.\n * If the field is already present and it has a different value to that specified, then\n * an exception is thrown.\n *\n * @param {TemporalField} field - the field to add, not null\n * @param {Number} value - the value to add, not null\n * @return {DateTimeBuilder}, this for method chaining\n * @throws DateTimeException if the field is already present with a different value\n */\n _addFieldValue(field, value) {\n requireNonNull(field, 'field');\n const old = this.getFieldValue0(field); // check first for better error message\n if (old != null && old !== value) {\n throw new DateTimeException(`Conflict found: ${field} ${old} differs from ${field} ${value}: ${this}`);\n }\n return this._putFieldValue0(field, value);\n }\n\n /**\n * @param {TemporalField} field\n * @param {Number} value\n * @return {DateTimeBuilder}, this for method chaining\n */\n _putFieldValue0(field, value) {\n this.fieldValues.put(field, value);\n return this;\n }\n\n /**\n * Resolves the builder, evaluating the date and time.\n *\n * This examines the contents of the build.er and resolves it to produce the best\n * available date and time, throwing an exception if a problem occurs.\n * Calling this method changes the state of the builder.\n *\n * @param {ResolverStyle} resolverStyle - how to resolve\n * @param {TemporalField[]} resolverFields\n * @return {DateTimeBuilder} this, for method chaining\n */\n resolve(resolverStyle, resolverFields) {\n if (resolverFields != null) {\n this.fieldValues.retainAll(resolverFields);\n }\n // handle standard fields\n // this._mergeInstantFields();\n this._mergeDate(resolverStyle);\n this._mergeTime(resolverStyle);\n //if (resolveFields(resolverStyle)) {\n // mergeInstantFields();\n // mergeDate(resolverStyle);\n // mergeTime(resolverStyle);\n //}\n this._resolveTimeInferZeroes(resolverStyle);\n //this._crossCheck();\n if (this.excessDays != null && this.excessDays.isZero() === false && this.date != null && this.time != null) {\n this.date = this.date.plus(this.excessDays);\n this.excessDays = Period.ZERO;\n }\n //resolveFractional();\n this._resolveInstant();\n return this;\n }\n\n /**\n *\n * @param {ResolverStyle} resolverStyle\n * @private\n */\n _mergeDate(resolverStyle) {\n //if (this.chrono instanceof IsoChronology) {\n this._checkDate(IsoChronology.INSTANCE.resolveDate(this.fieldValues, resolverStyle));\n //} else {\n // if (this.fieldValues.containsKey(ChronoField.EPOCH_DAY)) {\n // this._checkDate(LocalDate.ofEpochDay(this.fieldValues.remove(ChronoField.EPOCH_DAY)));\n // return;\n // }\n //}\n }\n\n /**\n *\n * @param {LocalDate} date\n * @private\n */\n _checkDate(date) {\n if (date != null) {\n this._addObject(date);\n for (const fieldName in this.fieldValues.keySet()) {\n const field = ChronoField.byName(fieldName);\n if (field) {\n if (this.fieldValues.get(field) !== undefined) { // undefined if \"removed\" in EnumMap\n if (field.isDateBased()) {\n let val1;\n try {\n val1 = date.getLong(field);\n } catch (ex) {\n if (ex instanceof DateTimeException) {\n continue;\n } else {\n throw ex;\n }\n }\n const val2 = this.fieldValues.get(field);\n if (val1 !== val2) {\n throw new DateTimeException(`Conflict found: Field ${field} ${val1} differs from ${field} ${val2} derived from ${date}`);\n }\n }\n }\n }\n }\n }\n }\n\n /**\n *\n * @param {ResolverStyle} resolverStyle\n * @private\n */\n _mergeTime(resolverStyle) {\n if (this.fieldValues.containsKey(ChronoField.CLOCK_HOUR_OF_DAY)) {\n const ch = this.fieldValues.remove(ChronoField.CLOCK_HOUR_OF_DAY);\n if (resolverStyle !== ResolverStyle.LENIENT) {\n if (resolverStyle === ResolverStyle.SMART && ch === 0) {\n // ok\n } else {\n ChronoField.CLOCK_HOUR_OF_DAY.checkValidValue(ch);\n }\n }\n this._addFieldValue(ChronoField.HOUR_OF_DAY, ch === 24 ? 0 : ch);\n }\n if (this.fieldValues.containsKey(ChronoField.CLOCK_HOUR_OF_AMPM)) {\n const ch = this.fieldValues.remove(ChronoField.CLOCK_HOUR_OF_AMPM);\n if (resolverStyle !== ResolverStyle.LENIENT) {\n if (resolverStyle === ResolverStyle.SMART && ch === 0) {\n // ok\n } else {\n ChronoField.CLOCK_HOUR_OF_AMPM.checkValidValue(ch);\n }\n }\n this._addFieldValue(ChronoField.HOUR_OF_AMPM, ch === 12 ? 0 : ch);\n }\n if (resolverStyle !== ResolverStyle.LENIENT) {\n if (this.fieldValues.containsKey(ChronoField.AMPM_OF_DAY)) {\n ChronoField.AMPM_OF_DAY.checkValidValue(this.fieldValues.get(ChronoField.AMPM_OF_DAY));\n }\n if (this.fieldValues.containsKey(ChronoField.HOUR_OF_AMPM)) {\n ChronoField.HOUR_OF_AMPM.checkValidValue(this.fieldValues.get(ChronoField.HOUR_OF_AMPM));\n }\n }\n if (this.fieldValues.containsKey(ChronoField.AMPM_OF_DAY) && this.fieldValues.containsKey(ChronoField.HOUR_OF_AMPM)) {\n const ap = this.fieldValues.remove(ChronoField.AMPM_OF_DAY);\n const hap = this.fieldValues.remove(ChronoField.HOUR_OF_AMPM);\n this._addFieldValue(ChronoField.HOUR_OF_DAY, ap * 12 + hap);\n }\n // if (timeFields.containsKey(HOUR_OF_DAY) && timeFields.containsKey(MINUTE_OF_HOUR)) {\n // const hod = timeFields.remove(HOUR_OF_DAY);\n // const moh = timeFields.remove(MINUTE_OF_HOUR);\n // this._addFieldValue(MINUTE_OF_DAY, hod * 60 + moh);\n // }\n // if (timeFields.containsKey(MINUTE_OF_DAY) && timeFields.containsKey(SECOND_OF_MINUTE)) {\n // const mod = timeFields.remove(MINUTE_OF_DAY);\n // const som = timeFields.remove(SECOND_OF_MINUTE);\n // this._addFieldValue(SECOND_OF_DAY, mod * 60 + som);\n // }\n if (this.fieldValues.containsKey(ChronoField.NANO_OF_DAY)) {\n const nod = this.fieldValues.remove(ChronoField.NANO_OF_DAY);\n if (resolverStyle !== ResolverStyle.LENIENT) {\n ChronoField.NANO_OF_DAY.checkValidValue(nod);\n }\n this._addFieldValue(ChronoField.SECOND_OF_DAY, MathUtil.intDiv(nod, 1000000000));\n this._addFieldValue(ChronoField.NANO_OF_SECOND, MathUtil.intMod(nod, 1000000000));\n }\n if (this.fieldValues.containsKey(ChronoField.MICRO_OF_DAY)) {\n const cod = this.fieldValues.remove(ChronoField.MICRO_OF_DAY);\n if (resolverStyle !== ResolverStyle.LENIENT) {\n ChronoField.MICRO_OF_DAY.checkValidValue(cod);\n }\n this._addFieldValue(ChronoField.SECOND_OF_DAY, MathUtil.intDiv(cod, 1000000));\n this._addFieldValue(ChronoField.MICRO_OF_SECOND, MathUtil.intMod(cod, 1000000));\n }\n if (this.fieldValues.containsKey(ChronoField.MILLI_OF_DAY)) {\n const lod = this.fieldValues.remove(ChronoField.MILLI_OF_DAY);\n if (resolverStyle !== ResolverStyle.LENIENT) {\n ChronoField.MILLI_OF_DAY.checkValidValue(lod);\n }\n this._addFieldValue(ChronoField.SECOND_OF_DAY, MathUtil.intDiv(lod, 1000));\n this._addFieldValue(ChronoField.MILLI_OF_SECOND, MathUtil.intMod(lod, 1000));\n }\n if (this.fieldValues.containsKey(ChronoField.SECOND_OF_DAY)) {\n const sod = this.fieldValues.remove(ChronoField.SECOND_OF_DAY);\n if (resolverStyle !== ResolverStyle.LENIENT) {\n ChronoField.SECOND_OF_DAY.checkValidValue(sod);\n }\n this._addFieldValue(ChronoField.HOUR_OF_DAY, MathUtil.intDiv(sod, 3600));\n this._addFieldValue(ChronoField.MINUTE_OF_HOUR, MathUtil.intMod(MathUtil.intDiv(sod, 60), 60));\n this._addFieldValue(ChronoField.SECOND_OF_MINUTE, MathUtil.intMod(sod, 60));\n }\n if (this.fieldValues.containsKey(ChronoField.MINUTE_OF_DAY)) {\n const mod = this.fieldValues.remove(ChronoField.MINUTE_OF_DAY);\n if (resolverStyle !== ResolverStyle.LENIENT) {\n ChronoField.MINUTE_OF_DAY.checkValidValue(mod);\n }\n this._addFieldValue(ChronoField.HOUR_OF_DAY, MathUtil.intDiv(mod, 60));\n this._addFieldValue(ChronoField.MINUTE_OF_HOUR, MathUtil.intMod(mod, 60));\n }\n\n // const sod = MathUtil.intDiv(nod, 1000000000L);\n // this._addFieldValue(HOUR_OF_DAY, MathUtil.intDiv(sod, 3600));\n // this._addFieldValue(MINUTE_OF_HOUR, MathUtil.intMod(MathUtil.intDiv(sod, 60), 60));\n // this._addFieldValue(SECOND_OF_MINUTE, MathUtil.intMod(sod, 60));\n // this._addFieldValue(NANO_OF_SECOND, MathUtil.intMod(nod, 1000000000L));\n if (resolverStyle !== ResolverStyle.LENIENT) {\n if (this.fieldValues.containsKey(ChronoField.MILLI_OF_SECOND)) {\n ChronoField.MILLI_OF_SECOND.checkValidValue(this.fieldValues.get(ChronoField.MILLI_OF_SECOND));\n }\n if (this.fieldValues.containsKey(ChronoField.MICRO_OF_SECOND)) {\n ChronoField.MICRO_OF_SECOND.checkValidValue(this.fieldValues.get(ChronoField.MICRO_OF_SECOND));\n }\n }\n if (this.fieldValues.containsKey(ChronoField.MILLI_OF_SECOND) && this.fieldValues.containsKey(ChronoField.MICRO_OF_SECOND)) {\n const los = this.fieldValues.remove(ChronoField.MILLI_OF_SECOND);\n const cos = this.fieldValues.get(ChronoField.MICRO_OF_SECOND);\n this._putFieldValue0(ChronoField.MICRO_OF_SECOND, los * 1000 + (MathUtil.intMod(cos, 1000)));\n }\n if (this.fieldValues.containsKey(ChronoField.MICRO_OF_SECOND) && this.fieldValues.containsKey(ChronoField.NANO_OF_SECOND)) {\n const nos = this.fieldValues.get(ChronoField.NANO_OF_SECOND);\n this._putFieldValue0(ChronoField.MICRO_OF_SECOND, MathUtil.intDiv(nos, 1000));\n this.fieldValues.remove(ChronoField.MICRO_OF_SECOND);\n }\n if (this.fieldValues.containsKey(ChronoField.MILLI_OF_SECOND) && this.fieldValues.containsKey(ChronoField.NANO_OF_SECOND)) {\n const nos = this.fieldValues.get(ChronoField.NANO_OF_SECOND);\n this._putFieldValue0(ChronoField.MILLI_OF_SECOND, MathUtil.intDiv(nos, 1000000));\n this.fieldValues.remove(ChronoField.MILLI_OF_SECOND);\n }\n if (this.fieldValues.containsKey(ChronoField.MICRO_OF_SECOND)) {\n const cos = this.fieldValues.remove(ChronoField.MICRO_OF_SECOND);\n this._putFieldValue0(ChronoField.NANO_OF_SECOND, cos * 1000);\n } else if (this.fieldValues.containsKey(ChronoField.MILLI_OF_SECOND)) {\n const los = this.fieldValues.remove(ChronoField.MILLI_OF_SECOND);\n this._putFieldValue0(ChronoField.NANO_OF_SECOND, los * 1000000);\n }\n }\n\n /**\n *\n * @param {ResolverStyle} resolverStyle\n * @private\n */\n _resolveTimeInferZeroes(resolverStyle) {\n let hod = this.fieldValues.get(ChronoField.HOUR_OF_DAY);\n const moh = this.fieldValues.get(ChronoField.MINUTE_OF_HOUR);\n const som = this.fieldValues.get(ChronoField.SECOND_OF_MINUTE);\n let nos = this.fieldValues.get(ChronoField.NANO_OF_SECOND);\n if (hod == null) {\n return;\n }\n if (moh == null && (som != null || nos != null)) {\n return;\n }\n if (moh != null && som == null && nos != null) {\n return;\n }\n if (resolverStyle !== ResolverStyle.LENIENT) {\n if (hod != null) {\n if (resolverStyle === ResolverStyle.SMART &&\n hod === 24 &&\n (moh == null || moh === 0) &&\n (som == null || som === 0) &&\n (nos == null || nos === 0)) {\n hod = 0;\n this.excessDays = Period.ofDays(1);\n }\n const hodVal = ChronoField.HOUR_OF_DAY.checkValidIntValue(hod);\n if (moh != null) {\n const mohVal = ChronoField.MINUTE_OF_HOUR.checkValidIntValue(moh);\n if (som != null) {\n const somVal = ChronoField.SECOND_OF_MINUTE.checkValidIntValue(som);\n if (nos != null) {\n const nosVal = ChronoField.NANO_OF_SECOND.checkValidIntValue(nos);\n this._addObject(LocalTime.of(hodVal, mohVal, somVal, nosVal));\n } else {\n this._addObject(LocalTime.of(hodVal, mohVal, somVal));\n }\n } else {\n if (nos == null) {\n this._addObject(LocalTime.of(hodVal, mohVal));\n }\n }\n } else {\n if (som == null && nos == null) {\n this._addObject(LocalTime.of(hodVal, 0));\n }\n }\n }\n } else {\n if (hod != null) {\n let hodVal = hod;\n if (moh != null) {\n if (som != null) {\n if (nos == null) {\n nos = 0;\n }\n let totalNanos = MathUtil.safeMultiply(hodVal, 3600000000000);\n totalNanos = MathUtil.safeAdd(totalNanos, MathUtil.safeMultiply(moh, 60000000000));\n totalNanos = MathUtil.safeAdd(totalNanos, MathUtil.safeMultiply(som, 1000000000));\n totalNanos = MathUtil.safeAdd(totalNanos, nos);\n const excessDays = MathUtil.floorDiv(totalNanos, 86400000000000); // safe int cast\n const nod = MathUtil.floorMod(totalNanos, 86400000000000);\n this._addObject(LocalTime.ofNanoOfDay(nod));\n this.excessDays = Period.ofDays(excessDays);\n } else {\n let totalSecs = MathUtil.safeMultiply(hodVal, 3600);\n totalSecs = MathUtil.safeAdd(totalSecs, MathUtil.safeMultiply(moh, 60));\n const excessDays = MathUtil.floorDiv(totalSecs, 86400); // safe int cast\n const sod = MathUtil.floorMod(totalSecs, 86400);\n this._addObject(LocalTime.ofSecondOfDay(sod));\n this.excessDays = Period.ofDays(excessDays);\n }\n } else {\n const excessDays = MathUtil.safeToInt(MathUtil.floorDiv(hodVal, 24));\n hodVal = MathUtil.floorMod(hodVal, 24);\n this._addObject(LocalTime.of(hodVal, 0));\n this.excessDays = Period.ofDays(excessDays);\n }\n }\n }\n this.fieldValues.remove(ChronoField.HOUR_OF_DAY);\n this.fieldValues.remove(ChronoField.MINUTE_OF_HOUR);\n this.fieldValues.remove(ChronoField.SECOND_OF_MINUTE);\n this.fieldValues.remove(ChronoField.NANO_OF_SECOND);\n }\n\n /**\n *\n * @param {ChronoLocalDate|LocalTime} dateOrTime\n * @private\n */\n _addObject(dateOrTime) {\n if (dateOrTime instanceof ChronoLocalDate){\n this.date = dateOrTime;\n } else if (dateOrTime instanceof LocalTime){\n this.time = dateOrTime;\n }\n }\n\n _resolveInstant() {\n if (this.date != null && this.time != null) {\n const offsetSecs = this.fieldValues.get(ChronoField.OFFSET_SECONDS);\n if (offsetSecs != null) {\n const offset = ZoneOffset.ofTotalSeconds(offsetSecs);\n const instant = this.date.atTime(this.time).atZone(offset).getLong(ChronoField.INSTANT_SECONDS);\n this.fieldValues.put(ChronoField.INSTANT_SECONDS, instant);\n } else if (this.zone != null) {\n const instant = this.date.atTime(this.time).atZone(this.zone).getLong(ChronoField.INSTANT_SECONDS);\n this.fieldValues.put(ChronoField.INSTANT_SECONDS, instant);\n }\n }\n }\n\n /**\n * Builds the specified type from the values in this builder.\n *\n * This attempts to build the specified type from this builder.\n * If the builder cannot return the type, an exception is thrown.\n *\n * @param {!TemporalQuery} type - the type to invoke `from` on, not null\n * @return {*} the extracted value, not null\n * @throws DateTimeException if an error occurs\n */\n build(type) {\n return type.queryFrom(this);\n }\n\n /**\n *\n * @param {TemporalField} field\n * @returns {number}\n */\n isSupported(field) {\n if (field == null) {\n return false;\n }\n return (this.fieldValues.containsKey(field) && this.fieldValues.get(field) !== undefined) ||\n (this.date != null && this.date.isSupported(field)) ||\n (this.time != null && this.time.isSupported(field));\n }\n\n /**\n *\n * @param {TemporalField} field\n * @returns {number}\n */\n getLong(field) {\n requireNonNull(field, 'field');\n const value = this.getFieldValue0(field);\n if (value == null) {\n if (this.date != null && this.date.isSupported(field)) {\n return this.date.getLong(field);\n }\n if (this.time != null && this.time.isSupported(field)) {\n return this.time.getLong(field);\n }\n throw new DateTimeException(`Field not found: ${field}`);\n }\n return value;\n }\n\n /**\n *\n * @param {!TemporalQuery} query\n * @returns {*}\n */\n query(query) {\n if (query === TemporalQueries.zoneId()) {\n return this.zone;\n } else if (query === TemporalQueries.chronology()) {\n return this.chrono;\n } else if (query === TemporalQueries.localDate()) {\n return this.date != null ? LocalDate.from(this.date) : null;\n } else if (query === TemporalQueries.localTime()) {\n return this.time;\n } else if (query === TemporalQueries.zone() || query === TemporalQueries.offset()) {\n return query.queryFrom(this);\n } else if (query === TemporalQueries.precision()) {\n return null; // not a complete date/time\n }\n // inline TemporalAccessor.super.query(query) as an optimization\n // non-JDK classes are not permitted to make this optimization\n return query.queryFrom(this);\n }\n\n}\n","/*\n * @copyright (c) 2016, Philipp Thürwächter & Pattrick Hüper\n * @copyright (c) 2007-present, Stephen Colebourne & Michael Nascimento Santos\n * @license BSD-3-Clause (see LICENSE in the root directory of this source tree)\n */\n\nimport { assert, requireNonNull } from '../assert';\n\nimport { DateTimeBuilder } from './DateTimeBuilder';\nimport { EnumMap } from './EnumMap';\n\nimport { IsoChronology } from '../chrono/IsoChronology';\nimport { Temporal } from '../temporal/Temporal';\nimport { TemporalQueries } from '../temporal/TemporalQueries';\n\n/**\n * @private\n */\nexport class DateTimeParseContext{\n\n constructor(){\n if(arguments.length === 1){\n if(arguments[0] instanceof DateTimeParseContext){\n this._constructorSelf.apply(this, arguments);\n return;\n } else {\n this._constructorFormatter.apply(this, arguments);\n }\n } else {\n this._constructorParam.apply(this, arguments);\n }\n\n this._caseSensitive = true;\n this._strict = true;\n this._parsed = [new Parsed(this)];\n }\n\n _constructorParam(locale, symbols, chronology){\n this._locale = locale;\n this._symbols = symbols;\n this._overrideChronology = chronology;\n }\n\n _constructorFormatter(formatter){\n this._locale = formatter.locale();\n this._symbols = formatter.decimalStyle();\n this._overrideChronology = formatter.chronology();\n }\n\n\n _constructorSelf(other) {\n this._locale = other._locale;\n this._symbols = other._symbols;\n this._overrideChronology = other._overrideChronology;\n this._overrideZone = other._overrideZone;\n this._caseSensitive = other._caseSensitive;\n this._strict = other._strict;\n this._parsed = [new Parsed(this)];\n }\n\n /**\n * Creates a copy of this context.\n */\n copy() {\n return new DateTimeParseContext(this);\n }\n\n symbols(){\n return this._symbols;\n }\n\n isStrict(){\n return this._strict;\n }\n\n setStrict(strict){\n this._strict = strict;\n }\n\n locale() {\n return this._locale;\n }\n\n setLocale(locale) {\n this._locale = locale;\n }\n //-----------------------------------------------------------------------\n /**\n * Starts the parsing of an optional segment of the input.\n */\n startOptional() {\n this._parsed.push(this.currentParsed().copy());\n }\n\n /**\n * Ends the parsing of an optional segment of the input.\n *\n * @param {boolean} successful whether the optional segment was successfully parsed\n */\n endOptional(successful) {\n if (successful) {\n this._parsed.splice(this._parsed.length - 2, 1);\n } else {\n this._parsed.splice(this._parsed.length - 1, 1);\n }\n }\n\n /**\n * Checks if parsing is case sensitive.\n *\n * @return true if parsing is case sensitive, false if case insensitive\n */\n isCaseSensitive() {\n return this._caseSensitive;\n }\n\n /**\n * Sets whether the parsing is case sensitive or not.\n *\n * @param caseSensitive changes the parsing to be case sensitive or not from now on\n */\n setCaseSensitive(caseSensitive) {\n this._caseSensitive = caseSensitive;\n }\n\n /**\n * Helper to compare two {@link CharSequence} instances.\n * This uses {@link isCaseSensitive}.\n *\n * @param cs1 the first character sequence, not null\n * @param offset1 the offset into the first sequence, valid\n * @param cs2 the second character sequence, not null\n * @param offset2 the offset into the second sequence, valid\n * @param length the length to check, valid\n * @return true if equal\n */\n subSequenceEquals(cs1, offset1, cs2, offset2, length) {\n if (offset1 + length > cs1.length || offset2 + length > cs2.length) {\n return false;\n }\n if (! this.isCaseSensitive()) {\n cs1 = cs1.toLowerCase();\n cs2 = cs2.toLowerCase();\n }\n for (let i = 0; i < length; i++) {\n const ch1 = cs1[offset1 + i];\n const ch2 = cs2[offset2 + i];\n if (ch1 !== ch2) {\n return false;\n }\n }\n return true;\n }\n\n /**\n * Helper to compare two `char`.\n * This uses {@link isCaseSensitive}.\n *\n * @param ch1 the first character\n * @param ch2 the second character\n * @return true if equal\n */\n charEquals(ch1, ch2) {\n if (this.isCaseSensitive()) {\n return ch1 === ch2;\n }\n return this.charEqualsIgnoreCase(ch1, ch2);\n }\n\n /**\n * Compares two characters ignoring case.\n *\n * @param c1 the first\n * @param c2 the second\n * @return true if equal\n */\n charEqualsIgnoreCase(c1, c2) {\n return c1 === c2 ||\n c1.toLowerCase() === c2.toLowerCase();\n }\n\n setParsedField(field, value, errorPos, successPos){\n const currentParsedFieldValues = this.currentParsed().fieldValues;\n const old = currentParsedFieldValues.get(field);\n currentParsedFieldValues.set(field, value);\n return (old != null && old !== value) ? ~errorPos : successPos;\n }\n\n /**\n * Stores the parsed zone.\n *\n * This stores the zone that has been parsed.\n * No validation is performed other than ensuring it is not null.\n *\n * @param {ZoneId} zone the parsed zone, not null\n */\n setParsedZone(zone) {\n requireNonNull(zone, 'zone');\n this.currentParsed().zone = zone;\n }\n\n getParsed(field) {\n return this.currentParsed().fieldValues.get(field);\n }\n\n toParsed() {\n return this.currentParsed();\n }\n\n currentParsed() {\n return this._parsed[this._parsed.length - 1];\n }\n\n /**\n * Stores the leap second.\n */\n setParsedLeapSecond() {\n this.currentParsed().leapSecond = true;\n }\n\n /**\n * Gets the effective chronology during parsing.\n *\n * @return the effective parsing chronology, not null\n */\n getEffectiveChronology() {\n let chrono = this.currentParsed().chrono;\n if (chrono == null) {\n chrono = this._overrideChronology;\n if (chrono == null) {\n chrono = IsoChronology.INSTANCE;\n }\n }\n return chrono;\n }\n\n\n}\n\nclass Parsed extends Temporal {\n constructor(dateTimeParseContext){\n super();\n this.chrono = null;\n this.zone = null;\n this.fieldValues = new EnumMap();\n this.leapSecond = false;\n this.dateTimeParseContext = dateTimeParseContext;\n }\n\n copy() {\n const cloned = new Parsed();\n cloned.chrono = this.chrono;\n cloned.zone = this.zone;\n cloned.fieldValues.putAll(this.fieldValues);\n cloned.leapSecond = this.leapSecond;\n cloned.dateTimeParseContext = this.dateTimeParseContext;\n return cloned;\n }\n\n toString() {\n return `${this.fieldValues}, ${this.chrono}, ${this.zone}`;\n }\n\n isSupported(field) {\n return this.fieldValues.containsKey(field);\n }\n\n get(field) {\n const val = this.fieldValues.get(field);\n assert(val != null);\n return val;\n }\n\n query(query) {\n if (query === TemporalQueries.chronology()) {\n return this.chrono;\n }\n if (query === TemporalQueries.zoneId() || query === TemporalQueries.zone()) {\n return this.zone;\n }\n return super.query(query);\n }\n\n toBuilder() {\n const builder = new DateTimeBuilder();\n builder.fieldValues.putAll(this.fieldValues);\n builder.chrono = this.dateTimeParseContext.getEffectiveChronology();\n if (this.zone != null) {\n builder.zone = this.zone;\n } else {\n builder.zone = this.overrideZone;\n }\n builder.leapSecond = this.leapSecond;\n builder.excessDays = this.excessDays;\n return builder;\n }\n}\n","/*\n * @copyright (c) 2016, Philipp Thürwächter & Pattrick Hüper\n * @copyright (c) 2007-present, Stephen Colebourne & Michael Nascimento Santos\n * @license BSD-3-Clause (see LICENSE in the root directory of this source tree)\n */\n\nimport { DateTimeException } from '../errors';\n\nimport { DateTimeFormatter } from './DateTimeFormatter';\n\n/**\n * @private\n */\nexport class DateTimePrintContext{\n /**\n *\n * @param {TemporalAccessor} temporal\n * @param {DateTimeFormatter|Locale} localeOrFormatter\n * @param {DecimalStyle} symbols\n */\n constructor(temporal, localeOrFormatter, symbols) {\n if(arguments.length === 2 && arguments[1] instanceof DateTimeFormatter){\n this._temporal = DateTimePrintContext.adjust(temporal, localeOrFormatter);\n this._locale = localeOrFormatter.locale();\n this._symbols = localeOrFormatter.decimalStyle();\n } else {\n this._temporal = temporal;\n this._locale = localeOrFormatter;\n this._symbols = symbols;\n }\n this._optional = 0;\n }\n\n /**\n *\n * @param {TemporalAccessor} temporal\n * @param {DateTimeFormatter} formatter\n * @returns {TemporalAccessor}\n */\n // eslint-disable-next-line no-unused-vars\n static adjust(temporal, formatter) {\n // TODO implement\n return temporal;\n }\n\n\n symbols(){\n return this._symbols;\n }\n\n /**\n * Starts the printing of an optional segment of the input.\n */\n startOptional() {\n this._optional++;\n }\n\n /**\n * Ends the printing of an optional segment of the input.\n */\n endOptional() {\n this._optional--;\n }\n\n /**\n * Gets a value using a query.\n *\n * @param {TemporalQuery} query the query to use, not null\n * @return {*} the result, null if not found and optional is true\n * @throws DateTimeException if the type is not available and the section is not optional\n */\n getValueQuery(query) {\n const result = this._temporal.query(query);\n if (result == null && this._optional === 0) {\n throw new DateTimeException(`Unable to extract value: ${this._temporal}`);\n }\n return result;\n }\n\n /**\n * Gets the value of the specified field.\n *\n * This will return the value for the specified field.\n *\n * @param field the field to find, not null\n * @return the value, null if not found and optional is true\n * @throws DateTimeException if the field is not available and the section is not optional\n */\n getValue(field) {\n try {\n return this._temporal.getLong(field);\n } catch (ex) {\n if ((ex instanceof DateTimeException) && this._optional > 0) {\n return null;\n }\n throw ex;\n }\n }\n\n //-----------------------------------------------------------------------\n /**\n * Gets the temporal object being output.\n *\n * @return {TemporalAccessor} the temporal object, not null\n */\n temporal() {\n return this._temporal;\n }\n\n /**\n * Gets the locale.\n *

\n * This locale is used to control localization in the print output except\n * where localization is controlled by the symbols.\n *\n * @return the locale, not null\n */\n locale() {\n return this._locale;\n }\n\n //-------------------------------------------------------------------------\n // for testing\n /**\n * Sets the date-time being output.\n *\n * @param temporal the date-time object, not null\n */\n setDateTime(temporal) {\n this._temporal = temporal;\n }\n\n setLocale(locale) {\n this._locale = locale;\n }\n\n\n}\n","/*\n * @copyright (c) 2016, Philipp Thürwächter & Pattrick Hüper\n * @copyright (c) 2007-present, Stephen Colebourne & Michael Nascimento Santos\n * @license BSD-3-Clause (see LICENSE in the root directory of this source tree)\n */\n\nimport { UnsupportedTemporalTypeException, IllegalStateException } from '../errors';\n\nimport { DayOfWeek } from '../DayOfWeek';\nimport { Duration } from '../Duration';\nimport { MathUtil } from '../MathUtil';\nimport { LocalDate } from '../LocalDate';\n\nimport { ChronoField } from './ChronoField';\nimport { ChronoUnit } from './ChronoUnit';\nimport { TemporalField } from './TemporalField';\nimport { TemporalUnit } from './TemporalUnit';\nimport { ValueRange } from './ValueRange';\n\nimport { IsoChronology } from '../chrono/IsoChronology';\n\nimport { ResolverStyle } from '../format/ResolverStyle';\n\n/**\n * Fields and units specific to the ISO-8601 calendar system,\n * including quarter-of-year and week-based-year.\n *\n * This class defines fields and units that are specific to the ISO calendar system.\n *\n * ### Quarter of year\n *\n * The ISO-8601 standard is based on the standard civic 12 month year.\n * This is commonly divided into four quarters, often abbreviated as Q1, Q2, Q3 and Q4.\n *\n * January, February and March are in Q1.\n * April, May and June are in Q2.\n * July, August and September are in Q3.\n * October, November and December are in Q4.\n *\n * The complete date is expressed using three fields:\n *\n * * `IsoFields.DAY_OF_QUARTER` - the day within the quarter, from 1 to 90, 91 or 92\n * * `QUARTER_OF_YEAR` - the week within the week-based-year\n * * `ChronoField.YEAR` - the standard ISO year (see {@link ChronoField})\n *\n * ### Week based years\n *\n * The ISO-8601 standard was originally intended as a data interchange format,\n * defining a string format for dates and times. However, it also defines an\n * alternate way of expressing the date, based on the concept of week-based-year.\n *\n * The date is expressed using three fields:\n *\n * * `ChronoField.DAY_OF_WEEK` - the standard field defining the\n * day-of-week from Monday (1) to Sunday (7) (see {@link ChronoField})\n * * `WEEK_OF_WEEK_BASED_YEAR` - the week within the week-based-year\n * * `WEEK_BASED_YEAR` - the week-based-year \n *\n * The week-based-year itself is defined relative to the standard ISO proleptic year.\n * It differs from the standard year in that it always starts on a Monday.\n *\n * The first week of a week-based-year is the first Monday-based week of the standard\n * ISO year that has at least 4 days in the new year.\n *\n * * If January 1st is Monday then week 1 starts on January 1st\n * * If January 1st is Tuesday then week 1 starts on December 31st of the previous standard year\n * * If January 1st is Wednesday then week 1 starts on December 30th of the previous standard year\n * * If January 1st is Thursday then week 1 starts on December 29th of the previous standard year\n * * If January 1st is Friday then week 1 starts on January 4th\n * * If January 1st is Saturday then week 1 starts on January 3rd\n * * If January 1st is Sunday then week 1 starts on January 2nd\n *\n * There are 52 weeks in most week-based years, however on occasion there are 53 weeks.\n *\n * For example:\n *\n * * Sunday, 2008-12-28: Week 52 of week-based-year 2008\n * * Monday, 2008-12-29: Week 1 of week-based-year 2009\n * * Wednesday, 2008-12-31: Week 1 of week-based-year 2009\n * * Thursday, 2009-01-01: Week 1 of week-based-year 2009\n * * Sunday, 2009-01-04: Week 1 of week-based-year 2009\n * * Monday, 2009-01-05: Week 2 of week-based-year 2009\n *\n * @property {TemporalField} DAY_OF_QUARTER The field that represents the day-of-quarter.\n *\n * This field allows the day-of-quarter value to be queried and set.\n * The day-of-quarter has values from 1 to 90 in Q1 of a standard year, from 1 to 91\n * in Q1 of a leap year, from 1 to 91 in Q2 and from 1 to 92 in Q3 and Q4.\n *\n * The day-of-quarter can only be calculated if the day-of-year, month-of-year and year\n * are available.\n *\n * When setting this field, the value is allowed to be partially lenient, taking any\n * value from 1 to 92. If the quarter has less than 92 days, then day 92, and\n * potentially day 91, is in the following quarter.\n *\n * @property {TemporalField} QUARTER_OF_YEAR The field that represents the quarter-of-year.\n *\n * This field allows the quarter-of-year value to be queried and set.\n * The quarter-of-year has values from 1 to 4.\n *\n * The day-of-quarter can only be calculated if the month-of-year is available.\n *\n * @property {TemporalField} WEEK_OF_WEEK_BASED_YEAR The field that represents the\n * week-of-week-based-year.\n *\n * This field allows the week of the week-based-year value to be queried and set.\n *\n * @property {TemporalField} WEEK_BASED_YEAR The field that represents the week-based-year.\n *\n * This field allows the week-based-year value to be queried and set.\n *\n * @property {TemporalField} WEEK_BASED_YEARS The unit that represents week-based-years for\n * the purpose of addition and subtraction.\n *\n * This allows a number of week-based-years to be added to, or subtracted from, a date.\n * The unit is equal to either 52 or 53 weeks.\n * The estimated duration of a week-based-year is the same as that of a standard ISO\n * year at 365.2425 days.\n *\n * The rules for addition add the number of week-based-years to the existing value\n * for the week-based-year field. If the resulting week-based-year only has 52 weeks,\n * then the date will be in week 1 of the following week-based-year.\n *\n * @property {TemporalField} QUARTER_YEARS Unit that represents the concept of a quarter-year.\n * For the ISO calendar system, it is equal to 3 months.\n * The estimated duration of a quarter-year is one quarter of 365.2425 days.\n * \n * @typedef {Object} IsoFields\n * @type {Object}\n */\nexport const IsoFields = {};\n\n//-----------------------------------------------------------------------\n\nconst QUARTER_DAYS = [0, 90, 181, 273, 0, 91, 182, 274];\n\n/**\n * Implementation of the field.\n * @private\n */\nclass Field extends TemporalField{\n\n /**\n *\n * @returns {boolean}\n */\n isDateBased() {\n return true;\n }\n\n /**\n *\n * @returns {boolean}\n */\n isTimeBased() {\n return false;\n }\n\n /**\n *\n * @returns {boolean}\n */\n _isIso() {\n return true;\n }\n\n /**\n *\n * @param {LocalDate} date\n * @returns {ValueRange}\n */\n static _getWeekRangeByLocalDate(date) {\n const wby = Field._getWeekBasedYear(date);\n return ValueRange.of(1, Field._getWeekRangeByYear(wby));\n }\n\n /**\n *\n * @param {number} wby\n * @returns {number}\n */\n static _getWeekRangeByYear(wby) {\n const date = LocalDate.of(wby, 1, 1);\n // 53 weeks if standard year starts on Thursday, or Wed in a leap year\n if (date.dayOfWeek() === DayOfWeek.THURSDAY || (date.dayOfWeek() === DayOfWeek.WEDNESDAY && date.isLeapYear())) {\n return 53;\n }\n return 52;\n }\n\n /**\n *\n * @param {LocalDate} date\n * @returns {number}\n */\n static _getWeek(date) {\n const dow0 = date.dayOfWeek().ordinal();\n const doy0 = date.dayOfYear() - 1;\n const doyThu0 = doy0 + (3 - dow0); // adjust to mid-week Thursday (which is 3 indexed from zero)\n const alignedWeek = MathUtil.intDiv(doyThu0, 7);\n const firstThuDoy0 = doyThu0 - (alignedWeek * 7);\n let firstMonDoy0 = firstThuDoy0 - 3;\n if (firstMonDoy0 < -3) {\n firstMonDoy0 += 7;\n }\n if (doy0 < firstMonDoy0) {\n return Field._getWeekRangeByLocalDate(date.withDayOfYear(180).minusYears(1)).maximum();\n }\n let week = MathUtil.intDiv((doy0 - firstMonDoy0), 7) + 1;\n if (week === 53) {\n if ((firstMonDoy0 === -3 || (firstMonDoy0 === -2 && date.isLeapYear())) === false) {\n week = 1;\n }\n }\n return week;\n }\n\n /**\n *\n * @param {LocalDate} date\n * @returns {number}\n */\n static _getWeekBasedYear(date) {\n let year = date.year();\n let doy = date.dayOfYear();\n if (doy <= 3) {\n const dow = date.dayOfWeek().ordinal();\n if (doy - dow < -2) {\n year--;\n }\n } else if (doy >= 363) {\n const dow = date.dayOfWeek().ordinal();\n doy = doy - 363 - (date.isLeapYear() ? 1 : 0);\n if (doy - dow >= 0) {\n year++;\n }\n }\n return year;\n }\n\n /**\n *\n * @returns {string}\n */\n displayName(/*locale*/) {\n return this.toString();\n }\n\n /**\n *\n * @returns {null}\n */\n resolve() {\n return null;\n }\n\n name(){\n return this.toString();\n }\n\n}\n\n/**\n * @private\n */\nclass DAY_OF_QUARTER_FIELD extends Field {\n\n /**\n *\n * @returns {string}\n */\n toString() {\n return 'DayOfQuarter';\n }\n\n /**\n *\n * @returns {TemporalUnit}\n */\n baseUnit() {\n return ChronoUnit.DAYS;\n }\n\n /**\n *\n * @returns {TemporalUnit}\n */\n rangeUnit() {\n return QUARTER_YEARS;\n }\n\n /**\n *\n * @returns {ValueRange}\n */\n range() {\n return ValueRange.of(1, 90, 92);\n }\n\n /**\n *\n * @param {TemporalAccessor} temporal\n * @returns {boolean}\n */\n isSupportedBy(temporal) {\n return temporal.isSupported(ChronoField.DAY_OF_YEAR) && temporal.isSupported(ChronoField.MONTH_OF_YEAR) &&\n temporal.isSupported(ChronoField.YEAR) && this._isIso(temporal);\n }\n\n\n /**\n *\n * @param {TemporalAccessor} temporal\n * @returns {ValueRange}\n */\n rangeRefinedBy(temporal) {\n if (temporal.isSupported(this) === false) {\n throw new UnsupportedTemporalTypeException('Unsupported field: DayOfQuarter');\n }\n const qoy = temporal.getLong(QUARTER_OF_YEAR);\n if (qoy === 1) {\n const year = temporal.getLong(ChronoField.YEAR);\n return (IsoChronology.isLeapYear(year) ? ValueRange.of(1, 91) : ValueRange.of(1, 90));\n } else if (qoy === 2) {\n return ValueRange.of(1, 91);\n } else if (qoy === 3 || qoy === 4) {\n return ValueRange.of(1, 92);\n } // else value not from 1 to 4, so drop through\n return this.range();\n }\n\n /**\n *\n * @param {TemporalAccessor} temporal\n * @returns {number}\n */\n getFrom(temporal) {\n if (temporal.isSupported(this) === false) {\n throw new UnsupportedTemporalTypeException('Unsupported field: DayOfQuarter');\n }\n const doy = temporal.get(ChronoField.DAY_OF_YEAR);\n const moy = temporal.get(ChronoField.MONTH_OF_YEAR);\n const year = temporal.getLong(ChronoField.YEAR);\n return doy - QUARTER_DAYS[MathUtil.intDiv((moy - 1), 3) + (IsoChronology.isLeapYear(year) ? 4 : 0)];\n }\n\n /**\n *\n * @param {Temporal} temporal\n * @param {number} newValue\n * @returns {temporal}\n */\n adjustInto(temporal, newValue) {\n const curValue = this.getFrom(temporal);\n this.range().checkValidValue(newValue, this);\n return temporal.with(ChronoField.DAY_OF_YEAR, temporal.getLong(ChronoField.DAY_OF_YEAR) + (newValue - curValue));\n }\n\n /**\n *\n * @param {Map} fieldValues\n * @param {TemporalAccessor} partialTemporal\n * @param {ResolverStyle} resolverStyle\n * @returns {ValueRange}\n */\n resolve(fieldValues, partialTemporal, resolverStyle) {\n const yearLong = fieldValues.get(ChronoField.YEAR);\n const qoyLong = fieldValues.get(QUARTER_OF_YEAR);\n if (yearLong == null || qoyLong == null) {\n return null;\n }\n const y = ChronoField.YEAR.checkValidIntValue(yearLong);\n const doq = fieldValues.get(DAY_OF_QUARTER);\n let date;\n if (resolverStyle === ResolverStyle.LENIENT) {\n const qoy = qoyLong;\n date = LocalDate.of(y, 1, 1);\n date = date.plusMonths(MathUtil.safeMultiply(MathUtil.safeSubtract(qoy, 1), 3));\n date = date.plusDays(MathUtil.safeSubtract(doq, 1));\n } else {\n const qoy = QUARTER_OF_YEAR.range().checkValidIntValue(qoyLong, QUARTER_OF_YEAR);\n if (resolverStyle === ResolverStyle.STRICT) {\n let max = 92;\n if (qoy === 1) {\n max = (IsoChronology.isLeapYear(y) ? 91 : 90);\n } else if (qoy === 2) {\n max = 91;\n }\n ValueRange.of(1, max).checkValidValue(doq, this);\n } else {\n this.range().checkValidValue(doq, this); // leniently check from 1 to 92\n }\n date = LocalDate.of(y, ((qoy - 1) * 3) + 1, 1).plusDays(doq - 1);\n }\n fieldValues.remove(this);\n fieldValues.remove(ChronoField.YEAR);\n fieldValues.remove(QUARTER_OF_YEAR);\n return date;\n }\n}\n\n/**\n * @private\n */\nclass QUARTER_OF_YEAR_FIELD extends Field {\n\n /**\n *\n * @returns {string}\n */\n toString() {\n return 'QuarterOfYear';\n }\n\n /**\n *\n * @returns {TemporalUnit}\n */\n baseUnit() {\n return QUARTER_YEARS;\n }\n\n /**\n *\n * @returns {TemporalUnit}\n */\n rangeUnit() {\n return ChronoUnit.YEARS;\n }\n\n /**\n *\n * @returns {ValueRange}\n */\n range() {\n return ValueRange.of(1, 4);\n }\n\n /**\n *\n * @param {TemporalAccessor} temporal\n * @returns {boolean}\n */\n isSupportedBy(temporal) {\n return temporal.isSupported(ChronoField.MONTH_OF_YEAR) && this._isIso(temporal);\n }\n\n\n /**\n *\n * @param {TemporalAccessor} temporal\n * @returns {ValueRange}\n */\n //eslint-disable-next-line no-unused-vars\n rangeRefinedBy(temporal) {\n return this.range();\n }\n\n /**\n *\n * @param {TemporalAccessor} temporal\n * @returns {number}\n */\n getFrom(temporal) {\n if (temporal.isSupported(this) === false) {\n throw new UnsupportedTemporalTypeException('Unsupported field: QuarterOfYear');\n }\n const moy = temporal.getLong(ChronoField.MONTH_OF_YEAR);\n return MathUtil.intDiv((moy + 2), 3);\n }\n\n /**\n *\n * @param {Temporal} temporal\n * @param {number} newValue\n * @returns {temporal}\n */\n adjustInto(temporal, newValue) {\n const curValue = this.getFrom(temporal);\n this.range().checkValidValue(newValue, this);\n return temporal.with(ChronoField.MONTH_OF_YEAR, temporal.getLong(ChronoField.MONTH_OF_YEAR) + (newValue - curValue) * 3);\n }\n\n}\n\n/**\n * @private\n */\nclass WEEK_OF_WEEK_BASED_YEAR_FIELD extends Field {\n\n /**\n *\n * @returns {string}\n */\n toString() {\n return 'WeekOfWeekBasedYear';\n }\n\n /**\n *\n * @returns {TemporalUnit}\n */\n baseUnit() {\n return ChronoUnit.WEEKS;\n }\n\n /**\n *\n * @returns {TemporalUnit}\n */\n rangeUnit() {\n return WEEK_BASED_YEARS;\n }\n\n /**\n *\n * @returns {ValueRange}\n */\n range() {\n return ValueRange.of(1, 52, 53);\n }\n\n /**\n *\n * @param {TemporalAccessor} temporal\n * @returns {boolean}\n */\n isSupportedBy(temporal) {\n return temporal.isSupported(ChronoField.EPOCH_DAY) && this._isIso(temporal);\n }\n\n\n /**\n *\n * @param {TemporalAccessor} temporal\n * @returns {ValueRange}\n */\n rangeRefinedBy(temporal) {\n if (temporal.isSupported(this) === false) {\n throw new UnsupportedTemporalTypeException('Unsupported field: WeekOfWeekBasedYear');\n }\n return Field._getWeekRangeByLocalDate(LocalDate.from(temporal));\n }\n\n /**\n *\n * @param {TemporalAccessor} temporal\n * @returns {number}\n */\n getFrom(temporal) {\n if (temporal.isSupported(this) === false) {\n throw new UnsupportedTemporalTypeException('Unsupported field: WeekOfWeekBasedYear');\n }\n return Field._getWeek(LocalDate.from(temporal));\n }\n\n /**\n *\n * @param {Temporal} temporal\n * @param {number} newValue\n * @returns {temporal}\n */\n adjustInto(temporal, newValue) {\n this.range().checkValidValue(newValue, this);\n return temporal.plus(MathUtil.safeSubtract(newValue, this.getFrom(temporal)), ChronoUnit.WEEKS);\n }\n\n /**\n *\n * @param {Map} fieldValues\n * @param {TemporalAccessor} partialTemporal\n * @param {ResolverStyle} resolverStyle\n * @returns {ValueRange}\n */\n resolve(fieldValues, partialTemporal, resolverStyle) {\n const wbyLong = fieldValues.get(WEEK_BASED_YEAR);\n const dowLong = fieldValues.get(ChronoField.DAY_OF_WEEK);\n if (wbyLong == null || dowLong == null) {\n return null;\n }\n const wby = WEEK_BASED_YEAR.range().checkValidIntValue(wbyLong, WEEK_BASED_YEAR);\n const wowby = fieldValues.get(WEEK_OF_WEEK_BASED_YEAR);\n let date;\n if (resolverStyle === ResolverStyle.LENIENT) {\n let dow = dowLong;\n let weeks = 0;\n if (dow > 7) {\n weeks = MathUtil.intDiv((dow - 1), 7);\n dow = (MathUtil.intMod((dow - 1), 7) + 1);\n } else if (dow < 1) {\n weeks = MathUtil.intDiv(dow, 7) - 1;\n dow = MathUtil.intMod(dow, 7) + 7;\n }\n date = LocalDate.of(wby, 1, 4).plusWeeks(wowby - 1).plusWeeks(weeks).with(ChronoField.DAY_OF_WEEK, dow);\n } else {\n const dow = ChronoField.DAY_OF_WEEK.checkValidIntValue(dowLong);\n if (resolverStyle === ResolverStyle.STRICT) {\n const temp = LocalDate.of(wby, 1, 4);\n const range = Field._getWeekRangeByLocalDate(temp);\n range.checkValidValue(wowby, this);\n } else {\n this.range().checkValidValue(wowby, this); // leniently check from 1 to 53\n }\n date = LocalDate.of(wby, 1, 4).plusWeeks(wowby - 1).with(ChronoField.DAY_OF_WEEK, dow);\n }\n fieldValues.remove(this);\n fieldValues.remove(WEEK_BASED_YEAR);\n fieldValues.remove(ChronoField.DAY_OF_WEEK);\n return date;\n }\n\n /**\n *\n * @returns {string}\n */\n displayName() {\n return 'Week';\n }\n\n}\n\n/**\n * @private\n */\nclass WEEK_BASED_YEAR_FIELD extends Field {\n\n /**\n *\n * @returns {string}\n */\n toString() {\n return 'WeekBasedYear';\n }\n\n /**\n *\n * @returns {TemporalUnit}\n */\n baseUnit() {\n return WEEK_BASED_YEARS;\n }\n\n /**\n *\n * @returns {TemporalUnit}\n */\n rangeUnit() {\n return ChronoUnit.FOREVER;\n }\n\n /**\n *\n * @returns {ValueRange}\n */\n range() {\n return ChronoField.YEAR.range();\n }\n\n /**\n *\n * @param {TemporalAccessor} temporal\n * @returns {boolean}\n */\n isSupportedBy(temporal) {\n return temporal.isSupported(ChronoField.EPOCH_DAY) && this._isIso(temporal);\n }\n\n\n /**\n *\n * @param {TemporalAccessor} temporal\n * @returns {ValueRange}\n */\n //eslint-disable-next-line no-unused-vars\n rangeRefinedBy(temporal) {\n return ChronoField.YEAR.range();\n }\n\n /**\n *\n * @param {TemporalAccessor} temporal\n * @returns {number}\n */\n getFrom(temporal) {\n if (temporal.isSupported(this) === false) {\n throw new UnsupportedTemporalTypeException('Unsupported field: WeekBasedYear');\n }\n return Field._getWeekBasedYear(LocalDate.from(temporal));\n }\n\n /**\n *\n * @param {Temporal} temporal\n * @param {number} newValue\n * @returns {temporal}\n */\n adjustInto(temporal, newValue) {\n if (this.isSupportedBy(temporal) === false) {\n throw new UnsupportedTemporalTypeException('Unsupported field: WeekBasedYear');\n }\n const newWby = this.range().checkValidIntValue(newValue, WEEK_BASED_YEAR); // strict check\n const date = LocalDate.from(temporal);\n const dow = date.get(ChronoField.DAY_OF_WEEK);\n let week = Field._getWeek(date);\n if (week === 53 && Field._getWeekRangeByYear(newWby) === 52) {\n week = 52;\n }\n let resolved = LocalDate.of(newWby, 1, 4); // 4th is guaranteed to be in week one\n const days = (dow - resolved.get(ChronoField.DAY_OF_WEEK)) + ((week - 1) * 7);\n resolved = resolved.plusDays(days);\n return temporal.with(resolved);\n }\n\n}\n\n//-----------------------------------------------------------------------\n/**\n * Implementation of the period unit.\n * @private\n */\nclass Unit extends TemporalUnit {\n\n /**\n *\n * @param {string} name\n * @param {Duration} estimatedDuration\n * @private\n */\n constructor(name, estimatedDuration) {\n super();\n this._name = name;\n this._duration = estimatedDuration;\n }\n\n /**\n *\n * @returns {Duration}\n */\n duration() {\n return this._duration;\n }\n\n /**\n *\n * @returns {boolean}\n */\n isDurationEstimated() {\n return true;\n }\n\n /**\n *\n * @returns {boolean}\n */\n isDateBased() {\n return true;\n }\n\n /**\n *\n * @returns {boolean}\n */\n isTimeBased() {\n return false;\n }\n\n /**\n *\n * @param {Temporal} temporal\n * @returns {boolean}\n */\n isSupportedBy(temporal) {\n return temporal.isSupported(ChronoField.EPOCH_DAY);\n }\n\n /**\n *\n * @param {Temporal} temporal\n * @param {number} periodToAdd\n * @returns {number}\n */\n addTo(temporal, periodToAdd) {\n switch(this) {\n case WEEK_BASED_YEARS: {\n const added = MathUtil.safeAdd(temporal.get(WEEK_BASED_YEAR), periodToAdd);\n return temporal.with(WEEK_BASED_YEAR, added);\n }\n case QUARTER_YEARS:\n // no overflow (256 is multiple of 4)\n return temporal.plus(MathUtil.intDiv(periodToAdd, 256), ChronoUnit.YEARS).plus(MathUtil.intMod(periodToAdd, 256) * 3, ChronoUnit.MONTHS);\n default:\n throw new IllegalStateException('Unreachable');\n }\n }\n\n /**\n *\n * @param {Temporal} temporal1\n * @param {Temporal} temporal2\n * @returns {number}\n */\n between(temporal1, temporal2) {\n switch(this) {\n case WEEK_BASED_YEARS:\n return MathUtil.safeSubtract(temporal2.getLong(WEEK_BASED_YEAR), temporal1.getLong(WEEK_BASED_YEAR));\n case QUARTER_YEARS:\n return MathUtil.intDiv(temporal1.until(temporal2, ChronoUnit.MONTHS), 3);\n default:\n throw new IllegalStateException('Unreachable');\n }\n }\n\n toString() {\n return this._name;\n }\n}\n\nlet DAY_OF_QUARTER = null;\nlet QUARTER_OF_YEAR = null;\nlet WEEK_OF_WEEK_BASED_YEAR = null;\nlet WEEK_BASED_YEAR = null;\nlet WEEK_BASED_YEARS = null;\nlet QUARTER_YEARS = null;\n\nexport function _init() {\n DAY_OF_QUARTER = new DAY_OF_QUARTER_FIELD();\n QUARTER_OF_YEAR = new QUARTER_OF_YEAR_FIELD();\n WEEK_OF_WEEK_BASED_YEAR = new WEEK_OF_WEEK_BASED_YEAR_FIELD();\n WEEK_BASED_YEAR = new WEEK_BASED_YEAR_FIELD();\n\n WEEK_BASED_YEARS = new Unit('WeekBasedYears', Duration.ofSeconds(31556952));\n QUARTER_YEARS = new Unit('QuarterYears', Duration.ofSeconds(31556952 / 4));\n\n IsoFields.DAY_OF_QUARTER = DAY_OF_QUARTER;\n IsoFields.QUARTER_OF_YEAR = QUARTER_OF_YEAR;\n IsoFields.WEEK_OF_WEEK_BASED_YEAR = WEEK_OF_WEEK_BASED_YEAR;\n IsoFields.WEEK_BASED_YEAR = WEEK_BASED_YEAR;\n IsoFields.WEEK_BASED_YEARS = WEEK_BASED_YEARS;\n IsoFields.QUARTER_YEARS = QUARTER_YEARS;\n\n // this differs from threeten, but for ease of use we bring back good old joda time functionality\n /**\n * the week of the week based year as defined by the ISO8601 Standard with a Monday-based week\n *\n * @returns {number} the week a the week based year\n */\n LocalDate.prototype.isoWeekOfWeekyear = function () {\n return this.get(IsoFields.WEEK_OF_WEEK_BASED_YEAR);\n };\n /**\n * the year of the week based year as defined by the ISO8601 Standard with a Monday-based week\n *\n * @returns {number} the year a the week based year\n */\n LocalDate.prototype.isoWeekyear = function () {\n return this.get(IsoFields.WEEK_BASED_YEAR);\n };\n}\n","/**\n * @copyright (c) 2016, Philipp Thürwächter & Pattrick Hüper\n * @copyright (c) 2007-present, Stephen Colebourne & Michael Nascimento Santos\n * @license BSD-3-Clause (see LICENSE in the root directory of this source tree)\n */\n\nexport class DecimalStyle {\n /**\n *\n * @param zeroChar\n * @param positiveSignChar\n * @param negativeSignChar\n * @param decimalPointChar\n * @private\n */\n constructor(zeroChar, positiveSignChar, negativeSignChar, decimalPointChar) {\n this._zeroDigit = zeroChar;\n this._zeroDigitCharCode = zeroChar.charCodeAt(0);\n this._positiveSign = positiveSignChar;\n this._negativeSign = negativeSignChar;\n this._decimalSeparator = decimalPointChar;\n }\n\n positiveSign(){\n return this._positiveSign;\n }\n\n withPositiveSign(positiveSign) {\n if (positiveSign === this._positiveSign) {\n return this;\n }\n return new DecimalStyle(this._zeroDigit, positiveSign, this._negativeSign, this._decimalSeparator);\n }\n\n negativeSign(){\n return this._negativeSign;\n }\n\n withNegativeSign(negativeSign) {\n if (negativeSign === this._negativeSign) {\n return this;\n }\n return new DecimalStyle(this._zeroDigit, this._positiveSign, negativeSign, this._decimalSeparator);\n }\n\n zeroDigit(){\n return this._zeroDigit;\n }\n\n withZeroDigit(zeroDigit) {\n if (zeroDigit === this._zeroDigit) {\n return this;\n }\n return new DecimalStyle(zeroDigit, this._positiveSign, this._negativeSign, this._decimalSeparator);\n }\n\n decimalSeparator(){\n return this._decimalSeparator;\n }\n\n withDecimalSeparator(decimalSeparator) {\n if (decimalSeparator === this._decimalSeparator) {\n return this;\n }\n return new DecimalStyle(this._zeroDigit, this._positiveSign, this._negativeSign, decimalSeparator);\n }\n\n convertToDigit(char){\n const val = char.charCodeAt(0) - this._zeroDigitCharCode;\n return (val >= 0 && val <= 9) ? val : -1;\n }\n\n convertNumberToI18N(numericText) {\n if (this._zeroDigit === '0') {\n return numericText;\n }\n const diff = this._zeroDigitCharCode - '0'.charCodeAt(0);\n let convertedText = '';\n for (let i = 0; i < numericText.length; i++) {\n convertedText += String.fromCharCode(numericText.charCodeAt(i) + diff);\n }\n return convertedText;\n }\n\n equals(other) {\n if (this === other) {\n return true;\n }\n if (other instanceof DecimalStyle) {\n return (this._zeroDigit === other._zeroDigit && this._positiveSign === other._positiveSign &&\n this._negativeSign === other._negativeSign && this._decimalSeparator === other._decimalSeparator);\n }\n return false;\n }\n\n hashCode() {\n return this._zeroDigit + this._positiveSign + this._negativeSign + this._decimalSeparator;\n }\n\n toString() {\n return `DecimalStyle[${this._zeroDigit}${this._positiveSign}${this._negativeSign}${this._decimalSeparator}]`;\n }\n\n static of(){\n throw new Error('not yet supported');\n }\n static availableLocales(){\n throw new Error('not yet supported');\n }\n\n}\n\nDecimalStyle.STANDARD = new DecimalStyle('0', '+', '-', '.');\n","/**\n * @copyright (c) 2016, Philipp Thürwächter & Pattrick Hüper\n * @copyright (c) 2007-present, Stephen Colebourne & Michael Nascimento Santos\n * @license BSD-3-Clause (see LICENSE in the root directory of this source tree)\n */\n\nimport { Enum } from '../Enum';\n\nexport class SignStyle extends Enum{\n /**\n * Parse helper.\n *\n * @param positive true if positive sign parsed, false for negative sign\n * @param strict true if strict, false if lenient\n * @param fixedWidth true if fixed width, false if not\n * @return true if valid\n */\n parse(positive, strict, fixedWidth){\n switch (this) {\n case SignStyle.NORMAL: // NORMAL\n // valid if negative or (positive and lenient)\n return !positive || !strict;\n case SignStyle.ALWAYS: // ALWAYS\n case SignStyle.EXCEEDS_PAD: // EXCEEDS_PAD\n return true;\n default:\n // valid if lenient and not fixed width\n return !strict && !fixedWidth;\n }\n\n }\n}\n\nSignStyle.NORMAL = new SignStyle('NORMAL');\nSignStyle.NEVER = new SignStyle('NEVER');\nSignStyle.ALWAYS = new SignStyle('ALWAYS');\nSignStyle.EXCEEDS_PAD = new SignStyle('EXCEEDS_PAD');\nSignStyle.NOT_NEGATIVE = new SignStyle('NOT_NEGATIVE');\n","/*\n * @copyright (c) 2016, Philipp Thürwächter & Pattrick Hüper\n * @license BSD-3-Clause (see LICENSE.md in the root directory of this source tree)\n */\n\nimport { Enum } from '../Enum';\n\n/**\n * Enumeration of the style of text formatting and parsing.\n *\n * Text styles define three sizes for the formatted text - 'full', 'short' and 'narrow'.\n * Each of these three sizes is available in both 'standard' and 'stand-alone' variations.\n *\n * The difference between the three sizes is obvious in most languages.\n * For example, in English the 'full' month is 'January', the 'short' month is 'Jan'\n * and the 'narrow' month is 'J'. Note that the narrow size is often not unique.\n * For example, 'January', 'June' and 'July' all have the 'narrow' text 'J'.\n *\n * The difference between the 'standard' and 'stand-alone' forms is trickier to describe\n * as there is no difference in English. However, in other languages there is a difference\n * in the word used when the text is used alone, as opposed to in a complete date.\n * For example, the word used for a month when used alone in a date picker is different\n * to the word used for month in association with a day and year in a date.\n *\n * ### Specification for implementors\n *\n * This is immutable and thread-safe enum.\n */\nexport class TextStyle extends Enum {\n /**\n * Checks if the style is stand-alone.\n *\n * @return {boolean} true if the style is stand-alone\n */\n isStandalone() {\n switch (this) {\n case TextStyle.FULL_STANDALONE:\n case TextStyle.SHORT_STANDALONE:\n case TextStyle.NARROW_STANDALONE:\n return true;\n default:\n return false;\n }\n }\n\n /**\n * Converts the style to the equivalent stand-alone style.\n *\n * @return {TextStyle} the matching stand-alone style\n */\n asStandalone() {\n switch (this) {\n case TextStyle.FULL:\n return TextStyle.FULL_STANDALONE;\n case TextStyle.SHORT:\n return TextStyle.SHORT_STANDALONE;\n case TextStyle.NARROW:\n return TextStyle.NARROW_STANDALONE;\n default:\n // all others are already standalone\n return this;\n }\n }\n\n /**\n * Converts the style to the equivalent normal style.\n *\n * @return {TextStyle} the matching normal style\n */\n asNormal() {\n switch (this) {\n case TextStyle.FULL_STANDALONE:\n return TextStyle.FULL;\n case TextStyle.SHORT_STANDALONE:\n return TextStyle.SHORT;\n case TextStyle.NARROW_STANDALONE:\n return TextStyle.NARROW;\n default:\n // all others are already normal\n return this;\n }\n }\n}\n\n/**\n * Full text, typically the full description.\n * For example, day-of-week Monday might output \"Monday\".\n */\nTextStyle.FULL = new TextStyle('FULL');\n/**\n * Full text for stand-alone use, typically the full description.\n * For example, day-of-week Monday might output \"Monday\".\n */\nTextStyle.FULL_STANDALONE = new TextStyle('FULL_STANDALONE');\n/**\n * Short text, typically an abbreviation.\n * For example, day-of-week Monday might output \"Mon\".\n */\nTextStyle.SHORT = new TextStyle('SHORT');\n/**\n * Short text for stand-alone use, typically an abbreviation.\n * For example, day-of-week Monday might output \"Mon\".\n */\nTextStyle.SHORT_STANDALONE = new TextStyle('SHORT_STANDALONE');\n/**\n * Narrow text, typically a single letter.\n * For example, day-of-week Monday might output \"M\".\n */\nTextStyle.NARROW = new TextStyle('NARROW');\n/**\n * Narrow text for stand-alone use, typically a single letter.\n * For example, day-of-week Monday might output \"M\".\n */\nTextStyle.NARROW_STANDALONE = new TextStyle('NARROW_STANDALONE');\n","/**\n * @copyright (c) 2016, Philipp Thürwächter & Pattrick Hüper\n * @copyright (c) 2007-present, Stephen Colebourne & Michael Nascimento Santos\n * @license BSD-3-Clause (see LICENSE in the root directory of this source tree)\n */\n\nimport { IllegalArgumentException } from '../../errors';\n\n/**\n * Prints or parses a char literal.\n * @private\n */\nexport class CharLiteralPrinterParser {\n\n constructor(literal) {\n if (literal.length > 1) {\n throw new IllegalArgumentException(`invalid literal, too long: \"${literal}\"`);\n }\n this._literal = literal;\n }\n\n print(context, buf) {\n buf.append(this._literal);\n return true;\n }\n\n parse(context, text, position) {\n const length = text.length;\n if (position === length) {\n return ~position;\n }\n const ch = text.charAt(position);\n if (context.charEquals(this._literal, ch) === false) {\n return ~position;\n }\n return position + this._literal.length;\n }\n\n toString() {\n if (this._literal === '\\'') {\n return \"''\";\n }\n return `'${this._literal}'`;\n }\n}\n\n","/**\n * @copyright (c) 2016, Philipp Thürwächter & Pattrick Hüper\n * @copyright (c) 2007-present, Stephen Colebourne & Michael Nascimento Santos\n * @license BSD-3-Clause (see LICENSE in the root directory of this source tree)\n */\n\n/**\n * @private\n */\nexport class CompositePrinterParser {\n\n constructor(printerParsers, optional) {\n this._printerParsers = printerParsers;\n this._optional = optional;\n }\n\n /**\n * Returns a copy of this printer-parser with the optional flag changed.\n *\n * @param {boolean} optional the optional flag to set in the copy\n * @return {CompositePrinterParser} the new printer-parser, not null\n */\n withOptional(optional) {\n if (optional === this._optional) {\n return this;\n }\n return new CompositePrinterParser(this._printerParsers, optional);\n }\n\n print(context, buf) {\n const length = buf.length();\n if (this._optional) {\n context.startOptional();\n }\n try {\n for (let i=0; i 9) {\n throw new IllegalArgumentException(`Minimum width must be from 0 to 9 inclusive but was ${minWidth}`);\n }\n if (maxWidth < 1 || maxWidth > 9) {\n throw new IllegalArgumentException(`Maximum width must be from 1 to 9 inclusive but was ${maxWidth}`);\n }\n if (maxWidth < minWidth) {\n throw new IllegalArgumentException(`Maximum width must exceed or equal the minimum width but ${ \n maxWidth} < ${minWidth}`);\n }\n this.field = field;\n this.minWidth = minWidth;\n this.maxWidth = maxWidth;\n this.decimalPoint = decimalPoint;\n }\n\n print(context, buf) {\n const value = context.getValue(this.field);\n if (value === null) {\n return false;\n }\n const symbols = context.symbols();\n if (value === 0) { // scale is zero if value is zero\n if (this.minWidth > 0) {\n if (this.decimalPoint) {\n buf.append(symbols.decimalSeparator());\n }\n for (let i = 0; i < this.minWidth; i++) {\n buf.append(symbols.zeroDigit());\n }\n }\n } else {\n let fraction = this.convertToFraction(value, symbols.zeroDigit());\n const outputScale = Math.min(Math.max(fraction.length, this.minWidth), this.maxWidth);\n fraction = fraction.substr(0, outputScale);\n if(fraction * 1 > 0 ) {\n while (fraction.length > this.minWidth && fraction[fraction.length - 1] === '0') {\n fraction = fraction.substr(0, fraction.length - 1);\n }\n }\n let str = fraction;\n str = symbols.convertNumberToI18N(str);\n if (this.decimalPoint) {\n buf.append(symbols.decimalSeparator());\n }\n buf.append(str);\n }\n return true;\n }\n\n parse(context, text, position) {\n const effectiveMin = (context.isStrict() ? this.minWidth : 0);\n const effectiveMax = (context.isStrict() ? this.maxWidth : 9);\n const length = text.length;\n if (position === length) {\n // valid if whole field is optional, invalid if minimum width\n return (effectiveMin > 0 ? ~position : position);\n }\n if (this.decimalPoint) {\n if (text[position] !== context.symbols().decimalSeparator()) {\n // valid if whole field is optional, invalid if minimum width\n return (effectiveMin > 0 ? ~position : position);\n }\n position++;\n }\n const minEndPos = position + effectiveMin;\n if (minEndPos > length) {\n return ~position; // need at least min width digits\n }\n const maxEndPos = Math.min(position + effectiveMax, length);\n let total = 0; // can use int because we are only parsing up to 9 digits\n let pos = position;\n while (pos < maxEndPos) {\n const ch = text.charAt(pos++);\n const digit = context.symbols().convertToDigit(ch);\n if (digit < 0) {\n if (pos < minEndPos) {\n return ~position; // need at least min width digits\n }\n pos--;\n break;\n }\n total = total * 10 + digit;\n }\n const moveLeft = pos - position;\n const scale = Math.pow(10, moveLeft);\n const value = this.convertFromFraction(total, scale);\n return context.setParsedField(this.field, value, position, pos);\n }\n\n /**\n *\n * @param {Number} value the value to convert, must be valid for this rule\n * @param {String} zeroDigit the character for zero\n * @return {String} the value as a fraction within the range, from 0 to 1, not null\n */\n convertToFraction(value, zeroDigit) {\n const range = this.field.range();\n range.checkValidValue(value, this.field);\n const _min = range.minimum();\n const _range = range.maximum() - _min + 1;\n const _value = value - _min;\n const _scaled = MathUtil.intDiv((_value * 1000000000), _range);\n let fraction = `${_scaled}`;\n while(fraction.length < 9){\n fraction = zeroDigit + fraction;\n }\n return fraction;\n }\n\n /**\n *\n * @param {Number} total the fraction to convert, not null\n * @param {Number} scale the scale, not null\n * @return {Number} the value of the field, valid for this rule\n * @throws DateTimeException if the value cannot be converted\n */\n convertFromFraction(total, scale) {\n const range = this.field.range();\n const _min = range.minimum();\n const _range = range.maximum() - _min + 1;\n const _value = MathUtil.intDiv((total * _range), scale);\n return _value;\n }\n\n toString() {\n const decimal = (this.decimalPoint ? ',DecimalPoint' : '');\n return `Fraction(${this.field},${this.minWidth},${this.maxWidth}${decimal})`;\n }\n}\n\n","/**\n * @copyright (c) 2016, Philipp Thürwächter & Pattrick Hüper\n * @copyright (c) 2007-present, Stephen Colebourne & Michael Nascimento Santos\n * @license BSD-3-Clause (see LICENSE in the root directory of this source tree)\n */\n\nimport { assert } from '../../assert';\nimport { ArithmeticException, DateTimeException, IllegalArgumentException } from '../../errors';\nimport { MathUtil } from '../../MathUtil';\n\nimport { IsoChronology } from '../../chrono/IsoChronology';\n\nimport { SignStyle } from '../SignStyle';\n\n\nconst MAX_WIDTH = 15; // can't parse all numbers with more then 15 digits in javascript\n\nconst EXCEED_POINTS = [\n 0,\n 10,\n 100,\n 1000,\n 10000,\n 100000,\n 1000000,\n 10000000,\n 100000000,\n 1000000000\n];\n\n/**\n * @private\n */\nexport class NumberPrinterParser {\n\n /**\n * Constructor.\n *\n * @param field the field to print, not null\n * @param minWidth the minimum field width, from 1 to 19\n * @param maxWidth the maximum field width, from minWidth to 19\n * @param signStyle the positive/negative sign style, not null\n * @param subsequentWidth the width of subsequent non-negative numbers, 0 or greater,\n * -1 if fixed width due to active adjacent parsing\n */\n constructor(field, minWidth, maxWidth, signStyle, subsequentWidth=0){\n this._field = field;\n this._minWidth = minWidth;\n this._maxWidth = maxWidth;\n this._signStyle = signStyle;\n this._subsequentWidth = subsequentWidth;\n }\n\n field(){ return this._field;}\n minWidth(){ return this._minWidth;}\n maxWidth(){ return this._maxWidth;}\n signStyle(){ return this._signStyle;}\n\n withFixedWidth() {\n if (this._subsequentWidth === -1) {\n return this;\n }\n return new NumberPrinterParser(this._field, this._minWidth, this._maxWidth, this._signStyle, -1);\n }\n\n withSubsequentWidth(subsequentWidth) {\n return new NumberPrinterParser(this._field, this._minWidth, this._maxWidth, this._signStyle, this._subsequentWidth + subsequentWidth);\n }\n\n _isFixedWidth() {\n return this._subsequentWidth === -1 ||\n (this._subsequentWidth > 0 && this._minWidth === this._maxWidth && this._signStyle === SignStyle.NOT_NEGATIVE);\n }\n\n print(context, buf) {\n const contextValue = context.getValue(this._field);\n if (contextValue == null) {\n return false;\n }\n const value = this._getValue(context, contextValue);\n const symbols = context.symbols();\n let str = `${Math.abs(value)}`;\n if (str.length > this._maxWidth) {\n throw new DateTimeException(`Field ${this._field \n } cannot be printed as the value ${value \n } exceeds the maximum print width of ${this._maxWidth}`);\n }\n str = symbols.convertNumberToI18N(str);\n\n if (value >= 0) {\n switch (this._signStyle) {\n case SignStyle.EXCEEDS_PAD:\n if (this._minWidth < MAX_WIDTH && value >= EXCEED_POINTS[this._minWidth]) {\n buf.append(symbols.positiveSign());\n }\n break;\n case SignStyle.ALWAYS:\n buf.append(symbols.positiveSign());\n break;\n }\n } else {\n switch (this._signStyle) {\n case SignStyle.NORMAL:\n case SignStyle.EXCEEDS_PAD:\n case SignStyle.ALWAYS:\n buf.append(symbols.negativeSign());\n break;\n case SignStyle.NOT_NEGATIVE:\n throw new DateTimeException(`Field ${this._field \n } cannot be printed as the value ${value \n } cannot be negative according to the SignStyle`);\n }\n }\n for (let i = 0; i < this._minWidth - str.length; i++) {\n buf.append(symbols.zeroDigit());\n }\n buf.append(str);\n return true;\n }\n\n parse(context, text, position){\n const length = text.length;\n if (position === length) {\n return ~position;\n }\n assert(position>=0 && position length) {\n return ~position;\n }\n let effMaxWidth = (context.isStrict() || this._isFixedWidth() ? this._maxWidth : 9) + Math.max(this._subsequentWidth, 0);\n let total = 0;\n let pos = position;\n for (let pass = 0; pass < 2; pass++) {\n const maxEndPos = Math.min(pos + effMaxWidth, length);\n while (pos < maxEndPos) {\n const ch = text.charAt(pos++);\n const digit = context.symbols().convertToDigit(ch);\n if (digit < 0) {\n pos--;\n if (pos < minEndPos) {\n return ~position; // need at least min width digits\n }\n break;\n }\n if ((pos - position) > MAX_WIDTH) {\n throw new ArithmeticException('number text exceeds length');\n } else {\n total = total * 10 + digit;\n }\n }\n if (this._subsequentWidth > 0 && pass === 0) {\n // re-parse now we know the correct width\n const parseLen = pos - position;\n effMaxWidth = Math.max(effMinWidth, parseLen - this._subsequentWidth);\n pos = position;\n total = 0;\n } else {\n break;\n }\n }\n if (negative) {\n if (total === 0 && context.isStrict()) {\n return ~(position - 1); // minus zero not allowed\n }\n if(total !== 0) {\n total = -total;\n }\n } else if (this._signStyle === SignStyle.EXCEEDS_PAD && context.isStrict()) {\n const parseLen = pos - position;\n if (positive) {\n if (parseLen <= this._minWidth) {\n return ~(position - 1); // '+' only parsed if minWidth exceeded\n }\n } else {\n if (parseLen > this._minWidth) {\n return ~position; // '+' must be parsed if minWidth exceeded\n }\n }\n }\n return this._setValue(context, total, position, pos);\n }\n\n /**\n * Gets the value to output.\n * (This is needed to allow e.g. ReducedPrinterParser to override this and change the value!\n *\n * @param context the context\n * @param value the value of the field, not null\n * @return the value\n * @private\n */\n _getValue(context, value) {\n return value;\n }\n\n /**\n * Stores the value.\n *\n * @param context the context to store into, not null\n * @param value the value\n * @param errorPos the position of the field being parsed\n * @param successPos the position after the field being parsed\n * @return the new position\n */\n _setValue(context, value, errorPos, successPos) {\n return context.setParsedField(this._field, value, errorPos, successPos);\n }\n\n toString() {\n if (this._minWidth === 1 && this._maxWidth === MAX_WIDTH && this._signStyle === SignStyle.NORMAL) {\n return `Value(${this._field})`;\n }\n if (this._minWidth === this._maxWidth && this._signStyle === SignStyle.NOT_NEGATIVE) {\n return `Value(${this._field},${this._minWidth})`;\n }\n return `Value(${this._field},${this._minWidth},${this._maxWidth},${this._signStyle})`;\n }\n\n}\n//-----------------------------------------------------------------------\n/**\n * Prints and parses a reduced numeric date-time field.\n * @private\n */\nexport class ReducedPrinterParser extends NumberPrinterParser {\n\n /**\n * Constructor.\n *\n * @param {TemporalField} field the field to print, validated not null\n * @param {number} width the field width, from 1 to 10\n * @param {number} maxWidth the field max width, from 1 to 10\n * @param {number} baseValue the base value\n * @param {ChronoLocalDate} baseDate the base date\n */\n constructor(field, width, maxWidth, baseValue, baseDate) {\n super(field, width, maxWidth, SignStyle.NOT_NEGATIVE);\n if (width < 1 || width > 10) {\n throw new IllegalArgumentException(`The width must be from 1 to 10 inclusive but was ${width}`);\n }\n if (maxWidth < 1 || maxWidth > 10) {\n throw new IllegalArgumentException(`The maxWidth must be from 1 to 10 inclusive but was ${maxWidth}`);\n }\n if (maxWidth < width) {\n throw new IllegalArgumentException('The maxWidth must be greater than the width');\n }\n if (baseDate === null) {\n if (field.range().isValidValue(baseValue) === false) {\n throw new IllegalArgumentException('The base value must be within the range of the field');\n }\n if ((baseValue + EXCEED_POINTS[width]) > MathUtil.MAX_SAFE_INTEGER) {\n throw new DateTimeException('Unable to add printer-parser as the range exceeds the capacity of an int');\n }\n }\n this._baseValue = baseValue;\n this._baseDate = baseDate;\n }\n\n /**\n *\n * @param {DateTimePrintContext} context\n * @param {number} value\n */\n _getValue(context, value) {\n const absValue = Math.abs(value);\n let baseValue = this._baseValue;\n if (this._baseDate !== null) {\n // TODO: in threetenbp the following line is used, but we dont have Chronology yet,\n // let chrono = Chronology.from(context.getTemporal());\n // so let's use IsoChronology for now\n context.temporal();\n const chrono = IsoChronology.INSTANCE;\n baseValue = chrono.date(this._baseDate).get(this._field);\n }\n if (value >= baseValue && value < baseValue + EXCEED_POINTS[this._minWidth]) {\n return absValue % EXCEED_POINTS[this._minWidth];\n }\n return absValue % EXCEED_POINTS[this._maxWidth];\n }\n\n /**\n *\n * @param {DateTimeParseContext} context\n * @param {number} value\n * @param {number} errorPos\n * @param {number} successPos\n */\n _setValue(context, value, errorPos, successPos) {\n let baseValue = this._baseValue;\n if (this._baseDate != null) {\n const chrono = context.getEffectiveChronology();\n baseValue = chrono.date(this._baseDate).get(this._field);\n // TODO: not implemented??\n // context.addChronologyChangedParser(this, value, errorPos, successPos);\n }\n const parseLen = successPos - errorPos;\n if (parseLen === this._minWidth && value >= 0) {\n const range = EXCEED_POINTS[this._minWidth];\n const lastPart = baseValue % range;\n const basePart = baseValue - lastPart;\n if (baseValue > 0) {\n value = basePart + value;\n } else {\n value = basePart - value;\n }\n if (value < baseValue) {\n value += range;\n }\n }\n return context.setParsedField(this._field, value, errorPos, successPos);\n }\n\n withFixedWidth() {\n if (this._subsequentWidth === -1) {\n return this;\n }\n return new ReducedPrinterParser(this._field, this._minWidth, this._maxWidth, this._baseValue, this._baseDate, -1);\n }\n\n /**\n *\n * @param {number} subsequentWidth\n * @returns {ReducedPrinterParser}\n */\n withSubsequentWidth(subsequentWidth) {\n return new ReducedPrinterParser(this._field, this._minWidth, this._maxWidth, this._baseValue, this._baseDate,\n this._subsequentWidth + subsequentWidth);\n }\n\n /**\n *\n * @param {DateTimeParseContext} context\n */\n isFixedWidth(context) {\n if (context.isStrict() === false) {\n return false;\n }\n return super.isFixedWidth(context);\n }\n\n toString() {\n return `ReducedValue(${this._field},${this._minWidth},${this._maxWidth},${this._baseDate != null ? this._baseDate : this._baseValue})`;\n }\n}\n\n","/**\n * @copyright (c) 2016, Philipp Thürwächter & Pattrick Hüper\n * @copyright (c) 2007-present, Stephen Colebourne & Michael Nascimento Santos\n * @license BSD-3-Clause (see LICENSE in the root directory of this source tree)\n */\n\nimport { requireNonNull } from '../../assert';\nimport { IllegalArgumentException } from '../../errors';\nimport { MathUtil } from '../../MathUtil';\n\nimport { ChronoField } from '../../temporal/ChronoField';\n\n//-----------------------------------------------------------------------\nconst PATTERNS = [\n '+HH', '+HHmm', '+HH:mm', '+HHMM', '+HH:MM', '+HHMMss', '+HH:MM:ss', '+HHMMSS', '+HH:MM:SS'\n];\n/**\n * Prints or parses an offset ID.\n * @private\n */\nexport class OffsetIdPrinterParser {\n\n /**\n * Constructor.\n *\n * @param {string} noOffsetText the text to use for UTC, not null\n * @param {string} pattern the pattern\n */\n constructor(noOffsetText, pattern) {\n requireNonNull(noOffsetText, 'noOffsetText');\n requireNonNull(pattern, 'pattern');\n this.noOffsetText = noOffsetText;\n this.type = this._checkPattern(pattern);\n }\n\n /**\n * @param {String} pattern\n * @return {number}\n */\n _checkPattern(pattern) {\n for (let i = 0; i < PATTERNS.length; i++) {\n if (PATTERNS[i] === pattern) {\n return i;\n }\n }\n throw new IllegalArgumentException(`Invalid zone offset pattern: ${pattern}`);\n }\n\n /**\n * @param {DateTimePrintContext} context\n * @param {StringBuilder} buf\n * @return {boolean}\n */\n print(context, buf) {\n const offsetSecs = context.getValue(ChronoField.OFFSET_SECONDS);\n if (offsetSecs == null) {\n return false;\n }\n const totalSecs = MathUtil.safeToInt(offsetSecs);\n if (totalSecs === 0) {\n buf.append(this.noOffsetText);\n } else {\n const absHours = Math.abs(MathUtil.intMod(MathUtil.intDiv(totalSecs, 3600), 100)); // anything larger than 99 silently dropped\n const absMinutes = Math.abs(MathUtil.intMod(MathUtil.intDiv(totalSecs, 60), 60));\n const absSeconds = Math.abs(MathUtil.intMod(totalSecs, 60));\n const bufPos = buf.length();\n let output = absHours;\n buf.append(totalSecs < 0 ? '-' : '+')\n .appendChar((`${MathUtil.intDiv(absHours, 10)}0`)).appendChar(`${MathUtil.intMod(absHours, 10)}0`);\n if (this.type >= 3 || (this.type >= 1 && absMinutes > 0)) {\n buf.append((this.type % 2) === 0 ? ':' : '')\n .appendChar((`${MathUtil.intDiv(absMinutes, 10)}0`)).appendChar((`${absMinutes % 10}0`));\n output += absMinutes;\n if (this.type >= 7 || (this.type >= 5 && absSeconds > 0)) {\n buf.append((this.type % 2) === 0 ? ':' : '')\n .appendChar((`${MathUtil.intDiv(absSeconds, 10)}0`)).appendChar((`${absSeconds % 10}0`));\n output += absSeconds;\n }\n }\n if (output === 0) {\n buf.setLength(bufPos);\n buf.append(this.noOffsetText);\n }\n }\n return true;\n }\n\n /**\n * @param {DateTimeParseContext} context\n * @param {String} text\n * @param {number} position\n * @return {number}\n */\n parse(context, text, position) {\n const length = text.length;\n const noOffsetLen = this.noOffsetText.length;\n if (noOffsetLen === 0) {\n if (position === length) {\n return context.setParsedField(ChronoField.OFFSET_SECONDS, 0, position, position);\n }\n } else {\n if (position === length) {\n return ~position;\n }\n if (context.subSequenceEquals(text, position, this.noOffsetText, 0, noOffsetLen)) {\n return context.setParsedField(ChronoField.OFFSET_SECONDS, 0, position, position + noOffsetLen);\n }\n }\n\n // parse normal plus/minus offset\n const sign = text[position]; // IOOBE if invalid position\n if (sign === '+' || sign === '-') {\n // starts\n const negative = (sign === '-' ? -1 : 1);\n const array = [0,0,0,0];\n array[0] = position + 1;\n if ((this._parseNumber(array, 1, text, true) ||\n this._parseNumber(array, 2, text, this.type >=3) ||\n this._parseNumber(array, 3, text, false)) === false) {\n // success\n const offsetSecs = MathUtil.safeZero(negative * (array[1] * 3600 + array[2] * 60 + array[3]));\n return context.setParsedField(ChronoField.OFFSET_SECONDS, offsetSecs, position, array[0]);\n }\n }\n // handle special case of empty no offset text\n if (noOffsetLen === 0) {\n return context.setParsedField(ChronoField.OFFSET_SECONDS, 0, position, position + noOffsetLen);\n }\n return ~position;\n }\n\n /**\n * Parse a two digit zero-prefixed number.\n *\n * @param {number[]} array the array of parsed data, 0=pos,1=hours,2=mins,3=secs, not null\n * @param {number} arrayIndex the index to parse the value into\n * @param {string} parseText the offset ID, not null\n * @param {boolean} required whether this number is required\n * @return {boolean} true if an error occurred\n */\n _parseNumber(array, arrayIndex, parseText, required) {\n if ((this.type + 3) / 2 < arrayIndex) {\n return false; // ignore seconds/minutes\n }\n let pos = array[0];\n if ((this.type % 2) === 0 && arrayIndex > 1) {\n if (pos + 1 > parseText.length || parseText[pos] !== ':') {\n return required;\n }\n pos++;\n }\n if (pos + 2 > parseText.length) {\n return required;\n }\n const ch1 = parseText[pos++];\n const ch2 = parseText[pos++];\n if (ch1 < '0' || ch1 > '9' || ch2 < '0' || ch2 > '9') {\n return required;\n }\n const value = (ch1.charCodeAt(0) - 48) * 10 + (ch2.charCodeAt(0) - 48);\n if (value < 0 || value > 59) {\n return required;\n }\n array[arrayIndex] = value;\n array[0] = pos;\n return false;\n }\n\n\n toString() {\n const converted = this.noOffsetText.replace('\\'', '\\'\\'');\n return `Offset(${PATTERNS[this.type]},'${converted}')`;\n }\n}\nOffsetIdPrinterParser.INSTANCE_ID = new OffsetIdPrinterParser('Z', '+HH:MM:ss');\nOffsetIdPrinterParser.PATTERNS = PATTERNS;\n\n","/**\n * @copyright (c) 2016, Philipp Thürwächter & Pattrick Hüper\n * @copyright (c) 2007-present, Stephen Colebourne & Michael Nascimento Santos\n * @license BSD-3-Clause (see LICENSE in the root directory of this source tree)\n */\n\nimport { assert } from '../../assert';\n\nimport { DateTimeException } from '../../errors';\n\n/**\n * Pads the output to a fixed width.\n * @private\n */\nexport class PadPrinterParserDecorator {\n\n /**\n * Constructor.\n *\n * @param printerParser the printer, not null\n * @param padWidth the width to pad to, 1 or greater\n * @param padChar the pad character\n */\n constructor(printerParser, padWidth, padChar) {\n // input checked by DateTimeFormatterBuilder\n this._printerParser = printerParser;\n this._padWidth = padWidth;\n this._padChar = padChar;\n }\n\n print(context, buf) {\n const preLen = buf.length();\n if (this._printerParser.print(context, buf) === false) {\n return false;\n }\n const len = buf.length() - preLen;\n if (len > this._padWidth) {\n throw new DateTimeException(\n `Cannot print as output of ${len} characters exceeds pad width of ${this._padWidth}`);\n }\n for (let i = 0; i < this._padWidth - len; i++) {\n buf.insert(preLen, this._padChar);\n }\n return true;\n }\n\n parse(context, text, position) {\n // cache context before changed by decorated parser\n const strict = context.isStrict();\n const caseSensitive = context.isCaseSensitive();\n // parse\n assert(!(position > text.length));\n assert(position >= 0);\n if (position === text.length) {\n return ~position; // no more characters in the string\n }\n let endPos = position + this._padWidth;\n if (endPos > text.length) {\n if (strict) {\n return ~position; // not enough characters in the string to meet the parse width\n }\n endPos = text.length;\n }\n let pos = position;\n while (pos < endPos &&\n (caseSensitive ? text[pos] === this._padChar : context.charEquals(text[pos], this._padChar))) {\n pos++;\n }\n text = text.substring(0, endPos);\n const resultPos = this._printerParser.parse(context, text, pos);\n if (resultPos !== endPos && strict) {\n return ~(position + pos); // parse of decorated field didn't parse to the end\n }\n return resultPos;\n }\n\n toString() {\n return `Pad(${this._printerParser},${this._padWidth}${(this._padChar === ' ' ? ')' : `,'${this._padChar}')`)}`;\n }\n}\n\n","/**\n * @copyright (c) 2016, Philipp Thürwächter & Pattrick Hüper\n * @copyright (c) 2007-present, Stephen Colebourne & Michael Nascimento Santos\n * @license BSD-3-Clause (see LICENSE in the root directory of this source tree)\n */\n\nimport { Enum } from '../../Enum';\n\n/**\n * @private\n */\nexport class SettingsParser extends Enum {\n\n print(/*context, buf*/) {\n return true; // nothing to do here\n }\n\n parse(context, text, position) {\n // using ordinals to avoid javac synthetic inner class\n switch (this) {\n case SettingsParser.SENSITIVE: context.setCaseSensitive(true); break;\n case SettingsParser.INSENSITIVE: context.setCaseSensitive(false); break;\n case SettingsParser.STRICT: context.setStrict(true); break;\n case SettingsParser.LENIENT: context.setStrict(false); break;\n }\n return position;\n }\n\n toString() {\n // using ordinals to avoid javac synthetic inner class\n switch (this) {\n case SettingsParser.SENSITIVE: return 'ParseCaseSensitive(true)';\n case SettingsParser.INSENSITIVE: return 'ParseCaseSensitive(false)';\n case SettingsParser.STRICT: return 'ParseStrict(true)';\n case SettingsParser.LENIENT: return 'ParseStrict(false)';\n }\n }\n}\n\nSettingsParser.SENSITIVE = new SettingsParser('SENSITIVE');\nSettingsParser.INSENSITIVE = new SettingsParser('INSENSITIVE');\nSettingsParser.STRICT = new SettingsParser('STRICT');\nSettingsParser.LENIENT = new SettingsParser('LENIENT');\n\n","/**\n * @copyright (c) 2016, Philipp Thürwächter & Pattrick Hüper\n * @copyright (c) 2007-present, Stephen Colebourne & Michael Nascimento Santos\n * @license BSD-3-Clause (see LICENSE in the root directory of this source tree)\n */\n\nimport { assert } from '../../assert';\n\n/**\n * Prints or parses a string literal.\n * @private\n */\nexport class StringLiteralPrinterParser {\n\n constructor(literal) {\n this._literal = literal;\n }\n\n print(context, buf) {\n buf.append(this._literal);\n return true;\n }\n\n parse(context, text, position) {\n const length = text.length;\n assert(!(position > length || position < 0));\n\n if (context.subSequenceEquals(text, position, this._literal, 0, this._literal.length) === false) {\n return ~position;\n }\n return position + this._literal.length;\n }\n\n toString() {\n const converted = this._literal.replace(\"'\", \"''\");\n return `'${converted}'`;\n }\n}\n\n","/*\n * @copyright (c) 2016, Philipp Thürwächter, Pattrick Hüper\n * @copyright (c) 2007-present, Stephen Colebourne & Michael Nascimento Santos\n * @license BSD-3-Clause (see LICENSE in the root directory of this source tree)\n */\n\nimport { DateTimeException } from '../errors';\n\nexport class ZoneRulesProvider {\n /**\n * Gets the rules for the zone ID.\n *\n * This returns the latest available rules for the zone ID.\n *\n * This method relies on time-zone data provider files that are configured.\n *\n * @param {string} zoneId\n * @return {ZoneRules}\n */\n static getRules(zoneId){\n throw new DateTimeException(`unsupported ZoneId:${zoneId}`);\n }\n\n\n /**\n * Gets the set of available zone IDs.\n *\n * These zone IDs are loaded and available for use by {@link ZoneId}.\n *\n * @return {string[]} a modifiable copy of the set of zone IDs, not null\n */\n static getAvailableZoneIds(){\n return [];\n }\n}\n\n","/*\n * @copyright (c) 2016, Philipp Thürwächter & Pattrick Hüper\n * @copyright (c) 2007-present, Stephen Colebourne & Michael Nascimento Santos\n * @license BSD-3-Clause (see LICENSE in the root directory of this source tree)\n */\n\n\nimport { ZoneId } from './ZoneId';\nimport { ZoneRulesProvider } from './zone/ZoneRulesProvider';\n\n/**\n * A geographical region where the same time-zone rules apply.\n *\n * Time-zone information is categorized as a set of rules defining when and\n * how the offset from UTC/Greenwich changes. These rules are accessed using\n * identifiers based on geographical regions, such as countries or states.\n * The most common region classification is the Time Zone Database (TZDB),\n * which defines regions such as 'Europe/Paris' and 'Asia/Tokyo'.\n *\n * The region identifier, modeled by this class, is distinct from the\n * underlying rules, modeled by {@link ZoneRules}.\n * The rules are defined by governments and change frequently.\n * By contrast, the region identifier is well-defined and long-lived.\n * This separation also allows rules to be shared between regions if appropriate.\n *\n * ### Specification for implementors\n *\n * This class is immutable and thread-safe.\n */\nexport class ZoneRegion extends ZoneId {\n /**\n * @param {string} zoneId\n * @return {ZoneId}\n */\n static ofId(zoneId){\n const rules = ZoneRulesProvider.getRules(zoneId);\n return new ZoneRegion(zoneId, rules);\n }\n\n //-------------------------------------------------------------------------\n /**\n * Constructor.\n *\n * @param {string} id the time-zone ID, not null\n * @param {ZoneRules} rules the rules, null for lazy lookup\n * @private\n */\n constructor(id, rules) {\n super();\n this._id = id;\n this._rules = rules;\n }\n\n //-----------------------------------------------------------------------\n /**\n *\n * @returns {string}\n */\n id() {\n return this._id;\n }\n\n /**\n *\n * @returns {ZoneRules}\n */\n rules() {\n return this._rules;\n }\n\n}\n","/**\n * @copyright (c) 2016, Philipp Thürwächter & Pattrick Hüper\n * @copyright (c) 2007-present, Stephen Colebourne & Michael Nascimento Santos\n * @license BSD-3-Clause (see LICENSE in the root directory of this source tree)\n */\n\nimport { ZoneOffset } from '../../ZoneOffset';\nimport { ZoneId } from '../../ZoneId';\nimport { ZoneRegion } from '../../ZoneRegion';\n\nimport { ChronoField } from '../../temporal/ChronoField';\n\nimport { ZoneRulesProvider } from '../../zone/ZoneRulesProvider';\n\nimport { OffsetIdPrinterParser } from './OffsetIdPrinterParser';\n\n/**\n * Prints or parses a zone ID.\n * @private\n */\nexport class ZoneIdPrinterParser {\n\n /**\n *\n * @param {TemporalQuery} query\n * @param {string} description\n */\n constructor(query, description) {\n this.query = query;\n this.description = description;\n }\n\n //-----------------------------------------------------------------------\n /**\n *\n * @param {DateTimePrintContext } context\n * @param {StringBuilder} buf\n * @returns {boolean}\n */\n print(context, buf) {\n const zone = context.getValueQuery(this.query);\n if (zone == null) {\n return false;\n }\n buf.append(zone.id());\n return true;\n }\n\n //-----------------------------------------------------------------------\n /**\n * This implementation looks for the longest matching string.\n * For example, parsing Etc/GMT-2 will return Etc/GMC-2 rather than just\n * Etc/GMC although both are valid.\n *\n * This implementation uses a tree to search for valid time-zone names in\n * the parseText. The top level node of the tree has a length equal to the\n * length of the shortest time-zone as well as the beginning characters of\n * all other time-zones.\n *\n * @param {DateTimeParseContext} context\n * @param {String} text\n * @param {number} position\n * @return {number}\n */\n parse(context, text, position) {\n const length = text.length;\n if (position > length) {\n return ~position;\n }\n if (position === length) {\n return ~position;\n }\n\n // handle fixed time-zone IDs\n const nextChar = text.charAt(position);\n if (nextChar === '+' || nextChar === '-') {\n const newContext = context.copy();\n const endPos = OffsetIdPrinterParser.INSTANCE_ID.parse(newContext, text, position);\n if (endPos < 0) {\n return endPos;\n }\n const offset = newContext.getParsed(ChronoField.OFFSET_SECONDS);\n const zone = ZoneOffset.ofTotalSeconds(offset);\n context.setParsedZone(zone);\n return endPos;\n } else if (length >= position + 2) {\n const nextNextChar = text.charAt(position + 1);\n if (context.charEquals(nextChar, 'U') &&\n context.charEquals(nextNextChar, 'T')) {\n if (length >= position + 3 &&\n context.charEquals(text.charAt(position + 2), 'C')) {\n return this._parsePrefixedOffset(context, text, position, position + 3);\n }\n return this._parsePrefixedOffset(context, text, position, position + 2);\n } else if (context.charEquals(nextChar, 'G') &&\n length >= position + 3 &&\n context.charEquals(nextNextChar, 'M') &&\n context.charEquals(text.charAt(position + 2), 'T')) {\n return this._parsePrefixedOffset(context, text, position, position + 3);\n }\n }\n // javascript special case\n if(text.substr(position, 6) === 'SYSTEM'){\n context.setParsedZone(ZoneId.systemDefault());\n return position + 6;\n }\n\n // ...\n if (context.charEquals(nextChar, 'Z')) {\n context.setParsedZone(ZoneOffset.UTC);\n return position + 1;\n }\n\n const availableZoneIds = ZoneRulesProvider.getAvailableZoneIds();\n if (zoneIdTree.size !== availableZoneIds.length) {\n zoneIdTree = ZoneIdTree.createTreeMap(availableZoneIds);\n }\n\n const maxParseLength = length - position;\n let treeMap = zoneIdTree.treeMap;\n let parsedZoneId = null;\n let parseLength = 0;\n while(treeMap != null) {\n const parsedSubZoneId = text.substr(position, Math.min(treeMap.length, maxParseLength));\n treeMap = treeMap.get(parsedSubZoneId);\n if (treeMap != null && treeMap.isLeaf) {\n parsedZoneId = parsedSubZoneId;\n parseLength = treeMap.length;\n }\n }\n if (parsedZoneId != null) {\n context.setParsedZone(ZoneRegion.ofId(parsedZoneId));\n return position + parseLength;\n }\n\n return ~position;\n }\n\n /**\n *\n * @param {DateTimeParseContext} context\n * @param {String} text\n * @param {number} prefixPos\n * @param {number} position\n * @return {number}\n */\n _parsePrefixedOffset(context, text, prefixPos, position) {\n const prefix = text.substring(prefixPos, position).toUpperCase();\n const newContext = context.copy();\n if (position < text.length && context.charEquals(text.charAt(position), 'Z')) {\n context.setParsedZone(ZoneId.ofOffset(prefix, ZoneOffset.UTC));\n return position;\n }\n const endPos = OffsetIdPrinterParser.INSTANCE_ID.parse(newContext, text, position);\n if (endPos < 0) {\n context.setParsedZone(ZoneId.ofOffset(prefix, ZoneOffset.UTC));\n return position;\n }\n const offsetSecs = newContext.getParsed(ChronoField.OFFSET_SECONDS);\n const offset = ZoneOffset.ofTotalSeconds(offsetSecs);\n context.setParsedZone(ZoneId.ofOffset(prefix, offset));\n return endPos;\n }\n\n /**\n *\n * @returns {string}\n */\n toString() {\n return this.description;\n }\n}\n\nclass ZoneIdTree {\n\n static createTreeMap(availableZoneIds) {\n const sortedZoneIds = availableZoneIds.sort((a, b) => a.length - b.length);\n const treeMap = new ZoneIdTreeMap(sortedZoneIds[0].length, false);\n for (let i=0; i this.length) {\n const subZoneId = zoneId.substr(0, this.length);\n let subTreeMap = this._treeMap[subZoneId];\n if (subTreeMap == null) {\n subTreeMap = new ZoneIdTreeMap(idLength, false);\n this._treeMap[subZoneId] = subTreeMap;\n }\n subTreeMap.add(zoneId);\n }\n }\n\n get(zoneId){\n return this._treeMap[zoneId];\n }\n}\n\nlet zoneIdTree = new ZoneIdTree([]);","/**\n * @copyright (c) 2016, Philipp Thürwächter & Pattrick Hüper\n * @copyright (c) 2007-present, Stephen Colebourne & Michael Nascimento Santos\n * @license BSD-3-Clause (see LICENSE in the root directory of this source tree)\n */\n\nimport { assert, requireNonNull, requireInstance } from '../assert';\nimport { IllegalArgumentException, IllegalStateException } from '../errors';\nimport { MathUtil } from '../MathUtil';\n\nimport { LocalDate } from '../LocalDate';\nimport { LocalDateTime } from '../LocalDateTime';\nimport { ZoneOffset } from '../ZoneOffset';\nimport { ChronoLocalDate } from '../chrono/ChronoLocalDate';\nimport { ChronoField } from '../temporal/ChronoField';\nimport { IsoFields } from '../temporal/IsoFields';\nimport { TemporalQueries } from '../temporal/TemporalQueries';\n\nimport { DateTimeFormatter } from './DateTimeFormatter';\nimport { DecimalStyle } from './DecimalStyle';\nimport { SignStyle } from './SignStyle';\nimport { TextStyle } from './TextStyle';\nimport { ResolverStyle } from './ResolverStyle';\n\nimport { CharLiteralPrinterParser } from './parser/CharLiteralPrinterParser';\nimport { CompositePrinterParser } from './parser/CompositePrinterParser';\nimport { FractionPrinterParser } from './parser/FractionPrinterParser';\nimport { NumberPrinterParser, ReducedPrinterParser } from './parser/NumberPrinterParser';\nimport { OffsetIdPrinterParser } from './parser/OffsetIdPrinterParser';\nimport { PadPrinterParserDecorator } from './parser/PadPrinterParserDecorator';\nimport { SettingsParser } from './parser/SettingsParser';\nimport { StringLiteralPrinterParser } from './parser/StringLiteralPrinterParser';\nimport { ZoneIdPrinterParser } from './parser/ZoneIdPrinterParser';\n\nconst MAX_WIDTH = 15; // can't parse all numbers with more then 15 digits in javascript\n\nexport class DateTimeFormatterBuilder {\n\n /**\n * Constructs a new instance of the builder.\n */\n constructor() {\n /**\n * The currently active builder, used by the outermost builder.\n */\n this._active = this;\n /**\n * The parent builder, null for the outermost builder.\n */\n this._parent = null;\n\n /**\n * The list of printers that will be used.\n */\n this._printerParsers = [];\n\n /**\n * Whether this builder produces an optional formatter.\n */\n this._optional = false;\n /**\n * The width to pad the next field to.\n */\n this._padNextWidth = 0;\n\n /**\n * The character to pad the next field with.\n */\n this._padNextChar = null;\n\n /**\n * The index of the last variable width value parser.\n */\n this._valueParserIndex = -1;\n }\n\n /**\n * Private static factory, replaces private threeten constructor\n * Returns a new instance of the builder.\n *\n * @param {DateTimeFormatterBuilder} parent the parent builder, not null\n * @param {boolean} optional whether the formatter is optional, not null\n * @return {DateTimeFormatterBuilder} new instance\n */\n static _of(parent, optional){\n requireNonNull(parent, 'parent');\n requireNonNull(optional, 'optional');\n\n const dtFormatterBuilder = new DateTimeFormatterBuilder();\n dtFormatterBuilder._parent = parent;\n dtFormatterBuilder._optional = optional;\n\n return dtFormatterBuilder;\n }\n\n /**\n * Changes the parse style to be case sensitive for the remainder of the formatter.\n *\n * Parsing can be case sensitive or insensitive - by default it is case sensitive.\n * This method allows the case sensitivity setting of parsing to be changed.\n *\n * Calling this method changes the state of the builder such that all\n * subsequent builder method calls will parse text in case sensitive mode.\n * See {@link parseCaseInsensitive} for the opposite setting.\n * The parse case sensitive/insensitive methods may be called at any point\n * in the builder, thus the parser can swap between case parsing modes\n * multiple times during the parse.\n *\n * Since the default is case sensitive, this method should only be used after\n * a previous call to {@link parseCaseInsensitive}.\n *\n * @return {DateTimeFormatterBuilder} this, for chaining, not null\n */\n parseCaseSensitive() {\n this._appendInternalPrinterParser(SettingsParser.SENSITIVE);\n return this;\n }\n\n /**\n * Changes the parse style to be case insensitive for the remainder of the formatter.\n *\n * Parsing can be case sensitive or insensitive - by default it is case sensitive.\n * This method allows the case sensitivity setting of parsing to be changed.\n *\n * Calling this method changes the state of the builder such that all\n * subsequent builder method calls will parse text in case sensitive mode.\n * See {@link parseCaseSensitive} for the opposite setting.\n * The parse case sensitive/insensitive methods may be called at any point\n * in the builder, thus the parser can swap between case parsing modes\n * multiple times during the parse.\n *\n * @return {DateTimeFormatterBuilder} this, for chaining, not null\n */\n parseCaseInsensitive() {\n this._appendInternalPrinterParser(SettingsParser.INSENSITIVE);\n return this;\n }\n\n //-----------------------------------------------------------------------\n /**\n * Changes the parse style to be strict for the remainder of the formatter.\n *\n * Parsing can be strict or lenient - by default its strict.\n * This controls the degree of flexibility in matching the text and sign styles.\n *\n * When used, this method changes the parsing to be strict from this point onwards.\n * As strict is the default, this is normally only needed after calling {@link parseLenient}.\n * The change will remain in force until the end of the formatter that is eventually\n * constructed or until {@link parseLenient} is called.\n *\n * @return {DateTimeFormatterBuilder} this, for chaining, not null\n */\n parseStrict() {\n this._appendInternalPrinterParser(SettingsParser.STRICT);\n return this;\n }\n\n /**\n * Changes the parse style to be lenient for the remainder of the formatter.\n * Note that case sensitivity is set separately to this method.\n *\n * Parsing can be strict or lenient - by default its strict.\n * This controls the degree of flexibility in matching the text and sign styles.\n * Applications calling this method should typically also call {@link parseCaseInsensitive}.\n *\n * When used, this method changes the parsing to be strict from this point onwards.\n * The change will remain in force until the end of the formatter that is eventually\n * constructed or until {@link parseStrict} is called.\n *\n * @return {DateTimeFormatterBuilder} this, for chaining, not null\n */\n parseLenient() {\n this._appendInternalPrinterParser(SettingsParser.LENIENT);\n return this;\n }\n\n /**\n * Appends a default value for a field to the formatter for use in parsing.\n *

\n * This appends an instruction to the builder to inject a default value\n * into the parsed result. This is especially useful in conjunction with\n * optional parts of the formatter.\n *

\n * For example, consider a formatter that parses the year, followed by\n * an optional month, with a further optional day-of-month. Using such a\n * formatter would require the calling code to check whether a full date,\n * year-month or just a year had been parsed. This method can be used to\n * default the month and day-of-month to a sensible value, such as the\n * first of the month, allowing the calling code to always get a date.\n *

\n * During formatting, this method has no effect.\n *

\n * During parsing, the current state of the parse is inspected.\n * If the specified field has no associated value, because it has not been\n * parsed successfully at that point, then the specified value is injected\n * into the parse result. Injection is immediate, thus the field-value pair\n * will be visible to any subsequent elements in the formatter.\n * As such, this method is normally called at the end of the builder.\n *\n * @param {TemporalField} field the field to default the value of, not null\n * @param {number} value the value to default the field to\n * @return {DateTimeFormatterBuilder} this, for chaining, not null\n */\n parseDefaulting(field, value) {\n requireNonNull(field);\n this._appendInternal(new DefaultingParser(field, value));\n return this;\n }\n\n /**\n * appendValue function overloading\n */\n appendValue(){\n if(arguments.length === 1){\n return this._appendValue1.apply(this, arguments);\n } else if(arguments.length === 2){\n return this._appendValue2.apply(this, arguments);\n } else {\n return this._appendValue4.apply(this, arguments);\n }\n }\n\n /**\n * Appends the value of a date-time field to the formatter using a normal\n * output style.\n *\n * The value of the field will be output during a print.\n * If the value cannot be obtained then an exception will be thrown.\n *\n * The value will be printed as per the normal print of an integer value.\n * Only negative numbers will be signed. No padding will be added.\n *\n * The parser for a variable width value such as this normally behaves greedily,\n * requiring one digit, but accepting as many digits as possible.\n * This behavior can be affected by 'adjacent value parsing'.\n * See {@link appendValue} for full details.\n *\n * @param field the field to append, not null\n * @return {DateTimeFormatterBuilder} this, for chaining, not null\n */\n _appendValue1(field) {\n requireNonNull(field);\n this._appendValuePrinterParser(new NumberPrinterParser(field, 1, MAX_WIDTH, SignStyle.NORMAL));\n return this;\n }\n\n /**\n * Appends the value of a date-time field to the formatter using a fixed\n * width, zero-padded approach.\n *\n * The value of the field will be output during a print.\n * If the value cannot be obtained then an exception will be thrown.\n *\n * The value will be zero-padded on the left. If the size of the value\n * means that it cannot be printed within the width then an exception is thrown.\n * If the value of the field is negative then an exception is thrown during printing.\n *\n * This method supports a special technique of parsing known as 'adjacent value parsing'.\n * This technique solves the problem where a variable length value is followed by one or more\n * fixed length values. The standard parser is greedy, and thus it would normally\n * steal the digits that are needed by the fixed width value parsers that follow the\n * variable width one.\n *\n * No action is required to initiate 'adjacent value parsing'.\n * When a call to {@link appendValue} with a variable width is made, the builder\n * enters adjacent value parsing setup mode. If the immediately subsequent method\n * call or calls on the same builder are to this method, then the parser will reserve\n * space so that the fixed width values can be parsed.\n *\n * For example, consider `builder.appendValue(YEAR).appendValue(MONTH_OF_YEAR, 2)`.\n * The year is a variable width parse of between 1 and 19 digits.\n * The month is a fixed width parse of 2 digits.\n * Because these were appended to the same builder immediately after one another,\n * the year parser will reserve two digits for the month to parse.\n * Thus, the text '201106' will correctly parse to a year of 2011 and a month of 6.\n * Without adjacent value parsing, the year would greedily parse all six digits and leave\n * nothing for the month.\n *\n * Adjacent value parsing applies to each set of fixed width not-negative values in the parser\n * that immediately follow any kind of variable width value.\n * Calling any other append method will end the setup of adjacent value parsing.\n * Thus, in the unlikely event that you need to avoid adjacent value parsing behavior,\n * simply add the `appendValue` to another {@link DateTimeFormatterBuilder}\n * and add that to this builder.\n *\n * If adjacent parsing is active, then parsing must match exactly the specified\n * number of digits in both strict and lenient modes.\n * In addition, no positive or negative sign is permitted.\n *\n * @param field the field to append, not null\n * @param width the width of the printed field, from 1 to 19\n * @return this, for chaining, not null\n * @throws IllegalArgumentException if the width is invalid\n */\n _appendValue2(field, width) {\n requireNonNull(field);\n if (width < 1 || width > MAX_WIDTH) {\n throw new IllegalArgumentException(`The width must be from 1 to ${MAX_WIDTH} inclusive but was ${width}`);\n }\n const pp = new NumberPrinterParser(field, width, width, SignStyle.NOT_NEGATIVE);\n this._appendValuePrinterParser(pp);\n return this;\n }\n\n /**\n * Appends the value of a date-time field to the formatter providing full\n * control over printing.\n *\n * The value of the field will be output during a print.\n * If the value cannot be obtained then an exception will be thrown.\n *\n * This method provides full control of the numeric formatting, including\n * zero-padding and the positive/negative sign.\n *\n * The parser for a variable width value such as this normally behaves greedily,\n * accepting as many digits as possible.\n * This behavior can be affected by 'adjacent value parsing'.\n * See {@link appendValue} for full details.\n *\n * In strict parsing mode, the minimum number of parsed digits is `minWidth`.\n * In lenient parsing mode, the minimum number of parsed digits is one.\n *\n * If this method is invoked with equal minimum and maximum widths and a sign style of\n * `NOT_NEGATIVE` then it delegates to `appendValue(TemporalField, int)`.\n * In this scenario, the printing and parsing behavior described there occur.\n *\n * @param field the field to append, not null\n * @param minWidth the minimum field width of the printed field, from 1 to 19\n * @param maxWidth the maximum field width of the printed field, from 1 to 19\n * @param signStyle the positive/negative output style, not null\n * @return {DateTimeFormatterBuilder} this, for chaining, not null\n * @throws IllegalArgumentException if the widths are invalid\n */\n _appendValue4(field, minWidth, maxWidth, signStyle) {\n requireNonNull(field);\n requireNonNull(signStyle);\n if (minWidth === maxWidth && signStyle === SignStyle.NOT_NEGATIVE) {\n return this._appendValue2(field, maxWidth);\n }\n if (minWidth < 1 || minWidth > MAX_WIDTH) {\n throw new IllegalArgumentException(`The minimum width must be from 1 to ${MAX_WIDTH} inclusive but was ${minWidth}`);\n }\n if (maxWidth < 1 || maxWidth > MAX_WIDTH) {\n throw new IllegalArgumentException(`The minimum width must be from 1 to ${MAX_WIDTH} inclusive but was ${maxWidth}`);\n }\n if (maxWidth < minWidth) {\n throw new IllegalArgumentException(`The maximum width must exceed or equal the minimum width but ${maxWidth} < ${minWidth}`);\n }\n const pp = new NumberPrinterParser(field, minWidth, maxWidth, signStyle);\n this._appendValuePrinterParser(pp);\n return this;\n }\n\n /**\n * appendValueReduced function overloading\n */\n appendValueReduced() {\n if (arguments.length === 4 && arguments[3] instanceof ChronoLocalDate) {\n return this._appendValueReducedFieldWidthMaxWidthBaseDate.apply(this, arguments);\n } else {\n return this._appendValueReducedFieldWidthMaxWidthBaseValue.apply(this, arguments);\n }\n }\n\n /**\n * Appends the reduced value of a date-time field to the formatter.\n *\n * Since fields such as year vary by chronology, it is recommended to use the\n * {@link appendValueReduced} date}\n * variant of this method in most cases. This variant is suitable for\n * simple fields or working with only the ISO chronology.\n *\n * For formatting, the `width` and `maxWidth` are used to\n * determine the number of characters to format.\n * If they are equal then the format is fixed width.\n * If the value of the field is within the range of the `baseValue` using\n * `width` characters then the reduced value is formatted otherwise the value is\n * truncated to fit `maxWidth`.\n * The rightmost characters are output to match the width, left padding with zero.\n *\n * For strict parsing, the number of characters allowed by `width` to `maxWidth` are parsed.\n * For lenient parsing, the number of characters must be at least 1 and less than 10.\n * If the number of digits parsed is equal to `width` and the value is positive,\n * the value of the field is computed to be the first number greater than\n * or equal to the `baseValue` with the same least significant characters,\n * otherwise the value parsed is the field value.\n * This allows a reduced value to be entered for values in range of the baseValue\n * and width and absolute values can be entered for values outside the range.\n *\n * For example, a base value of `1980` and a width of `2` will have\n * valid values from `1980` to `2079`.\n * During parsing, the text `\"12\"` will result in the value `2012` as that\n * is the value within the range where the last two characters are \"12\".\n * By contrast, parsing the text `\"1915\"` will result in the value `1915`.\n *\n * @param {TemporalField} field the field to append, not null\n * @param {number} width the field width of the printed and parsed field, from 1 to 10\n * @param {number} maxWidth the maximum field width of the printed field, from 1 to 10\n * @param {number} baseValue the base value of the range of valid values\n * @return {DateTimeFormatterBuilder} this, for chaining, not null\n * @throws IllegalArgumentException if the width or base value is invalid\n */\n _appendValueReducedFieldWidthMaxWidthBaseValue(field, width, maxWidth, baseValue) {\n requireNonNull(field, 'field');\n const pp = new ReducedPrinterParser(field, width, maxWidth, baseValue, null);\n this._appendValuePrinterParser(pp);\n return this;\n }\n\n /**\n * Appends the reduced value of a date-time field to the formatter.\n *\n * This is typically used for formatting and parsing a two digit year.\n *\n * The base date is used to calculate the full value during parsing.\n * For example, if the base date is 1950-01-01 then parsed values for\n * a two digit year parse will be in the range 1950-01-01 to 2049-12-31.\n * Only the year would be extracted from the date, thus a base date of\n * 1950-08-25 would also parse to the range 1950-01-01 to 2049-12-31.\n * This behavior is necessary to support fields such as week-based-year\n * or other calendar systems where the parsed value does not align with\n * standard ISO years.\n *\n * The exact behavior is as follows. Parse the full set of fields and\n * determine the effective chronology using the last chronology if\n * it appears more than once. Then convert the base date to the\n * effective chronology. Then extract the specified field from the\n * chronology-specific base date and use it to determine the\n * `baseValue` used below.\n *\n * For formatting, the `width` and `maxWidth` are used to\n * determine the number of characters to format.\n * If they are equal then the format is fixed width.\n * If the value of the field is within the range of the `baseValue` using\n * `width` characters then the reduced value is formatted otherwise the value is\n * truncated to fit `maxWidth`.\n * The rightmost characters are output to match the width, left padding with zero.\n *\n * For strict parsing, the number of characters allowed by `width` to `maxWidth` are parsed.\n * For lenient parsing, the number of characters must be at least 1 and less than 10.\n * If the number of digits parsed is equal to `width` and the value is positive,\n * the value of the field is computed to be the first number greater than\n * or equal to the `baseValue` with the same least significant characters,\n * otherwise the value parsed is the field value.\n * This allows a reduced value to be entered for values in range of the baseValue\n * and width and absolute values can be entered for values outside the range.\n *\n * For example, a base value of `1980` and a width of `2` will have\n * valid values from `1980` to `2079`.\n * During parsing, the text `\"12\"` will result in the value `2012` as that\n * is the value within the range where the last two characters are \"12\".\n * By contrast, parsing the text `\"1915\"` will result in the value `1915`.\n *\n * @param {TemporalField} field the field to append, not null\n * @param {number} width the field width of the printed and parsed field, from 1 to 10\n * @param {number} maxWidth the maximum field width of the printed field, from 1 to 10\n * @param {ChronoLocalDate} baseDate the base date used to calculate the base value for the range\n * of valid values in the parsed chronology, not null\n * @return {DateTimeFormatterBuilder} this, for chaining, not null\n * @throws IllegalArgumentException if the width or base value is invalid\n */\n _appendValueReducedFieldWidthMaxWidthBaseDate(field, width, maxWidth, baseDate) {\n requireNonNull(field, 'field');\n requireNonNull(baseDate, 'baseDate');\n requireInstance(baseDate, ChronoLocalDate, 'baseDate');\n const pp = new ReducedPrinterParser(field, width, maxWidth, 0, baseDate);\n this._appendValuePrinterParser(pp);\n return this;\n }\n\n /**\n * Appends a fixed width printer-parser.\n *\n * @param pp the printer-parser, not null\n * @return {DateTimeFormatterBuilder} this, for chaining, not null\n */\n _appendValuePrinterParser(pp) {\n assert(pp != null);\n if (this._active._valueParserIndex >= 0 &&\n this._active._printerParsers[this._active._valueParserIndex] instanceof NumberPrinterParser) {\n const activeValueParser = this._active._valueParserIndex;\n\n // adjacent parsing mode, update setting in previous parsers\n let basePP = this._active._printerParsers[activeValueParser];\n if (pp.minWidth() === pp.maxWidth() && pp.signStyle() === SignStyle.NOT_NEGATIVE) {\n // Append the width to the subsequentWidth of the active parser\n basePP = basePP.withSubsequentWidth(pp.maxWidth());\n // Append the new parser as a fixed width\n this._appendInternal(pp.withFixedWidth());\n // Retain the previous active parser\n this._active._valueParserIndex = activeValueParser;\n } else {\n // Modify the active parser to be fixed width\n basePP = basePP.withFixedWidth();\n // The new parser becomes the mew active parser\n this._active._valueParserIndex = this._appendInternal(pp);\n }\n // Replace the modified parser with the updated one\n this._active._printerParsers[activeValueParser] = basePP;\n } else {\n // The new Parser becomes the active parser\n this._active._valueParserIndex = this._appendInternal(pp);\n }\n return this;\n }\n\n //-----------------------------------------------------------------------\n /**\n * Appends the fractional value of a date-time field to the formatter.\n *\n * The fractional value of the field will be output including the\n * preceding decimal point. The preceding value is not output.\n * For example, the second-of-minute value of 15 would be output as `.25`.\n *\n * The width of the printed fraction can be controlled. Setting the\n * minimum width to zero will cause no output to be generated.\n * The printed fraction will have the minimum width necessary between\n * the minimum and maximum widths - trailing zeroes are omitted.\n * No rounding occurs due to the maximum width - digits are simply dropped.\n *\n * When parsing in strict mode, the number of parsed digits must be between\n * the minimum and maximum width. When parsing in lenient mode, the minimum\n * width is considered to be zero and the maximum is nine.\n *\n * If the value cannot be obtained then an exception will be thrown.\n * If the value is negative an exception will be thrown.\n * If the field does not have a fixed set of valid values then an\n * exception will be thrown.\n * If the field value in the date-time to be printed is invalid it\n * cannot be printed and an exception will be thrown.\n *\n * @param {TemporalField} field the field to append, not null\n * @param {Number} minWidth the minimum width of the field excluding the decimal point, from 0 to 9\n * @param {Number} maxWidth the maximum width of the field excluding the decimal point, from 1 to 9\n * @param {boolean} decimalPoint whether to output the localized decimal point symbol\n * @return {DateTimeFormatterBuilder} this, for chaining, not null\n * @throws IllegalArgumentException if the field has a variable set of valid values or\n * either width is invalid\n */\n appendFraction(field, minWidth, maxWidth, decimalPoint) {\n this._appendInternal(new FractionPrinterParser(field, minWidth, maxWidth, decimalPoint));\n return this;\n }\n\n /**\n * Appends an instant using ISO-8601 to the formatter with control over\n * the number of fractional digits.\n *\n * Instants have a fixed output format, although this method provides some\n * control over the fractional digits. They are converted to a date-time\n * with a zone-offset of UTC and printed using the standard ISO-8601 format.\n * The localized decimal style is not used.\n *\n * The {@link this.fractionalDigits} parameter allows the output of the fractional\n * second to be controlled. Specifying zero will cause no fractional digits\n * to be output. From 1 to 9 will output an increasing number of digits, using\n * zero right-padding if necessary. The special value -1 is used to output as\n * many digits as necessary to avoid any trailing zeroes.\n *\n * When parsing in strict mode, the number of parsed digits must match the\n * fractional digits. When parsing in lenient mode, any number of fractional\n * digits from zero to nine are accepted.\n *\n * The instant is obtained using {@link ChronoField#INSTANT_SECONDS}\n * and optionally (@code NANO_OF_SECOND). The value of {@link INSTANT_SECONDS}\n * may be outside the maximum range of {@link LocalDateTime}.\n *\n * The {@link ResolverStyle} has no effect on instant parsing.\n * The end-of-day time of '24:00' is handled as midnight at the start of the following day.\n * The leap-second time of '23:59:59' is handled to some degree, see\n * {@link DateTimeFormatter#parsedLeapSecond} for full details.\n *\n * An alternative to this method is to format/parse the instant as a single\n * epoch-seconds value. That is achieved using `appendValue(INSTANT_SECONDS)`.\n *\n * @param {number} [fractionalDigits=-2] - the number of fractional second digits to format with,\n * from 0 to 9, or -1 to use as many digits as necessary\n * @return {DateTimeFormatterBuilder} this, for chaining, not null\n */\n appendInstant(fractionalDigits=-2) {\n if (fractionalDigits < -2 || fractionalDigits > 9) {\n throw new IllegalArgumentException(`Invalid fractional digits: ${fractionalDigits}`);\n }\n this._appendInternal(new InstantPrinterParser(fractionalDigits));\n return this;\n }\n\n\n /**\n * Appends the zone offset, such as '+01:00', to the formatter.\n *\n * This appends an instruction to print/parse the offset ID to the builder.\n * This is equivalent to calling `appendOffset(\"HH:MM:ss\", \"Z\")`.\n *\n * @return {DateTimeFormatterBuilder} this, for chaining, not null\n */\n appendOffsetId() {\n this._appendInternal(OffsetIdPrinterParser.INSTANCE_ID);\n return this;\n }\n\n /**\n * Appends the zone offset, such as '+01:00', to the formatter.\n *\n * This appends an instruction to print/parse the offset ID to the builder.\n *\n * During printing, the offset is obtained using a mechanism equivalent\n * to querying the temporal with {@link TemporalQueries#offset}.\n * It will be printed using the format defined below.\n * If the offset cannot be obtained then an exception is thrown unless the\n * section of the formatter is optional.\n *\n * During parsing, the offset is parsed using the format defined below.\n * If the offset cannot be parsed then an exception is thrown unless the\n * section of the formatter is optional.\n *\n * The format of the offset is controlled by a pattern which must be one\n * of the following:\n *\n * * `+HH` - hour only, ignoring minute and second\n * * `+HHmm` - hour, with minute if non-zero, ignoring second, no colon\n * * `+HH:mm` - hour, with minute if non-zero, ignoring second, with colon\n * * `+HHMM` - hour and minute, ignoring second, no colon\n * * `+HH:MM` - hour and minute, ignoring second, with colon\n * * `+HHMMss` - hour and minute, with second if non-zero, no colon\n * * `+HH:MM:ss` - hour and minute, with second if non-zero, with colon\n * * `+HHMMSS` - hour, minute and second, no colon\n * * `+HH:MM:SS` - hour, minute and second, with colon\n *\n * The \"no offset\" text controls what text is printed when the total amount of\n * the offset fields to be output is zero.\n * Example values would be 'Z', '+00:00', 'UTC' or 'GMT'.\n * Three formats are accepted for parsing UTC - the \"no offset\" text, and the\n * plus and minus versions of zero defined by the pattern.\n *\n * @param {String} pattern the pattern to use, not null\n * @param {String} noOffsetText the text to use when the offset is zero, not null\n * @return {DateTimeFormatterBuilder} this, for chaining, not null\n */\n appendOffset(pattern, noOffsetText) {\n this._appendInternalPrinterParser(new OffsetIdPrinterParser(noOffsetText, pattern));\n return this;\n }\n\n /**\n * Appends the time-zone ID, such as 'Europe/Paris' or '+02:00', to the formatter.\n *\n * This appends an instruction to print/parse the zone ID to the builder.\n * The zone ID is obtained in a strict manner suitable for {@link ZonedDateTime}.\n * By contrast, {@link OffsetDateTime} does not have a zone ID suitable\n * for use with this method, see {@link appendZoneOrOffsetId}.\n *\n * During printing, the zone is obtained using a mechanism equivalent\n * to querying the temporal with {@link TemporalQueries#zoneId}.\n * It will be printed using the result of {@link ZoneId#getId}.\n * If the zone cannot be obtained then an exception is thrown unless the\n * section of the formatter is optional.\n *\n * During parsing, the zone is parsed and must match a known zone or offset.\n * If the zone cannot be parsed then an exception is thrown unless the\n * section of the formatter is optional.\n *\n * @return {DateTimeFormatterBuilder} this, for chaining, not null\n * @see #appendZoneRegionId()\n */\n appendZoneId() {\n this._appendInternal(new ZoneIdPrinterParser(TemporalQueries.zoneId(), 'ZoneId()'));\n return this;\n }\n\n //-----------------------------------------------------------------------\n /**\n * Appends the elements defined by the specified pattern to the builder.\n *\n * All letters 'A' to 'Z' and 'a' to 'z' are reserved as pattern letters.\n * The characters '{' and '}' are reserved for future use.\n * The characters '[' and ']' indicate optional patterns.\n * The following pattern letters are defined:\n *

\n     *  |Symbol  |Meaning                     |Presentation      |Examples\n     *  |--------|----------------------------|------------------|----------------------------------------------------\n     *  | G      | era                        | number/text      | 1; 01; AD; Anno Domini\n     *  | u      | year                       | year             | 2004; 04\n     *  | y      | year-of-era                | year             | 2004; 04\n     *  | D      | day-of-year                | number           | 189\n     *  | M      | month-of-year              | number/text      | 7; 07; Jul; July; J\n     *  | d      | day-of-month               | number           | 10\n     *  |        |                            |                  |\n     *  | Q      | quarter-of-year            | number/text      | 3; 03; Q3\n     *  | Y      | week-based-year            | year             | 1996; 96\n     *  | w      | week-of-year               | number           | 27\n     *  | W      | week-of-month              | number           | 27\n     *  | e      | localized day-of-week      | number           | 2; Tue; Tuesday; T\n     *  | E      | day-of-week                | number/text      | 2; Tue; Tuesday; T\n     *  | F      | week-of-month              | number           | 3\n     *  |        |                            |                  |\n     *  | a      | am-pm-of-day               | text             | PM\n     *  | h      | clock-hour-of-am-pm (1-12) | number           | 12\n     *  | K      | hour-of-am-pm (0-11)       | number           | 0\n     *  | k      | clock-hour-of-am-pm (1-24) | number           | 0\n     *  |        |                            |                  |\n     *  | H      | hour-of-day (0-23)         | number           | 0\n     *  | m      | minute-of-hour             | number           | 30\n     *  | s      | second-of-minute           | number           | 55\n     *  | S      | fraction-of-second         | fraction         | 978\n     *  | A      | milli-of-day               | number           | 1234\n     *  | n      | nano-of-second             | number           | 987654321\n     *  | N      | nano-of-day                | number           | 1234000000\n     *  |        |                            |                  |\n     *  | V      | time-zone ID               | zone-id          | America/Los_Angeles; Z; -08:30\n     *  | z      | time-zone name             | zone-name        | Pacific Standard Time; PST\n     *  | X      | zone-offset 'Z' for zero   | offset-X         | Z; -08; -0830; -08:30; -083015; -08:30:15;\n     *  | x      | zone-offset                | offset-x         | +0000; -08; -0830; -08:30; -083015; -08:30:15;\n     *  | Z      | zone-offset                | offset-Z         | +0000; -0800; -08:00;\n     *  |        |                            |                  |\n     *  | p      | pad next                   | pad modifier     | 1\n     *  |        |                            |                  |\n     *  | '      | escape for text            | delimiter        |\n     *  | ''     | single quote               | literal          | '\n     *  | [      | optional section start     |                  |\n     *  | ]      | optional section end       |                  |\n     *  | {}     | reserved for future use    |                  |\n     * 
\n *\n * The count of pattern letters determine the format.\n *\n * **Text**: The text style is determined based on the number of pattern letters used.\n * Less than 4 pattern letters will use the short form (see {@link TextStyle#SHORT}).\n * Exactly 4 pattern letters will use the full form (see {@link TextStyle#FULL}).\n * Exactly 5 pattern letters will use the narrow form (see {@link TextStyle#NARROW}).\n *\n * **Number**: If the count of letters is one, then the value is printed using the minimum number\n * of digits and without padding as per {@link appendValue}. Otherwise, the\n * count of digits is used as the width of the output field as per {@link appendValue}.\n *\n * **Number/Text**: If the count of pattern letters is 3 or greater, use the Text rules above.\n * Otherwise use the Number rules above.\n *\n * **Fraction**: Outputs the nano-of-second field as a fraction-of-second.\n * The nano-of-second value has nine digits, thus the count of pattern letters is from 1 to 9.\n * If it is less than 9, then the nano-of-second value is truncated, with only the most\n * significant digits being output.\n * When parsing in strict mode, the number of parsed digits must match the count of pattern letters.\n * When parsing in lenient mode, the number of parsed digits must be at least the count of pattern\n * letters, up to 9 digits.\n *\n * **Year**: The count of letters determines the minimum field width below which padding is used.\n * If the count of letters is two, then a reduced (see {@link appendValueReduced}) two digit form is used.\n * For printing, this outputs the rightmost two digits. For parsing, this will parse using the\n * base value of 2000, resulting in a year within the range 2000 to 2099 inclusive.\n * If the count of letters is less than four (but not two), then the sign is only output for negative\n * years as per {@link SignStyle#NORMAL}.\n * Otherwise, the sign is output if the pad width is exceeded, as per {@link SignStyle#EXCEEDS_PAD}\n *\n * **ZoneId**: This outputs the time-zone ID, such as 'Europe/Paris'.\n * If the count of letters is two, then the time-zone ID is output.\n * Any other count of letters throws {@link IllegalArgumentException}.\n *
\n     *  Pattern     Equivalent builder methods\n     *   VV          appendZoneId()\n     * 
\n *\n * **Zone names**: This outputs the display name of the time-zone ID.\n * If the count of letters is one, two or three, then the short name is output.\n * If the count of letters is four, then the full name is output.\n * Five or more letters throws {@link IllegalArgumentException}.\n *
\n     *  Pattern     Equivalent builder methods\n     *   z           appendZoneText(TextStyle.SHORT)\n     *   zz          appendZoneText(TextStyle.SHORT)\n     *   zzz         appendZoneText(TextStyle.SHORT)\n     *   zzzz        appendZoneText(TextStyle.FULL)\n     * 
\n *\n * **Offset X and x**: This formats the offset based on the number of pattern letters.\n * One letter outputs just the hour', such as '+01', unless the minute is non-zero\n * in which case the minute is also output, such as '+0130'.\n * Two letters outputs the hour and minute, without a colon, such as '+0130'.\n * Three letters outputs the hour and minute, with a colon, such as '+01:30'.\n * Four letters outputs the hour and minute and optional second, without a colon, such as '+013015'.\n * Five letters outputs the hour and minute and optional second, with a colon, such as '+01:30:15'.\n * Six or more letters throws {@link IllegalArgumentException}.\n * Pattern letter 'X' (upper case) will output 'Z' when the offset to be output would be zero,\n * whereas pattern letter 'x' (lower case) will output '+00', '+0000', or '+00:00'.\n *
\n     *  Pattern     Equivalent builder methods\n     *   X           appendOffset(\"+HHmm\",\"Z\")\n     *   XX          appendOffset(\"+HHMM\",\"Z\")\n     *   XXX         appendOffset(\"+HH:MM\",\"Z\")\n     *   XXXX        appendOffset(\"+HHMMss\",\"Z\")\n     *   XXXXX       appendOffset(\"+HH:MM:ss\",\"Z\")\n     *   x           appendOffset(\"+HHmm\",\"+00\")\n     *   xx          appendOffset(\"+HHMM\",\"+0000\")\n     *   xxx         appendOffset(\"+HH:MM\",\"+00:00\")\n     *   xxxx        appendOffset(\"+HHMMss\",\"+0000\")\n     *   xxxxx       appendOffset(\"+HH:MM:ss\",\"+00:00\")\n     * 
\n *\n * **Offset Z**: This formats the offset based on the number of pattern letters.\n * One, two or three letters outputs the hour and minute, without a colon, such as '+0130'.\n * Four or more letters throws {@link IllegalArgumentException}.\n * The output will be '+0000' when the offset is zero.\n *
\n     *  Pattern     Equivalent builder methods\n     *   Z           appendOffset(\"+HHMM\",\"+0000\")\n     *   ZZ          appendOffset(\"+HHMM\",\"+0000\")\n     *   ZZZ         appendOffset(\"+HHMM\",\"+0000\")\n     * 
\n *\n * **Optional section**: The optional section markers work exactly like calling {@link optionalStart}\n * and {@link optionalEnd}.\n *\n * **Pad modifier**: Modifies the pattern that immediately follows to be padded with spaces.\n * The pad width is determined by the number of pattern letters.\n * This is the same as calling {@link padNext}.\n *\n * For example, 'ppH' outputs the hour-of-day padded on the left with spaces to a width of 2.\n *\n * Any unrecognized letter is an error.\n * Any non-letter character, other than '[', ']', '{', '}' and the single quote will be output directly.\n * Despite this, it is recommended to use single quotes around all characters that you want to\n * output directly to ensure that future changes do not break your application.\n *\n * Note that the pattern string is similar, but not identical, to\n * {@link java.text.SimpleDateFormat}.\n * The pattern string is also similar, but not identical, to that defined by the\n * Unicode Common Locale Data Repository (CLDR/LDML).\n * Pattern letters 'E' and 'u' are merged, which changes the meaning of \"E\" and \"EE\" to be numeric.\n * Pattern letters 'X' is aligned with Unicode CLDR/LDML, which affects pattern 'X'.\n * Pattern letter 'y' and 'Y' parse years of two digits and more than 4 digits differently.\n * Pattern letters 'n', 'A', 'N', 'I' and 'p' are added.\n * Number types will reject large numbers.\n *\n * @param {String} pattern the pattern to add, not null\n * @return {DateTimeFormatterBuilder} this, for chaining, not null\n * @throws IllegalArgumentException if the pattern is invalid\n */\n appendPattern(pattern) {\n requireNonNull(pattern, 'pattern');\n this._parsePattern(pattern);\n return this;\n }\n\n\n //-----------------------------------------------------------------------\n // empty implementations of locale functionality, be implemented/overridden by js-joda-locale\n\n appendZoneText() {\n throw new IllegalArgumentException('Pattern using (localized) text not implemented, use @js-joda/locale plugin!');\n }\n\n appendText() {\n throw new IllegalArgumentException('Pattern using (localized) text not implemented, use @js-joda/locale plugin!');\n }\n\n appendLocalizedOffset() {\n throw new IllegalArgumentException('Pattern using (localized) text not implemented, use @js-joda/locale plugin!');\n }\n\n appendWeekField() {\n throw new IllegalArgumentException('Pattern using (localized) text not implemented, use @js-joda/locale plugin!');\n }\n\n //-----------------------------------------------------------------------\n\n _parsePattern(pattern) {\n /** Map of letters to fields. */\n const FIELD_MAP = {\n 'G': ChronoField.ERA,\n 'y': ChronoField.YEAR_OF_ERA,\n 'u': ChronoField.YEAR,\n 'Q': IsoFields.QUARTER_OF_YEAR,\n 'q': IsoFields.QUARTER_OF_YEAR,\n 'M': ChronoField.MONTH_OF_YEAR,\n 'L': ChronoField.MONTH_OF_YEAR,\n 'D': ChronoField.DAY_OF_YEAR,\n 'd': ChronoField.DAY_OF_MONTH,\n 'F': ChronoField.ALIGNED_DAY_OF_WEEK_IN_MONTH,\n 'E': ChronoField.DAY_OF_WEEK,\n 'c': ChronoField.DAY_OF_WEEK,\n 'e': ChronoField.DAY_OF_WEEK,\n 'a': ChronoField.AMPM_OF_DAY,\n 'H': ChronoField.HOUR_OF_DAY,\n 'k': ChronoField.CLOCK_HOUR_OF_DAY,\n 'K': ChronoField.HOUR_OF_AMPM,\n 'h': ChronoField.CLOCK_HOUR_OF_AMPM,\n 'm': ChronoField.MINUTE_OF_HOUR,\n 's': ChronoField.SECOND_OF_MINUTE,\n 'S': ChronoField.NANO_OF_SECOND,\n 'A': ChronoField.MILLI_OF_DAY,\n 'n': ChronoField.NANO_OF_SECOND,\n 'N': ChronoField.NANO_OF_DAY\n };\n\n for (let pos = 0; pos < pattern.length; pos++) {\n let cur = pattern.charAt(pos);\n if ((cur >= 'A' && cur <= 'Z') || (cur >= 'a' && cur <= 'z')) {\n let start = pos++;\n for (; pos < pattern.length && pattern.charAt(pos) === cur; pos++); // short loop\n let count = pos - start;\n // padding\n if (cur === 'p') {\n let pad = 0;\n if (pos < pattern.length) {\n cur = pattern.charAt(pos);\n if ((cur >= 'A' && cur <= 'Z') || (cur >= 'a' && cur <= 'z')) {\n pad = count;\n start = pos++;\n for (; pos < pattern.length && pattern.charAt(pos) === cur; pos++); // short loop\n count = pos - start;\n }\n }\n if (pad === 0) {\n throw new IllegalArgumentException(\n `Pad letter 'p' must be followed by valid pad pattern: ${pattern}`);\n }\n this.padNext(pad); // pad and continue parsing\n }\n // main rules\n const field = FIELD_MAP[cur];\n if (field != null) {\n this._parseField(cur, count, field);\n } else if (cur === 'z') {\n if (count > 4) {\n throw new IllegalArgumentException(`Too many pattern letters: ${cur}`);\n } else if (count === 4) {\n this.appendZoneText(TextStyle.FULL);\n } else {\n this.appendZoneText(TextStyle.SHORT);\n }\n } else if (cur === 'V') {\n if (count !== 2) {\n throw new IllegalArgumentException(`Pattern letter count must be 2: ${cur}`);\n }\n this.appendZoneId();\n } else if (cur === 'Z') {\n if (count < 4) {\n this.appendOffset('+HHMM', '+0000');\n } else if (count === 4) {\n this.appendLocalizedOffset(TextStyle.FULL);\n } else if (count === 5) {\n this.appendOffset('+HH:MM:ss', 'Z');\n } else {\n throw new IllegalArgumentException(`Too many pattern letters: ${cur}`);\n }\n } else if (cur === 'O') {\n if (count === 1) {\n this.appendLocalizedOffset(TextStyle.SHORT);\n } else if (count === 4) {\n this.appendLocalizedOffset(TextStyle.FULL);\n } else {\n throw new IllegalArgumentException(`Pattern letter count must be 1 or 4: ${cur}`);\n }\n } else if (cur === 'X') {\n if (count > 5) {\n throw new IllegalArgumentException(`Too many pattern letters: ${cur}`);\n }\n this.appendOffset(OffsetIdPrinterParser.PATTERNS[count + (count === 1 ? 0 : 1)], 'Z');\n } else if (cur === 'x') {\n if (count > 5) {\n throw new IllegalArgumentException(`Too many pattern letters: ${cur}`);\n }\n const zero = (count === 1 ? '+00' : (count % 2 === 0 ? '+0000' : '+00:00'));\n this.appendOffset(OffsetIdPrinterParser.PATTERNS[count + (count === 1 ? 0 : 1)], zero);\n } else if (cur === 'W') {\n if (count > 1) {\n throw new IllegalArgumentException(`Too many pattern letters: ${cur}`);\n }\n this.appendWeekField('W', count);\n } else if (cur === 'w') {\n if (count > 2) {\n throw new IllegalArgumentException(`Too many pattern letters: ${cur}`);\n }\n this.appendWeekField('w', count);\n } else if (cur === 'Y') {\n this.appendWeekField('Y', count);\n } else {\n throw new IllegalArgumentException(`Unknown pattern letter: ${cur}`);\n }\n pos--;\n\n } else if (cur === '\\'') {\n // parse literals\n const start = pos++;\n for (; pos < pattern.length; pos++) {\n if (pattern.charAt(pos) === '\\'') {\n if (pos + 1 < pattern.length && pattern.charAt(pos + 1) === '\\'') {\n pos++;\n } else {\n break; // end of literal\n }\n }\n }\n if (pos >= pattern.length) {\n throw new IllegalArgumentException(`Pattern ends with an incomplete string literal: ${pattern}`);\n }\n const str = pattern.substring(start + 1, pos);\n if (str.length === 0) {\n this.appendLiteral('\\'');\n } else {\n this.appendLiteral(str.replace('\\'\\'', '\\''));\n }\n\n } else if (cur === '[') {\n this.optionalStart();\n\n } else if (cur === ']') {\n if (this._active._parent === null) {\n throw new IllegalArgumentException('Pattern invalid as it contains ] without previous [');\n }\n this.optionalEnd();\n\n } else if (cur === '{' || cur === '}' || cur === '#') {\n throw new IllegalArgumentException(`Pattern includes reserved character: '${cur}'`);\n } else {\n this.appendLiteral(cur);\n }\n }\n }\n\n _parseField(cur, count, field) {\n switch (cur) {\n case 'u':\n case 'y':\n if (count === 2) {\n this.appendValueReduced(field, 2, 2, ReducedPrinterParser.BASE_DATE);\n } else if (count < 4) {\n this.appendValue(field, count, MAX_WIDTH, SignStyle.NORMAL);\n } else {\n this.appendValue(field, count, MAX_WIDTH, SignStyle.EXCEEDS_PAD);\n }\n break;\n case 'M':\n case 'Q':\n switch (count) {\n case 1:\n this.appendValue(field);\n break;\n case 2:\n this.appendValue(field, 2);\n break;\n case 3:\n this.appendText(field, TextStyle.SHORT);\n break;\n case 4:\n this.appendText(field, TextStyle.FULL);\n break;\n case 5:\n this.appendText(field, TextStyle.NARROW);\n break;\n default:\n throw new IllegalArgumentException(`Too many pattern letters: ${cur}`);\n }\n break;\n case 'L':\n case 'q':\n switch (count) {\n case 1:\n this.appendValue(field);\n break;\n case 2:\n this.appendValue(field, 2);\n break;\n case 3:\n this.appendText(field, TextStyle.SHORT_STANDALONE);\n break;\n case 4:\n this.appendText(field, TextStyle.FULL_STANDALONE);\n break;\n case 5:\n this.appendText(field, TextStyle.NARROW_STANDALONE);\n break;\n default:\n throw new IllegalArgumentException(`Too many pattern letters: ${cur}`);\n }\n break;\n case 'e':\n switch (count) {\n case 1:\n case 2:\n this.appendWeekField('e', count);\n break;\n case 3:\n this.appendText(field, TextStyle.SHORT);\n break;\n case 4:\n this.appendText(field, TextStyle.FULL);\n break;\n case 5:\n this.appendText(field, TextStyle.NARROW);\n break;\n default:\n throw new IllegalArgumentException(`Too many pattern letters: ${cur}`);\n }\n // eslint-disable-next-line no-unreachable\n break;\n case 'c':\n switch (count) {\n case 1:\n this.appendWeekField('c', count);\n break;\n case 2:\n throw new IllegalArgumentException(`Invalid number of pattern letters: ${cur}`);\n case 3:\n this.appendText(field, TextStyle.SHORT_STANDALONE);\n break;\n case 4:\n this.appendText(field, TextStyle.FULL_STANDALONE);\n break;\n case 5:\n this.appendText(field, TextStyle.NARROW_STANDALONE);\n break;\n default:\n throw new IllegalArgumentException(`Too many pattern letters: ${cur}`);\n }\n // eslint-disable-next-line no-unreachable\n break;\n case 'a':\n if (count === 1) {\n this.appendText(field, TextStyle.SHORT);\n } else {\n throw new IllegalArgumentException(`Too many pattern letters: ${cur}`);\n }\n // eslint-disable-next-line no-unreachable\n break;\n case 'E':\n case 'G':\n switch (count) {\n case 1:\n case 2:\n case 3:\n this.appendText(field, TextStyle.SHORT);\n break;\n case 4:\n this.appendText(field, TextStyle.FULL);\n break;\n case 5:\n this.appendText(field, TextStyle.NARROW);\n break;\n default:\n throw new IllegalArgumentException(`Too many pattern letters: ${cur}`);\n }\n // eslint-disable-next-line no-unreachable\n break;\n case 'S':\n this.appendFraction(ChronoField.NANO_OF_SECOND, count, count, false);\n break;\n case 'F':\n if (count === 1) {\n this.appendValue(field);\n } else {\n throw new IllegalArgumentException(`Too many pattern letters: ${cur}`);\n }\n break;\n case 'd':\n case 'h':\n case 'H':\n case 'k':\n case 'K':\n case 'm':\n case 's':\n if (count === 1) {\n this.appendValue(field);\n } else if (count === 2) {\n this.appendValue(field, count);\n } else {\n throw new IllegalArgumentException(`Too many pattern letters: ${cur}`);\n }\n break;\n case 'D':\n if (count === 1) {\n this.appendValue(field);\n } else if (count <= 3) {\n this.appendValue(field, count);\n } else {\n throw new IllegalArgumentException(`Too many pattern letters: ${cur}`);\n }\n break;\n default:\n if (count === 1) {\n this.appendValue(field);\n } else {\n this.appendValue(field, count);\n }\n break;\n }\n }\n\n /**\n * padNext function overloading\n */\n padNext() {\n if (arguments.length === 1) {\n return this._padNext1.apply(this, arguments);\n } else {\n return this._padNext2.apply(this, arguments);\n }\n }\n\n /**\n * Causes the next added printer/parser to pad to a fixed width using a space.\n *\n * This padding will pad to a fixed width using spaces.\n *\n * During formatting, the decorated element will be output and then padded\n * to the specified width. An exception will be thrown during printing if\n * the pad width is exceeded.\n *\n * During parsing, the padding and decorated element are parsed.\n * If parsing is lenient, then the pad width is treated as a maximum.\n * If parsing is case insensitive, then the pad character is matched ignoring case.\n * The padding is parsed greedily. Thus, if the decorated element starts with\n * the pad character, it will not be parsed.\n *\n * @param {number} padWidth the pad width, 1 or greater\n * @return {DateTimeFormatterBuilder} this, for chaining, not null\n * @throws IllegalArgumentException if pad width is too small\n */\n _padNext1(padWidth) {\n return this._padNext2(padWidth, ' ');\n }\n\n /**\n * Causes the next added printer/parser to pad to a fixed width.\n *\n * This padding is intended for padding other than zero-padding.\n * Zero-padding should be achieved using the appendValue methods.\n *\n * During formatting, the decorated element will be output and then padded\n * to the specified width. An exception will be thrown during printing if\n * the pad width is exceeded.\n *\n * During parsing, the padding and decorated element are parsed.\n * If parsing is lenient, then the pad width is treated as a maximum.\n * If parsing is case insensitive, then the pad character is matched ignoring case.\n * The padding is parsed greedily. Thus, if the decorated element starts with\n * the pad character, it will not be parsed.\n *\n * @param {number} padWidth the pad width, 1 or greater\n * @param {String} padChar the pad character\n * @return {DateTimeFormatterBuilder} this, for chaining, not null\n * @throws IllegalArgumentException if pad width is too small\n */\n _padNext2(padWidth, padChar) {\n if (padWidth < 1) {\n throw new IllegalArgumentException(`The pad width must be at least one but was ${padWidth}`);\n }\n this._active._padNextWidth = padWidth;\n this._active._padNextChar = padChar;\n this._active._valueParserIndex = -1;\n return this;\n }\n\n\n //-----------------------------------------------------------------------\n /**\n * Mark the start of an optional section.\n *\n * The output of printing can include optional sections, which may be nested.\n * An optional section is started by calling this method and ended by calling\n * {@link optionalEnd} or by ending the build process.\n *\n * All elements in the optional section are treated as optional.\n * During printing, the section is only output if data is available in the\n * {@link TemporalAccessor} for all the elements in the section.\n * During parsing, the whole section may be missing from the parsed string.\n *\n * For example, consider a builder setup as\n * `builder.appendValue(HOUR_OF_DAY,2).optionalStart().appendValue(MINUTE_OF_HOUR,2)`.\n * The optional section ends automatically at the end of the builder.\n * During printing, the minute will only be output if its value can be obtained from the date-time.\n * During parsing, the input will be successfully parsed whether the minute is present or not.\n *\n * @return {DateTimeFormatterBuilder} this, for chaining, not null\n */\n optionalStart() {\n this._active._valueParserIndex = -1;\n this._active = DateTimeFormatterBuilder._of(this._active, true);\n return this;\n }\n\n /**\n * Ends an optional section.\n *\n * The output of printing can include optional sections, which may be nested.\n * An optional section is started by calling {@link optionalStart} and ended\n * using this method (or at the end of the builder).\n *\n * Calling this method without having previously called `optionalStart`\n * will throw an exception.\n * Calling this method immediately after calling `optionalStart` has no effect\n * on the formatter other than ending the (empty) optional section.\n *\n * All elements in the optional section are treated as optional.\n * During printing, the section is only output if data is available in the\n * {@link TemporalAccessor} for all the elements in the section.\n * During parsing, the whole section may be missing from the parsed string.\n *\n * For example, consider a builder setup as\n * `builder.appendValue(HOUR_OF_DAY,2).optionalStart().appendValue(MINUTE_OF_HOUR,2).optionalEnd()`.\n * During printing, the minute will only be output if its value can be obtained from the date-time.\n * During parsing, the input will be successfully parsed whether the minute is present or not.\n *\n * @return {DateTimeFormatterBuilder} this, for chaining, not null\n * @throws IllegalStateException if there was no previous call to `optionalStart`\n */\n optionalEnd() {\n if (this._active._parent == null) {\n throw new IllegalStateException('Cannot call optionalEnd() as there was no previous call to optionalStart()');\n }\n if (this._active._printerParsers.length > 0) {\n const cpp = new CompositePrinterParser(this._active._printerParsers, this._active._optional);\n this._active = this._active._parent;\n this._appendInternal(cpp);\n } else {\n this._active = this._active._parent;\n }\n return this;\n }\n\n /**\n * Appends a printer and/or parser to the internal list handling padding.\n *\n * @param pp the printer-parser to add, not null\n * @return the index into the active parsers list\n */\n _appendInternal(pp) {\n assert(pp != null);\n if (this._active._padNextWidth > 0) {\n if (pp != null) {\n pp = new PadPrinterParserDecorator(pp, this._active._padNextWidth, this._active._padNextChar);\n }\n this._active._padNextWidth = 0;\n this._active._padNextChar = 0;\n }\n this._active._printerParsers.push(pp);\n this._active._valueParserIndex = -1;\n return this._active._printerParsers.length - 1;\n }\n\n /**\n * Appends a string literal to the formatter.\n *\n * This string will be output during a print.\n *\n * If the literal is empty, nothing is added to the formatter.\n *\n * @param literal the literal to append, not null\n * @return {DateTimeFormatterBuilder} this, for chaining, not null\n */\n appendLiteral(literal) {\n assert(literal != null);\n if (literal.length > 0) {\n if (literal.length === 1) {\n this._appendInternalPrinterParser(new CharLiteralPrinterParser(literal.charAt(0)));\n } else {\n this._appendInternalPrinterParser(new StringLiteralPrinterParser(literal));\n }\n }\n return this;\n }\n\n /**\n * Appends a printer and/or parser to the internal list handling padding.\n *\n * @param pp the printer-parser to add, not null\n * @return the index into the active parsers list\n */\n _appendInternalPrinterParser(pp) {\n assert(pp != null);\n if (this._active._padNextWidth > 0) {\n if (pp != null) {\n pp = new PadPrinterParserDecorator(pp, this._active._padNextWidth, this._active._padNextChar);\n }\n this._active._padNextWidth = 0;\n this._active._padNextChar = 0;\n }\n this._active._printerParsers.push(pp);\n this._active._valueParserIndex = -1;\n return this._active._printerParsers.length - 1;\n }\n\n //-----------------------------------------------------------------------\n /**\n * Appends all the elements of a formatter to the builder.\n *\n * This method has the same effect as appending each of the constituent\n * parts of the formatter directly to this builder.\n *\n * @param {DateTimeFormatter} formatter the formatter to add, not null\n * @return {DateTimeFormatterBuilder} this, for chaining, not null\n */\n append(formatter) {\n requireNonNull(formatter, 'formatter');\n this._appendInternal(formatter._toPrinterParser(false));\n return this;\n }\n\n /**\n * Completes this builder by creating the DateTimeFormatter.\n *\n * This will create a formatter with the specified locale.\n * Numbers will be printed and parsed using the standard non-localized set of symbols.\n *\n * Calling this method will end any open optional sections by repeatedly\n * calling {@link optionalEnd} before creating the formatter.\n *\n * This builder can still be used after creating the formatter if desired,\n * although the state may have been changed by calls to `optionalEnd`.\n *\n * @param resolverStyle the new resolver style\n * @return the created formatter, not null\n */\n toFormatter(resolverStyle=ResolverStyle.SMART) {\n while (this._active._parent != null) {\n this.optionalEnd();\n }\n const pp = new CompositePrinterParser(this._printerParsers, false);\n return new DateTimeFormatter(pp, null, DecimalStyle.STANDARD, resolverStyle, null, null, null);\n }\n\n}\n\n// days in a 400 year cycle = 146097\n// days in a 10,000 year cycle = 146097 * 25\n// seconds per day = 86400\nconst SECONDS_PER_10000_YEARS = 146097 * 25 * 86400;\nconst SECONDS_0000_TO_1970 = ((146097 * 5) - (30 * 365 + 7)) * 86400;\n\n/**\n * Prints or parses an ISO-8601 instant.\n */\nclass InstantPrinterParser {\n\n constructor(fractionalDigits) {\n this.fractionalDigits = fractionalDigits;\n }\n\n print(context, buf) {\n // use INSTANT_SECONDS, thus this code is not bound by Instant.MAX\n const inSecs = context.getValue(ChronoField.INSTANT_SECONDS);\n let inNanos = 0;\n if (context.temporal().isSupported(ChronoField.NANO_OF_SECOND)) {\n inNanos = context.temporal().getLong(ChronoField.NANO_OF_SECOND);\n }\n if (inSecs == null) {\n return false;\n }\n const inSec = inSecs;\n let inNano = ChronoField.NANO_OF_SECOND.checkValidIntValue(inNanos);\n if (inSec >= -SECONDS_0000_TO_1970) {\n // current era\n const zeroSecs = inSec - SECONDS_PER_10000_YEARS + SECONDS_0000_TO_1970;\n const hi = MathUtil.floorDiv(zeroSecs, SECONDS_PER_10000_YEARS) + 1;\n const lo = MathUtil.floorMod(zeroSecs, SECONDS_PER_10000_YEARS);\n const ldt = LocalDateTime.ofEpochSecond(lo - SECONDS_0000_TO_1970, 0, ZoneOffset.UTC);\n if (hi > 0) {\n buf.append('+').append(hi);\n }\n buf.append(ldt.toString());\n if (ldt.second() === 0) {\n buf.append(':00');\n }\n } else {\n // before current era\n const zeroSecs = inSec + SECONDS_0000_TO_1970;\n const hi = MathUtil.intDiv(zeroSecs, SECONDS_PER_10000_YEARS);\n const lo = MathUtil.intMod(zeroSecs, SECONDS_PER_10000_YEARS);\n const ldt = LocalDateTime.ofEpochSecond(lo - SECONDS_0000_TO_1970, 0, ZoneOffset.UTC);\n const pos = buf.length();\n buf.append(ldt.toString());\n if (ldt.second() === 0) {\n buf.append(':00');\n }\n if (hi < 0) {\n if (ldt.year() === -10000) {\n buf.replace(pos, pos + 2, `${hi - 1}`);\n } else if (lo === 0) {\n buf.insert(pos, hi);\n } else {\n buf.insert(pos + 1, Math.abs(hi));\n }\n }\n }\n //fraction\n if (this.fractionalDigits === -2) {\n if (inNano !== 0) {\n buf.append('.');\n if (MathUtil.intMod(inNano, 1000000) === 0) {\n buf.append((`${MathUtil.intDiv(inNano, 1000000) + 1000}`).substring(1));\n } else if (MathUtil.intMod(inNano, 1000) === 0) {\n buf.append((`${MathUtil.intDiv(inNano, 1000) + 1000000}`).substring(1));\n } else {\n buf.append((`${(inNano) + 1000000000}`).substring(1));\n }\n }\n } else if (this.fractionalDigits > 0 || (this.fractionalDigits === -1 && inNano > 0)) {\n buf.append('.');\n let div = 100000000;\n for (let i = 0; ((this.fractionalDigits === -1 && inNano > 0) || i < this.fractionalDigits); i++) {\n const digit = MathUtil.intDiv(inNano, div);\n buf.append(digit);\n inNano = inNano - (digit * div);\n div = MathUtil.intDiv(div, 10);\n }\n }\n buf.append('Z');\n return true;\n }\n\n parse(context, text, position) {\n // new context to avoid overwriting fields like year/month/day\n const newContext = context.copy();\n const minDigits = (this.fractionalDigits < 0 ? 0 : this.fractionalDigits);\n const maxDigits = (this.fractionalDigits < 0 ? 9 : this.fractionalDigits);\n const parser = new DateTimeFormatterBuilder()\n .append(DateTimeFormatter.ISO_LOCAL_DATE).appendLiteral('T')\n .appendValue(ChronoField.HOUR_OF_DAY, 2).appendLiteral(':').appendValue(ChronoField.MINUTE_OF_HOUR, 2).appendLiteral(':')\n .appendValue(ChronoField.SECOND_OF_MINUTE, 2).appendFraction(ChronoField.NANO_OF_SECOND, minDigits, maxDigits, true).appendLiteral('Z')\n .toFormatter()._toPrinterParser(false);\n const pos = parser.parse(newContext, text, position);\n if (pos < 0) {\n return pos;\n }\n // parser restricts most fields to 2 digits, so definitely int\n // correctly parsed nano is also guaranteed to be valid\n const yearParsed = newContext.getParsed(ChronoField.YEAR);\n const month = newContext.getParsed(ChronoField.MONTH_OF_YEAR);\n const day = newContext.getParsed(ChronoField.DAY_OF_MONTH);\n let hour = newContext.getParsed(ChronoField.HOUR_OF_DAY);\n const min = newContext.getParsed(ChronoField.MINUTE_OF_HOUR);\n const secVal = newContext.getParsed(ChronoField.SECOND_OF_MINUTE);\n const nanoVal = newContext.getParsed(ChronoField.NANO_OF_SECOND);\n let sec = (secVal != null ? secVal : 0);\n const nano = (nanoVal != null ? nanoVal : 0);\n const year = MathUtil.intMod(yearParsed, 10000);\n let days = 0;\n if (hour === 24 && min === 0 && sec === 0 && nano === 0) {\n hour = 0;\n days = 1;\n } else if (hour === 23 && min === 59 && sec === 60) {\n context.setParsedLeapSecond();\n sec = 59;\n }\n let instantSecs;\n try {\n const ldt = LocalDateTime.of(year, month, day, hour, min, sec, 0).plusDays(days);\n instantSecs = ldt.toEpochSecond(ZoneOffset.UTC);\n instantSecs += MathUtil.safeMultiply(MathUtil.intDiv(yearParsed, 10000), SECONDS_PER_10000_YEARS);\n } catch (ex) {\n return ~position;\n }\n let successPos = pos;\n successPos = context.setParsedField(ChronoField.INSTANT_SECONDS, instantSecs, position, successPos);\n return context.setParsedField(ChronoField.NANO_OF_SECOND, nano, position, successPos);\n }\n\n toString() {\n return 'Instant()';\n }\n}\n\n/**\n * Used by parseDefaulting().\n * @implements {DateTimePrinterParser}\n * @private\n */\nclass DefaultingParser {\n /**\n * @param {TemporalField} field \n * @param {number} value \n */\n constructor(field, value) {\n this._field = field;\n this._value = value;\n }\n\n /**\n * @param {DateTimePrintContext} context\n * @param {StringBuilder} buf\n * @return {boolean}\n */\n print() {\n return true;\n }\n\n\n /** \n * @param {DateTimeParseContext} context \n * @param {string} text\n * @param {number} position \n * @returns {number}\n */\n parse(context, text, position) {\n if (context.getParsed(this._field) == null) {\n context.setParsedField(this._field, this._value, position, position);\n }\n return position;\n }\n}\n\nexport function _init() {\n ReducedPrinterParser.BASE_DATE = LocalDate.of(2000, 1, 1);\n\n DateTimeFormatterBuilder.CompositePrinterParser = CompositePrinterParser;\n DateTimeFormatterBuilder.PadPrinterParserDecorator = PadPrinterParserDecorator;\n DateTimeFormatterBuilder.SettingsParser = SettingsParser;\n DateTimeFormatterBuilder.CharLiteralPrinterParser = StringLiteralPrinterParser;\n DateTimeFormatterBuilder.StringLiteralPrinterParser = StringLiteralPrinterParser;\n DateTimeFormatterBuilder.CharLiteralPrinterParser = CharLiteralPrinterParser;\n DateTimeFormatterBuilder.NumberPrinterParser = NumberPrinterParser;\n DateTimeFormatterBuilder.ReducedPrinterParser = ReducedPrinterParser;\n DateTimeFormatterBuilder.FractionPrinterParser = FractionPrinterParser;\n DateTimeFormatterBuilder.OffsetIdPrinterParser = OffsetIdPrinterParser;\n DateTimeFormatterBuilder.ZoneIdPrinterParser = ZoneIdPrinterParser;\n}\n","/*\n * @copyright (c) 2016, Philipp Thürwächter & Pattrick Hüper\n * @license BSD-3-Clause (see LICENSE in the root directory of this source tree)\n */\n\n/**\n * @private\n */\nexport class StringBuilder {\n constructor(){\n this._str = '';\n }\n\n append(str){\n this._str += str;\n return this;\n }\n\n appendChar(str){\n this._str += str[0];\n return this;\n }\n\n insert(offset, str){\n this._str = this._str.slice(0, offset) + str + this._str.slice(offset);\n return this;\n }\n\n replace(start, end, str){\n this._str = this._str.slice(0, start) + str + this._str.slice(end);\n return this;\n }\n\n length(){\n return this._str.length;\n }\n\n setLength(length){\n this._str = this._str.slice(0, length);\n return this;\n }\n\n\n toString() {\n return this._str;\n }\n}\n","/**\n * @copyright (c) 2016, Philipp Thürwächter & Pattrick Hüper\n * @copyright (c) 2007-present, Stephen Colebourne & Michael Nascimento Santos\n * @license BSD-3-Clause (see LICENSE in the root directory of this source tree)\n */\n\nimport { assert, requireNonNull } from '../assert';\n\nimport { DateTimeParseException, NullPointerException } from '../errors';\n\nimport { Period } from '../Period';\n\nimport { ParsePosition } from './ParsePosition';\nimport { DateTimeBuilder } from './DateTimeBuilder';\nimport { DateTimeParseContext } from './DateTimeParseContext';\nimport { DateTimePrintContext } from './DateTimePrintContext';\nimport { DateTimeFormatterBuilder } from './DateTimeFormatterBuilder';\nimport { SignStyle } from './SignStyle';\nimport { StringBuilder } from './StringBuilder';\nimport { ResolverStyle } from './ResolverStyle';\n\nimport { IsoChronology } from '../chrono/IsoChronology';\nimport { ChronoField } from '../temporal/ChronoField';\nimport { createTemporalQuery } from '../temporal/TemporalQuery';\n\n/**\n *\n * ### Static properties of Class {@link DateTimeFormatter}\n *\n * DateTimeFormatter.ISO_LOCAL_DATE\n *\n * DateTimeFormatter.ISO_LOCAL_TIME\n *\n * DateTimeFormatter.ISO_LOCAL_DATE_TIME\n *\n */\nexport class DateTimeFormatter {\n\n //-----------------------------------------------------------------------\n /**\n * A query that provides access to the excess days that were parsed.\n *\n * This returns a singleton {@link TemporalQuery} that provides\n * access to additional information from the parse. The query always returns\n * a non-null period, with a zero period returned instead of null.\n *\n * There are two situations where this query may return a non-zero period.\n *\n * * If the {@link ResolverStyle} is {@link LENIENT} and a time is parsed\n * without a date, then the complete result of the parse consists of a\n * {@link LocalTime} and an excess {@link Period} in days.\n * * If the {@link ResolverStyle} is {@link SMART} and a time is parsed\n * without a date where the time is 24:00:00, then the complete result of\n * the parse consists of a {@link LocalTime} of 00:00:00 and an excess\n * {@link Period} of one day.\n *\n * In both cases, if a complete {@link ChronoLocalDateTime} or {@link Instant}\n * is parsed, then the excess days are added to the date part.\n * As a result, this query will return a zero period.\n *\n * The {@link SMART} behaviour handles the common \"end of day\" 24:00 value.\n * Processing in {@link LENIENT} mode also produces the same result:\n *
\n     *  Text to parse        Parsed object                         Excess days\n     *  \"2012-12-03T00:00\"   LocalDateTime.of(2012, 12, 3, 0, 0)   ZERO\n     *  \"2012-12-03T24:00\"   LocalDateTime.of(2012, 12, 4, 0, 0)   ZERO\n     *  \"00:00\"              LocalTime.of(0, 0)                    ZERO\n     *  \"24:00\"              LocalTime.of(0, 0)                    Period.ofDays(1)\n     * 
\n * The query can be used as follows:\n *
\n     *  TemporalAccessor parsed = formatter.parse(str);\n     *  LocalTime time = parsed.query(LocalTime.FROM);\n     *  Period extraDays = parsed.query(DateTimeFormatter.parsedExcessDays());\n     * 
\n * @return {TemporalQuery} a query that provides access to the excess days that were parsed\n */\n static parsedExcessDays() {\n return DateTimeFormatter.PARSED_EXCESS_DAYS;\n }\n\n /**\n * A query that provides access to whether a leap-second was parsed.\n *\n * This returns a singleton {@link TemporalQuery} that provides\n * access to additional information from the parse. The query always returns\n * a non-null boolean, true if parsing saw a leap-second, false if not.\n *\n * Instant parsing handles the special \"leap second\" time of '23:59:60'.\n * Leap seconds occur at '23:59:60' in the UTC time-zone, but at other\n * local times in different time-zones. To avoid this potential ambiguity,\n * the handling of leap-seconds is limited to\n * {@link DateTimeFormatterBuilder#appendInstant}, as that method\n * always parses the instant with the UTC zone offset.\n *\n * If the time '23:59:60' is received, then a simple conversion is applied,\n * replacing the second-of-minute of 60 with 59. This query can be used\n * on the parse result to determine if the leap-second adjustment was made.\n * The query will return one second of excess if it did adjust to remove\n * the leap-second, and zero if not. Note that applying a leap-second\n * smoothing mechanism, such as UTC-SLS, is the responsibility of the\n * application, as follows:\n *
\n     *  TemporalAccessor parsed = formatter.parse(str);\n     *  Instant instant = parsed.query(Instant::from);\n     *  if (parsed.query(DateTimeFormatter.parsedLeapSecond())) {\n     *    // validate leap-second is correct and apply correct smoothing\n     *  }\n     * 
\n * @return a query that provides access to whether a leap-second was parsed\n */\n static parsedLeapSecond() {\n return DateTimeFormatter.PARSED_LEAP_SECOND;\n }\n\n /**\n * Creates a formatter using the specified pattern.\n *\n * This method will create a formatter based on a simple pattern of letters and symbols.\n *\n * The returned formatter will use the default locale, but this can be changed\n * using {@link DateTimeFormatter.withLocale}.\n *\n * All letters 'A' to 'Z' and 'a' to 'z' are reserved as pattern letters.\n * The following pattern letters are defined:\n *
\n     *  |Symbol  |Meaning                     |Presentation      |Examples\n     *  |--------|----------------------------|------------------|----------------------------------------------------\n     *  | G      | era                        | number/text      | 1; 01; AD; Anno Domini\n     *  | u      | year                       | year             | 2004; 04\n     *  | y      | year-of-era                | year             | 2004; 04\n     *  | D      | day-of-year                | number           | 189\n     *  | M      | month-of-year              | number/text      | 7; 07; Jul; July; J\n     *  | d      | day-of-month               | number           | 10\n     *  |        |                            |                  |\n     *  | Q      | quarter-of-year            | number/text      | 3; 03; Q3\n     *  | Y      | week-based-year            | year             | 1996; 96\n     *  | w      | week-of-year               | number           | 27\n     *  | W      | week-of-month              | number           | 27\n     *  | e      | localized day-of-week      | number           | 2; Tue; Tuesday; T\n     *  | E      | day-of-week                | number/text      | 2; Tue; Tuesday; T\n     *  | F      | week-of-month              | number           | 3\n     *  |        |                            |                  |\n     *  | a      | am-pm-of-day               | text             | PM\n     *  | h      | clock-hour-of-am-pm (1-12) | number           | 12\n     *  | K      | hour-of-am-pm (0-11)       | number           | 0\n     *  | k      | clock-hour-of-am-pm (1-24) | number           | 0\n     *  |        |                            |                  |\n     *  | H      | hour-of-day (0-23)         | number           | 0\n     *  | m      | minute-of-hour             | number           | 30\n     *  | s      | second-of-minute           | number           | 55\n     *  | S      | fraction-of-second         | fraction         | 978\n     *  | A      | milli-of-day               | number           | 1234\n     *  | n      | nano-of-second             | number           | 987654321\n     *  | N      | nano-of-day                | number           | 1234000000\n     *  |        |                            |                  |\n     *  | V      | time-zone ID               | zone-id          | America/Los_Angeles; Z; -08:30\n     *  | z      | time-zone name             | zone-name        | Pacific Standard Time; PST\n     *  | X      | zone-offset 'Z' for zero   | offset-X         | Z; -08; -0830; -08:30; -083015; -08:30:15;\n     *  | x      | zone-offset                | offset-x         | +0000; -08; -0830; -08:30; -083015; -08:30:15;\n     *  | Z      | zone-offset                | offset-Z         | +0000; -0800; -08:00;\n     *  |        |                            |                  |\n     *  | p      | pad next                   | pad modifier     | 1\n     *  |        |                            |                  |\n     *  | '      | escape for text            | delimiter        |\n     *  | ''     | single quote               | literal          | '\n     *  | [      | optional section start     |                  |\n     *  | ]      | optional section end       |                  |\n     *  | {}     | reserved for future use    |                  |\n     * 
\n *\n * The count of pattern letters determine the format.\n *\n * **Text**: The text style is determined based on the number of pattern letters used.\n * Less than 4 pattern letters will use the short form `TextStyle.SHORT`.\n * Exactly 4 pattern letters will use the full form `TextStyle.FULL`.\n * Exactly 5 pattern letters will use the narrow form `TextStyle.NARROW`.\n *\n * **NOTE**: since text styles require locale support, they are currently not supported in js-joda!\n *\n * **Number**: If the count of letters is one, then the value is printed using the minimum number\n * of digits and without padding as per {@link DateTimeFormatterBuilder.appendValue}.\n * Otherwise, the count of digits is used as the width of the output field as per\n * {@link DateTimeFormatterBuilder.appendValue}.\n *\n * **Number/Text**: If the count of pattern letters is 3 or greater, use the Text rules above.\n * Otherwise use the Number rules above.\n *\n * **Fraction**: Outputs the nano-of-second field as a fraction-of-second.\n * The nano-of-second value has nine digits, thus the count of pattern letters is from 1 to 9.\n * If it is less than 9, then the nano-of-second value is truncated, with only the most\n * significant digits being output.\n * When parsing in strict mode, the number of parsed digits must match the count of pattern letters.\n * When parsing in lenient mode, the number of parsed digits must be at least the count of pattern\n * letters, up to 9 digits.\n *\n * **Year**: The count of letters determines the minimum field width below which padding is used.\n * If the count of letters is two, then a {@link DateTimeFormatterBuilder.appendValueReduced}\n * two digit form is used.\n * For printing, this outputs the rightmost two digits. For parsing, this will parse using the\n * base value of 2000, resulting in a year within the range 2000 to 2099 inclusive.\n * If the count of letters is less than four (but not two), then the sign is only output for negative\n * years as per `SignStyle.NORMAL`.\n * Otherwise, the sign is output if the pad width is exceeded, as per `SignStyle.EXCEEDS_PAD`\n *\n * **ZoneId**: This outputs the time-zone ID, such as 'Europe/Paris'.\n * If the count of letters is two, then the time-zone ID is output.\n * Any other count of letters throws `IllegalArgumentException`.\n *\n * **Zone names**: This outputs the display name of the time-zone ID.\n * If the count of letters is one, two or three, then the short name is output.\n * If the count of letters is four, then the full name is output.\n * Five or more letters throws `IllegalArgumentException`.\n *\n * **NOTE**: since zone ids and name require the iana tzdb, they are currently not supported in js-joda!\n *\n * **Offset X and x**: This formats the offset based on the number of pattern letters.\n * One letter outputs just the hour', such as '+01', unless the minute is non-zero\n * in which case the minute is also output, such as '+0130'.\n * Two letters outputs the hour and minute, without a colon, such as '+0130'.\n * Three letters outputs the hour and minute, with a colon, such as '+01:30'.\n * Four letters outputs the hour and minute and optional second, without a colon, such as '+013015'.\n * Five letters outputs the hour and minute and optional second, with a colon, such as '+01:30:15'.\n * Six or more letters throws `IllegalArgumentException`.\n * Pattern letter 'X' (upper case) will output 'Z' when the offset to be output would be zero,\n * whereas pattern letter 'x' (lower case) will output '+00', '+0000', or '+00:00'.\n *\n * **Offset Z**: This formats the offset based on the number of pattern letters.\n * One, two or three letters outputs the hour and minute, without a colon, such as '+0130'.\n * Four or more letters throws `IllegalArgumentException`.\n * The output will be '+0000' when the offset is zero.\n *\n * **Optional section**: The optional section markers work exactly like calling\n * {@link DateTimeFormatterBuilder.optionalStart} and {@link DateTimeFormatterBuilder.optionalEnd}.\n *\n * **Pad modifier**: Modifies the pattern that immediately follows to be padded with spaces.\n * The pad width is determined by the number of pattern letters.\n * This is the same as calling {@link DateTimeFormatterBuilder.padNext}.\n *\n * For example, 'ppH' outputs the hour-of-day padded on the left with spaces to a width of 2.\n *\n * Any unrecognized letter is an error.\n * Any non-letter character, other than '[', ']', '{', '}' and the single quote will be output directly.\n * Despite this, it is recommended to use single quotes around all characters that you want to\n * output directly to ensure that future changes do not break your application.\n *\n * @param {String} pattern the pattern to use, not null\n * @return {DateTimeFormatter} the formatter based on the pattern, not null\n * @throws IllegalArgumentException if the pattern is invalid\n * @see DateTimeFormatterBuilder#appendPattern(String)\n * @example\n * var s = LocalDate.parse('2016-04-01').format(DateTimeFormatter.ofPattern('d MM yyyy'));\n * console.log(s); // '1 04 2016'\n *\n */\n static ofPattern(pattern) {\n return new DateTimeFormatterBuilder().appendPattern(pattern).toFormatter();\n }\n\n\n //-----------------------------------------------------------------------\n /**\n * Constructor.\n *\n * @param printerParser the printer/parser to use, not null\n * @param locale the locale to use, not null\n * @param decimalStyle the decimal style to use, not null\n * @param resolverStyle the resolver style to use, not null\n * @param resolverFields the fields to use during resolving, null for all fields\n * @param chrono the chronology to use, null for no override\n * @param zone the zone to use, null for no override\n * @private\n */\n constructor(printerParser, locale, decimalStyle, resolverStyle, resolverFields, chrono=IsoChronology.INSTANCE, zone) {\n assert(printerParser != null);\n assert(decimalStyle != null);\n assert(resolverStyle != null);\n /**\n * The printer and/or parser to use, not null.\n */\n this._printerParser = printerParser;\n /**\n * The locale to use for formatting. // nyi\n */\n this._locale = locale;\n /**\n * The symbols to use for formatting, not null.\n */\n this._decimalStyle = decimalStyle;\n /**\n * The resolver style to use, not null.\n */\n this._resolverStyle = resolverStyle;\n /**\n * The fields to use in resolving, null for all fields.\n */\n this._resolverFields = resolverFields;\n /**\n * The chronology to use for formatting, null for no override.\n */\n this._chrono = chrono;\n /**\n * The zone to use for formatting, null for no override. // nyi\n */\n this._zone = zone;\n }\n\n locale() {\n return this._locale;\n }\n\n decimalStyle() {\n return this._decimalStyle;\n }\n\n chronology() {\n return this._chrono;\n }\n\n /**\n * Returns a copy of this formatter with a new override chronology.\n *\n * This returns a formatter with similar state to this formatter but\n * with the override chronology set.\n * By default, a formatter has no override chronology, returning null.\n *\n * If an override is added, then any date that is printed or parsed will be affected.\n *\n * When printing, if the {@link Temporal} object contains a date then it will\n * be converted to a date in the override chronology.\n * Any time or zone will be retained unless overridden.\n * The converted result will behave in a manner equivalent to an implementation\n * of {@link ChronoLocalDate},{@link ChronoLocalDateTime} or {@link ChronoZonedDateTime}.\n *\n * When parsing, the override chronology will be used to interpret the\n * {@link ChronoField} into a date unless the\n * formatter directly parses a valid chronology.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param chrono the new chronology, not null\n * @return a formatter based on this formatter with the requested override chronology, not null\n */\n withChronology(chrono) {\n if (this._chrono != null && this._chrono.equals(chrono)) {\n return this;\n }\n return new DateTimeFormatter(this._printerParser, this._locale, this._decimalStyle,\n this._resolverStyle, this._resolverFields, chrono, this._zone);\n }\n\n /**\n * not yet supported\n * @returns {DateTimeFormatter}\n */\n withLocale(){\n return this;\n }\n\n /**\n * Returns a copy of this formatter with a new resolver style.\n *

\n * This returns a formatter with similar state to this formatter but\n * with the resolver style set. By default, a formatter has the\n * {@link ResolverStyle#SMART SMART} resolver style.\n *

\n * Changing the resolver style only has an effect during parsing.\n * Parsing a text string occurs in two phases.\n * Phase 1 is a basic text parse according to the fields added to the builder.\n * Phase 2 resolves the parsed field-value pairs into date and/or time objects.\n * The resolver style is used to control how phase 2, resolving, happens.\n * See {@link ResolverStyle} for more information on the options available.\n *

\n * This instance is immutable and unaffected by this method call.\n *\n * @param {ResolverStyle} resolverStyle the new resolver style, not null\n * @return {DateTimeFormatter} a formatter based on this formatter with the requested resolver style, not null\n */\n withResolverStyle(resolverStyle) {\n requireNonNull(resolverStyle, 'resolverStyle');\n if (resolverStyle.equals(this._resolverStyle)) {\n return this;\n }\n return new DateTimeFormatter(this._printerParser, this._locale, this._decimalStyle, resolverStyle, this._resolverFields, this._chrono, this._zone);\n }\n //-----------------------------------------------------------------------\n /**\n * Formats a date-time object using this formatter.\n *\n * This formats the date-time to a String using the rules of the formatter.\n *\n * @param {TemporalAccessor} temporal the temporal object to print, not null\n * @return {String} the printed string, not null\n * @throws DateTimeException if an error occurs during formatting\n */\n format(temporal) {\n const buf = new StringBuilder(32);\n this._formatTo(temporal, buf);\n return buf.toString();\n }\n\n //-----------------------------------------------------------------------\n /**\n * Formats a date-time object to an {@link Appendable} using this formatter.\n *\n * This formats the date-time to the specified destination.\n * {@link Appendable} is a general purpose interface that is implemented by all\n * key character output classes including {@link StringBuffer}, {@link StringBuilder},\n * {@link PrintStream} and {@link Writer}.\n *\n * Although {@link Appendable} methods throw an {@link IOException}, this method does not.\n * Instead, any {@link IOException} is wrapped in a runtime exception.\n *\n * @param {TemporalAccessor} temporal - the temporal object to print, not null\n * @param {StringBuilder} appendable - the appendable to print to, not null\n * @throws DateTimeException if an error occurs during formatting\n */\n _formatTo(temporal, appendable) {\n requireNonNull(temporal, 'temporal');\n requireNonNull(appendable, 'appendable');\n const context = new DateTimePrintContext(temporal, this);\n this._printerParser.print(context, appendable);\n }\n\n /**\n * function overloading for {@link DateTimeFormatter.parse}\n *\n * if called with one arg {@link DateTimeFormatter.parse1} is called\n * otherwise {@link DateTimeFormatter.parse2}\n *\n * @param {string} text\n * @param {TemporalQuery} type\n * @return {TemporalAccessor}\n */\n parse(text, type){\n if(arguments.length === 1){\n return this.parse1(text);\n } else {\n return this.parse2(text, type);\n }\n }\n\n /**\n * Fully parses the text producing a temporal object.\n *\n * This parses the entire text producing a temporal object.\n * It is typically more useful to use {@link parse}.\n * The result of this method is {@link TemporalAccessor} which has been resolved,\n * applying basic validation checks to help ensure a valid date-time.\n *\n * If the parse completes without reading the entire length of the text,\n * or a problem occurs during parsing or merging, then an exception is thrown.\n *\n * @param {String} text the text to parse, not null\n * @return {TemporalAccessor} the parsed temporal object, not null\n * @throws DateTimeParseException if unable to parse the requested result\n */\n parse1(text) {\n requireNonNull(text, 'text');\n try {\n return this._parseToBuilder(text, null).resolve(this._resolverStyle, this._resolverFields);\n } catch (ex) {\n if(ex instanceof DateTimeParseException){\n throw ex;\n } else {\n throw this._createError(text, ex);\n }\n }\n }\n\n /**\n * Fully parses the text producing a temporal object.\n *\n * This parses the entire text producing a temporal object.\n * It is typically more useful to use {@link parse}.\n * The result of this method is {@link TemporalAccessor} which has been resolved,\n * applying basic validation checks to help ensure a valid date-time.\n *\n * If the parse completes without reading the entire length of the text,\n * or a problem occurs during parsing or merging, then an exception is thrown.\n *\n * @param text the text to parse, not null\n * @param type the type to extract, not null\n * @return the parsed temporal object, not null\n * @throws DateTimeParseException if unable to parse the requested result\n */\n parse2(text, type) {\n requireNonNull(text, 'text');\n requireNonNull(type, 'type');\n try {\n const builder = this._parseToBuilder(text, null).resolve(this._resolverStyle, this._resolverFields);\n return builder.build(type);\n } catch (ex) {\n if(ex instanceof DateTimeParseException){\n throw ex;\n } else {\n throw this._createError(text, ex);\n }\n }\n }\n\n _createError(text, ex) {\n let abbr = '';\n if (text.length > 64) {\n abbr = `${text.substring(0, 64)}...`;\n } else {\n abbr = text;\n }\n return new DateTimeParseException(`Text '${abbr}' could not be parsed: ${ex.message}`, text, 0, ex);\n }\n\n\n /**\n * Parses the text to a builder.\n *\n * This parses to a {@link DateTimeBuilder} ensuring that the text is fully parsed.\n * This method throws {@link DateTimeParseException} if unable to parse, or\n * some other {@link DateTimeException} if another date/time problem occurs.\n *\n * @param text the text to parse, not null\n * @param position the position to parse from, updated with length parsed\n * and the index of any error, null if parsing whole string\n * @return the engine representing the result of the parse, not null\n * @throws DateTimeParseException if the parse fails\n */\n _parseToBuilder(text, position) {\n const pos = (position != null ? position : new ParsePosition(0));\n const result = this._parseUnresolved0(text, pos);\n if (result == null || pos.getErrorIndex() >= 0 || (position == null && pos.getIndex() < text.length)) {\n let abbr = '';\n if (text.length > 64) {\n abbr = `${text.substr(0, 64).toString()}...`;\n } else {\n abbr = text;\n }\n if (pos.getErrorIndex() >= 0) {\n throw new DateTimeParseException(`Text '${abbr}' could not be parsed at index ${ \n pos.getErrorIndex()}`, text, pos.getErrorIndex());\n } else {\n throw new DateTimeParseException(`Text '${abbr}' could not be parsed, unparsed text found at index ${ \n pos.getIndex()}`, text, pos.getIndex());\n }\n }\n return result.toBuilder();\n }\n\n /**\n * Parses the text using this formatter, without resolving the result, intended\n * for advanced use cases.\n *\n * Parsing is implemented as a two-phase operation.\n * First, the text is parsed using the layout defined by the formatter, producing\n * a {@link Map} of field to value, a {@link ZoneId} and a {@link Chronology}.\n * Second, the parsed data is *resolved*, by validating, combining and\n * simplifying the various fields into more useful ones.\n * This method performs the parsing stage but not the resolving stage.\n *\n * The result of this method is {@link TemporalAccessor} which represents the\n * data as seen in the input. Values are not validated, thus parsing a date string\n * of '2012-00-65' would result in a temporal with three fields - year of '2012',\n * month of '0' and day-of-month of '65'.\n *\n * The text will be parsed from the specified start {@link ParsePosition}.\n * The entire length of the text does not have to be parsed, the {@link ParsePosition}\n * will be updated with the index at the end of parsing.\n *\n * Errors are returned using the error index field of the {@link ParsePosition}\n * instead of {@link DateTimeParseException}.\n * The returned error index will be set to an index indicative of the error.\n * Callers must check for errors before using the context.\n *\n * If the formatter parses the same field more than once with different values,\n * the result will be an error.\n *\n * This method is intended for advanced use cases that need access to the\n * internal state during parsing. Typical application code should use\n * {@link parse} or the parse method on the target type.\n *\n * @param text the text to parse, not null\n * @param position the position to parse from, updated with length parsed\n * and the index of any error, not null\n * @return the parsed text, null if the parse results in an error\n * @throws DateTimeException if some problem occurs during parsing\n * @throws IndexOutOfBoundsException if the position is invalid\n */\n parseUnresolved(text, position) {\n return this._parseUnresolved0(text, position);\n }\n\n _parseUnresolved0(text, position) {\n assert(text != null, 'text', NullPointerException);\n assert(position != null, 'position', NullPointerException);\n const context = new DateTimeParseContext(this);\n let pos = position.getIndex();\n pos = this._printerParser.parse(context, text, pos);\n if (pos < 0) {\n position.setErrorIndex(~pos); // index not updated from input\n return null;\n }\n position.setIndex(pos); // errorIndex not updated from input\n return context.toParsed();\n }\n\n /**\n * Returns the formatter as a composite printer parser.\n *\n * @param {boolean} optional whether the printer/parser should be optional\n * @return {CompositePrinterParser} the printer/parser, not null\n */\n _toPrinterParser(optional) {\n return this._printerParser.withOptional(optional);\n }\n\n /**\n *\n * @returns {string}\n */\n toString() {\n const pattern = this._printerParser.toString();\n return pattern.indexOf('[') === 0 ? pattern : pattern.substring(1, pattern.length - 1);\n }\n\n}\n\nexport function _init() {\n\n DateTimeFormatter.ISO_LOCAL_DATE = new DateTimeFormatterBuilder()\n .appendValue(ChronoField.YEAR, 4, 10, SignStyle.EXCEEDS_PAD)\n .appendLiteral('-')\n .appendValue(ChronoField.MONTH_OF_YEAR, 2)\n .appendLiteral('-')\n .appendValue(ChronoField.DAY_OF_MONTH, 2)\n .toFormatter(ResolverStyle.STRICT).withChronology(IsoChronology.INSTANCE);\n\n DateTimeFormatter.ISO_LOCAL_TIME = new DateTimeFormatterBuilder()\n .appendValue(ChronoField.HOUR_OF_DAY, 2)\n .appendLiteral(':')\n .appendValue(ChronoField.MINUTE_OF_HOUR, 2)\n .optionalStart()\n .appendLiteral(':')\n .appendValue(ChronoField.SECOND_OF_MINUTE, 2)\n .optionalStart()\n .appendFraction(ChronoField.NANO_OF_SECOND, 0, 9, true)\n .toFormatter(ResolverStyle.STRICT);\n\n DateTimeFormatter.ISO_LOCAL_DATE_TIME = new DateTimeFormatterBuilder()\n .parseCaseInsensitive()\n .append(DateTimeFormatter.ISO_LOCAL_DATE)\n .appendLiteral('T')\n .append(DateTimeFormatter.ISO_LOCAL_TIME)\n .toFormatter(ResolverStyle.STRICT).withChronology(IsoChronology.INSTANCE);\n\n DateTimeFormatter.ISO_INSTANT = new DateTimeFormatterBuilder()\n .parseCaseInsensitive()\n .appendInstant()\n .toFormatter(ResolverStyle.STRICT);\n\n DateTimeFormatter.ISO_OFFSET_DATE_TIME = new DateTimeFormatterBuilder()\n .parseCaseInsensitive()\n .append(DateTimeFormatter.ISO_LOCAL_DATE_TIME)\n .appendOffsetId()\n .toFormatter(ResolverStyle.STRICT).withChronology(IsoChronology.INSTANCE);\n\n DateTimeFormatter.ISO_ZONED_DATE_TIME = new DateTimeFormatterBuilder()\n .append(DateTimeFormatter.ISO_OFFSET_DATE_TIME)\n .optionalStart()\n .appendLiteral('[')\n .parseCaseSensitive()\n .appendZoneId()\n // .appendZoneRegionId()\n .appendLiteral(']')\n .toFormatter(ResolverStyle.STRICT).withChronology(IsoChronology.INSTANCE);\n\n DateTimeFormatter.BASIC_ISO_DATE = new DateTimeFormatterBuilder()\n .appendValue(ChronoField.YEAR, 4, 10, SignStyle.EXCEEDS_PAD)\n .appendValue(ChronoField.MONTH_OF_YEAR, 2)\n .appendValue(ChronoField.DAY_OF_MONTH, 2)\n .toFormatter(ResolverStyle.STRICT).withChronology(IsoChronology.INSTANCE);\n\n DateTimeFormatter.ISO_OFFSET_DATE = new DateTimeFormatterBuilder()\n .parseCaseInsensitive()\n .append(DateTimeFormatter.ISO_LOCAL_DATE)\n .appendOffsetId()\n .toFormatter(ResolverStyle.STRICT).withChronology(IsoChronology.INSTANCE);\n\n DateTimeFormatter.ISO_OFFSET_TIME = new DateTimeFormatterBuilder()\n .parseCaseInsensitive()\n .append(DateTimeFormatter.ISO_LOCAL_TIME)\n .appendOffsetId()\n .toFormatter(ResolverStyle.STRICT).withChronology(IsoChronology.INSTANCE);\n\n DateTimeFormatter.ISO_ORDINAL_DATE = new DateTimeFormatterBuilder()\n .appendValue(ChronoField.YEAR, 4, 10, SignStyle.EXCEEDS_PAD)\n .appendLiteral('-')\n .appendValue(ChronoField.DAY_OF_YEAR)\n .toFormatter(ResolverStyle.STRICT);\n\n DateTimeFormatter.ISO_WEEK_DATE = new DateTimeFormatterBuilder()\n .appendValue(ChronoField.YEAR, 4, 10, SignStyle.EXCEEDS_PAD)\n .appendLiteral('-W')\n .appendValue(ChronoField.ALIGNED_WEEK_OF_YEAR)\n .appendLiteral('-')\n .appendValue(ChronoField.DAY_OF_WEEK)\n .toFormatter(ResolverStyle.STRICT);\n\n DateTimeFormatter.ISO_DATE = new DateTimeFormatterBuilder()\n .parseCaseInsensitive()\n .append(DateTimeFormatter.ISO_LOCAL_DATE)\n .optionalStart()\n .appendOffsetId()\n .optionalEnd()\n .toFormatter(ResolverStyle.STRICT).withChronology(IsoChronology.INSTANCE);\n\n DateTimeFormatter.ISO_TIME = new DateTimeFormatterBuilder()\n .parseCaseInsensitive()\n .append(DateTimeFormatter.ISO_LOCAL_TIME)\n .optionalStart()\n .appendOffsetId()\n .optionalEnd()\n .toFormatter(ResolverStyle.STRICT);\n\n DateTimeFormatter.ISO_DATE_TIME = new DateTimeFormatterBuilder()\n .append(DateTimeFormatter.ISO_LOCAL_DATE_TIME)\n .optionalStart()\n .appendOffsetId()\n .optionalEnd()\n .toFormatter(ResolverStyle.STRICT).withChronology(IsoChronology.INSTANCE);\n\n // TODO:\n // RFC_1123_DATE_TIME - https://www.threeten.org/threetenbp/apidocs/org/threeten/bp/format/DateTimeFormatter.html#RFC_1123_DATE_TIME\n\n DateTimeFormatter.PARSED_EXCESS_DAYS = createTemporalQuery('PARSED_EXCESS_DAYS', (temporal) => {\n if (temporal instanceof DateTimeBuilder) {\n return temporal.excessDays;\n } else {\n return Period.ZERO;\n }\n });\n\n DateTimeFormatter.PARSED_LEAP_SECOND = createTemporalQuery('PARSED_LEAP_SECOND', (temporal) => {\n if (temporal instanceof DateTimeBuilder) {\n return temporal.leapSecond;\n } else {\n return false;\n }\n });\n\n\n}\n","/*\n * @copyright (c) 2016, Philipp Thürwächter & Pattrick Hüper\n * @license BSD-3-Clause (see LICENSE.md in the root directory of this source tree)\n */\n\nimport { requireNonNull, requireInstance } from './assert';\nimport { DateTimeException, UnsupportedTemporalTypeException } from './errors';\nimport { MathUtil } from './MathUtil';\n\nimport { ChronoField } from './temporal/ChronoField';\nimport { Clock } from './Clock';\nimport { DateTimeFormatter } from './format/DateTimeFormatter';\nimport { DateTimeFormatterBuilder } from './format/DateTimeFormatterBuilder';\nimport { IsoChronology } from './chrono/IsoChronology';\nimport { LocalDate } from './LocalDate';\nimport { Month } from './Month';\nimport { TemporalAccessor } from './temporal/TemporalAccessor';\nimport { TemporalQuery, createTemporalQuery } from './temporal/TemporalQuery';\nimport { TemporalQueries } from './temporal/TemporalQueries';\nimport { ValueRange } from './temporal/ValueRange';\nimport { Year } from './Year';\nimport { ZoneId } from './ZoneId';\n\n/**\n * A month-day in the ISO-8601 calendar system, such as `--12-03`.\n *\n * {@link MonthDay} is an immutable date-time object that represents the combination\n * of a year and month. Any field that can be derived from a month and day, such as\n * quarter-of-year, can be obtained.\n *\n * This class does not store or represent a year, time or time-zone.\n * For example, the value \"December 3rd\" can be stored in a {@link MonthDay}.\n *\n * Since a {@link MonthDay} does not possess a year, the leap day of\n * February 29th is considered valid.\n *\n * This class implements {@link TemporalAccessor} rather than {@link Temporal}.\n * This is because it is not possible to define whether February 29th is valid or not\n * without external information, preventing the implementation of plus/minus.\n * Related to this, {@link MonthDay} only provides access to query and set the fields\n * {@link MONTH_OF_YEAR} and {@link DAY_OF_MONTH}.\n *\n * The ISO-8601 calendar system is the modern civil calendar system used today\n * in most of the world. It is equivalent to the proleptic Gregorian calendar\n * system, in which today's rules for leap years are applied for all time.\n * For most applications written today, the ISO-8601 rules are entirely suitable.\n * However, any application that makes use of historical dates, and requires them\n * to be accurate will find the ISO-8601 approach unsuitable.\n *\n * ### Specification for implementors\n *\n * This class is immutable and thread-safe.\n */\nexport class MonthDay extends TemporalAccessor {\n /**\n * function overloading for {@link MonthDay.now}\n *\n * if called with 0 argument {@link MonthDay.now0} is executed,\n *\n * if called with 1 argument and first argument is an instance of ZoneId, then {@link MonthDay.nowZoneId} is executed,\n *\n * otherwise {@link MonthDay.nowClock} is executed\n *\n * @param {?(ZoneId|Clock)} zoneIdOrClock\n * @returns {MonthDay}\n */\n static now(zoneIdOrClock) {\n if (arguments.length === 0) {\n return MonthDay.now0();\n } else if (arguments.length === 1 && zoneIdOrClock instanceof ZoneId) {\n return MonthDay.nowZoneId(zoneIdOrClock);\n } else {\n return MonthDay.nowClock(zoneIdOrClock);\n }\n }\n /**\n * Obtains the current month-day from the system clock in the default time-zone.\n *\n * This will query the system clock (see {@link Clock#systemDefaultZone}) in the default\n * time-zone to obtain the current month-day.\n *\n * Using this method will prevent the ability to use an alternate clock for testing\n * because the clock is hard-coded.\n *\n * @return {MonthDay} the current month-day using the system clock and default time-zone, not null\n */\n static now0() {\n return this.nowClock(Clock.systemDefaultZone());\n }\n\n /**\n * Obtains the current month-day from the system clock in the specified time-zone.\n *\n * This will query the system clock (see {@link Clock#system}) to obtain the current month-day.\n * Specifying the time-zone avoids dependence on the default time-zone.\n *\n * Using this method will prevent the ability to use an alternate clock for testing\n * because the clock is hard-coded.\n *\n * @param {ZoneId} zone the zone ID to use, not null\n * @return {MonthDay} the current month-day using the system clock, not null\n */\n static nowZoneId(zone) {\n requireNonNull(zone, 'zone');\n return this.nowClock(Clock.system(zone));\n }\n\n /**\n * Obtains the current month-day from the specified clock.\n *\n * This will query the specified clock to obtain the current month-day.\n * Using this method allows the use of an alternate clock for testing.\n * The alternate clock may be introduced using dependency injection (see {@link Clock}).\n *\n * @param {Clock} clock the clock to use, not null\n * @return {MonthDay} the current month-day, not null\n */\n static nowClock(clock) {\n requireNonNull(clock, 'clock');\n const now = LocalDate.now(clock); // called once\n return MonthDay.of(now.month(), now.dayOfMonth());\n }\n //-----------------------------------------------------------------------\n /**\n * function overloading for {@link MonthDay.of}\n *\n * if called with 2 argument and first argument is an instance of Month, then {@link MonthDay.ofMonthNumber} is executed,\n *\n * otherwise {@link MonthDay.ofNumberNumber} is executed\n *\n * @param {!(Month|number)} monthOrNumber\n * @param {?number} number\n * @returns {MonthDay}\n */\n static of(monthOrNumber, number) {\n if (arguments.length === 2 && monthOrNumber instanceof Month) {\n return MonthDay.ofMonthNumber(monthOrNumber, number);\n } else {\n return MonthDay.ofNumberNumber(monthOrNumber, number);\n }\n }\n /**\n * Obtains an instance of {@link MonthDay}.\n *\n * The day-of-month must be valid for the month within a leap year.\n * Hence, for February, day 29 is valid.\n *\n * For example, passing in April and day 31 will throw an exception, as\n * there can never be April 31st in any year. By contrast, passing in\n * February 29th is permitted, as that month-day can sometimes be valid.\n *\n * @param {Month} month the month-of-year to represent, not null\n * @param {number} dayOfMonth the day-of-month to represent, from 1 to 31\n * @return {MonthDay} the month-day, not null\n * @throws DateTimeException if the value of any field is out of range\n * @throws DateTimeException if the day-of-month is invalid for the month\n */\n static ofMonthNumber(month, dayOfMonth) {\n requireNonNull(month, 'month');\n ChronoField.DAY_OF_MONTH.checkValidValue(dayOfMonth);\n if (dayOfMonth > month.maxLength()) {\n throw new DateTimeException(`Illegal value for DayOfMonth field, value ${dayOfMonth \n } is not valid for month ${month.toString()}`);\n }\n return new MonthDay(month.value(), dayOfMonth);\n }\n\n /**\n * Obtains an instance of {@link MonthDay}.\n *\n * The day-of-month must be valid for the month within a leap year.\n * Hence, for month 2 (February), day 29 is valid.\n *\n * For example, passing in month 4 (April) and day 31 will throw an exception, as\n * there can never be April 31st in any year. By contrast, passing in\n * February 29th is permitted, as that month-day can sometimes be valid.\n *\n * @param {number} month the month-of-year to represent, from 1 (January) to 12 (December)\n * @param {number} dayOfMonth the day-of-month to represent, from 1 to 31\n * @return {MonthDay} the month-day, not null\n * @throws DateTimeException if the value of any field is out of range\n * @throws DateTimeException if the day-of-month is invalid for the month\n */\n static ofNumberNumber(month, dayOfMonth) {\n requireNonNull(month, 'month');\n requireNonNull(dayOfMonth, 'dayOfMonth');\n return MonthDay.of(Month.of(month), dayOfMonth);\n }\n //-----------------------------------------------------------------------\n /**\n * Obtains an instance of {@link MonthDay} from a temporal object.\n *\n * A {@link TemporalAccessor} represents some form of date and time information.\n * This factory converts the arbitrary temporal object to an instance of {@link MonthDay}.\n *\n * The conversion extracts the MONTH_OF_YEAR (see {@link ChronoField#MONTH_OF_YEAR}) and\n * DAY_OF_MONTH (see {@link ChronoField#DAY_OF_MONTH}) fields.\n * The extraction is only permitted if the date-time has an ISO chronology.\n *\n * This method matches the signature of the functional interface {@link TemporalQuery}\n * allowing it to be used in queries via method reference, {@link MonthDay::from}.\n *\n * @param {TemporalAccessor} temporal the temporal object to convert, not null\n * @return {MonthDay} the month-day, not null\n * @throws DateTimeException if unable to convert to a {@link MonthDay}\n */\n static from(temporal) {\n requireNonNull(temporal, 'temporal');\n requireInstance(temporal, TemporalAccessor, 'temporal');\n if (temporal instanceof MonthDay) {\n return temporal;\n }\n try {\n /* TODO: only IsoChronology for now\n if (IsoChronology.INSTANCE.equals(Chronology.from(temporal)) == false) {\n temporal = LocalDate.from(temporal);\n }*/\n return MonthDay.of(temporal.get(ChronoField.MONTH_OF_YEAR), temporal.get(ChronoField.DAY_OF_MONTH));\n } catch (ex) {\n throw new DateTimeException(`Unable to obtain MonthDay from TemporalAccessor: ${ \n temporal}, type ${temporal && temporal.constructor != null ? temporal.constructor.name : ''}`);\n }\n }\n //-----------------------------------------------------------------------\n /**\n * function overloading for {@link MonthDay.parse}\n *\n * if called with 1 argument, then {@link MonthDay.parseString} is executed,\n *\n * otherwise {@link MonthDay.parseStringFormatter} is executed\n *\n * @param {!(String)} text\n * @param {?DateTimeFormatter} formatter\n * @returns {MonthDay}\n */\n static parse(text, formatter) {\n if (arguments.length === 1) {\n return MonthDay.parseString(text);\n } else {\n return MonthDay.parseStringFormatter(text, formatter);\n }\n }\n\n /**\n * Obtains an instance of {@link MonthDay} from a text string such as `--12-03`.\n *\n * The string must represent a valid month-day.\n * The format is `--MM-dd`.\n *\n * @param {String} text the text to parse such as \"--12-03\", not null\n * @return {MonthDay} the parsed month-day, not null\n * @throws DateTimeParseException if the text cannot be parsed\n */\n static parseString(text) {\n return MonthDay.parseStringFormatter(text, PARSER);\n }\n\n /**\n * Obtains an instance of {@link MonthDay} from a text string using a specific formatter.\n *\n * The text is parsed using the formatter, returning a month-day.\n *\n * @param {String} text the text to parse, not null\n * @param {DateTimeFormatter} formatter the formatter to use, not null\n * @return {MonthDay} the parsed month-day, not null\n * @throws DateTimeParseException if the text cannot be parsed\n */\n static parseStringFormatter(text, formatter) {\n requireNonNull(text, 'text');\n requireNonNull(formatter, 'formatter');\n requireInstance(formatter, DateTimeFormatter, 'formatter');\n return formatter.parse(text, MonthDay.FROM);\n }\n\n //-----------------------------------------------------------------------\n /**\n * Constructor, previously validated.\n *\n * @param {number} month the month-of-year to represent, validated from 1 to 12\n * @param {number} dayOfMonth the day-of-month to represent, validated from 1 to 29-31\n * @private\n */\n constructor(month, dayOfMonth) {\n super();\n this._month = MathUtil.safeToInt(month);\n this._day = MathUtil.safeToInt(dayOfMonth);\n }\n\n //-----------------------------------------------------------------------\n /**\n * Gets the month-of-year field from 1 to 12.\n *\n * This method returns the month as an `int` from 1 to 12.\n * Application code is frequently clearer if the enum {@link Month}\n * is used by calling {@link getMonth}.\n *\n * @return {number} the month-of-year, from 1 to 12\n * @see #month()\n */\n monthValue() {\n return this._month;\n }\n\n /**\n * Gets the month-of-year field using the {@link Month} enum.\n *\n * This method returns the enum {@link Month} for the month.\n * This avoids confusion as to what `int` values mean.\n * If you need access to the primitive `int` value then the enum\n * provides the int value (see {@link Month#getValue}).\n *\n * @return {Month} the month-of-year, not null\n * @see #getMonthValue()\n */\n month() {\n return Month.of(this._month);\n }\n\n /**\n * Gets the day-of-month field.\n *\n * This method returns the primitive `int` value for the day-of-month.\n *\n * @return {number} the day-of-month, from 1 to 31\n */\n dayOfMonth() {\n return this._day;\n }\n\n //-----------------------------------------------------------------------\n /**\n * Checks if the specified field is supported.\n *\n * This checks if this month-day can be queried for the specified field.\n * If false, then calling the range (see {@link range}) and\n * get (see {@link get}) methods will throw an exception.\n *\n * If the field is a {@link ChronoField} then the query is implemented here.\n * The supported fields (see {@link isSupported}) will return valid\n * values based on this date-time.\n * The supported fields are:\n *\n * * {@link MONTH_OF_YEAR}\n * * {@link YEAR}\n *\n * All other {@link ChronoField} instances will return false.\n *\n * If the field is not a {@link ChronoField}, then the result of this method\n * is obtained by invoking {@link TemporalField.isSupportedBy}\n * passing `this` as the argument.\n * Whether the field is supported is determined by the field.\n *\n * @param {TemporalField} field the field to check, null returns false\n * @return {boolean} true if the field is supported on this month-day, false if not\n */\n isSupported(field) {\n if (field instanceof ChronoField) {\n return field === ChronoField.MONTH_OF_YEAR || field === ChronoField.DAY_OF_MONTH;\n }\n return field != null && field.isSupportedBy(this);\n }\n\n /**\n * Gets the range of valid values for the specified field.\n *\n * The range object expresses the minimum and maximum valid values for a field.\n * This month-day is used to enhance the accuracy of the returned range.\n * If it is not possible to return the range, because the field is not supported\n * or for some other reason, an exception is thrown.\n *\n * If the field is a {@link ChronoField} then the query is implemented here.\n * The supported fields (see {@link isSupported}) will return\n * appropriate range instances.\n * All other {@link ChronoField} instances will throw a {@link DateTimeException}.\n *\n * If the field is not a {@link ChronoField}, then the result of this method\n * is obtained by invoking {@link TemporalField.rangeRefinedBy}\n * passing `this` as the argument.\n * Whether the range can be obtained is determined by the field.\n *\n * @param {TemporalField} field the field to query the range for, not null\n * @return {ValueRange} the range of valid values for the field, not null\n * @throws DateTimeException if the range for the field cannot be obtained\n */\n range(field) {\n if (field === ChronoField.MONTH_OF_YEAR) {\n return field.range();\n } else if (field === ChronoField.DAY_OF_MONTH) {\n return ValueRange.of(1, this.month().minLength(), this.month().maxLength());\n }\n return super.range(field);\n }\n\n /**\n * Gets the value of the specified field from this month-day as an `int`.\n *\n * This queries this month-day for the value for the specified field.\n * The returned value will always be within the valid range of values for the field.\n * If it is not possible to return the value, because the field is not supported\n * or for some other reason, an exception is thrown.\n *\n * If the field is a {@link ChronoField} then the query is implemented here.\n * The supported fields (see {@link isSupported}) will return valid\n * values based on this month-day.\n * All other {@link ChronoField} instances will throw a {@link DateTimeException}.\n *\n * If the field is not a {@link ChronoField}, then the result of this method\n * is obtained by invoking {@link TemporalField.getFrom}\n * passing `this` as the argument. Whether the value can be obtained,\n * and what the value represents, is determined by the field.\n *\n * @param {TemporalField} field the field to get, not null\n * @return {number} the value for the field\n * @throws DateTimeException if a value for the field cannot be obtained\n * @throws ArithmeticException if numeric overflow occurs\n */\n get(field) {\n return this.range(field).checkValidIntValue(this.getLong(field), field);\n }\n\n /**\n * Gets the value of the specified field from this month-day as a `long`.\n *\n * This queries this month-day for the value for the specified field.\n * If it is not possible to return the value, because the field is not supported\n * or for some other reason, an exception is thrown.\n *\n * If the field is a {@link ChronoField} then the query is implemented here.\n * The supported fields (see {@link isSupported}) will return valid\n * values based on this month-day.\n * All other {@link ChronoField} instances will throw a {@link DateTimeException}.\n *\n * If the field is not a {@link ChronoField}, then the result of this method\n * is obtained by invoking {@link TemporalField.getFrom}\n * passing `this` as the argument. Whether the value can be obtained,\n * and what the value represents, is determined by the field.\n *\n * @param {TemporalField} field the field to get, not null\n * @return {number} the value for the field\n * @throws DateTimeException if a value for the field cannot be obtained\n * @throws ArithmeticException if numeric overflow occurs\n */\n getLong(field) {\n requireNonNull(field, 'field');\n if (field instanceof ChronoField) {\n switch (field) {\n // alignedDOW and alignedWOM not supported because they cannot be set in with()\n case ChronoField.DAY_OF_MONTH: return this._day;\n case ChronoField.MONTH_OF_YEAR: return this._month;\n }\n throw new UnsupportedTemporalTypeException(`Unsupported field: ${field}`);\n }\n return field.getFrom(this);\n }\n //-----------------------------------------------------------------------\n /**\n * Checks if the year is valid for this month-day.\n *\n * This method checks whether this month and day and the input year form\n * a valid date. This can only return false for February 29th.\n *\n * @param {number} year the year to validate, an out of range value returns false\n * @return {boolean} true if the year is valid for this month-day\n * @see Year#isValidMonthDay(MonthDay)\n */\n isValidYear(year) {\n return (this._day === 29 && this._month === 2 && Year.isLeap(year) === false) === false;\n }\n\n //-----------------------------------------------------------------------\n /**\n * Returns a copy of this {@link MonthDay} with the month-of-year altered.\n *\n * This returns a month-day with the specified month.\n * If the day-of-month is invalid for the specified month, the day will\n * be adjusted to the last valid day-of-month.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {number} month the month-of-year to set in the returned month-day, from 1 (January) to 12 (December)\n * @return {MonthDay} based on this month-day with the requested month, not null\n * @throws DateTimeException if the month-of-year value is invalid\n */\n withMonth(month) {\n return this.with(Month.of(month));\n }\n\n /**\n * Returns a copy of this {@link MonthDay} with the month-of-year altered.\n *\n * This returns a month-day with the specified month.\n * If the day-of-month is invalid for the specified month, the day will\n * be adjusted to the last valid day-of-month.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {Month} month the month-of-year to set in the returned month-day, not null\n * @return {MonthDay} based on this month-day with the requested month, not null\n */\n with(month) {\n requireNonNull(month, 'month');\n if (month.value() === this._month) {\n return this;\n }\n const day = Math.min(this._day, month.maxLength());\n return new MonthDay(month.value(), day);\n }\n\n /**\n * Returns a copy of this {@link MonthDay} with the day-of-month altered.\n *\n * This returns a month-day with the specified day-of-month.\n * If the day-of-month is invalid for the month, an exception is thrown.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {number} dayOfMonth the day-of-month to set in the return month-day, from 1 to 31\n * @return {MonthDay} based on this month-day with the requested day, not null\n * @throws DateTimeException if the day-of-month value is invalid\n * @throws DateTimeException if the day-of-month is invalid for the month\n */\n withDayOfMonth(dayOfMonth) {\n if (dayOfMonth === this._day) {\n return this;\n }\n return MonthDay.of(this._month, dayOfMonth);\n }\n\n //-----------------------------------------------------------------------\n /**\n * Queries this month-day using the specified query.\n *\n * This queries this month-day using the specified query strategy object.\n * The {@link TemporalQuery} object defines the logic to be used to\n * obtain the result. Read the documentation of the query to understand\n * what the result of this method will be.\n *\n * The result of this method is obtained by invoking the\n * {@link TemporalQuery#queryFrom} method on the\n * specified query passing `this` as the argument.\n *\n * @param {TemporalQuery} query the query to invoke, not null\n * @return {*} the query result, null may be returned (defined by the query)\n * @throws DateTimeException if unable to query (defined by the query)\n * @throws ArithmeticException if numeric overflow occurs (defined by the query)\n */\n query(query) {\n requireNonNull(query, 'query');\n requireInstance(query, TemporalQuery, 'query');\n if (query === TemporalQueries.chronology()) {\n return IsoChronology.INSTANCE;\n }\n return super.query(query);\n }\n\n /**\n * Adjusts the specified temporal object to have this month-day.\n *\n * This returns a temporal object of the same observable type as the input\n * with the month and day-of-month changed to be the same as this.\n *\n * The adjustment is equivalent to using {@link Temporal#with}\n * twice, passing {@link ChronoField#MONTH_OF_YEAR} and\n * {@link ChronoField#DAY_OF_MONTH} as the fields.\n * If the specified temporal object does not use the ISO calendar system then\n * a {@link DateTimeException} is thrown.\n *\n * In most cases, it is clearer to reverse the calling pattern by using\n * {@link Temporal#with}:\n *

\n     *   // these two lines are equivalent, but the second approach is recommended\n     *   temporal = thisMonthDay.adjustInto(temporal);\n     *   temporal = temporal.with(thisMonthDay);\n     * 
\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {Temporal} temporal the target object to be adjusted, not null\n * @return {Temporal} the adjusted object, not null\n * @throws DateTimeException if unable to make the adjustment\n * @throws ArithmeticException if numeric overflow occurs\n */\n adjustInto(temporal) {\n requireNonNull(temporal, 'temporal');\n /* TODO: only IsoChronology for now\n if (Chronology.from(temporal).equals(IsoChronology.INSTANCE) == false) {\n throw new DateTimeException(\"Adjustment only supported on ISO date-time\");\n }*/\n temporal = temporal.with(ChronoField.MONTH_OF_YEAR, this._month);\n return temporal.with(ChronoField.DAY_OF_MONTH, Math.min(temporal.range(ChronoField.DAY_OF_MONTH).maximum(), this._day));\n }\n\n //-----------------------------------------------------------------------\n /**\n * Combines this month-day with a year to create a {@link LocalDate}.\n *\n * This returns a {@link LocalDate} formed from this month-day and the specified year.\n *\n * A month-day of February 29th will be adjusted to February 28th in the resulting\n * date if the year is not a leap year.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {number} year the year to use, from MIN_YEAR to MAX_YEAR\n * @return {LocalDate} the local date formed from this month-day and the specified year, not null\n * @throws DateTimeException if the year is outside the valid range of years\n */\n atYear(year) {\n return LocalDate.of(year, this._month, this.isValidYear(year) ? this._day : 28);\n }\n //-----------------------------------------------------------------------\n /**\n * Compares this month-day to another month-day.\n *\n * The comparison is based first on value of the month, then on the value of the day.\n * It is \"consistent with equals\", as defined by {@link Comparable}.\n *\n * @param {MonthDay} other the other month-day to compare to, not null\n * @return {number} the comparator value, negative if less, positive if greater\n */\n compareTo(other) {\n requireNonNull(other, 'other');\n requireInstance(other, MonthDay, 'other');\n let cmp = (this._month - other.monthValue());\n if (cmp === 0) {\n cmp = (this._day - other.dayOfMonth());\n }\n return cmp;\n }\n\n /**\n * Is this month-day after the specified month-day.\n *\n * @param {MonthDay} other the other month-day to compare to, not null\n * @return {boolean} true if this is after the specified month-day\n */\n isAfter(other) {\n requireNonNull(other, 'other');\n requireInstance(other, MonthDay, 'other');\n return this.compareTo(other) > 0;\n }\n\n /**\n * Is this month-day before the specified month-day.\n *\n * @param {MonthDay} other the other month-day to compare to, not null\n * @return {boolean} true if this point is before the specified month-day\n */\n isBefore(other) {\n requireNonNull(other, 'other');\n requireInstance(other, MonthDay, 'other');\n return this.compareTo(other) < 0;\n }\n\n\n //-----------------------------------------------------------------------\n /**\n * Checks if this month-day is equal to another month-day.\n *\n * The comparison is based on the time-line position of the month-day within a year.\n *\n * @param {*} obj the object to check, null returns false\n * @return {boolean} true if this is equal to the other month-day\n */\n equals(obj) {\n if (this === obj) {\n return true;\n }\n if (obj instanceof MonthDay) {\n const other = obj;\n return this.monthValue() === other.monthValue() && this.dayOfMonth() === other.dayOfMonth();\n }\n return false;\n }\n //-----------------------------------------------------------------------\n /**\n * Outputs this month-day as a string, such as `--12-03`.\n *\n * The output will be in the format `--MM-dd`:\n *\n * @return {String} a string representation of this month-day, not null\n */\n toString() {\n return `--${\n this._month < 10 ? '0' : ''}${this._month\n }${this._day < 10 ? '-0' : '-'}${this._day}`;\n }\n\n /**\n * toJSON() use by JSON.stringify\n * delegates to toString()\n *\n * @return {string}\n */\n toJSON() {\n return this.toString();\n }\n\n /**\n * Outputs this month-day as a string using the formatter.\n *\n * This month-day will be passed to the formatter\n * print method (see {@link DateTimeFormatter#format}).\n *\n * @param {DateTimeFormatter} formatter the formatter to use, not null\n * @return {String} the formatted month-day string, not null\n * @throws DateTimeException if an error occurs during printing\n */\n format(formatter) {\n requireNonNull(formatter, 'formatter');\n requireInstance(formatter, DateTimeFormatter, 'formatter');\n return formatter.format(this);\n }\n\n}\n\nlet PARSER;\n\nexport function _init() {\n PARSER = new DateTimeFormatterBuilder()\n .appendLiteral('--')\n .appendValue(ChronoField.MONTH_OF_YEAR, 2)\n .appendLiteral('-')\n .appendValue(ChronoField.DAY_OF_MONTH, 2)\n .toFormatter();\n\n MonthDay.FROM = createTemporalQuery('MonthDay.FROM', (temporal) => {\n return MonthDay.from(temporal);\n });\n}\n","/*\n * @copyright (c) 2016, Philipp Thürwächter & Pattrick Hüper\n * @license BSD-3-Clause (see LICENSE.md in the root directory of this source tree)\n */\n\nimport { requireNonNull, requireInstance } from './assert';\nimport { DateTimeException, UnsupportedTemporalTypeException } from './errors';\nimport { MathUtil } from './MathUtil';\n\nimport { ChronoField } from './temporal/ChronoField';\nimport { ChronoUnit } from './temporal/ChronoUnit';\nimport { Clock } from './Clock';\nimport { DateTimeFormatterBuilder } from './format/DateTimeFormatterBuilder';\nimport { IsoChronology } from './chrono/IsoChronology';\nimport { LocalDate } from './LocalDate';\nimport { Month } from './Month';\nimport { SignStyle } from './format/SignStyle';\nimport { Temporal } from './temporal/Temporal';\nimport { TemporalField } from './temporal/TemporalField';\nimport { TemporalQueries } from './temporal/TemporalQueries';\nimport { TemporalQuery } from './temporal/TemporalQuery';\nimport { TemporalUnit } from './temporal/TemporalUnit';\nimport { createTemporalQuery } from './temporal/TemporalQuery';\nimport { ValueRange } from './temporal/ValueRange';\nimport { Year } from './Year';\nimport { ZoneId } from './ZoneId';\n\n/**\n * A year-month in the ISO-8601 calendar system, such as `2007-12`.\n *\n * {@link YearMonth} is an immutable date-time object that represents the combination\n * of a year and month. Any field that can be derived from a year and month, such as\n * quarter-of-year, can be obtained.\n *\n * This class does not store or represent a day, time or time-zone.\n * For example, the value \"October 2007\" can be stored in a {@link YearMonth}.\n *\n * The ISO-8601 calendar system is the modern civil calendar system used today\n * in most of the world. It is equivalent to the proleptic Gregorian calendar\n * system, in which today's rules for leap years are applied for all time.\n * For most applications written today, the ISO-8601 rules are entirely suitable.\n * However, any application that makes use of historical dates, and requires them\n * to be accurate will find the ISO-8601 approach unsuitable.\n *\n * ### Specification for implementors\n *\n * This class is immutable and thread-safe.\n */\nexport class YearMonth extends Temporal {\n //-----------------------------------------------------------------------\n /**\n * function overloading for {@link YearMonth.now}\n *\n * if called with 0 argument {@link YearMonth.now0} is executed,\n *\n * if called with 1 argument and first argument is an instance of ZoneId, then {@link YearMonth.nowZoneId} is executed,\n *\n * otherwise {@link YearMonth.nowClock} is executed\n *\n * @param {?(ZoneId|Clock)} zoneIdOrClock\n * @returns {YearMonth}\n */\n static now(zoneIdOrClock) {\n if (arguments.length === 0) {\n return YearMonth.now0();\n } else if (arguments.length === 1 && zoneIdOrClock instanceof ZoneId) {\n return YearMonth.nowZoneId(zoneIdOrClock);\n } else {\n return YearMonth.nowClock(zoneIdOrClock);\n }\n }\n\n /**\n * Obtains the current year-month from the system clock in the default time-zone.\n *\n * This will query the system clock (see {@link Clock#systemDefaultZone}) in the default\n * time-zone to obtain the current year-month.\n * The zone and offset will be set based on the time-zone in the clock.\n *\n * Using this method will prevent the ability to use an alternate clock for testing\n * because the clock is hard-coded.\n *\n * @return {YearMonth} the current year-month using the system clock and default time-zone, not null\n */\n static now0() {\n return YearMonth.nowClock(Clock.systemDefaultZone());\n }\n\n /**\n * Obtains the current year-month from the system clock in the specified time-zone.\n *\n * This will query the system clock (see {@link Clock#system}) to obtain the current year-month.\n * Specifying the time-zone avoids dependence on the default time-zone.\n *\n * Using this method will prevent the ability to use an alternate clock for testing\n * because the clock is hard-coded.\n *\n * @param {ZoneId} zone the zone ID to use, not null\n * @return {YearMonth} the current year-month using the system clock, not null\n */\n static nowZoneId(zone) {\n return YearMonth.nowClock(Clock.system(zone));\n }\n\n /**\n * Obtains the current year-month from the specified clock.\n *\n * This will query the specified clock to obtain the current year-month.\n * Using this method allows the use of an alternate clock for testing.\n * The alternate clock may be introduced using dependency injection.\n *\n * @param {Clock} clock the clock to use, not null\n * @return {YearMonth} the current year-month, not null\n */\n static nowClock(clock) {\n const now = LocalDate.now(clock);\n return YearMonth.of(now.year(), now.month());\n }\n\n //-----------------------------------------------------------------------\n /**\n * function overloading for {@link YearMonth.of}\n *\n * if called with 2 argument and first argument is an instance of Month, then {@link YearMonth.ofNumberMonth} is executed,\n *\n * otherwise {@link YearMonth.ofNumberNumber} is executed\n *\n * @param {!number} year\n * @param {!(Month|number)} monthOrNumber\n * @returns {YearMonth}\n */\n static of(year, monthOrNumber) {\n if (arguments.length === 2 && monthOrNumber instanceof Month) {\n return YearMonth.ofNumberMonth(year, monthOrNumber);\n } else {\n return YearMonth.ofNumberNumber(year, monthOrNumber);\n }\n }\n\n /**\n * Obtains an instance of {@link YearMonth} from a year and month.\n *\n * @param {number} year the year to represent, from MIN_YEAR to MAX_YEAR\n * @param {Month} month the month-of-year to represent, not null\n * @return {YearMonth} the year-month, not null\n * @throws DateTimeException if the year value is invalid\n */\n static ofNumberMonth(year, month) {\n requireNonNull(month, 'month');\n requireInstance(month, Month, 'month');\n return YearMonth.ofNumberNumber(year, month.value());\n }\n\n /**\n * Obtains an instance of {@link YearMonth} from a year and month.\n *\n * @param {number} year the year to represent, from MIN_YEAR to MAX_YEAR\n * @param {number} month the month-of-year to represent, from 1 (January) to 12 (December)\n * @return {YearMonth} the year-month, not null\n * @throws DateTimeException if either field value is invalid\n */\n static ofNumberNumber(year, month) {\n requireNonNull(year, 'year');\n requireNonNull(month, 'month');\n ChronoField.YEAR.checkValidValue(year);\n ChronoField.MONTH_OF_YEAR.checkValidValue(month);\n return new YearMonth(year, month);\n }\n\n //-----------------------------------------------------------------------\n /**\n * Obtains an instance of {@link YearMonth} from a temporal object.\n *\n * A {@link TemporalAccessor} represents some form of date and time information.\n * This factory converts the arbitrary temporal object to an instance of {@link YearMonth}.\n *\n * The conversion extracts the {@link ChronoField#YEAR} and\n * {@link ChronoField#MONTH_OF_YEAR} fields.\n * The extraction is only permitted if the temporal object has an ISO\n * chronology, or can be converted to a {@link LocalDate}.\n *\n * This method matches the signature of the functional interface {@link TemporalQuery}\n * allowing it to be used in queries via method reference, {@link YearMonth::from}.\n *\n * @param {TemporalAccessor} temporal the temporal object to convert, not null\n * @return {YearMonth} the year-month, not null\n * @throws DateTimeException if unable to convert to a {@link YearMonth}\n */\n static from(temporal) {\n requireNonNull(temporal, 'temporal');\n if (temporal instanceof YearMonth) {\n return temporal;\n }\n try {\n /* TODO: only IsoChronology for now\n if (IsoChronology.INSTANCE.equals(Chronology.from(temporal)) == false) {\n temporal = LocalDate.from(temporal);\n }*/\n return YearMonth.of(temporal.get(ChronoField.YEAR), temporal.get(ChronoField.MONTH_OF_YEAR));\n } catch (ex) {\n throw new DateTimeException(`Unable to obtain YearMonth from TemporalAccessor: ${ \n temporal}, type ${temporal && temporal.constructor != null ? temporal.constructor.name : ''}`);\n }\n }\n //-----------------------------------------------------------------------\n /**\n * function overloading for {@link YearMonth.parse}\n *\n * if called with 2 argument and first argument is an instance of Month, then {@link YearMonth.parseString} is executed,\n *\n * otherwise {@link YearMonth.parseStringFormatter} is executed\n *\n * @param {!(String)} text\n * @param {?DateTimeFormatter} formatter\n * @returns {YearMonth}\n */\n static parse(text, formatter) {\n if (arguments.length === 1) {\n return YearMonth.parseString(text);\n } else {\n return YearMonth.parseStringFormatter(text, formatter);\n }\n }\n\n /**\n * Obtains an instance of {@link YearMonth} from a text string such as `2007-12`.\n *\n * The string must represent a valid year-month.\n * The format must be {@link yyyy-MM}.\n * Years outside the range 0000 to 9999 must be prefixed by the plus or minus symbol.\n *\n * @param {String} text the text to parse such as \"2007-12\", not null\n * @return {YearMonth} the parsed year-month, not null\n * @throws DateTimeParseException if the text cannot be parsed\n */\n static parseString(text) {\n return YearMonth.parseStringFormatter(text, PARSER);\n }\n\n /**\n * Obtains an instance of {@link YearMonth} from a text string using a specific formatter.\n *\n * The text is parsed using the formatter, returning a year-month.\n *\n * @param {String} text the text to parse, not null\n * @param {DateTimeFormatter} formatter the formatter to use, not null\n * @return the parsed year-month, not null\n * @throws DateTimeParseException if the text cannot be parsed\n */\n static parseStringFormatter(text, formatter) {\n requireNonNull(formatter, 'formatter');\n return formatter.parse(text, YearMonth.FROM);\n }\n\n\n /**\n * Constructor.\n *\n * @param {number} year the year to represent, validated from MIN_YEAR to MAX_YEAR\n * @param {number} month the month-of-year to represent, validated from 1 (January) to 12 (December)\n * @private\n */\n constructor(year, month) {\n super();\n this._year = MathUtil.safeToInt(year);\n this._month = MathUtil.safeToInt(month);\n }\n\n /**\n * function overloading for {@link YearMonth.isSupported}\n *\n * if called with 1 argument and first argument is an instance of TemporalField, then {@link YearMonth.isSupportedField} is executed,\n *\n * otherwise {@link YearMonth.isSupportedUnit} is executed\n *\n * @param {!(TemporalField|ChronoUnit)} fieldOrUnit\n * @returns {boolean}\n */\n isSupported(fieldOrUnit) {\n if (arguments.length === 1 && fieldOrUnit instanceof TemporalField) {\n return this.isSupportedField(fieldOrUnit);\n } else {\n return this.isSupportedUnit(fieldOrUnit);\n }\n }\n\n /**\n * Checks if the specified field is supported.\n *\n * This checks if this year-month can be queried for the specified field.\n * If false, then calling {@link range} and {@link get} will throw an exception.\n *\n * If the field is a {@link ChronoField} then the query is implemented here.\n * The supported fields (see {@link isSupported}) will return valid\n * values based on this date-time.\n * The supported fields are:\n *\n * * {@link MONTH_OF_YEAR}\n * * {@link EPOCH_MONTH}\n * * {@link YEAR_OF_ERA}\n * * {@link YEAR}\n * * {@link ERA}\n *\n * All other {@link ChronoField} instances will return false.\n *\n * If the field is not a {@link ChronoField}, then the result of this method\n * is obtained by invoking {@link TemporalField.isSupportedBy}\n * passing `this` as the argument.\n * Whether the field is supported is determined by the field.\n *\n * @param {TemporalField} field the field to check, null returns false\n * @return {boolean} true if the field is supported on this year-month, false if not\n */\n isSupportedField(field) {\n if (field instanceof ChronoField) {\n return field === ChronoField.YEAR || field === ChronoField.MONTH_OF_YEAR ||\n field === ChronoField.PROLEPTIC_MONTH || field === ChronoField.YEAR_OF_ERA || field === ChronoField.ERA;\n }\n return field != null && field.isSupportedBy(this);\n }\n\n isSupportedUnit(unit) {\n if (unit instanceof ChronoUnit) {\n return unit === ChronoUnit.MONTHS || unit === ChronoUnit.YEARS || unit === ChronoUnit.DECADES || unit === ChronoUnit.CENTURIES || unit === ChronoUnit.MILLENNIA || unit === ChronoUnit.ERAS;\n }\n return unit != null && unit.isSupportedBy(this);\n }\n\n /**\n * Gets the range of valid values for the specified field.\n *\n * The range object expresses the minimum and maximum valid values for a field.\n * This year-month is used to enhance the accuracy of the returned range.\n * If it is not possible to return the range, because the field is not supported\n * or for some other reason, an exception is thrown.\n *\n * If the field is a {@link ChronoField} then the query is implemented here.\n * The supported fields (see {@link isSupported}) will return\n * appropriate range instances.\n * All other {@link ChronoField} instances will throw a {@link DateTimeException}.\n *\n * If the field is not a {@link ChronoField}, then the result of this method\n * is obtained by invoking {@link TemporalField.rangeRefinedBy}\n * passing `this` as the argument.\n * Whether the range can be obtained is determined by the field.\n *\n * @param {TemporalField} field the field to query the range for, not null\n * @return {ValueRange} the range of valid values for the field, not null\n * @throws DateTimeException if the range for the field cannot be obtained\n */\n range(field) {\n if (field === ChronoField.YEAR_OF_ERA) {\n return (this.year() <= 0 ? ValueRange.of(1, Year.MAX_VALUE + 1) : ValueRange.of(1, Year.MAX_VALUE));\n }\n return super.range(field);\n }\n\n /**\n * Gets the value of the specified field from this year-month as an `int`.\n *\n * This queries this year-month for the value for the specified field.\n * The returned value will always be within the valid range of values for the field.\n * If it is not possible to return the value, because the field is not supported\n * or for some other reason, an exception is thrown.\n *\n * If the field is a {@link ChronoField} then the query is implemented here.\n * The supported fields (see {@link isSupported}) will return valid\n * values based on this year-month, except {@link EPOCH_MONTH} which is too\n * large to fit in an `int` and throw a {@link DateTimeException}.\n * All other {@link ChronoField} instances will throw a {@link DateTimeException}.\n *\n * If the field is not a {@link ChronoField}, then the result of this method\n * is obtained by invoking {@link TemporalField.getFrom}\n * passing `this` as the argument. Whether the value can be obtained,\n * and what the value represents, is determined by the field.\n *\n * @param {TemporalField} field the field to get, not null\n * @return {number} the value for the field\n * @throws DateTimeException if a value for the field cannot be obtained\n * @throws ArithmeticException if numeric overflow occurs\n */\n get(field) {\n requireNonNull(field, 'field');\n requireInstance(field, TemporalField, 'field');\n return this.range(field).checkValidIntValue(this.getLong(field), field);\n }\n\n /**\n * Gets the value of the specified field from this year-month as a `long`.\n *\n * This queries this year-month for the value for the specified field.\n * If it is not possible to return the value, because the field is not supported\n * or for some other reason, an exception is thrown.\n *\n * If the field is a {@link ChronoField} then the query is implemented here.\n * The supported fields (see {@link isSupported}) will return valid\n * values based on this year-month.\n * All other {@link ChronoField} instances will throw a {@link DateTimeException}.\n *\n * If the field is not a {@link ChronoField}, then the result of this method\n * is obtained by invoking {@link TemporalField.getFrom}\n * passing `this` as the argument. Whether the value can be obtained,\n * and what the value represents, is determined by the field.\n *\n * @param {TemporalField} field the field to get, not null\n * @return {number} the value for the field\n * @throws DateTimeException if a value for the field cannot be obtained\n * @throws ArithmeticException if numeric overflow occurs\n */\n getLong(field) {\n requireNonNull(field, 'field');\n requireInstance(field, TemporalField, 'field');\n if (field instanceof ChronoField) {\n switch (field) {\n case ChronoField.MONTH_OF_YEAR: return this._month;\n case ChronoField.PROLEPTIC_MONTH: return this._getProlepticMonth();\n case ChronoField.YEAR_OF_ERA: return (this._year < 1 ? 1 - this._year : this._year);\n case ChronoField.YEAR: return this._year;\n case ChronoField.ERA: return (this._year < 1 ? 0 : 1);\n }\n throw new UnsupportedTemporalTypeException(`Unsupported field: ${field}`);\n }\n return field.getFrom(this);\n }\n\n _getProlepticMonth() {\n return MathUtil.safeAdd(MathUtil.safeMultiply(this._year, 12), (this._month - 1));\n }\n\n //-----------------------------------------------------------------------\n /**\n * Gets the year field.\n *\n * This method returns the primitive `int` value for the year.\n *\n * The year returned by this method is proleptic as per {@link get}.\n *\n * @return {number} the year, from MIN_YEAR to MAX_YEAR\n */\n year() {\n return this._year;\n }\n\n /**\n * Gets the month-of-year field from 1 to 12.\n *\n * This method returns the month as an `int` from 1 to 12.\n * Application code is frequently clearer if the enum {@link Month}\n * is used by calling {@link getMonth}.\n *\n * @return {number} the month-of-year, from 1 to 12\n * @see #getMonth()\n */\n monthValue() {\n return this._month;\n }\n\n /**\n * Gets the month-of-year field using the {@link Month} enum.\n *\n * This method returns the enum {@link Month} for the month.\n * This avoids confusion as to what `int` values mean.\n * If you need access to the primitive `int` value, use {@link Month#getValue}.\n *\n * @return {Month} the month-of-year, not null\n */\n month() {\n return Month.of(this._month);\n }\n\n //-----------------------------------------------------------------------\n /**\n * Checks if the year is a leap year, according to the ISO proleptic\n * calendar system rules.\n *\n * This method applies the current rules for leap years across the whole time-line.\n * In general, a year is a leap year if it is divisible by four without\n * remainder. However, years divisible by 100, are not leap years, with\n * the exception of years divisible by 400 which are.\n *\n * For example, 1904 is a leap year it is divisible by 4.\n * 1900 was not a leap year as it is divisible by 100, however 2000 was a\n * leap year as it is divisible by 400.\n *\n * The calculation is proleptic - applying the same rules into the far future and far past.\n * This is historically inaccurate, but is correct for the ISO-8601 standard.\n *\n * @return {boolean} true if the year is leap, false otherwise\n */\n isLeapYear() {\n return IsoChronology.isLeapYear(this._year);\n }\n\n /**\n * Checks if the day-of-month is valid for this year-month.\n *\n * This method checks whether this year and month and the input day form\n * a valid date.\n *\n * @param {number} dayOfMonth the day-of-month to validate, from 1 to 31, invalid value returns false\n * @return {boolean} true if the day is valid for this year-month\n */\n isValidDay(dayOfMonth) {\n return dayOfMonth >= 1 && dayOfMonth <= this.lengthOfMonth();\n }\n\n /**\n * Returns the length of the month, taking account of the year.\n *\n * This returns the length of the month in days.\n * For example, a date in January would return 31.\n *\n * @return {number} the length of the month in days, from 28 to 31\n */\n lengthOfMonth() {\n return this.month().length(this.isLeapYear());\n }\n\n /**\n * Returns the length of the year.\n *\n * This returns the length of the year in days, either 365 or 366.\n *\n * @return {number} 366 if the year is leap, 365 otherwise\n */\n lengthOfYear() {\n return (this.isLeapYear() ? 366 : 365);\n }\n\n /**\n * function overloading for {@link YearMonth.with}\n *\n * if called with 1 argument, then {@link YearMonth.withAdjuster} is executed,\n * otherwise {@link YearMonth.withFieldValue} is executed.\n *\n * @param {!(TemporalAdjuster|TemporalField)} adjusterOrField\n * @param {?number} value nullable only of first argument is an instance of TemporalAdjuster\n * @returns {YearMonth}\n */\n with(adjusterOrField, value) {\n if (arguments.length === 1) {\n return this._withAdjuster(adjusterOrField);\n } else {\n return this._withField(adjusterOrField, value);\n }\n }\n\n /**\n * Returns a copy of this year-month with the specified field set to a new value.\n *\n * This returns a new {@link YearMonth}, based on this one, with the value\n * for the specified field changed.\n * This can be used to change any supported field, such as the year or month.\n * If it is not possible to set the value, because the field is not supported or for\n * some other reason, an exception is thrown.\n *\n * If the field is a {@link ChronoField} then the adjustment is implemented here.\n * The supported fields behave as follows:\n *\n * * {@link MONTH_OF_YEAR} -\n * Returns a {@link YearMonth} with the specified month-of-year.\n * The year will be unchanged.\n * * {@link PROLEPTIC_MONTH} -\n * Returns a {@link YearMonth} with the specified proleptic-month.\n * This completely replaces the year and month of this object.\n * * {@link YEAR_OF_ERA} -\n * Returns a {@link YearMonth} with the specified year-of-era\n * The month and era will be unchanged.\n * * {@link YEAR} -\n * Returns a {@link YearMonth} with the specified year.\n * The month will be unchanged.\n * * {@link ERA} -\n * Returns a {@link YearMonth} with the specified era.\n * The month and year-of-era will be unchanged.\n *\n * In all cases, if the new value is outside the valid range of values for the field\n * then a {@link DateTimeException} will be thrown.\n *\n * All other {@link ChronoField} instances will throw a {@link DateTimeException}.\n *\n * If the field is not a {@link ChronoField}, then the result of this method\n * is obtained by invoking {@link TemporalField.adjustInto}\n * passing `this` as the argument. In this case, the field determines\n * whether and how to adjust the instant.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {TemporalField} field the field to set in the result, not null\n * @param {number} newValue the new value of the field in the result\n * @return a {@link YearMonth} based on `this` with the specified field set, not null\n * @throws DateTimeException if the field cannot be set\n * @throws ArithmeticException if numeric overflow occurs\n */\n _withField(field, newValue) {\n requireNonNull(field, 'field');\n requireInstance(field, TemporalField, 'field');\n if (field instanceof ChronoField) {\n const f = field;\n f.checkValidValue(newValue);\n switch (f) {\n case ChronoField.MONTH_OF_YEAR: return this.withMonth(newValue);\n case ChronoField.PROLEPTIC_MONTH: return this.plusMonths(newValue - this.getLong(ChronoField.PROLEPTIC_MONTH));\n case ChronoField.YEAR_OF_ERA: return this.withYear((this._year < 1 ? 1 - newValue : newValue));\n case ChronoField.YEAR: return this.withYear(newValue);\n case ChronoField.ERA: return (this.getLong(ChronoField.ERA) === newValue ? this : this.withYear(1 - this._year));\n }\n throw new UnsupportedTemporalTypeException(`Unsupported field: ${field}`);\n }\n return field.adjustInto(this, newValue);\n }\n\n //-----------------------------------------------------------------------\n /**\n * Returns a copy of this {@link YearMonth} with the year altered.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {number} year the year to set in the returned year-month, from MIN_YEAR to MAX_YEAR\n * @return {YearMonth} based on this year-month with the requested year, not null\n * @throws DateTimeException if the year value is invalid\n */\n withYear(year) {\n ChronoField.YEAR.checkValidValue(year);\n return new YearMonth(year, this._month);\n }\n\n /**\n * Returns a copy of this {@link YearMonth} with the month-of-year altered.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {number} month the month-of-year to set in the returned year-month, from 1 (January) to 12 (December)\n * @return {YearMonth} based on this year-month with the requested month, not null\n * @throws DateTimeException if the month-of-year value is invalid\n */\n withMonth(month) {\n ChronoField.MONTH_OF_YEAR.checkValidValue(month);\n return new YearMonth(this._year, month);\n }\n\n //-----------------------------------------------------------------------\n\n /**\n * @param {number} amountToAdd\n * @param {TemporalUnit} unit\n * @return {YearMonth} based on this year-month with the addition made, not null\n * @throws DateTimeException if the addition cannot be made\n * @throws ArithmeticException if numeric overflow occurs\n */\n _plusUnit(amountToAdd, unit) {\n requireNonNull(unit, 'unit');\n requireInstance(unit, TemporalUnit, 'unit');\n if (unit instanceof ChronoUnit) {\n switch (unit) {\n case ChronoUnit.MONTHS: return this.plusMonths(amountToAdd);\n case ChronoUnit.YEARS: return this.plusYears(amountToAdd);\n case ChronoUnit.DECADES: return this.plusYears(MathUtil.safeMultiply(amountToAdd, 10));\n case ChronoUnit.CENTURIES: return this.plusYears(MathUtil.safeMultiply(amountToAdd, 100));\n case ChronoUnit.MILLENNIA: return this.plusYears(MathUtil.safeMultiply(amountToAdd, 1000));\n case ChronoUnit.ERAS: return this.with(ChronoField.ERA, MathUtil.safeAdd(this.getLong(ChronoField.ERA), amountToAdd));\n }\n throw new UnsupportedTemporalTypeException(`Unsupported unit: ${unit}`);\n }\n return unit.addTo(this, amountToAdd);\n }\n\n /**\n * Returns a copy of this year-month with the specified period in years added.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {number} yearsToAdd the years to add, may be negative\n * @return {YearMonth} based on this year-month with the years added, not null\n * @throws DateTimeException if the result exceeds the supported range\n */\n plusYears(yearsToAdd) {\n if (yearsToAdd === 0) {\n return this;\n }\n const newYear = ChronoField.YEAR.checkValidIntValue(this._year + yearsToAdd); // safe overflow\n return this.withYear(newYear);\n }\n\n /**\n * Returns a copy of this year-month with the specified period in months added.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {number} monthsToAdd the months to add, may be negative\n * @return {YearMonth} based on this year-month with the months added, not null\n * @throws DateTimeException if the result exceeds the supported range\n */\n plusMonths(monthsToAdd) {\n if (monthsToAdd === 0) {\n return this;\n }\n const monthCount = (this._year * 12) + (this._month - 1);\n const calcMonths = monthCount + monthsToAdd;\n const newYear = ChronoField.YEAR.checkValidIntValue(MathUtil.floorDiv(calcMonths, 12));\n const newMonth = MathUtil.floorMod(calcMonths, 12) + 1;\n return new YearMonth(newYear, newMonth);\n }\n\n //-----------------------------------------------------------------------\n\n /**\n * Returns a copy of this year-month with the specified period in years subtracted.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {number} yearsToSubtract the years to subtract, may be negative\n * @return {YearMonth} based on this year-month with the years subtracted, not null\n * @throws DateTimeException if the result exceeds the supported range\n */\n minusYears(yearsToSubtract) {\n return (yearsToSubtract === MathUtil.MIN_SAFE_INTEGER ? this.plusYears(MathUtil.MIN_SAFE_INTEGER).plusYears(1) : this.plusYears(-yearsToSubtract));\n }\n\n /**\n * Returns a copy of this year-month with the specified period in months subtracted.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {number} monthsToSubtract the months to subtract, may be negative\n * @return {YearMonth} based on this year-month with the months subtracted, not null\n * @throws DateTimeException if the result exceeds the supported range\n */\n minusMonths(monthsToSubtract) {\n return (monthsToSubtract === MathUtil.MIN_SAFE_INTEGER ? this.plusMonths(Math.MAX_SAFE_INTEGER).plusMonths(1) : this.plusMonths(-monthsToSubtract));\n }\n\n //-----------------------------------------------------------------------\n /**\n * Queries this year-month using the specified query.\n *\n * This queries this year-month using the specified query strategy object.\n * The {@link TemporalQuery} object defines the logic to be used to\n * obtain the result. Read the documentation of the query to understand\n * what the result of this method will be.\n *\n * The result of this method is obtained by invoking the\n * {@link TemporalQuery#queryFrom} method on the\n * specified query passing `this` as the argument.\n *\n * @param {TemporalQuery} query the query to invoke, not null\n * @return {*} the query result, null may be returned (defined by the query)\n * @throws DateTimeException if unable to query (defined by the query)\n * @throws ArithmeticException if numeric overflow occurs (defined by the query)\n */\n query(query) {\n requireNonNull(query, 'query');\n requireInstance(query, TemporalQuery, 'query');\n if (query === TemporalQueries.chronology()) {\n return IsoChronology.INSTANCE;\n } else if (query === TemporalQueries.precision()) {\n return ChronoUnit.MONTHS;\n } else if (query === TemporalQueries.localDate() || query === TemporalQueries.localTime() ||\n query === TemporalQueries.zone() || query === TemporalQueries.zoneId() || query === TemporalQueries.offset()) {\n return null;\n }\n return super.query(query);\n }\n\n /**\n * Adjusts the specified temporal object to have this year-month.\n *\n * This returns a temporal object of the same observable type as the input\n * with the year and month changed to be the same as this.\n *\n * The adjustment is equivalent to using {@link Temporal#with}\n * passing {@link ChronoField#PROLEPTIC_MONTH} as the field.\n * If the specified temporal object does not use the ISO calendar system then\n * a {@link DateTimeException} is thrown.\n *\n * In most cases, it is clearer to reverse the calling pattern by using\n * {@link Temporal#with}:\n *
\n     *   // these two lines are equivalent, but the second approach is recommended\n     *   temporal = thisYearMonth.adjustInto(temporal);\n     *   temporal = temporal.with(thisYearMonth);\n     * 
\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {Temporal} temporal the target object to be adjusted, not null\n * @return {Temporal} the adjusted object, not null\n * @throws DateTimeException if unable to make the adjustment\n * @throws ArithmeticException if numeric overflow occurs\n */\n adjustInto(temporal) {\n requireNonNull(temporal, 'temporal');\n requireInstance(temporal, Temporal, 'temporal');\n /* TODO: only IsoChronology for now\n if (Chronology.from(temporal).equals(IsoChronology.INSTANCE) == false) {\n throw new DateTimeException(\"Adjustment only supported on ISO date-time\");\n }*/\n return temporal.with(ChronoField.PROLEPTIC_MONTH, this._getProlepticMonth());\n }\n\n /**\n * Calculates the period between this year-month and another year-month in\n * terms of the specified unit.\n *\n * This calculates the period between two year-months in terms of a single unit.\n * The start and end points are `this` and the specified year-month.\n * The result will be negative if the end is before the start.\n * The {@link Temporal} passed to this method must be a {@link YearMonth}.\n * For example, the period in years between two year-months can be calculated\n * using {@link startYearMonth.until}.\n *\n * The calculation returns a whole number, representing the number of\n * complete units between the two year-months.\n * For example, the period in decades between 2012-06 and 2032-05\n * will only be one decade as it is one month short of two decades.\n *\n * This method operates in association with {@link TemporalUnit#between}.\n * The result of this method is a `long` representing the amount of\n * the specified unit. By contrast, the result of {@link between} is an\n * object that can be used directly in addition/subtraction:\n *
\n     *   long period = start.until(end, YEARS);   // this method\n     *   dateTime.plus(YEARS.between(start, end));      // use in plus/minus\n     * 
\n *\n * The calculation is implemented in this method for {@link ChronoUnit}.\n * The units {@link MONTHS}, {@link YEARS}, {@link DECADES},\n * {@link CENTURIES}, {@link MILLENNIA} and {@link ERAS} are supported.\n * Other {@link ChronoUnit} values will throw an exception.\n *\n * If the unit is not a {@link ChronoUnit}, then the result of this method\n * is obtained by invoking {@link TemporalUnit.between}\n * passing `this` as the first argument and the input temporal as\n * the second argument.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {Temporal} endExclusive the end year-month, which is converted to a {@link YearMonth}, not null\n * @param {TemporalUnit} unit the unit to measure the period in, not null\n * @return {number} the amount of the period between this year-month and the end year-month\n * @throws DateTimeException if the period cannot be calculated\n * @throws ArithmeticException if numeric overflow occurs\n */\n until(endExclusive, unit) {\n requireNonNull(endExclusive, 'endExclusive');\n requireNonNull(unit, 'unit');\n requireInstance(endExclusive, Temporal, 'endExclusive');\n requireInstance(unit, TemporalUnit, 'unit');\n\n const end = YearMonth.from(endExclusive);\n if (unit instanceof ChronoUnit) {\n const monthsUntil = end._getProlepticMonth() - this._getProlepticMonth(); // no overflow\n switch (unit) {\n case ChronoUnit.MONTHS: return monthsUntil;\n case ChronoUnit.YEARS: return MathUtil.intDiv(monthsUntil, 12);\n case ChronoUnit.DECADES: return MathUtil.intDiv(monthsUntil, 120);\n case ChronoUnit.CENTURIES: return MathUtil.intDiv(monthsUntil, 1200);\n case ChronoUnit.MILLENNIA: return MathUtil.intDiv(monthsUntil, 12000);\n case ChronoUnit.ERAS: return end.getLong(ChronoField.ERA) - this.getLong(ChronoField.ERA);\n }\n throw new UnsupportedTemporalTypeException(`Unsupported unit: ${unit}`);\n }\n return unit.between(this, end);\n }\n\n //-----------------------------------------------------------------------\n /**\n * Combines this year-month with a day-of-month to create a {@link LocalDate}.\n *\n * This returns a {@link LocalDate} formed from this year-month and the specified day-of-month.\n *\n * The day-of-month value must be valid for the year-month.\n *\n * This method can be used as part of a chain to produce a date:\n *
\n     *  LocalDate date = year.atMonth(month).atDay(day);\n     * 
\n *\n * @param {number} dayOfMonth the day-of-month to use, from 1 to 31\n * @return {LocalDate} the date formed from this year-month and the specified day, not null\n * @throws DateTimeException if the day is invalid for the year-month\n * @see #isValidDay(int)\n */\n atDay(dayOfMonth) {\n requireNonNull(dayOfMonth, 'dayOfMonth');\n return LocalDate.of(this._year, this._month, dayOfMonth);\n }\n\n /**\n * Returns a {@link LocalDate} at the end of the month.\n *\n * This returns a {@link LocalDate} based on this year-month.\n * The day-of-month is set to the last valid day of the month, taking\n * into account leap years.\n *\n * This method can be used as part of a chain to produce a date:\n *
\n     *  LocalDate date = year.atMonth(month).atEndOfMonth();\n     * 
\n *\n * @return {LocalDate} the last valid date of this year-month, not null\n */\n atEndOfMonth() {\n return LocalDate.of(this._year, this._month, this.lengthOfMonth());\n }\n\n //-----------------------------------------------------------------------\n /**\n * Compares this year-month to another year-month.\n *\n * The comparison is based first on the value of the year, then on the value of the month.\n * It is \"consistent with equals\", as defined by {@link Comparable}.\n *\n * @param {YearMonth} other the other year-month to compare to, not null\n * @return {number} the comparator value, negative if less, positive if greater\n */\n compareTo(other) {\n requireNonNull(other, 'other');\n requireInstance(other, YearMonth, 'other');\n let cmp = (this._year - other.year());\n if (cmp === 0) {\n cmp = (this._month - other.monthValue());\n }\n return cmp;\n }\n\n /**\n * Is this year-month after the specified year-month.\n *\n * @param {YearMonth} other the other year-month to compare to, not null\n * @return {boolean} true if this is after the specified year-month\n */\n isAfter(other) {\n return this.compareTo(other) > 0;\n }\n\n /**\n * Is this year-month before the specified year-month.\n *\n * @param {YearMonth} other the other year-month to compare to, not null\n * @return {boolean} true if this point is before the specified year-month\n */\n isBefore(other) {\n return this.compareTo(other) < 0;\n }\n\n //-----------------------------------------------------------------------\n /**\n * Checks if this year-month is equal to another year-month.\n *\n * The comparison is based on the time-line position of the year-months.\n *\n * @param {*} obj the object to check, null returns false\n * @return {boolean} true if this is equal to the other year-month\n */\n equals(obj) {\n if (this === obj) {\n return true;\n }\n if (obj instanceof YearMonth) {\n const other = obj;\n return this.year() === other.year() && this.monthValue() === other.monthValue();\n }\n return false;\n }\n\n //-----------------------------------------------------------------------\n /**\n * Outputs this year-month as a string, such as `2007-12`.\n *\n * The output will be in the format {@link yyyy-MM}:\n *\n * @return {String} a string representation of this year-month, not null\n */\n toString() {\n return PARSER.format(this);\n }\n\n /**\n * toJSON() use by JSON.stringify\n * delegates to toString()\n *\n * @return {string}\n */\n toJSON() {\n return this.toString();\n }\n\n /**\n * Outputs this year-month as a string using the formatter.\n *\n * @param {DateTimeFormatter} formatter the formatter to use, not null\n * @return {String} the formatted year-month string, not null\n * @throws DateTimeException if an error occurs during printing\n */\n format(formatter) {\n requireNonNull(formatter, 'formatter');\n return formatter.format(this);\n }\n\n}\n\nlet PARSER;\n\nexport function _init() {\n\n PARSER = new DateTimeFormatterBuilder()\n .appendValue(ChronoField.YEAR, 4, 10, SignStyle.EXCEEDS_PAD)\n .appendLiteral('-')\n .appendValue(ChronoField.MONTH_OF_YEAR, 2)\n .toFormatter();\n\n YearMonth.FROM = createTemporalQuery('YearMonth.FROM', (temporal) => {\n return YearMonth.from(temporal);\n });\n}\n","/**\n * @copyright (c) 2016, Philipp Thürwächter & Pattrick Hüper\n * @copyright (c) 2007-present, Stephen Colebourne & Michael Nascimento Santos\n * @license BSD-3-Clause (see LICENSE in the root directory of this source tree)\n */\n\nimport { DateTimeException, UnsupportedTemporalTypeException } from './errors';\nimport { requireNonNull, requireInstance } from './assert';\nimport { MathUtil } from './MathUtil';\n\nimport { ChronoField } from './temporal/ChronoField';\nimport { ChronoUnit } from './temporal/ChronoUnit';\nimport { Clock } from './Clock';\nimport { DateTimeFormatter } from './format/DateTimeFormatter';\nimport { DateTimeFormatterBuilder } from './format/DateTimeFormatterBuilder';\nimport { IsoChronology } from './chrono/IsoChronology';\nimport { LocalDate } from './LocalDate';\nimport { Month } from './Month';\nimport { MonthDay } from './MonthDay';\nimport { SignStyle } from './format/SignStyle';\nimport { Temporal } from './temporal/Temporal';\nimport { TemporalAccessor } from './temporal/TemporalAccessor';\nimport { TemporalField } from './temporal/TemporalField';\nimport { TemporalQueries } from './temporal/TemporalQueries';\nimport { TemporalQuery, createTemporalQuery } from './temporal/TemporalQuery';\nimport { TemporalUnit } from './temporal/TemporalUnit';\nimport { YearConstants } from './YearConstants';\nimport { YearMonth } from './YearMonth';\nimport { ZoneId } from './ZoneId';\n\n\n/**\n * A year in the ISO-8601 calendar system, such as `2007`.\n *\n * {@link Year} is an immutable date-time object that represents a year.\n * Any field that can be derived from a year can be obtained.\n *\n * **Note that years in the ISO chronology only align with years in the\n * Gregorian-Julian system for modern years. Parts of Russia did not switch to the\n * modern Gregorian/ISO rules until 1920.\n * As such, historical years must be treated with caution.**\n *\n * This class does not store or represent a month, day, time or time-zone.\n * For example, the value \"2007\" can be stored in a {@link Year}.\n *\n * Years represented by this class follow the ISO-8601 standard and use\n * the proleptic numbering system. Year 1 is preceded by year 0, then by year -1.\n *\n * The ISO-8601 calendar system is the modern civil calendar system used today\n * in most of the world. It is equivalent to the proleptic Gregorian calendar\n * system, in which today's rules for leap years are applied for all time.\n * For most applications written today, the ISO-8601 rules are entirely suitable.\n * However, any application that makes use of historical dates, and requires them\n * to be accurate will find the ISO-8601 approach unsuitable.\n *\n * ### Static properties of Class {@link LocalDate}\n *\n * Year.MIN_VALUE = -999.999;\n *\n * The minimum supported year. Theoretically the minimum could be -28.542.4812 years in javascript.\n * approx LocalDateTime.ofEpochSecond(Number.MIN_SAFE_INTEGER, 0, ZoneOffset.UTC).year()\n *\n * Year.MAX_VALUE = 999.999;\n *\n * The maximum supported year. Theoretically the maximum could be 285.428.751 years in javascript.\n * approx LocalDateTime.ofEpochSecond(Number.MAX_SAFE_INTEGER, 0, ZoneOffset.UTC).year()\n *\n */\nexport class Year extends Temporal {\n\n /**\n *\n * @param {number} value\n * @private\n */\n constructor(value) {\n super();\n this._year = MathUtil.safeToInt(value);\n }\n\n /**\n *\n * @return {number} gets the value\n */\n value() {\n return this._year;\n }\n\n /**\n * function overloading for {@link Year.now}\n *\n * if called without arguments, then {@link Year.now0} is executed.\n\n * if called with 1 arguments and first argument is an instance of ZoneId, then {@link Year.nowZoneId} is executed.\n *\n * Otherwise {@link Year.nowClock} is executed.\n *\n * @param {!(ZoneId|Clock)} zoneIdOrClock\n * @returns {Year}\n */\n static now(zoneIdOrClock = undefined) {\n if (zoneIdOrClock === undefined) {\n return Year.now0();\n } else if (zoneIdOrClock instanceof ZoneId) {\n return Year.nowZoneId(zoneIdOrClock);\n } else {\n return Year.nowClock(zoneIdOrClock);\n }\n }\n\n /**\n * Obtains the current year from the system clock in the default time-zone.\n *\n * This will query the system clock (see {@link Clock#systemDefaultZone}) in the default\n * time-zone to obtain the current year.\n *\n * Using this method will prevent the ability to use an alternate clock for testing\n * because the clock is hard-coded.\n *\n * @return {Year} the current year using the system clock and default time-zone, not null\n */\n static now0() {\n return Year.nowClock(Clock.systemDefaultZone());\n }\n\n /**\n * Obtains the current year from the system clock in the specified time-zone.\n *\n * This will query the system clock (see {@link Clock#system}) to obtain the current year.\n * Specifying the time-zone avoids dependence on the default time-zone.\n *\n * Using this method will prevent the ability to use an alternate clock for testing\n * because the clock is hard-coded.\n *\n * @param {ZoneId} zone the zone ID to use, not null\n * @return {Year} the current year using the system clock, not null\n */\n static nowZoneId(zone) {\n requireNonNull(zone, 'zone');\n requireInstance(zone, ZoneId, 'zone');\n return Year.nowClock(Clock.system(zone));\n }\n\n /**\n * Obtains the current year from the specified clock.\n *\n * This will query the specified clock to obtain the current year.\n * Using this method allows the use of an alternate clock for testing.\n * The alternate clock may be introduced using dependency injection.\n *\n * @param {Clock} clock the clock to use, not null\n * @return {Year} the current year, not null\n */\n static nowClock(clock) {\n requireNonNull(clock, 'clock');\n requireInstance(clock, Clock, 'clock');\n const now = LocalDate.now(clock); // called once\n return Year.of(now.year());\n }\n /**\n * Obtains an instance of {@link Year}.\n *\n * This method accepts a year value from the proleptic ISO calendar system.\n *\n * * The year 2AD/CE is represented by 2.\n * * The year 1AD/CE is represented by 1.\n * * The year 1BC/BCE is represented by 0.\n * * The year 2BC/BCE is represented by -1.\n *\n * @param {Number} isoYear the ISO proleptic year to represent, from {@link MIN_VALUE} to {@link MAX_VALUE}\n * @return {Year} the year, not null\n * @throws DateTimeException if the field is invalid\n */\n static of(isoYear) {\n requireNonNull(isoYear, 'isoYear');\n ChronoField.YEAR.checkValidValue(isoYear);\n return new Year(isoYear);\n }\n\n //-----------------------------------------------------------------------\n /**\n * Obtains an instance of {@link Year} from a temporal object.\n *\n * A {@link TemporalAccessor} represents some form of date and time information.\n * This factory converts the arbitrary temporal object to an instance of {@link Year}.\n *\n * The conversion extracts the {@link ChronoField#YEAR} field.\n * The extraction is only permitted if the temporal object has an ISO\n * chronology, or can be converted to a {@link LocalDate}.\n *\n * This method matches the signature of the functional interface {@link TemporalQuery}\n * allowing it to be used in queries via method reference, {@link Year::from}.\n *\n * @param {TemporalAccessor} temporal the temporal object to convert, not null\n * @return {Year} the year, not null\n * @throws DateTimeException if unable to convert to a {@link Year}\n */\n static from(temporal) {\n requireNonNull(temporal, 'temporal');\n requireInstance(temporal, TemporalAccessor, 'temporal');\n if (temporal instanceof Year) {\n return temporal;\n }\n try {\n /* TODO: we support only ISO for now\n if (IsoChronology.INSTANCE.equals(Chronology.from(temporal)) == false) {\n temporal = LocalDate.from(temporal);\n }*/\n return Year.of(temporal.get(ChronoField.YEAR));\n } catch (ex) {\n throw new DateTimeException(`Unable to obtain Year from TemporalAccessor: ${ \n temporal}, type ${temporal && temporal.constructor != null ? temporal.constructor.name : ''}`);\n }\n }\n //-----------------------------------------------------------------------\n /**\n * function overloading for {@link Year.parse}\n *\n * if called with 1 argument, then {@link Year.parseText} is executed.\n *\n * Otherwise {@link Year.parseTextFormatter} is executed.\n *\n * @param {!(String)} text\n * @param {?DateTimeFormatter} formatter\n * @returns {Year}\n */\n static parse(text, formatter) {\n if (arguments.length <= 1) {\n return Year.parseText(text);\n } else {\n return Year.parseTextFormatter(text, formatter);\n }\n }\n\n /**\n * Obtains an instance of {@link Year} from a text string such as `2007`.\n *\n * The string must represent a valid year.\n * Years outside the range 0000 to 9999 must be prefixed by the plus or minus symbol.\n *\n * @param {String} text the text to parse such as \"2007\", not null\n * @return {Year} the parsed year, not null\n * @throws DateTimeParseException if the text cannot be parsed\n */\n static parseText(text) {\n requireNonNull(text, 'text');\n return Year.parse(text, PARSER);\n }\n\n /**\n * Obtains an instance of {@link Year} from a text string using a specific formatter.\n *\n * The text is parsed using the formatter, returning a year.\n *\n * @param {String} text the text to parse, not null\n * @param {DateTimeFormatter} formatter the formatter to use, not null\n * @return {Year} the parsed year, not null\n * @throws DateTimeParseException if the text cannot be parsed\n */\n static parseTextFormatter(text, formatter = PARSER) {\n requireNonNull(text, 'text');\n requireNonNull(formatter, 'formatter');\n requireInstance(formatter, DateTimeFormatter, 'formatter');\n return formatter.parse(text, Year.FROM);\n }\n\n //-------------------------------------------------------------------------\n /**\n * Checks if the year is a leap year, according to the ISO proleptic\n * calendar system rules.\n *\n * This method applies the current rules for leap years across the whole time-line.\n * In general, a year is a leap year if it is divisible by four without\n * remainder. However, years divisible by 100, are not leap years, with\n * the exception of years divisible by 400 which are.\n *\n * For example, 1904 is a leap year it is divisible by 4.\n * 1900 was not a leap year as it is divisible by 100, however 2000 was a\n * leap year as it is divisible by 400.\n *\n * The calculation is proleptic - applying the same rules into the far future and far past.\n * This is historically inaccurate, but is correct for the ISO-8601 standard.\n *\n * @param {number} year the year to check\n * @return {boolean} true if the year is leap, false otherwise\n */\n static isLeap(year) {\n return ((MathUtil.intMod(year, 4) === 0) && ((MathUtil.intMod(year, 100) !== 0) || (MathUtil.intMod(year, 400) === 0)));\n }\n\n /**\n * function overloading for {@link YearMonth.isSupported}\n *\n * if called with 1 argument and first argument is an instance of TemporalField, then {@link YearMonth.isSupportedField} is executed,\n *\n * otherwise {@link YearMonth.isSupportedUnit} is executed\n *\n * @param {!(TemporalField|ChronoUnit)} fieldOrUnit\n * @returns {boolean}\n */\n isSupported(fieldOrUnit) {\n if (arguments.length === 1 && fieldOrUnit instanceof TemporalField) {\n return this.isSupportedField(fieldOrUnit);\n } else {\n return this.isSupportedUnit(fieldOrUnit);\n }\n }\n\n /**\n * Checks if the specified field is supported.\n *\n * This checks if this year can be queried for the specified field.\n * If false, then calling {@link range} and {@link get} will throw an exception.\n *\n * If the field is a {@link ChronoField} then the query is implemented here.\n * The supported fields (see {@link isSupported}) will return valid\n * values based on this date-time.\n * The supported fields are:\n *\n * * {@link YEAR_OF_ERA}\n * * {@link YEAR}\n * * {@link ERA}\n *\n * All other {@link ChronoField} instances will return false.\n *\n * If the field is not a {@link ChronoField}, then the result of this method\n * is obtained by invoking {@link TemporalField.isSupportedBy}\n * passing `this` as the argument.\n * Whether the field is supported is determined by the field.\n *\n * @param {TemporalField} field the field to check, null returns false\n * @return {boolean} true if the field is supported on this year, false if not\n */\n isSupportedField(field) {\n if (field instanceof ChronoField) {\n return field === ChronoField.YEAR || field === ChronoField.YEAR_OF_ERA || field === ChronoField.ERA;\n }\n return field != null && field.isSupportedBy(this);\n }\n\n isSupportedUnit(unit) {\n if (unit instanceof ChronoUnit) {\n return unit === ChronoUnit.YEARS || unit === ChronoUnit.DECADES || unit === ChronoUnit.CENTURIES || unit === ChronoUnit.MILLENNIA || unit === ChronoUnit.ERAS;\n }\n return unit != null && unit.isSupportedBy(this);\n }\n\n /**\n * Gets the range of valid values for the specified field.\n *\n * The range object expresses the minimum and maximum valid values for a field.\n * This year is used to enhance the accuracy of the returned range.\n * If it is not possible to return the range, because the field is not supported\n * or for some other reason, an exception is thrown.\n *\n * If the field is a {@link ChronoField} then the query is implemented here.\n * The supported fields (see {@link isSupported}) will return\n * appropriate range instances.\n * All other {@link ChronoField} instances will throw a {@link DateTimeException}.\n *\n * If the field is not a {@link ChronoField}, then the result of this method\n * is obtained by invoking {@link TemporalField.rangeRefinedBy}\n * passing `this` as the argument.\n * Whether the range can be obtained is determined by the field.\n *\n * @param {TemporalField} field the field to query the range for, not null\n * @return {ValueRange} the range of valid values for the field, not null\n * @throws DateTimeException if the range for the field cannot be obtained\n */\n range(field) {\n if (this.isSupported(field)) {\n return field.range();\n } else if (field instanceof ChronoField) {\n throw new UnsupportedTemporalTypeException(`Unsupported field: ${field}`);\n }\n return super.range(field);\n }\n\n /**\n * Gets the value of the specified field from this year as an `int`.\n *\n * This queries this year for the value for the specified field.\n * The returned value will always be within the valid range of values for the field.\n * If it is not possible to return the value, because the field is not supported\n * or for some other reason, an exception is thrown.\n *\n * If the field is a {@link ChronoField} then the query is implemented here.\n * The supported fields (see {@link isSupported}) will return valid\n * values based on this year.\n * All other {@link ChronoField} instances will throw a {@link DateTimeException}.\n *\n * If the field is not a {@link ChronoField}, then the result of this method\n * is obtained by invoking {@link TemporalField.getFrom}\n * passing `this` as the argument. Whether the value can be obtained,\n * and what the value represents, is determined by the field.\n *\n * @param {TemporalField} field the field to get, not null\n * @return {number} the value for the field\n * @throws DateTimeException if a value for the field cannot be obtained\n * @throws ArithmeticException if numeric overflow occurs\n */\n get(field) {\n return this.range(field).checkValidIntValue(this.getLong(field), field);\n }\n\n /**\n * Gets the value of the specified field from this year as a `long`.\n *\n * This queries this year for the value for the specified field.\n * If it is not possible to return the value, because the field is not supported\n * or for some other reason, an exception is thrown.\n *\n * If the field is a {@link ChronoField} then the query is implemented here.\n * The supported fields (see {@link isSupported}) will return valid\n * values based on this year.\n * All other {@link ChronoField} instances will throw a {@link DateTimeException}.\n *\n * If the field is not a {@link ChronoField}, then the result of this method\n * is obtained by invoking {@link TemporalField.getFrom}\n * passing `this` as the argument. Whether the value can be obtained,\n * and what the value represents, is determined by the field.\n *\n * @param {TemporalField} field the field to get, not null\n * @return {number} the value for the field\n * @throws DateTimeException if a value for the field cannot be obtained\n * @throws ArithmeticException if numeric overflow occurs\n */\n getLong(field) {\n requireNonNull(field, 'field');\n if (field instanceof ChronoField) {\n switch (field) {\n case ChronoField.YEAR_OF_ERA: return (this._year < 1 ? 1 - this._year : this._year);\n case ChronoField.YEAR: return this._year;\n case ChronoField.ERA: return (this._year < 1 ? 0 : 1);\n }\n throw new UnsupportedTemporalTypeException(`Unsupported field: ${field}`);\n }\n return field.getFrom(this);\n }\n\n //-----------------------------------------------------------------------\n /**\n * Checks if the year is a leap year, according to the ISO proleptic\n * calendar system rules.\n *\n * This method applies the current rules for leap years across the whole time-line.\n * In general, a year is a leap year if it is divisible by four without\n * remainder. However, years divisible by 100, are not leap years, with\n * the exception of years divisible by 400 which are.\n *\n * For example, 1904 is a leap year it is divisible by 4.\n * 1900 was not a leap year as it is divisible by 100, however 2000 was a\n * leap year as it is divisible by 400.\n *\n * The calculation is proleptic - applying the same rules into the far future and far past.\n * This is historically inaccurate, but is correct for the ISO-8601 standard.\n *\n * @return {boolean} true if the year is leap, false otherwise\n */\n isLeap() {\n return Year.isLeap(this._year);\n }\n\n //-----------------------------------------------------------------------\n\n /**\n * Returns a copy of this year with the specified field set to a new value.\n *\n * This returns a new {@link Year}, based on this one, with the value\n * for the specified field changed.\n * If it is not possible to set the value, because the field is not supported or for\n * some other reason, an exception is thrown.\n *\n * If the field is a {@link ChronoField} then the adjustment is implemented here.\n * The supported fields behave as follows:\n *\n * * {@link YEAR_OF_ERA} -\n * Returns a {@link Year} with the specified year-of-era\n * The era will be unchanged.\n * * {@link YEAR} -\n * Returns a {@link Year} with the specified year.\n * This completely replaces the date and is equivalent to {@link of}.\n * * {@link ERA} -\n * Returns a {@link Year} with the specified era.\n * The year-of-era will be unchanged.\n *\n * In all cases, if the new value is outside the valid range of values for the field\n * then a {@link DateTimeException} will be thrown.\n *\n * All other {@link ChronoField} instances will throw a {@link DateTimeException}.\n *\n * If the field is not a {@link ChronoField}, then the result of this method\n * is obtained by invoking {@link TemporalField.adjustInto}\n * passing `this` as the argument. In this case, the field determines\n * whether and how to adjust the instant.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {TemporalField} field the field to set in the result, not null\n * @param {number} newValue the new value of the field in the result\n * @returns {Year} based on `this` with the specified field set, not null\n * @throws DateTimeException if the field cannot be set\n * @throws ArithmeticException if numeric overflow occurs\n */\n _withField(field, newValue) {\n requireNonNull(field, 'field');\n requireInstance(field, TemporalField, 'field');\n if (field instanceof ChronoField) {\n field.checkValidValue(newValue);\n switch (field) {\n case ChronoField.YEAR_OF_ERA:\n return Year.of((this._year < 1 ? 1 - newValue : newValue));\n case ChronoField.YEAR:\n return Year.of(newValue);\n case ChronoField.ERA:\n return (this.getLong(ChronoField.ERA) === newValue ? this : Year.of(1 - this._year));\n }\n throw new UnsupportedTemporalTypeException(`Unsupported field: ${field}`);\n }\n return field.adjustInto(this, newValue);\n }\n\n /**\n * @param {number} amountToAdd\n * @param {TemporalUnit} unit\n * @return {Year} based on this year with the addition made, not null\n * @throws DateTimeException if the addition cannot be made\n * @throws ArithmeticException if numeric overflow occurs\n */\n _plusUnit(amountToAdd, unit) {\n requireNonNull(amountToAdd, 'amountToAdd');\n requireNonNull(unit, 'unit');\n requireInstance(unit, TemporalUnit, 'unit');\n if (unit instanceof ChronoUnit) {\n switch (unit) {\n case ChronoUnit.YEARS: return this.plusYears(amountToAdd);\n case ChronoUnit.DECADES: return this.plusYears(MathUtil.safeMultiply(amountToAdd, 10));\n case ChronoUnit.CENTURIES: return this.plusYears(MathUtil.safeMultiply(amountToAdd, 100));\n case ChronoUnit.MILLENNIA: return this.plusYears(MathUtil.safeMultiply(amountToAdd, 1000));\n case ChronoUnit.ERAS: return this.with(ChronoField.ERA, MathUtil.safeAdd(this.getLong(ChronoField.ERA), amountToAdd));\n }\n throw new UnsupportedTemporalTypeException(`Unsupported unit: ${unit}`);\n }\n return unit.addTo(this, amountToAdd);\n }\n\n /**\n * Returns a copy of this year with the specified number of years added.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {number} yearsToAdd the years to add, may be negative\n * @return {Year} based on this year with the period added, not null\n * @throws DateTimeException if the result exceeds the supported year range\n */\n plusYears(yearsToAdd) {\n if (yearsToAdd === 0) {\n return this;\n }\n return Year.of(ChronoField.YEAR.checkValidIntValue(MathUtil.safeAdd(this._year, yearsToAdd)));\n }\n\n //-----------------------------------------------------------------------\n\n /**\n * Returns a copy of this year with the specified number of years subtracted.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {number} yearsToSubtract the years to subtract, may be negative\n * @return {Year} based on this year with the period subtracted, not null\n * @throws DateTimeException if the result exceeds the supported year range\n */\n minusYears(yearsToSubtract) {\n return (yearsToSubtract === MathUtil.MIN_SAFE_INTEGER ? this.plusYears(MathUtil.MAX_SAFE_INTEGER).plusYears(1) : this.plusYears(-yearsToSubtract));\n }\n\n /**\n * Adjusts the specified temporal object to have this year.\n *\n * This returns a temporal object of the same observable type as the input\n * with the year changed to be the same as this.\n *\n * The adjustment is equivalent to using {@link Temporal#with}\n * passing {@link ChronoField#YEAR} as the field.\n * If the specified temporal object does not use the ISO calendar system then\n * a {@link DateTimeException} is thrown.\n *\n * In most cases, it is clearer to reverse the calling pattern by using\n * {@link Temporal#with}:\n *
\n     *   // these two lines are equivalent, but the second approach is recommended\n     *   temporal = thisYear.adjustInto(temporal);\n     *   temporal = temporal.with(thisYear);\n     * 
\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {Temporal} temporal the target object to be adjusted, not null\n * @return {Temporal} the adjusted object, not null\n * @throws DateTimeException if unable to make the adjustment\n * @throws ArithmeticException if numeric overflow occurs\n */\n adjustInto(temporal) {\n requireNonNull(temporal, 'temporal');\n /* TODO: only IsoChronology for now\n if (Chronology.from(temporal).equals(IsoChronology.INSTANCE) == false) {\n throw new DateTimeException(\"Adjustment only supported on ISO date-time\");\n }*/\n return temporal.with(ChronoField.YEAR, this._year);\n }\n\n /**\n * Checks if the month-day is valid for this year.\n *\n * This method checks whether this year and the input month and day form\n * a valid date.\n *\n * @param {MonthDay} monthDay the month-day to validate, null returns false\n * @return {boolean} true if the month and day are valid for this year\n */\n isValidMonthDay(monthDay) {\n return monthDay != null && monthDay.isValidYear(this._year);\n }\n\n /**\n * Gets the length of this year in days.\n *\n * @return {number} the length of this year in days, 365 or 366\n */\n length() {\n return this.isLeap() ? 366 : 365;\n }\n\n //-----------------------------------------------------------------------\n /**\n * Combines this year with a day-of-year to create a {@link LocalDate}.\n *\n * This returns a {@link LocalDate} formed from this year and the specified day-of-year.\n *\n * The day-of-year value 366 is only valid in a leap year.\n *\n * @param {number} dayOfYear the day-of-year to use, not null\n * @return {LocalDate} the local date formed from this year and the specified date of year, not null\n * @throws DateTimeException if the day of year is zero or less, 366 or greater or equal\n * to 366 and this is not a leap year\n */\n atDay(dayOfYear) {\n return LocalDate.ofYearDay(this._year, dayOfYear);\n }\n\n /**\n * function overloading for {@link Year.atMonth}\n *\n * if called with 1 arguments and first argument is instance of Month, then {@link Year.atMonthMonth} is executed.\n *\n * Otherwise {@link Year.atMonthNumber} is executed.\n *\n * @param {Month|number} monthOrNumber\n * @returns {YearMonth}\n */\n atMonth(monthOrNumber) {\n if (arguments.length === 1 && monthOrNumber instanceof Month) {\n return this.atMonthMonth(monthOrNumber);\n } else {\n return this.atMonthNumber(monthOrNumber);\n }\n }\n\n /**\n * Combines this year with a month to create a {@link YearMonth}.\n *\n * This returns a {@link YearMonth} formed from this year and the specified month.\n * All possible combinations of year and month are valid.\n *\n * This method can be used as part of a chain to produce a date:\n *
\n     *  LocalDate date = year.atMonth(month).atDay(day);\n     * 
\n *\n * @param {Month} month the month-of-year to use, not null\n * @return {YearMonth} the year-month formed from this year and the specified month, not null\n */\n atMonthMonth(month) {\n requireNonNull(month, 'month');\n requireInstance(month, Month, 'month');\n return YearMonth.of(this._year, month);\n }\n\n /**\n * Combines this year with a month to create a {@link YearMonth}.\n *\n * This returns a {@link YearMonth} formed from this year and the specified month.\n * All possible combinations of year and month are valid.\n *\n * This method can be used as part of a chain to produce a date:\n *
\n     *  LocalDate date = year.atMonth(month).atDay(day);\n     * 
\n *\n * @param {number} month the month-of-year to use, from 1 (January) to 12 (December)\n * @return {YearMonth} the year-month formed from this year and the specified month, not null\n * @throws DateTimeException if the month is invalid\n */\n atMonthNumber(month) {\n requireNonNull(month, 'month');\n return YearMonth.of(this._year, month);\n }\n\n /**\n * Combines this year with a month-day to create a {@link LocalDate}.\n *\n * This returns a {@link LocalDate} formed from this year and the specified month-day.\n *\n * A month-day of February 29th will be adjusted to February 28th in the resulting\n * date if the year is not a leap year.\n *\n * @param {MonthDay} monthDay the month-day to use, not null\n * @return {LocalDate} the local date formed from this year and the specified month-day, not null\n */\n atMonthDay(monthDay) {\n requireNonNull(monthDay, 'monthDay');\n requireInstance(monthDay, MonthDay, 'monthDay');\n return monthDay.atYear(this._year);\n }\n\n\n //-----------------------------------------------------------------------\n /**\n * Queries this year using the specified query.\n *\n * This queries this year using the specified query strategy object.\n * The {@link TemporalQuery} object defines the logic to be used to\n * obtain the result. Read the documentation of the query to understand\n * what the result of this method will be.\n *\n * The result of this method is obtained by invoking the\n * {@link TemporalQuery#queryFrom} method on the\n * specified query passing `this` as the argument.\n *\n * @param {TemporalQuery} query the query to invoke, not null\n * @return {*} the query result, null may be returned (defined by the query)\n * @throws DateTimeException if unable to query (defined by the query)\n * @throws ArithmeticException if numeric overflow occurs (defined by the query)\n */\n query(query) {\n requireNonNull(query, 'query()');\n requireInstance(query, TemporalQuery, 'query()');\n if (query === TemporalQueries.chronology()) {\n return IsoChronology.INSTANCE;\n } else if (query === TemporalQueries.precision()) {\n return ChronoUnit.YEARS;\n } else if (query === TemporalQueries.localDate() || query === TemporalQueries.localTime() ||\n query === TemporalQueries.zone() || query === TemporalQueries.zoneId() || query === TemporalQueries.offset()) {\n return null;\n }\n return super.query(query);\n }\n //-----------------------------------------------------------------------\n /**\n * Compares this year to another year.\n *\n * The comparison is based on the value of the year.\n * It is \"consistent with equals\", as defined by {@link Comparable}.\n *\n * @param {Year} other the other year to compare to, not null\n * @return {number} the comparator value, negative if less, positive if greater\n */\n compareTo(other) {\n requireNonNull(other, 'other');\n requireInstance(other, Year, 'other');\n return this._year - other._year;\n }\n\n /**\n * Is this year after the specified year.\n *\n * @param {Year} other the other year to compare to, not null\n * @return {boolean} true if this is after the specified year\n */\n isAfter(other) {\n requireNonNull(other, 'other');\n requireInstance(other, Year, 'other');\n return this._year > other._year;\n }\n\n /**\n * Is this year before the specified year.\n *\n * @param {Year} other the other year to compare to, not null\n * @return {boolean} true if this point is before the specified year\n */\n isBefore(other) {\n requireNonNull(other, 'other');\n requireInstance(other, Year, 'other');\n return this._year < other._year;\n }\n /**\n * Outputs this year as a string using the formatter.\n *\n * @param {DateTimeFormatter} formatter the formatter to use, not null\n * @return {String} the formatted year string, not null\n * @throws DateTimeException if an error occurs during printing\n */\n format(formatter) {\n requireNonNull(formatter, 'formatter');\n requireInstance(formatter, DateTimeFormatter, 'formatter');\n return formatter.format(this);\n }\n\n /**\n * Checks if this year is equal to the specified {@link Year}.\n *\n * The comparison is based on the value\n *\n * @param {*} other - the other year, null returns false\n * @return {boolean} true if the other duration is equal to this one\n */\n equals(other) {\n if (this === other) {\n return true;\n }\n if (other instanceof Year) {\n return this.value() === other.value();\n }\n return false;\n }\n /**\n * Outputs this year as a string.\n *\n * @return {String} a string representation of this year, not null\n */\n toString() {\n return `${this._year}`;\n }\n\n /**\n * toJSON() use by JSON.stringify\n * delegates to toString()\n *\n * @return {string}\n */\n toJSON() {\n return this.toString();\n }\n\n /**\n * Calculates the amount of time until another temporal in terms of the specified unit.\n * This calculates the amount of time between two temporal objects in terms of a single {@link TemporalUnit}. The start and end points are this and the specified temporal. The end point is converted to be of the same type as the start point if different. The result will be negative if the end is before the start. For example, the amount in hours between two temporal objects can be calculated using `startTime.until(endTime, HOURS)`.\n *\n * The calculation returns a whole number, representing the number of complete units between the two temporals. For example, the amount in hours between the times 11:30 and 13:29 will only be one hour as it is one minute short of two hours.\n *\n * There are two equivalent ways of using this method. The first is to invoke this method directly. The second is to use `TemporalUnit.between(Temporal, Temporal)`:\n *\n *
\n     *    // these two lines are equivalent\n     *    temporal = start.until(end, unit);\n     *    temporal = unit.between(start, end);\n     * 
\n *\n * The choice should be made based on which makes the code more readable.\n * For example, this method allows the number of days between two dates to be calculated:\n *\n *
\n     *   daysBetween = start.until(end, DAYS);\n     *   // or alternatively\n     *   daysBetween = DAYS.between(start, end);\n     * 
\n *\n * ### Implementation Requirements:\n * Implementations must begin by checking to ensure that the input temporal object is of the same observable type as the implementation. They must then perform the calculation for all instances of {@link ChronoUnit}. An {@link UnsupportedTemporalTypeException} must be thrown for {@link ChronoUnit} instances that are unsupported.\n * If the unit is not a {@link ChronoUnit}, then the result of this method is obtained by invoking `TemporalUnit.between(Temporal, Temporal)` passing this as the first argument and the converted input temporal as the second argument.\n *\n * In summary, implementations must behave in a manner equivalent to this pseudo-code:\n *\n *
\n     *   // convert the end temporal to the same type as this class\n     *   if (unit instanceof ChronoUnit) {\n     *     // if unit is supported, then calculate and return result\n     *     // else throw UnsupportedTemporalTypeException for unsupported units\n     *   }\n     *   return unit.between(this, convertedEndTemporal);\n     * 
\n *\n * Note that the unit's between method must only be invoked if the two temporal objects have exactly the same type evaluated by `getClass()`.\n *\n * Implementations must ensure that no observable state is altered when this read-only method is invoked.\n *\n * @param {Temporal} endExclusive - the end temporal, exclusive, converted to be of the same type as this object, not null\n * @param {TemporalUnit} unit - the unit to measure the amount in, not null\n * @return {number} the amount of time between this temporal object and the specified one in terms of the unit; positive if the specified object is later than this one, negative if it is earlier than this one\n * @throws DateTimeException - if the amount cannot be calculated, or the end temporal cannot be converted to the same type as this temporal\n * @throws UnsupportedTemporalTypeException - if the unit is not supported\n * @throws ArithmeticException - if numeric overflow occurs\n */\n until(endExclusive, unit) {\n const end = Year.from(endExclusive);\n\n if (unit instanceof ChronoUnit) {\n const yearsUntil = end.value() - this.value();\n switch (unit) {\n case ChronoUnit.YEARS:\n return yearsUntil;\n case ChronoUnit.DECADES:\n return MathUtil.intDiv(yearsUntil, 10);\n case ChronoUnit.CENTURIES:\n return MathUtil.intDiv(yearsUntil, 100);\n case ChronoUnit.MILLENNIA:\n return MathUtil.intDiv(yearsUntil, 1000);\n case ChronoUnit.ERAS:\n return end.getLong(ChronoField.ERA) - this.getLong(ChronoField.ERA);\n }\n throw new UnsupportedTemporalTypeException(`Unsupported unit: ${unit}`);\n }\n return unit.between(this, end);\n }\n}\n\nlet PARSER;\n\nexport function _init() {\n\n Year.MIN_VALUE = YearConstants.MIN_VALUE;\n Year.MAX_VALUE = YearConstants.MAX_VALUE;\n\n PARSER = new DateTimeFormatterBuilder()\n .appendValue(ChronoField.YEAR, 4, 10, SignStyle.EXCEEDS_PAD)\n .toFormatter();\n\n Year.FROM = createTemporalQuery('Year.FROM', (temporal) => {\n return Year.from(temporal);\n });\n}\n","/*\n * @copyright (c) 2016, Philipp Thürwächter & Pattrick Hüper\n * @copyright (c) 2007-present, Stephen Colebourne & Michael Nascimento Santos\n * @license BSD-3-Clause (see LICENSE in the root directory of this source tree)\n */\n\nimport { abstractMethodFail } from '../assert';\n\n/**\n * Strategy for adjusting a temporal object.\n *\n * Adjusters are a key tool for modifying temporal objects.\n * They exist to externalize the process of adjustment, permitting different\n * approaches, as per the strategy design pattern.\n * Examples might be an adjuster that sets the date avoiding weekends, or one that\n * sets the date to the last day of the month.\n *\n * There are two equivalent ways of using a {@link TemporalAdjuster}.\n * The first is to invoke the method on this interface directly.\n * The second is to use {@link Temporal#with}:\n *
\n *   // these two lines are equivalent, but the second approach is recommended\n *   temporal = thisAdjuster.adjustInto(temporal);\n *   temporal = temporal.with(thisAdjuster);\n * 
\n * It is recommended to use the second approach, {@link with},\n * as it is a lot clearer to read in code.\n *\n * See {@link TemporalAdjusters} for a standard set of adjusters, including finding the\n * last day of the month.\n * Adjusters may also be defined by applications.\n *\n * ### Specification for implementors\n *\n * This interface places no restrictions on the mutability of implementations,\n * however immutability is strongly recommended.\n *\n * @interface\n */\nexport class TemporalAdjuster {\n\n /**\n * Adjusts the specified temporal object.\n *\n * This adjusts the specified temporal object using the logic\n * encapsulated in the implementing class.\n * Examples might be an adjuster that sets the date avoiding weekends, or one that\n * sets the date to the last day of the month.\n *\n * There are two equivalent ways of using this method.\n * The first is to invoke this method directly.\n * The second is to use {@link Temporal#with}:\n *
\n     *   // these two lines are equivalent, but the second approach is recommended\n     *   temporal = thisAdjuster.adjustInto(temporal);\n     *   temporal = temporal.with(thisAdjuster);\n     * 
\n * It is recommended to use the second approach, {@link with},\n * as it is a lot clearer to read in code.\n *\n * ### Specification for implementors\n *\n * The implementation must take the input object and adjust it.\n * The implementation defines the logic of the adjustment and is responsible for\n * documenting that logic. It may use any method on {@link Temporal} to\n * query the temporal object and perform the adjustment.\n * The returned object must have the same observable type as the input object\n *\n * The input object must not be altered.\n * Instead, an adjusted copy of the original must be returned.\n * This provides equivalent, safe behavior for immutable and mutable temporal objects.\n *\n * The input temporal object may be in a calendar system other than ISO.\n * Implementations may choose to document compatibility with other calendar systems,\n * or reject non-ISO temporal objects by querying the chronology (see {@link TemporalQueries#chronology}).\n *\n * This method may be called from multiple threads in parallel.\n * It must be thread-safe when invoked.\n *\n * @param {Temporal} temporal the temporal object to adjust, not null\n * @return {Temporal} an object of the same observable type with the adjustment made, not null\n * @throws DateTimeException if unable to make the adjustment\n * @throws ArithmeticException if numeric overflow occurs\n *\n * @abstract\n */\n // eslint-disable-next-line no-unused-vars\n adjustInto(temporal){\n abstractMethodFail('adjustInto');\n }\n\n}\n","/*\n * @copyright (c) 2016, Philipp Thürwächter & Pattrick Hüper\n * @copyright (c) 2007-present, Stephen Colebourne & Michael Nascimento Santos\n * @license BSD-3-Clause (see LICENSE in the root directory of this source tree)\n */\n\nimport { requireNonNull } from '../assert';\nimport { IllegalStateException } from '../errors';\n\nimport { TemporalAdjuster } from './TemporalAdjuster';\nimport { ChronoField } from '../temporal/ChronoField';\nimport { ChronoUnit } from '../temporal/ChronoUnit';\nimport { MathUtil } from '../MathUtil';\n\n/**\n * Common implementations of {@link TemporalAdjuster}.\n *\n * This class provides common implementations of {@link TemporalAdjuster}.\n * They are especially useful to document the intent of business logic and\n * often link well to requirements.\n * For example, these two pieces of code do the same thing, but the second\n * one is clearer (assuming that there is a static import of this class):\n *
\n *  // direct manipulation\n *  date.withDayOfMonth(1).plusMonths(1).minusDays(1);\n *  // use of an adjuster from this class\n *  date.with(lastDayOfMonth());\n * 
\n * There are two equivalent ways of using a {@link TemporalAdjuster}.\n * The first is to invoke the method on the interface directly.\n * The second is to use {@link Temporal#with}:\n *
\n *   // these two lines are equivalent, but the second approach is recommended\n *   dateTime = adjuster.adjustInto(dateTime);\n *   dateTime = dateTime.with(adjuster);\n * 
\n * It is recommended to use the second approach, {@link with},\n * as it is a lot clearer to read in code.\n *\n * ### Specification for implementors\n *\n * This is a thread-safe utility class.\n * All returned adjusters are immutable and thread-safe.\n *\n * The JDK 8 ofDateAdjuster(UnaryOperator) method is not backported.\n */\nexport class TemporalAdjusters {\n\n //-----------------------------------------------------------------------\n /**\n * Returns the 'first day of month' adjuster, which returns a new date set to\n * the first day of the current month.\n *\n * The ISO calendar system behaves as follows:\n *\n * * The input 2011-01-15 will return 2011-01-01.\n * * The input 2011-02-15 will return 2011-02-01.\n *\n * The behavior is suitable for use with most calendar systems.\n * It is equivalent to:\n *
\n     *  temporal.with(DAY_OF_MONTH, 1);\n     * 
\n *\n * @return {TemporalAdjuster} the first day-of-month adjuster, not null\n */\n static firstDayOfMonth() {\n return Impl.FIRST_DAY_OF_MONTH;\n }\n\n /**\n * Returns the 'last day of month' adjuster, which returns a new date set to\n * the last day of the current month.\n *\n * The ISO calendar system behaves as follows:\n *\n * * The input 2011-01-15 will return 2011-01-31.\n * * The input 2011-02-15 will return 2011-02-28.\n * * The input 2012-02-15 will return 2012-02-29 (leap year).\n * * The input 2011-04-15 will return 2011-04-30.\n *\n * The behavior is suitable for use with most calendar systems.\n * It is equivalent to:\n *
\n     *  long lastDay = temporal.range(DAY_OF_MONTH).getMaximum();\n     *  temporal.with(DAY_OF_MONTH, lastDay);\n     * 
\n *\n * @return {TemporalAdjuster} the last day-of-month adjuster, not null\n */\n static lastDayOfMonth() {\n return Impl.LAST_DAY_OF_MONTH;\n }\n\n /**\n * Returns the 'first day of next month' adjuster, which returns a new date set to\n * the first day of the next month.\n *\n * The ISO calendar system behaves as follows:\n *\n * * The input 2011-01-15 will return 2011-02-01.\n * * The input 2011-02-15 will return 2011-03-01.\n *\n * The behavior is suitable for use with most calendar systems.\n * It is equivalent to:\n *
\n     *  temporal.with(DAY_OF_MONTH, 1).plus(1, MONTHS);\n     * 
\n *\n * @return {TemporalAdjuster} the first day of next month adjuster, not null\n */\n static firstDayOfNextMonth() {\n return Impl.FIRST_DAY_OF_NEXT_MONTH;\n }\n\n //-----------------------------------------------------------------------\n /**\n * Returns the 'first day of year' adjuster, which returns a new date set to\n * the first day of the current year.\n *\n * The ISO calendar system behaves as follows:\n *\n * * The input 2011-01-15 will return 2011-01-01.\n * * The input 2011-02-15 will return 2011-01-01.\n *\n * The behavior is suitable for use with most calendar systems.\n * It is equivalent to:\n *
\n     *  temporal.with(DAY_OF_YEAR, 1);\n     * 
\n *\n * @return {TemporalAdjuster} the first day-of-year adjuster, not null\n */\n static firstDayOfYear() {\n return Impl.FIRST_DAY_OF_YEAR;\n }\n\n /**\n * Returns the 'last day of year' adjuster, which returns a new date set to\n * the last day of the current year.\n *\n * The ISO calendar system behaves as follows:\n *\n * * The input 2011-01-15 will return 2011-12-31.\n * * The input 2011-02-15 will return 2011-12-31.\n *\n * The behavior is suitable for use with most calendar systems.\n * It is equivalent to:\n *
\n     *  long lastDay = temporal.range(DAY_OF_YEAR).getMaximum();\n     *  temporal.with(DAY_OF_YEAR, lastDay);\n     * 
\n *\n * @return {TemporalAdjuster} the last day-of-year adjuster, not null\n */\n static lastDayOfYear() {\n return Impl.LAST_DAY_OF_YEAR;\n }\n\n /**\n * Returns the 'first day of next year' adjuster, which returns a new date set to\n * the first day of the next year.\n *\n * The ISO calendar system behaves as follows:\n *\n * * The input 2011-01-15 will return 2012-01-01.\n *\n * The behavior is suitable for use with most calendar systems.\n * It is equivalent to:\n *
\n     *  temporal.with(DAY_OF_YEAR, 1).plus(1, YEARS);\n     * 
\n *\n * @return {TemporalAdjuster} the first day of next month adjuster, not null\n */\n static firstDayOfNextYear() {\n return Impl.FIRST_DAY_OF_NEXT_YEAR;\n }\n\n //-----------------------------------------------------------------------\n /**\n * Returns the first in month adjuster, which returns a new date\n * in the same month with the first matching day-of-week.\n * This is used for expressions like 'first Tuesday in March'.\n *\n * The ISO calendar system behaves as follows:\n *\n * * The input 2011-12-15 for (MONDAY) will return 2011-12-05.\n * * The input 2011-12-15 for (FRIDAY) will return 2011-12-02.\n *\n * The behavior is suitable for use with most calendar systems.\n * It uses the {@link DAY_OF_WEEK} and {@link DAY_OF_MONTH} fields\n * and the {@link DAYS} unit, and assumes a seven day week.\n *\n * @param {DayOfWeek} dayOfWeek the day-of-week, not null\n * @return {TemporalAdjuster} the first in month adjuster, not null\n */\n static firstInMonth(dayOfWeek) {\n requireNonNull(dayOfWeek, 'dayOfWeek');\n return new DayOfWeekInMonth(1, dayOfWeek);\n }\n\n /**\n * Returns the last in month adjuster, which returns a new date\n * in the same month with the last matching day-of-week.\n * This is used for expressions like 'last Tuesday in March'.\n *\n * The ISO calendar system behaves as follows:\n *\n * * The input 2011-12-15 for (MONDAY) will return 2011-12-26.\n * * The input 2011-12-15 for (FRIDAY) will return 2011-12-30.\n *\n * The behavior is suitable for use with most calendar systems.\n * It uses the {@link DAY_OF_WEEK} and {@link DAY_OF_MONTH} fields\n * and the {@link DAYS} unit, and assumes a seven day week.\n *\n * @param {DayOfWeek} dayOfWeek the day-of-week, not null\n * @return {TemporalAdjuster} the first in month adjuster, not null\n */\n static lastInMonth(dayOfWeek) {\n requireNonNull(dayOfWeek, 'dayOfWeek');\n return new DayOfWeekInMonth(-1, dayOfWeek);\n }\n\n /**\n * Returns the day-of-week in month adjuster, which returns a new date\n * in the same month with the ordinal day-of-week.\n * This is used for expressions like the 'second Tuesday in March'.\n *\n * The ISO calendar system behaves as follows:\n *\n * * The input 2011-12-15 for (1,TUESDAY) will return 2011-12-06.\n * * The input 2011-12-15 for (2,TUESDAY) will return 2011-12-13.\n * * The input 2011-12-15 for (3,TUESDAY) will return 2011-12-20.\n * * The input 2011-12-15 for (4,TUESDAY) will return 2011-12-27.\n * * The input 2011-12-15 for (5,TUESDAY) will return 2012-01-03.\n * * The input 2011-12-15 for (-1,TUESDAY) will return 2011-12-27 (last in month).\n * * The input 2011-12-15 for (-4,TUESDAY) will return 2011-12-06 (3 weeks before last in month).\n * * The input 2011-12-15 for (-5,TUESDAY) will return 2011-11-29 (4 weeks before last in month).\n * * The input 2011-12-15 for (0,TUESDAY) will return 2011-11-29 (last in previous month).\n *\n * For a positive or zero ordinal, the algorithm is equivalent to finding the first\n * day-of-week that matches within the month and then adding a number of weeks to it.\n * For a negative ordinal, the algorithm is equivalent to finding the last\n * day-of-week that matches within the month and then subtracting a number of weeks to it.\n * The ordinal number of weeks is not validated and is interpreted leniently\n * according to this algorithm. This definition means that an ordinal of zero finds\n * the last matching day-of-week in the previous month.\n *\n * The behavior is suitable for use with most calendar systems.\n * It uses the {@link DAY_OF_WEEK} and {@link DAY_OF_MONTH} fields\n * and the {@link DAYS} unit, and assumes a seven day week.\n *\n * @param {Number} ordinal the week within the month, unbounded but typically from -5 to 5\n * @param {DayOfWeek} dayOfWeek the day-of-week, not null\n * @return {TemporalAdjuster} the day-of-week in month adjuster, not null\n */\n static dayOfWeekInMonth(ordinal, dayOfWeek) {\n requireNonNull(dayOfWeek, 'dayOfWeek');\n return new DayOfWeekInMonth(ordinal, dayOfWeek);\n }\n\n //-----------------------------------------------------------------------\n /**\n * Returns the next day-of-week adjuster, which adjusts the date to the\n * first occurrence of the specified day-of-week after the date being adjusted.\n *\n * The ISO calendar system behaves as follows:\n *\n * * The input 2011-01-15 (a Saturday) for parameter (MONDAY) will return 2011-01-17 (two days later).\n * * The input 2011-01-15 (a Saturday) for parameter (WEDNESDAY) will return 2011-01-19 (four days later).\n * * The input 2011-01-15 (a Saturday) for parameter (SATURDAY) will return 2011-01-22 (seven days later).\n *\n * The behavior is suitable for use with most calendar systems.\n * It uses the {@link DAY_OF_WEEK} field and the {@link DAYS} unit,\n * and assumes a seven day week.\n *\n * @param {DayOfWeek} dayOfWeek the day-of-week to move the date to, not null\n * @return {TemporalAdjuster} the next day-of-week adjuster, not null\n */\n static next(dayOfWeek) {\n return new RelativeDayOfWeek(2, dayOfWeek);\n }\n\n /**\n * Returns the next-or-same day-of-week adjuster, which adjusts the date to the\n * first occurrence of the specified day-of-week after the date being adjusted\n * unless it is already on that day in which case the same object is returned.\n *\n * The ISO calendar system behaves as follows:\n *\n * * The input 2011-01-15 (a Saturday) for parameter (MONDAY) will return 2011-01-17 (two days later).\n * * The input 2011-01-15 (a Saturday) for parameter (WEDNESDAY) will return 2011-01-19 (four days later).\n * * The input 2011-01-15 (a Saturday) for parameter (SATURDAY) will return 2011-01-15 (same as input).\n *\n * The behavior is suitable for use with most calendar systems.\n * It uses the {@link DAY_OF_WEEK} field and the {@link DAYS} unit,\n * and assumes a seven day week.\n *\n * @param {DayOfWeek} dayOfWeek the day-of-week to check for or move the date to, not null\n * @return {TemporalAdjuster} the next-or-same day-of-week adjuster, not null\n */\n static nextOrSame(dayOfWeek) {\n return new RelativeDayOfWeek(0, dayOfWeek);\n }\n\n /**\n * Returns the previous day-of-week adjuster, which adjusts the date to the\n * first occurrence of the specified day-of-week before the date being adjusted.\n *\n * The ISO calendar system behaves as follows:\n *\n * * The input 2011-01-15 (a Saturday) for parameter (MONDAY) will return 2011-01-10 (five days earlier).\n * * The input 2011-01-15 (a Saturday) for parameter (WEDNESDAY) will return 2011-01-12 (three days earlier).\n * * The input 2011-01-15 (a Saturday) for parameter (SATURDAY) will return 2011-01-08 (seven days earlier).\n *\n * The behavior is suitable for use with most calendar systems.\n * It uses the {@link DAY_OF_WEEK} field and the {@link DAYS} unit,\n * and assumes a seven day week.\n *\n * @param {DayOfWeek} dayOfWeek the day-of-week to move the date to, not null\n * @return {TemporalAdjuster} the previous day-of-week adjuster, not null\n */\n static previous(dayOfWeek) {\n return new RelativeDayOfWeek(3, dayOfWeek);\n }\n\n /**\n * Returns the previous-or-same day-of-week adjuster, which adjusts the date to the\n * first occurrence of the specified day-of-week before the date being adjusted\n * unless it is already on that day in which case the same object is returned.\n *\n * The ISO calendar system behaves as follows:\n *\n * * The input 2011-01-15 (a Saturday) for parameter (MONDAY) will return 2011-01-10 (five days earlier).\n * * The input 2011-01-15 (a Saturday) for parameter (WEDNESDAY) will return 2011-01-12 (three days earlier).\n * * The input 2011-01-15 (a Saturday) for parameter (SATURDAY) will return 2011-01-15 (same as input).\n *\n * The behavior is suitable for use with most calendar systems.\n * It uses the {@link DAY_OF_WEEK} field and the {@link DAYS} unit,\n * and assumes a seven day week.\n *\n * @param {DayOfWeek} dayOfWeek the day-of-week to check for or move the date to, not null\n * @return {TemporalAdjuster} the previous-or-same day-of-week adjuster, not null\n */\n static previousOrSame(dayOfWeek) {\n return new RelativeDayOfWeek(1, dayOfWeek);\n }\n\n}\n\n//-----------------------------------------------------------------------\n/**\n * Enum implementing the adjusters.\n */\nclass Impl extends TemporalAdjuster {\n\n /**\n *\n * @param ordinal\n * @private\n */\n constructor(ordinal) {\n super();\n this._ordinal = ordinal;\n }\n\n adjustInto(temporal) {\n switch (this._ordinal) {\n case 0: return temporal.with(ChronoField.DAY_OF_MONTH, 1);\n case 1: return temporal.with(ChronoField.DAY_OF_MONTH, temporal.range(ChronoField.DAY_OF_MONTH).maximum());\n case 2: return temporal.with(ChronoField.DAY_OF_MONTH, 1).plus(1, ChronoUnit.MONTHS);\n case 3: return temporal.with(ChronoField.DAY_OF_YEAR, 1);\n case 4: return temporal.with(ChronoField.DAY_OF_YEAR, temporal.range(ChronoField.DAY_OF_YEAR).maximum());\n case 5: return temporal.with(ChronoField.DAY_OF_YEAR, 1).plus(1, ChronoUnit.YEARS);\n }\n throw new IllegalStateException('Unreachable');\n }\n\n}\n\n/** First day of month adjuster. */\nImpl.FIRST_DAY_OF_MONTH = new Impl(0);\n/** Last day of month adjuster. */\nImpl.LAST_DAY_OF_MONTH = new Impl(1);\n/** First day of next month adjuster. */\nImpl.FIRST_DAY_OF_NEXT_MONTH = new Impl(2);\n/** First day of year adjuster. */\nImpl.FIRST_DAY_OF_YEAR = new Impl(3);\n/** Last day of year adjuster. */\nImpl.LAST_DAY_OF_YEAR = new Impl(4);\n/** First day of next month adjuster. */\nImpl.FIRST_DAY_OF_NEXT_YEAR = new Impl(5);\n\n\n/**\n * Class implementing day-of-week in month adjuster.\n */\nclass DayOfWeekInMonth extends TemporalAdjuster {\n\n /**\n *\n * @param ordinal\n * @param dow\n * @private\n */\n constructor(ordinal, dow) {\n super();\n this._ordinal = ordinal;\n this._dowValue = dow.value();\n }\n\n adjustInto(temporal) {\n if (this._ordinal >= 0) {\n const temp = temporal.with(ChronoField.DAY_OF_MONTH, 1);\n const curDow = temp.get(ChronoField.DAY_OF_WEEK);\n let dowDiff = MathUtil.intMod((this._dowValue - curDow + 7), 7);\n dowDiff += (this._ordinal - 1) * 7; // safe from overflow\n return temp.plus(dowDiff, ChronoUnit.DAYS);\n } else {\n const temp = temporal.with(ChronoField.DAY_OF_MONTH, temporal.range(ChronoField.DAY_OF_MONTH).maximum());\n const curDow = temp.get(ChronoField.DAY_OF_WEEK);\n let daysDiff = this._dowValue - curDow;\n daysDiff = (daysDiff === 0 ? 0 : (daysDiff > 0 ? daysDiff - 7 : daysDiff));\n daysDiff -= (-this._ordinal - 1) * 7; // safe from overflow\n return temp.plus(daysDiff, ChronoUnit.DAYS);\n }\n }\n}\n\n/**\n * Implementation of next, previous or current day-of-week.\n */\nclass RelativeDayOfWeek extends TemporalAdjuster {\n\n /**\n *\n * @param relative\n * @param dayOfWeek\n * @private\n */\n constructor(relative, dayOfWeek) {\n super();\n requireNonNull(dayOfWeek, 'dayOfWeek');\n /** Whether the current date is a valid answer. */\n this._relative = relative;\n /** The day-of-week value, from 1 to 7. */\n this._dowValue = dayOfWeek.value();\n }\n\n adjustInto(temporal) {\n const calDow = temporal.get(ChronoField.DAY_OF_WEEK);\n if (this._relative < 2 && calDow === this._dowValue) {\n return temporal;\n }\n if ((this._relative & 1) === 0) {\n const daysDiff = calDow - this._dowValue;\n return temporal.plus(daysDiff >= 0 ? 7 - daysDiff : -daysDiff, ChronoUnit.DAYS);\n } else {\n const daysDiff = this._dowValue - calDow;\n return temporal.minus(daysDiff >= 0 ? 7 - daysDiff : -daysDiff, ChronoUnit.DAYS);\n }\n }\n}\n","/**\n * @copyright (c) 2016, Philipp Thürwächter & Pattrick Hüper\n * @copyright (c) 2007-present, Stephen Colebourne & Michael Nascimento Santos\n * @license BSD-3-Clause (see LICENSE in the root directory of this source tree)\n */\n\nimport { Enum } from '../Enum';\nimport { requireNonNull } from '../assert';\nimport { DateTimeException } from '../errors';\nimport { MathUtil } from '../MathUtil';\n\nimport { DayOfWeek } from '../DayOfWeek';\nimport { LocalDate } from '../LocalDate';\nimport { Month } from '../Month';\nimport { Year } from '../Year';\n\nimport { ChronoField } from '../temporal/ChronoField';\nimport { ResolverStyle } from '../format/ResolverStyle';\nimport { TemporalAdjusters } from '../temporal/TemporalAdjusters';\n\nexport class IsoChronology extends Enum{\n /**\n * Checks if the year is a leap year, according to the ISO proleptic\n * calendar system rules.\n *\n * This method applies the current rules for leap years across the whole time-line.\n * In general, a year is a leap year if it is divisible by four without\n * remainder. However, years divisible by 100, are not leap years, with\n * the exception of years divisible by 400 which are.\n *\n * For example, 1904 is a leap year it is divisible by 4.\n * 1900 was not a leap year as it is divisible by 100, however 2000 was a\n * leap year as it is divisible by 400.\n *\n * The calculation is proleptic - applying the same rules into the far future and far past.\n * This is historically inaccurate, but is correct for the ISO-8601 standard.\n *\n * @param {number} prolepticYear - the ISO proleptic year to check\n * @return {boolean} true if the year is leap, false otherwise\n */\n static isLeapYear(prolepticYear) {\n return ((prolepticYear & 3) === 0) && ((prolepticYear % 100) !== 0 || (prolepticYear % 400) === 0);\n }\n\n /**\n * Updates the map of field-values during resolution.\n *\n * @param {EnumMap} fieldValues the fieldValues map to update, not null\n * @param {ChronoField} field the field to update, not null\n * @param {number} value the value to update, not null\n * @throws DateTimeException if a conflict occurs\n */\n _updateResolveMap(fieldValues, field, value) {\n // TODO: this function is in Chronology in threetenbp, maybe needs to be moved?\n requireNonNull(fieldValues, 'fieldValues');\n requireNonNull(field, 'field');\n const current = fieldValues.get(field);\n if (current != null && current !== value) {\n throw new DateTimeException(`Invalid state, field: ${field} ${current} conflicts with ${field} ${value}`);\n }\n fieldValues.put(field, value);\n }\n\n resolveDate(fieldValues, resolverStyle) {\n if (fieldValues.containsKey(ChronoField.EPOCH_DAY)) {\n return LocalDate.ofEpochDay(fieldValues.remove(ChronoField.EPOCH_DAY));\n }\n\n // normalize fields\n const prolepticMonth = fieldValues.remove(ChronoField.PROLEPTIC_MONTH);\n if (prolepticMonth != null) {\n if (resolverStyle !== ResolverStyle.LENIENT) {\n ChronoField.PROLEPTIC_MONTH.checkValidValue(prolepticMonth);\n }\n this._updateResolveMap(fieldValues, ChronoField.MONTH_OF_YEAR, MathUtil.floorMod(prolepticMonth, 12) + 1);\n this._updateResolveMap(fieldValues, ChronoField.YEAR, MathUtil.floorDiv(prolepticMonth, 12));\n }\n\n // eras\n const yoeLong = fieldValues.remove(ChronoField.YEAR_OF_ERA);\n if (yoeLong != null) {\n if (resolverStyle !== ResolverStyle.LENIENT) {\n ChronoField.YEAR_OF_ERA.checkValidValue(yoeLong);\n }\n const era = fieldValues.remove(ChronoField.ERA);\n if (era == null) {\n const year = fieldValues.get(ChronoField.YEAR);\n if (resolverStyle === ResolverStyle.STRICT) {\n // do not invent era if strict, but do cross-check with year\n if (year != null) {\n this._updateResolveMap(fieldValues, ChronoField.YEAR, (year > 0 ? yoeLong: MathUtil.safeSubtract(1, yoeLong)));\n } else {\n // reinstate the field removed earlier, no cross-check issues\n fieldValues.put(ChronoField.YEAR_OF_ERA, yoeLong);\n }\n } else {\n // invent era\n this._updateResolveMap(fieldValues, ChronoField.YEAR, (year == null || year > 0 ? yoeLong: MathUtil.safeSubtract(1, yoeLong)));\n }\n } else if (era === 1) {\n this._updateResolveMap(fieldValues, ChronoField.YEAR, yoeLong);\n } else if (era === 0) {\n this._updateResolveMap(fieldValues, ChronoField.YEAR, MathUtil.safeSubtract(1, yoeLong));\n } else {\n throw new DateTimeException(`Invalid value for era: ${era}`);\n }\n } else if (fieldValues.containsKey(ChronoField.ERA)) {\n ChronoField.ERA.checkValidValue(fieldValues.get(ChronoField.ERA)); // always validated\n }\n\n // build date\n if (fieldValues.containsKey(ChronoField.YEAR)) {\n if (fieldValues.containsKey(ChronoField.MONTH_OF_YEAR)) {\n if (fieldValues.containsKey(ChronoField.DAY_OF_MONTH)) {\n const y = ChronoField.YEAR.checkValidIntValue(fieldValues.remove(ChronoField.YEAR));\n const moy = fieldValues.remove(ChronoField.MONTH_OF_YEAR);\n let dom = fieldValues.remove(ChronoField.DAY_OF_MONTH);\n if (resolverStyle === ResolverStyle.LENIENT) {\n const months = moy - 1;\n const days = dom - 1;\n return LocalDate.of(y, 1, 1).plusMonths(months).plusDays(days);\n } else if (resolverStyle === ResolverStyle.SMART){\n ChronoField.DAY_OF_MONTH.checkValidValue(dom);\n if (moy === 4 || moy === 6 || moy === 9 || moy === 11) {\n dom = Math.min(dom, 30);\n } else if (moy === 2) {\n dom = Math.min(dom, Month.FEBRUARY.length(Year.isLeap(y)));\n }\n return LocalDate.of(y, moy, dom);\n } else {\n return LocalDate.of(y, moy, dom);\n }\n }\n /*\n if (fieldValues.containsKey(ALIGNED_WEEK_OF_MONTH)) {\n if (fieldValues.containsKey(ALIGNED_DAY_OF_WEEK_IN_MONTH)) {\n int y = ChronoField.YEAR.checkValidIntValue(fieldValues.remove(ChronoField.YEAR));\n if (resolverStyle == ResolverStyle.LENIENT) {\n long months = Jdk8Methods.safeSubtract(fieldValues.remove(ChronoField.MONTH_OF_YEAR), 1);\n long weeks = Jdk8Methods.safeSubtract(fieldValues.remove(ALIGNED_WEEK_OF_MONTH), 1);\n long days = Jdk8Methods.safeSubtract(fieldValues.remove(ALIGNED_DAY_OF_WEEK_IN_MONTH), 1);\n return LocalDate.of(y, 1, 1).plusMonths(months).plusWeeks(weeks).plusDays(days);\n }\n int moy = ChronoField.MONTH_OF_YEAR.checkValidIntValue(fieldValues.remove(ChronoField.MONTH_OF_YEAR));\n int aw = ALIGNED_WEEK_OF_MONTH.checkValidIntValue(fieldValues.remove(ALIGNED_WEEK_OF_MONTH));\n int ad = ALIGNED_DAY_OF_WEEK_IN_MONTH.checkValidIntValue(fieldValues.remove(ALIGNED_DAY_OF_WEEK_IN_MONTH));\n LocalDate date = LocalDate.of(y, moy, 1).plusDays((aw - 1) * 7 + (ad - 1));\n if (resolverStyle == ResolverStyle.STRICT && date.get(ChronoField.MONTH_OF_YEAR) != moy) {\n throw new DateTimeException(\"Strict mode rejected date parsed to a different month\");\n }\n return date;\n }\n if (fieldValues.containsKey(DAY_OF_WEEK)) {\n int y = ChronoField.YEAR.checkValidIntValue(fieldValues.remove(ChronoField.YEAR));\n if (resolverStyle == ResolverStyle.LENIENT) {\n long months = Jdk8Methods.safeSubtract(fieldValues.remove(ChronoField.MONTH_OF_YEAR), 1);\n long weeks = Jdk8Methods.safeSubtract(fieldValues.remove(ALIGNED_WEEK_OF_MONTH), 1);\n long days = Jdk8Methods.safeSubtract(fieldValues.remove(DAY_OF_WEEK), 1);\n return LocalDate.of(y, 1, 1).plusMonths(months).plusWeeks(weeks).plusDays(days);\n }\n int moy = ChronoField.MONTH_OF_YEAR.checkValidIntValue(fieldValues.remove(ChronoField.MONTH_OF_YEAR));\n int aw = ALIGNED_WEEK_OF_MONTH.checkValidIntValue(fieldValues.remove(ALIGNED_WEEK_OF_MONTH));\n int dow = DAY_OF_WEEK.checkValidIntValue(fieldValues.remove(DAY_OF_WEEK));\n LocalDate date = LocalDate.of(y, moy, 1).plusWeeks(aw - 1).with(nextOrSame(DayOfWeek.of(dow)));\n if (resolverStyle == ResolverStyle.STRICT && date.get(ChronoField.MONTH_OF_YEAR) != moy) {\n throw new DateTimeException(\"Strict mode rejected date parsed to a different month\");\n }\n return date;\n }\n }\n*/\n }\n if (fieldValues.containsKey(ChronoField.DAY_OF_YEAR)) {\n const y = ChronoField.YEAR.checkValidIntValue(fieldValues.remove(ChronoField.YEAR));\n if (resolverStyle === ResolverStyle.LENIENT) {\n const days = MathUtil.safeSubtract(fieldValues.remove(ChronoField.DAY_OF_YEAR), 1);\n return LocalDate.ofYearDay(y, 1).plusDays(days);\n }\n const doy = ChronoField.DAY_OF_YEAR.checkValidIntValue(fieldValues.remove(ChronoField.DAY_OF_YEAR));\n return LocalDate.ofYearDay(y, doy);\n }\n if (fieldValues.containsKey(ChronoField.ALIGNED_WEEK_OF_YEAR)) {\n if (fieldValues.containsKey(ChronoField.ALIGNED_DAY_OF_WEEK_IN_YEAR)) {\n const y = ChronoField.YEAR.checkValidIntValue(fieldValues.remove(ChronoField.YEAR));\n if (resolverStyle === ResolverStyle.LENIENT) {\n const weeks = MathUtil.safeSubtract(fieldValues.remove(ChronoField.ALIGNED_WEEK_OF_YEAR), 1);\n const days = MathUtil.safeSubtract(fieldValues.remove(ChronoField.ALIGNED_DAY_OF_WEEK_IN_YEAR), 1);\n return LocalDate.of(y, 1, 1).plusWeeks(weeks).plusDays(days);\n }\n const aw = ChronoField.ALIGNED_WEEK_OF_YEAR.checkValidIntValue(fieldValues.remove(ChronoField.ALIGNED_WEEK_OF_YEAR));\n const ad = ChronoField.ALIGNED_DAY_OF_WEEK_IN_YEAR.checkValidIntValue(fieldValues.remove(ChronoField.ALIGNED_DAY_OF_WEEK_IN_YEAR));\n const date = LocalDate.of(y, 1, 1).plusDays((aw - 1) * 7 + (ad - 1));\n if (resolverStyle === ResolverStyle.STRICT && date.get(ChronoField.YEAR) !== y) {\n throw new DateTimeException('Strict mode rejected date parsed to a different year');\n }\n return date;\n }\n if (fieldValues.containsKey(ChronoField.DAY_OF_WEEK)) {\n const y = ChronoField.YEAR.checkValidIntValue(fieldValues.remove(ChronoField.YEAR));\n if (resolverStyle === ResolverStyle.LENIENT) {\n const weeks = MathUtil.safeSubtract(fieldValues.remove(ChronoField.ALIGNED_WEEK_OF_YEAR), 1);\n const days = MathUtil.safeSubtract(fieldValues.remove(ChronoField.DAY_OF_WEEK), 1);\n return LocalDate.of(y, 1, 1).plusWeeks(weeks).plusDays(days);\n }\n const aw = ChronoField.ALIGNED_WEEK_OF_YEAR.checkValidIntValue(fieldValues.remove(ChronoField.ALIGNED_WEEK_OF_YEAR));\n const dow = ChronoField.DAY_OF_WEEK.checkValidIntValue(fieldValues.remove(ChronoField.DAY_OF_WEEK));\n const date = LocalDate.of(y, 1, 1).plusWeeks(aw - 1).with(TemporalAdjusters.nextOrSame(DayOfWeek.of(dow)));\n if (resolverStyle === ResolverStyle.STRICT && date.get(ChronoField.YEAR) !== y) {\n throw new DateTimeException('Strict mode rejected date parsed to a different month');\n }\n return date;\n }\n }\n }\n return null;\n }\n\n /**\n * Obtains an ISO local date from another date-time object.\n *

\n * This is equivalent to {@link LocalDate#from(TemporalAccessor)}.\n *\n * @param temporal the date-time object to convert, not null\n * @return the ISO local date, not null\n * @throws DateTimeException if unable to create the date\n */\n date(temporal) {\n return LocalDate.from(temporal);\n }\n\n}\n\nexport function _init() {\n IsoChronology.INSTANCE = new IsoChronology('IsoChronology');\n}\n","/**\n * @copyright (c) 2016-present, Philipp Thürwächter & Pattrick Hüper & js-joda contributors\n * @copyright (c) 2007-present, Stephen Colebourne & Michael Nascimento Santos\n * @license BSD-3-Clause (see LICENSE in the root directory of this source tree)\n */\n\nimport { ChronoField } from './temporal/ChronoField';\nimport { ChronoUnit } from './temporal/ChronoUnit';\nimport { Temporal } from './temporal/Temporal';\nimport { Clock } from './Clock';\nimport { DateTimeException, UnsupportedTemporalTypeException } from './errors';\nimport { DateTimeFormatter } from './format/DateTimeFormatter';\nimport { Instant, LocalTime } from './js-joda';\nimport { MathUtil } from './MathUtil';\nimport { OffsetDateTime } from './OffsetDateTime';\nimport { TemporalQueries } from './temporal/TemporalQueries';\nimport { ZoneId } from './ZoneId';\nimport { ZoneOffset } from './ZoneOffset';\n\nimport { createTemporalQuery } from './temporal/TemporalQuery';\nimport { requireInstance, requireNonNull } from './assert';\n\n/**\n * A time with an offset from UTC/Greenwich in the ISO-8601 calendar system, such as 10:15:30+01:00.\n */\nexport class OffsetTime extends Temporal {\n /**\n * @param {!TemporalAccessor} temporal\n * @return {OffsetTime}\n */\n static from(temporal) {\n requireNonNull(temporal, 'temporal');\n if (temporal instanceof OffsetTime) {\n return temporal;\n } else if (temporal instanceof OffsetDateTime) {\n return temporal.toOffsetTime();\n }\n try {\n const time = LocalTime.from(temporal);\n const offset = ZoneOffset.from(temporal);\n return new OffsetTime(time, offset);\n } catch(ex) {\n throw new DateTimeException(`Unable to obtain OffsetTime TemporalAccessor: ${temporal}, type ${temporal.constructor != null ? temporal.constructor.name : ''}`);\n }\n }\n\n /**\n * @param {Clock|ZoneId} clockOrZone\n * @return {OffsetTime}\n */\n static now(clockOrZone) {\n if (arguments.length === 0){\n return OffsetTime._now(Clock.systemDefaultZone());\n } else if (clockOrZone instanceof Clock){\n return OffsetTime._now(clockOrZone);\n } else {\n return OffsetTime._now(Clock.system(clockOrZone));\n }\n }\n\n /**\n * @param {Clock} clock - the clock to use, defaults to Clock.systemDefaultZone()\n * @return {OffsetTime} the current offset date-time, not null\n */\n static _now(clock) {\n requireNonNull(clock, 'clock');\n const now = clock.instant();\n return OffsetTime.ofInstant(now, clock.zone().rules().offset(now));\n }\n\n /**\n * @return {OffsetTime}\n */\n static of(){\n if (arguments.length <= 2) {\n return OffsetTime.ofTimeAndOffset.apply(this, arguments);\n } else {\n return OffsetTime.ofNumbers.apply(this, arguments);\n }\n }\n\n /**\n * @param {int} hour\n * @param {int} minute\n * @param {int} second\n * @param {int} nanoOfSecond\n * @param {ZoneOffset} offset\n * @return {OffsetTime}\n */\n static ofNumbers(hour, minute, second, nanoOfSecond, offset) {\n const time = LocalTime.of(hour, minute, second, nanoOfSecond);\n return new OffsetTime(time, offset);\n }\n\n /**\n * @param {LocalTime} time\n * @param {ZoneOffset} offset\n * @return {OffsetTime}\n */\n static ofTimeAndOffset(time, offset) {\n return new OffsetTime(time, offset);\n }\n\n /**\n * @param {!Instant} instant\n * @param {!ZoneId} zone\n * @return {!OffsetTime}\n */\n static ofInstant( instant, zone){\n requireNonNull(instant, 'instant');\n requireInstance(instant, Instant, 'instant');\n requireNonNull(zone, 'zone');\n requireInstance(zone, ZoneId, 'zone');\n\n const rules = zone.rules();\n const offset = rules.offset(instant);\n let secsOfDay = instant.epochSecond() % LocalTime.SECONDS_PER_DAY;\n secsOfDay = (secsOfDay + offset.totalSeconds()) % LocalTime.SECONDS_PER_DAY;\n if (secsOfDay < 0) {\n secsOfDay += LocalTime.SECONDS_PER_DAY;\n }\n const time = LocalTime.ofSecondOfDay(secsOfDay, instant.nano());\n return new OffsetTime(time, offset);\n }\n\n /**\n * @param {string} text\n * @param {DateTimeFormatter} formatter\n * @return {OffsetTime}\n */\n static parse(text, formatter= DateTimeFormatter.ISO_OFFSET_TIME) {\n requireNonNull(formatter, 'formatter');\n return formatter.parse(text, OffsetTime.FROM);\n }\n //-----------------------------------------------------------------------\n\n /**\n * @param {LocalTime} time\n * @param {ZoneOffset} offset\n * @private\n */\n constructor(time, offset) {\n super();\n requireNonNull(time, 'time');\n requireInstance(time, LocalTime, 'time');\n requireNonNull(offset, 'offset');\n requireInstance(offset, ZoneOffset, 'offset');\n this._time = time;\n this._offset = offset;\n }\n\n\n /**\n * @param {TemporalAdjuster} temporal - the target object to be adjusted, not null\n * @return {Temporal} the adjusted object, not null\n * @throws {DateTimeException} if unable to make the adjustment\n * @throws {ArithmeticException} if numeric overflow occurs\n */\n adjustInto(temporal) {\n return temporal\n .with(ChronoField.NANO_OF_DAY, this._time.toNanoOfDay())\n .with(ChronoField.OFFSET_SECONDS, this.offset().totalSeconds());\n }\n\n /**\n * @param {LocalDate} date - the date to combine with, not null\n * @return {OffsetDateTime} the offset date-time formed from this time and the specified date, not null\n */\n atDate(date) {\n return OffsetDateTime.of(date, this._time, this._offset);\n }\n\n /**\n * @param {DateTimeFormatter} formatter - the formatter to use, not null\n * @return {string} the formatted time string, not null\n * @throws {DateTimeException} if an error occurs during printing\n */\n format(formatter) {\n requireNonNull(formatter, 'formatter');\n return formatter.format(this, OffsetTime.FROM);\n }\n\n\n /**\n * @param {TemporalField} field - the field to get, not null\n * @return {number} the value for the field\n * @throws {DateTimeException} if a value for the field cannot be obtained\n * @throws {ArithmeticException} if numeric overflow occurs\n */\n get(field) {\n return super.get(field);\n }\n\n /**\n * @param {TemporalField} field - the field to get, not null\n * @return {number} the value for the field\n * @throws {DateTimeException} if a value for the field cannot be obtained\n * @trhows {UnsupportedTemporalTypeException}\n * @throws {ArithmeticException} if numeric overflow occurs\n */\n getLong(field) {\n if (field instanceof ChronoField) {\n if (field === ChronoField.OFFSET_SECONDS) {\n return this._offset.totalSeconds();\n }\n return this._time.getLong(field);\n }\n return field.getFrom(this);\n }\n\n /**\n * @return {int}\n */\n hour() {\n return this._time.hour();\n }\n\n /**\n * @return {int}\n */\n minute() {\n return this._time.minute();\n }\n\n /**\n * @return {int}\n */\n second() {\n return this._time.second();\n }\n\n /**\n * @return {int}\n */\n nano() {\n return this._time.nano();\n }\n\n /**\n * @return {ZoneOffset}\n */\n offset() {\n return this._offset;\n }\n\n /**\n * @param {OffsetTime} other - the other time to compare to, not null\n * @return {boolean} true if this is after the specified time\n * @throws {NullPointerException} if `other` is null\n */\n isAfter(other) {\n requireNonNull(other, 'other');\n return this._toEpochNano() > other._toEpochNano();\n }\n\n /**\n * @param {OffsetTime} other - the other time to compare to, not null\n * @return {boolean} true if this point is before the specified time\n * @throws {NullPointerException} if `other` is null\n */\n isBefore(other) {\n requireNonNull(other, 'other');\n return this._toEpochNano() < other._toEpochNano();\n }\n\n /**\n * @param {OffsetTime} other - the other time to compare to, not null\n * @return {boolean}\n * @throws {NullPointerException} if `other` is null\n */\n isEqual(other) {\n requireNonNull(other, 'other');\n return this._toEpochNano() === other._toEpochNano();\n }\n\n /**\n * @param {TemporalField|TemporalUnit} fieldOrUnit - the field to check, null returns false\n * @return {boolean} true if the field is supported on this time, false if not\n */\n isSupported(fieldOrUnit) {\n if (fieldOrUnit instanceof ChronoField) {\n return fieldOrUnit.isTimeBased() || fieldOrUnit === ChronoField.OFFSET_SECONDS;\n } else if (fieldOrUnit instanceof ChronoUnit) {\n return fieldOrUnit.isTimeBased();\n }\n return fieldOrUnit != null && fieldOrUnit.isSupportedBy(this);\n }\n\n /**\n * @param {number} hours\n * @return {OffsetTime}\n */\n minusHours(hours) {\n return this._withLocalTimeOffset(this._time.minusHours(hours), this._offset);\n }\n\n /**\n * @param {number} minutes\n * @return {OffsetTime}\n */\n minusMinutes(minutes) {\n return this._withLocalTimeOffset(this._time.minusMinutes(minutes), this._offset);\n }\n\n /**\n * @param {number} seconds\n * @return {OffsetTime}\n */\n minusSeconds(seconds) {\n return this._withLocalTimeOffset(this._time.minusSeconds(seconds), this._offset);\n }\n\n /**\n * @param {number} nanos\n * @return {OffsetTime}\n */\n minusNanos(nanos) {\n return this._withLocalTimeOffset(this._time.minusNanos(nanos), this._offset);\n }\n\n _minusAmount(amount) {\n requireNonNull(amount);\n return amount.subtractFrom(this);\n }\n\n _minusUnit(amountToSubtract, unit) {\n return this.plus(-1 * amountToSubtract, unit);\n }\n\n _plusAmount(amount) {\n requireNonNull(amount);\n return amount.addTo(this);\n }\n\n /**\n *\n * @param amountToAdd\n * @param unit\n * @return {Temporal}\n */\n _plusUnit(amountToAdd, unit) {\n if (unit instanceof ChronoUnit) {\n return this._withLocalTimeOffset(this._time.plus(amountToAdd, unit), this._offset);\n }\n return unit.addTo(this, amountToAdd);\n }\n\n /**\n * @param {int} hours\n * @return {OffsetTime}\n */\n plusHours(hours) {\n return this._withLocalTimeOffset(this._time.plusHours(hours), this._offset);\n }\n\n /**\n * @param {int} minutes\n * @return {OffsetTime}\n */\n plusMinutes(minutes) {\n return this._withLocalTimeOffset(this._time.plusMinutes(minutes), this._offset);\n }\n\n /**\n * @param {int} seconds\n * @return {OffsetTime}\n */\n plusSeconds(seconds) {\n return this._withLocalTimeOffset(this._time.plusSeconds(seconds), this._offset);\n }\n\n /**\n * @param {int} nanos\n * @return {OffsetTime}\n */\n plusNanos(nanos) {\n return this._withLocalTimeOffset(this._time.plusNanos(nanos), this._offset);\n }\n\n /**\n * @param {TemporalQuery} query - the query to invoke, not null\n * @return {*} the query result, null may be returned (defined by the query)\n * @throws {DateTimeException} if unable to query (defined by the query)\n * @throws {ArithmeticException} if numeric overflow occurs (defined by the query)\n */\n query(query) {\n requireNonNull(query, 'query');\n if (query === TemporalQueries.precision()) {\n return ChronoUnit.NANOS;\n } else if (query === TemporalQueries.offset() || query === TemporalQueries.zone()) {\n return this.offset();\n } else if (query === TemporalQueries.localTime()) {\n return this._time;\n } else if (query === TemporalQueries.chronology() || query === TemporalQueries.localDate() || query === TemporalQueries.zoneId()) {\n return null;\n }\n return super.query(query);\n }\n\n /**\n * @param {TemporalField} field - the field to query the range for, not null\n * @return {ValueRange} the range of valid values for the field, not null\n * @throws {DateTimeException} if the range for the field cannot be obtained\n */\n range(field) {\n if (field instanceof ChronoField) {\n if (field === ChronoField.OFFSET_SECONDS) {\n return field.range();\n }\n return this._time.range(field);\n }\n return field.rangeRefinedBy(this);\n }\n\n /**\n * @return {LocalTime}\n */\n toLocalTime() {\n return this._time;\n }\n\n /**\n * @param {TemporalUnit} unit - the unit to truncate to, not null\n * @return {OffsetTime} a {@link LocalTime} based on this time with the time truncated, not null\n * @throws {DateTimeException} if unable to truncate\n */\n truncatedTo(unit) {\n return this._withLocalTimeOffset(this._time.truncatedTo(unit), this._offset);\n }\n\n /**\n * @param {Temporal} endExclusive - the end time, which is converted to a {@link LocalTime}, not null\n * @param {TemporalUnit} unit - the unit to measure the period in, not null\n * @return {number} the amount of the period between this time and the end time\n * @throws {DateTimeException} if the period cannot be calculated\n * @throws {ArithmeticException} if numeric overflow occurs\n */\n until(endExclusive, unit) {\n requireNonNull(endExclusive, 'endExclusive');\n requireNonNull(unit, 'unit');\n const end = OffsetTime.from(endExclusive);\n if (unit instanceof ChronoUnit) {\n const nanosUntil = end._toEpochNano() - this._toEpochNano(); // no overflow\n switch (unit) {\n case ChronoUnit.NANOS: return nanosUntil;\n case ChronoUnit.MICROS: return MathUtil.intDiv(nanosUntil, 1000);\n case ChronoUnit.MILLIS: return MathUtil.intDiv(nanosUntil, 1000000);\n case ChronoUnit.SECONDS: return MathUtil.intDiv(nanosUntil, LocalTime.NANOS_PER_SECOND);\n case ChronoUnit.MINUTES: return MathUtil.intDiv(nanosUntil, LocalTime.NANOS_PER_MINUTE);\n case ChronoUnit.HOURS: return MathUtil.intDiv(nanosUntil, LocalTime.NANOS_PER_HOUR);\n case ChronoUnit.HALF_DAYS: return MathUtil.intDiv(nanosUntil, (12 * LocalTime.NANOS_PER_HOUR));\n }\n throw new UnsupportedTemporalTypeException(`Unsupported unit: ${unit}`);\n }\n return unit.between(this, end);\n }\n\n /**\n * @param {int} hour\n * @return {OffsetTime}\n */\n withHour(hour) {\n return this._withLocalTimeOffset(this._time.withHour(hour), this._offset);\n }\n\n /**\n * @param {int} minute\n * @return {OffsetTime}\n */\n withMinute(minute) {\n return this._withLocalTimeOffset(this._time.withMinute(minute), this._offset);\n }\n\n /**\n * @param {int} second\n * @return {OffsetTime}\n */\n withSecond(second) {\n return this._withLocalTimeOffset(this._time.withSecond(second), this._offset);\n }\n\n /**\n * @param {int} nano\n * @return {OffsetTime}\n */\n withNano(nano) {\n return this._withLocalTimeOffset(this._time.withNano(nano), this._offset);\n }\n\n /**\n * @param {ZoneOffset} offset\n * @return {OffsetTime}\n */\n withOffsetSameInstant(offset) {\n requireNonNull(offset, 'offset');\n if (offset.equals(this._offset)) {\n return this;\n }\n const difference = offset.totalSeconds() - this._offset.totalSeconds();\n const adjusted = this._time.plusSeconds(difference);\n return new OffsetTime(adjusted, offset);\n }\n\n /**\n * @param {ZoneOffset} offset\n * @return {OffsetTime}\n */\n withOffsetSameLocal(offset) {\n return offset != null && offset.equals(this._offset) ? this : new OffsetTime(this._time, offset);\n }\n\n _toEpochNano() {\n const nod = this._time.toNanoOfDay();\n const offsetNanos = this._offset.totalSeconds() * LocalTime.NANOS_PER_SECOND;\n return nod - offsetNanos;\n }\n\n _withAdjuster(adjuster) {\n requireNonNull(adjuster, 'adjuster');\n // optimizations\n if (adjuster instanceof LocalTime) {\n return this._withLocalTimeOffset(adjuster, this._offset);\n } else if (adjuster instanceof ZoneOffset) {\n return this._withLocalTimeOffset(this._time, adjuster);\n } else if (adjuster instanceof OffsetTime) {\n return adjuster;\n }\n return adjuster.adjustInto(this);\n }\n\n _withField(field, newValue) {\n requireNonNull(field, 'field');\n if (field instanceof ChronoField) {\n if (field === ChronoField.OFFSET_SECONDS) {\n return this._withLocalTimeOffset(this._time, ZoneOffset.ofTotalSeconds(field.checkValidIntValue(newValue)));\n }\n return this._withLocalTimeOffset(this._time.with(field, newValue), this._offset);\n }\n return field.adjustInto(this, newValue);\n }\n\n /**\n * @private\n * @param {LocalTime} time\n * @param {ZoneOffset} offset\n * @return {OffsetTime}\n */\n _withLocalTimeOffset(time, offset) {\n if (this._time === time && this._offset.equals(offset)) {\n return this;\n }\n return new OffsetTime(time, offset);\n }\n\n //---------------------------------\n\n /**\n * @param {OffsetTime} other - the other time to compare to, not null\n * @return {int} the comparator value, negative if less, positive if greater\n * @throws {NullPointerException} if `other` is null\n */\n compareTo(other) {\n requireNonNull(other, 'other');\n requireInstance(other, OffsetTime, 'other');\n if (this._offset.equals(other._offset)) {\n return this._time.compareTo(other._time);\n }\n const compare = MathUtil.compareNumbers(this._toEpochNano(), other._toEpochNano());\n if (compare === 0) {\n return this._time.compareTo(other._time);\n }\n return compare;\n }\n\n /**\n * @param {*} other - the object to check, null returns false\n * @return {boolean} true if this is equal to the other time\n */\n equals(other) {\n if (this === other) {\n return true;\n }\n if (other instanceof OffsetTime) {\n return this._time.equals(other._time) && this._offset.equals(other._offset);\n }\n return false;\n }\n\n /**\n * @return {number}\n */\n hashCode() {\n return this._time.hashCode() ^ this._offset.hashCode();\n }\n\n /**\n * @return {string}\n */\n toString() {\n return this._time.toString() + this._offset.toString();\n }\n\n /**\n *\n * @return {string} same as {@link LocalDateTime.toString}\n */\n toJSON() {\n return this.toString();\n }\n}\n\n\nexport function _init() {\n OffsetTime.MIN = OffsetTime.ofNumbers(0, 0, 0,0, ZoneOffset.MAX);\n\n OffsetTime.MAX = OffsetTime.ofNumbers(23, 59, 59,999999999, ZoneOffset.MIN);\n\n OffsetTime.FROM = createTemporalQuery('OffsetTime.FROM', (temporal) => {\n return OffsetTime.from(temporal);\n });\n}\n","/*\n * @copyright (c) 2016, Philipp Thürwächter & Pattrick Hüper\n * @copyright (c) 2007-present, Stephen Colebourne & Michael Nascimento Santos\n * @license BSD-3-Clause (see LICENSE in the root directory of this source tree)\n */\n\nimport { requireNonNull } from '../assert';\nimport { Instant } from '../Instant';\nimport { LocalDate } from '../LocalDate';\nimport { MathUtil } from '../MathUtil';\n\nimport { ChronoUnit } from '../temporal/ChronoUnit';\nimport { Temporal } from '../temporal/Temporal';\nimport { TemporalQueries } from '../temporal/TemporalQueries';\n\nexport class ChronoZonedDateTime extends Temporal {\n query(query) {\n if (query === TemporalQueries.zoneId() || query === TemporalQueries.zone()) {\n return this.zone();\n } else if (query === TemporalQueries.chronology()) {\n return this.toLocalDate().chronology();\n } else if (query === TemporalQueries.precision()) {\n return ChronoUnit.NANOS;\n } else if (query === TemporalQueries.offset()) {\n return this.offset();\n } else if (query === TemporalQueries.localDate()) {\n return LocalDate.ofEpochDay(this.toLocalDate().toEpochDay());\n } else if (query === TemporalQueries.localTime()) {\n return this.toLocalTime();\n }\n return super.query(query);\n }\n\n /**\n * Outputs this date-time as a string using the formatter.\n *\n * @param {DateTimeFormatter} formatter - the formatter to use, not null\n * @return {string} the formatted date-time string, not null\n * @throws DateTimeException if an error occurs during printing\n */\n format(formatter) {\n requireNonNull(formatter, 'formatter');\n return formatter.format(this);\n }\n\n /**\n * Converts this date-time to an {@link Instant}.\n *\n * This returns an {@link Instant} representing the same point on the\n * time-line as this date-time. The calculation combines the\n * local date-time (see {@link toLocalDateTime}) and\n * offset (see {@link getOffset}).\n *\n * @return {Instant} an {@link Instant} representing the same instant, not null\n */\n toInstant() {\n return Instant.ofEpochSecond(this.toEpochSecond(), this.toLocalTime().nano());\n }\n\n /**\n * Converts this date-time to the number of seconds from the epoch\n * of 1970-01-01T00:00:00Z.\n *\n * This uses the local date-time (see {@link toLocalDateTime}) and\n * offset (see {@link getOffset}) to calculate the epoch-second value,\n * which is the number of elapsed seconds from 1970-01-01T00:00:00Z.\n * Instants on the time-line after the epoch are positive, earlier are negative.\n *\n * @return {number} the number of seconds from the epoch of 1970-01-01T00:00:00Z\n */\n toEpochSecond() {\n const epochDay = this.toLocalDate().toEpochDay();\n let secs = epochDay * 86400 + this.toLocalTime().toSecondOfDay();\n secs -= this.offset().totalSeconds();\n return secs;\n }\n\n /**\n * Compares this date-time to another date-time, including the chronology.\n *\n * The comparison is based first on the instant, then on the local date-time,\n * then on the zone ID, then on the chronology.\n * It is \"consistent with equals\", as defined by {@link Comparable}.\n *\n * If all the date-time objects being compared are in the same chronology, then the\n * additional chronology stage is not required.\n *\n * @param {ChronoZonedDateTime} other - the other date-time to compare to, not null\n * @return {number} the comparator value, negative if less, positive if greater\n */\n compareTo(other) {\n requireNonNull(other, 'other');\n let cmp = MathUtil.compareNumbers(this.toEpochSecond(), other.toEpochSecond());\n if (cmp === 0) {\n cmp = this.toLocalTime().nano() - other.toLocalTime().nano();\n if (cmp === 0) {\n cmp = this.toLocalDateTime().compareTo(other.toLocalDateTime());\n if (cmp === 0) {\n cmp = strcmp(this.zone().id(), other.zone().id());\n // we only support iso for now\n //if (cmp === 0) {\n // cmp = toLocalDate().getChronology().compareTo(other.toLocalDate().getChronology());\n //}\n }\n }\n }\n return cmp;\n }\n\n //-----------------------------------------------------------------------\n /**\n * Checks if the instant of this date-time is after that of the specified date-time.\n *\n * This method differs from the comparison in {@link compareTo} in that it\n * only compares the instant of the date-time. This is equivalent to using\n * `dateTime1.toInstant().isAfter(dateTime2.toInstant())`.\n *\n * @param {!ChronoZonedDateTime} other - the other date-time to compare to, not null\n * @return {boolean} true if this is after the specified date-time\n */\n isAfter(other) {\n requireNonNull(other, 'other');\n const thisEpochSec = this.toEpochSecond();\n const otherEpochSec = other.toEpochSecond();\n return thisEpochSec > otherEpochSec ||\n (thisEpochSec === otherEpochSec && this.toLocalTime().nano() > other.toLocalTime().nano());\n }\n\n /**\n * Checks if the instant of this date-time is before that of the specified date-time.\n *\n * This method differs from the comparison in {@link compareTo} in that it\n * only compares the instant of the date-time. This is equivalent to using\n * `dateTime1.toInstant().isBefore(dateTime2.toInstant())`.\n *\n * @param {!ChronoZonedDateTime} other - the other date-time to compare to, not null\n * @return {boolean} true if this point is before the specified date-time\n */\n isBefore(other) {\n requireNonNull(other, 'other');\n const thisEpochSec = this.toEpochSecond();\n const otherEpochSec = other.toEpochSecond();\n return thisEpochSec < otherEpochSec ||\n (thisEpochSec === otherEpochSec && this.toLocalTime().nano() < other.toLocalTime().nano());\n }\n\n /**\n * Checks if the instant of this date-time is equal to that of the specified date-time.\n *\n * This method differs from the comparison in {@link compareTo} and {@link equals}\n * in that it only compares the instant of the date-time. This is equivalent to using\n * `dateTime1.toInstant().equals(dateTime2.toInstant())`.\n *\n * @param {!ChronoZonedDateTime} other - the other date-time to compare to, not null\n * @return {boolean} true if the instant equals the instant of the specified date-time\n */\n isEqual(other) {\n requireNonNull(other, 'other');\n return this.toEpochSecond() === other.toEpochSecond() &&\n this.toLocalTime().nano() === other.toLocalTime().nano();\n }\n\n //-----------------------------------------------------------------------\n /**\n * Checks if this date-time is equal to another date-time.\n *\n * The comparison is based on the offset date-time and the zone.\n * To compare for the same instant on the time-line, use {@link compareTo}.\n * Only objects of type {@link ChronoZoneDateTime} are compared, other types return false.\n *\n * @param {*} other the object to check, null returns false\n * @return {boolean} true if this is equal to the other date-time\n */\n equals(other) {\n if (this === other) {\n return true;\n }\n if (other instanceof ChronoZonedDateTime) {\n return this.compareTo(other) === 0;\n }\n return false;\n }\n\n}\n\nfunction strcmp(a, b){\n if (a < b) {\n return -1;\n }\n if (a > b) {\n return 1;\n }\n return 0;\n}\n","/*\n * @copyright (c) 2016, Philipp Thürwächter & Pattrick Hüper\n * @copyright (c) 2007-present, Stephen Colebourne & Michael Nascimento Santos\n * @license BSD-3-Clause (see LICENSE in the root directory of this source tree)\n */\n\nimport { requireNonNull } from './assert';\nimport { DateTimeException, IllegalArgumentException } from './errors';\nimport { MathUtil } from './MathUtil';\n\nimport { Clock } from './Clock';\nimport { Instant } from './Instant';\nimport { LocalDate } from './LocalDate';\nimport { LocalDateTime } from './LocalDateTime';\nimport { LocalTime } from './LocalTime';\nimport { OffsetDateTime } from './OffsetDateTime';\nimport { ZoneId } from './ZoneId';\nimport { ZoneOffset } from './ZoneOffset';\n\nimport { ChronoZonedDateTime } from './chrono/ChronoZonedDateTime';\nimport { DateTimeFormatter } from './format/DateTimeFormatter';\nimport { ChronoField } from './temporal/ChronoField';\nimport { ChronoUnit } from './temporal/ChronoUnit';\nimport { createTemporalQuery } from './temporal/TemporalQuery';\nimport { TemporalQueries } from './temporal/TemporalQueries';\n\n/**\n * A date-time with a time-zone in the ISO-8601 calendar system,\n * such as `2007-12-03T10:15:30+01:00 Europe/Paris`.\n *\n * `ZonedDateTime` is an immutable representation of a date-time with a time-zone.\n * This class stores all date and time fields, to a precision of nanoseconds,\n * and a time-zone, with a zone offset used to handle ambiguous local date-times.\n * For example, the value\n * '2nd October 2007 at 13:45.30.123456789 +02:00 in the Europe/Paris time-zone'\n * can be stored in a {@link ZonedDateTime}.\n *\n * This class handles conversion from the local time-line of {@link LocalDateTime}\n * to the instant time-line of {@link Instant}.\n * The difference between the two time-lines is the offset from UTC/Greenwich,\n * represented by a {@link ZoneOffset}.\n *\n * Converting between the two time-lines involves calculating the offset using the\n * {@link ZoneRules} rules accessed from the {@link ZoneId}.\n * Obtaining the offset for an instant is simple, as there is exactly one valid\n * offset for each instant. By contrast, obtaining the offset for a local date-time\n * is not straightforward. There are three cases:\n *\n * * Normal, with one valid offset. For the vast majority of the year, the normal\n * case applies, where there is a single valid offset for the local date-time.\n * * Gap, with zero valid offsets. This is when clocks jump forward typically\n * due to the spring daylight savings change from 'winter' to 'summer'.\n * In a gap there are local date-time values with no valid offset.\n * * Overlap, with two valid offsets. This is when clocks are set back typically\n * due to the autumn daylight savings change from 'summer' to 'winter'.\n * In an overlap there are local date-time values with two valid offsets.\n *\n * Any method that converts directly or implicitly from a local date-time to an\n * instant by obtaining the offset has the potential to be complicated.\n *\n * For Gaps, the general strategy is that if the local date-time falls in the\n * middle of a Gap, then the resulting zoned date-time will have a local date-time\n * shifted forwards by the length of the Gap, resulting in a date-time in the later\n * offset, typically 'summer' time.\n *\n * For Overlaps, the general strategy is that if the local date-time falls in the\n * middle of an Overlap, then the previous offset will be retained. If there is no\n * previous offset, or the previous offset is invalid, then the earlier offset is\n * used, typically 'summer' time. Two additional methods,\n * {@link withEarlierOffsetAtOverlap} and {@link withLaterOffsetAtOverlap},\n * help manage the case of an overlap.\n *\n * ### Specification for implementors\n *\n * A {@link ZonedDateTime} holds state equivalent to three separate objects,\n * a {@link LocalDateTime}, a {@link ZoneId} and the resolved {@link ZoneOffset}.\n * The offset and local date-time are used to define an instant when necessary.\n * The zone ID is used to obtain the rules for how and when the offset changes.\n * The offset cannot be freely set, as the zone controls which offsets are valid.\n */\nexport class ZonedDateTime extends ChronoZonedDateTime {\n\n //-----------------------------------------------------------------------\n /**\n * Obtains the current date-time from the system clock in the specified time-zone or clock\n * or default time zone.\n *\n * This will query the system clock (see {@link Clock#systemDefaultZone}) in the default\n * time-zone to obtain the current date-time.\n * The zone and offset will be set based on the time-zone in the clock.\n *\n * Using this method will prevent the ability to use an alternate clock for testing\n * because the clock is hard-coded.\n *\n * @param {Clock|ZoneId} [clockOrZone=Clock.systemDefaultZone()]\n * @return {ZonedDateTime} the current date-time using the system clock, not null\n */\n static now(clockOrZone) {\n let clock;\n if(clockOrZone instanceof ZoneId){\n clock = Clock.system(clockOrZone);\n } else {\n clock = clockOrZone == null ? Clock.systemDefaultZone() : clockOrZone;\n }\n return ZonedDateTime.ofInstant(clock.instant(), clock.zone());\n }\n\n //-----------------------------------------------------------------------\n /**\n * function overloading for static {@link ZonedDateTime.of}\n *\n * if called with 2 (or less) args {@link ZonedDateTime.of2} is called,\n * if called with 3 args and the first arg is an instance of LocalDate {@link ZonedDateTime.of3} is called,\n * otherwise {@link ZonedDateTime.of8} is called.\n */\n static of(){\n if(arguments.length <= 2){\n return ZonedDateTime.of2.apply(this, arguments);\n } else if (arguments.length === 3 && arguments[0] instanceof LocalDate){\n return ZonedDateTime.of3.apply(this, arguments);\n } else {\n return ZonedDateTime.of8.apply(this, arguments);\n }\n }\n /**\n * Obtains an instance of {@link ZonedDateTime} from a local date and time.\n *\n * This creates a zoned date-time matching the input local date and time as closely as possible.\n * Time-zone rules, such as daylight savings, mean that not every local date-time\n * is valid for the specified zone, thus the local date-time may be adjusted.\n *\n * The local date time and first combined to form a local date-time.\n * The local date-time is then resolved to a single instant on the time-line.\n * This is achieved by finding a valid offset from UTC/Greenwich for the local\n * date-time as defined by the {@link ZoneRules} of the zone ID.\n *\n * In most cases, there is only one valid offset for a local date-time.\n * In the case of an overlap, when clocks are set back, there are two valid offsets.\n * This method uses the earlier offset typically corresponding to 'summer'.\n *\n * In the case of a gap, when clocks jump forward, there is no valid offset.\n * Instead, the local date-time is adjusted to be later by the length of the gap.\n * For a typical one hour daylight savings change, the local date-time will be\n * moved one hour later into the offset typically corresponding to 'summer'.\n *\n * @param {LocalDate} date - the local date, not null\n * @param {LocalTime} time - the local time, not null\n * @param {ZoneId} zone - the time-zone, not null\n * @return {ZonedDateTime} the offset date-time, not null\n */\n static of3(date, time, zone) {\n return ZonedDateTime.of2(LocalDateTime.of(date, time), zone);\n }\n\n /**\n * Obtains an instance of {@link ZonedDateTime} from a local date-time.\n *\n * This creates a zoned date-time matching the input local date-time as closely as possible.\n * Time-zone rules, such as daylight savings, mean that not every local date-time\n * is valid for the specified zone, thus the local date-time may be adjusted.\n *\n * The local date-time is resolved to a single instant on the time-line.\n * This is achieved by finding a valid offset from UTC/Greenwich for the local\n * date-time as defined by the {@link ZoneRules} of the zone ID.\n *\n * In most cases, there is only one valid offset for a local date-time.\n * In the case of an overlap, when clocks are set back, there are two valid offsets.\n * This method uses the earlier offset typically corresponding to 'summer'.\n *\n * In the case of a gap, when clocks jump forward, there is no valid offset.\n * Instead, the local date-time is adjusted to be later by the length of the gap.\n * For a typical one hour daylight savings change, the local date-time will be\n * moved one hour later into the offset typically corresponding to 'summer'.\n *\n * @param {!LocalDateTime} localDateTime - the local date-time, not null\n * @param {!ZoneId} zone - the time-zone, not null\n * @return {ZonedDateTime} the zoned date-time, not null\n */\n static of2(localDateTime, zone) {\n return ZonedDateTime.ofLocal(localDateTime, zone, null);\n }\n\n /**\n * Obtains an instance of {@link ZonedDateTime} from a year, month, day,\n * hour, minute, second, nanosecond and time-zone.\n *\n * This creates a zoned date-time matching the local date-time of the seven\n * specified fields as closely as possible.\n * Time-zone rules, such as daylight savings, mean that not every local date-time\n * is valid for the specified zone, thus the local date-time may be adjusted.\n *\n * The local date-time is resolved to a single instant on the time-line.\n * This is achieved by finding a valid offset from UTC/Greenwich for the local\n * date-time as defined by the {@link ZoneRules} of the zone ID.\n *\n * In most cases, there is only one valid offset for a local date-time.\n * In the case of an overlap, when clocks are set back, there are two valid offsets.\n * This method uses the earlier offset typically corresponding to 'summer'.\n *\n * In the case of a gap, when clocks jump forward, there is no valid offset.\n * Instead, the local date-time is adjusted to be later by the length of the gap.\n * For a typical one hour daylight savings change, the local date-time will be\n * moved one hour later into the offset typically corresponding to 'summer'.\n *\n * This method exists primarily for writing test cases.\n * Non test-code will typically use other methods to create an offset time.\n * {@link LocalDateTime} has five additional convenience variants of the\n * equivalent factory method taking fewer arguments.\n * They are not provided here to reduce the footprint of the API.\n *\n * @param {number} year - the year to represent, from MIN_YEAR to MAX_YEAR\n * @param {number} month - the month-of-year to represent, from 1 (January) to 12 (December)\n * @param {number} dayOfMonth - the day-of-month to represent, from 1 to 31\n * @param {number} hour - the hour-of-day to represent, from 0 to 23\n * @param {number} minute - the minute-of-hour to represent, from 0 to 59\n * @param {number} second - the second-of-minute to represent, from 0 to 59\n * @param {number} nanoOfSecond - the nano-of-second to represent, from 0 to 999,999,999\n * @param {ZoneId} zone - the time-zone, not null\n * @return {ZonedDateTime } the offset date-time, not null\n * @throws DateTimeException if the value of any field is out of range, or\n * if the day-of-month is invalid for the month-year\n */\n static of8(\n year, month, dayOfMonth,\n hour, minute, second, nanoOfSecond, zone) {\n const dt = LocalDateTime.of(year, month, dayOfMonth, hour, minute, second, nanoOfSecond);\n return ZonedDateTime.ofLocal(dt, zone, null);\n }\n\n /**\n * Obtains an instance of {@link ZonedDateTime} from a local date-time\n * using the preferred offset if possible.\n *\n * The local date-time is resolved to a single instant on the time-line.\n * This is achieved by finding a valid offset from UTC/Greenwich for the local\n * date-time as defined by the {@link ZoneRules} of the zone ID.\n *\n * In most cases, there is only one valid offset for a local date-time.\n * In the case of an overlap, where clocks are set back, there are two valid offsets.\n * If the preferred offset is one of the valid offsets then it is used.\n * Otherwise the earlier valid offset is used, typically corresponding to 'summer'.\n *\n * In the case of a gap, where clocks jump forward, there is no valid offset.\n * Instead, the local date-time is adjusted to be later by the length of the gap.\n * For a typical one hour daylight savings change, the local date-time will be\n * moved one hour later into the offset typically corresponding to 'summer'.\n *\n * @param {!LocalDateTime} localDateTime - the local date-time, not null\n * @param {!ZoneId} zone - the time-zone, not null\n * @param {ZoneOffset} preferredOffset - the zone offset, null if no preference\n * @return {ZonedDateTime} the zoned date-time, not null\n */\n static ofLocal(localDateTime, zone, preferredOffset) {\n requireNonNull(localDateTime, 'localDateTime');\n requireNonNull(zone, 'zone');\n if (zone instanceof ZoneOffset) {\n return new ZonedDateTime(localDateTime, zone, zone);\n }\n let offset = null;\n const rules = zone.rules();\n const validOffsets = rules.validOffsets(localDateTime);\n if (validOffsets.length === 1) {\n offset = validOffsets[0];\n } else if (validOffsets.length === 0) {\n const trans = rules.transition(localDateTime);\n localDateTime = localDateTime.plusSeconds(trans.duration().seconds());\n offset = trans.offsetAfter();\n } else {\n if (preferredOffset != null &&\n validOffsets.some((validOffset) => {return validOffset.equals(preferredOffset);})) {\n offset = preferredOffset;\n } else {\n offset = requireNonNull(validOffsets[0], 'offset'); // protect against bad ZoneRules\n }\n }\n\n return new ZonedDateTime(localDateTime, offset, zone);\n }\n\n //-----------------------------------------------------------------------\n /**\n * function overloading for {@link ZonedDateTime.ofInstant}.\n * if called with 2 args {@link ZonedDateTime.ofInstant2} is called\n * otherwise {@link ZonedDateTime.ofInstant3}.\n */\n static ofInstant(){\n if (arguments.length === 2){\n return ZonedDateTime.ofInstant2.apply(this, arguments);\n } else {\n return ZonedDateTime.ofInstant3.apply(this, arguments);\n }\n }\n /**\n * Obtains an instance of {@link ZonedDateTime} from an {@link Instant}.\n *\n * This creates a zoned date-time with the same instant as that specified.\n * Calling {@link toInstant} will return an instant equal to the one used here.\n *\n * Converting an instant to a zoned date-time is simple as there is only one valid\n * offset for each instant.\n *\n * @param {!Instant} instant - the instant to create the date-time from, not null\n * @param {!ZoneId} zone - the time-zone, not null\n * @return {ZonedDateTime} the zoned date-time, not null\n * @throws DateTimeException if the result exceeds the supported range\n */\n static ofInstant2(instant, zone) {\n requireNonNull(instant, 'instant');\n requireNonNull(zone, 'zone');\n return ZonedDateTime._create(instant.epochSecond(), instant.nano(), zone);\n }\n\n /**\n * Obtains an instance of {@link ZonedDateTime} from the instant formed by combining\n * the local date-time and offset.\n *\n * This creates a zoned date-time by combining the {@link LocalDateTime} and {@link ZoneOffset}.\n * This combination uniquely specifies an instant without ambiguity.\n *\n * Converting an instant to a zoned date-time is simple as there is only one valid\n * offset for each instant. If the valid offset is different to the offset specified,\n * the the date-time and offset of the zoned date-time will differ from those specified.\n *\n * If the {@link ZoneId} to be used is a {@link ZoneOffset}, this method is equivalent\n * to {@link of}.\n *\n * @param {LocalDateTime} localDateTime - the local date-time, not null\n * @param {ZoneOffset} offset - the zone offset, not null\n * @param {ZoneId} zone - the time-zone, not null\n * @return {ZonedDateTime} the zoned date-time, not null\n */\n static ofInstant3(localDateTime, offset, zone) {\n requireNonNull(localDateTime, 'localDateTime');\n requireNonNull(offset, 'offset');\n requireNonNull(zone, 'zone');\n return ZonedDateTime._create(localDateTime.toEpochSecond(offset), localDateTime.nano(), zone);\n }\n\n /**\n * Obtains an instance of {@link ZonedDateTime} using seconds from the\n * epoch of 1970-01-01T00:00:00Z.\n *\n * @param {number} epochSecond - the number of seconds from the epoch of 1970-01-01T00:00:00Z\n * @param {number} nanoOfSecond - the nanosecond within the second, from 0 to 999,999,999\n * @param {ZoneId} zone - the time-zone, not null\n * @return {ZonedDateTime} the zoned date-time, not null\n * @throws DateTimeException if the result exceeds the supported range\n */\n static _create(epochSecond, nanoOfSecond, zone) {\n const rules = zone.rules();\n const instant = Instant.ofEpochSecond(epochSecond, nanoOfSecond); // TODO: rules should be queryable by epochSeconds\n const offset = rules.offset(instant);\n const ldt = LocalDateTime.ofEpochSecond(epochSecond, nanoOfSecond, offset);\n return new ZonedDateTime(ldt, offset, zone);\n }\n\n //-----------------------------------------------------------------------\n /**\n * Obtains an instance of {@link ZonedDateTime} strictly validating the\n * combination of local date-time, offset and zone ID.\n *\n * This creates a zoned date-time ensuring that the offset is valid for the\n * local date-time according to the rules of the specified zone.\n * If the offset is invalid, an exception is thrown.\n *\n * @param {LocalDateTime} localDateTime - the local date-time, not null\n * @param {ZoneOffset} offset - the zone offset, not null\n * @param {ZoneId} zone - the time-zone, not null\n * @return {ZonedDateTime} the zoned date-time, not null\n */\n static ofStrict(localDateTime, offset, zone) {\n requireNonNull(localDateTime, 'localDateTime');\n requireNonNull(offset, 'offset');\n requireNonNull(zone, 'zone');\n const rules = zone.rules();\n if (rules.isValidOffset(localDateTime, offset) === false) {\n const trans = rules.transition(localDateTime);\n if (trans != null && trans.isGap()) {\n // error message says daylight savings for simplicity\n // even though there are other kinds of gaps\n throw new DateTimeException(`LocalDateTime ${localDateTime \n } does not exist in zone ${zone \n } due to a gap in the local time-line, typically caused by daylight savings`);\n }\n throw new DateTimeException(`ZoneOffset \"${offset}\" is not valid for LocalDateTime \"${ \n localDateTime}\" in zone \"${zone}\"`);\n }\n return new ZonedDateTime(localDateTime, offset, zone);\n }\n\n /**\n * Obtains an instance of {@link ZonedDateTime} leniently, for advanced use cases,\n * allowing any combination of local date-time, offset and zone ID.\n *\n * This creates a zoned date-time with no checks other than no nulls.\n * This means that the resulting zoned date-time may have an offset that is in conflict\n * with the zone ID.\n *\n * This method is intended for advanced use cases.\n * For example, consider the case where a zoned date-time with valid fields is created\n * and then stored in a database or serialization-based store. At some later point,\n * the object is then re-loaded. However, between those points in time, the government\n * that defined the time-zone has changed the rules, such that the originally stored\n * local date-time now does not occur. This method can be used to create the object\n * in an 'invalid' state, despite the change in rules.\n *\n * @param {LocalDateTime} localDateTime - the local date-time, not null\n * @param {ZoneOffset} offset - the zone offset, not null\n * @param {ZoneId} zone - the time-zone, not null\n * @return {ZonedDateTime} the zoned date-time, not null\n */\n static ofLenient(localDateTime, offset, zone) {\n requireNonNull(localDateTime, 'localDateTime');\n requireNonNull(offset, 'offset');\n requireNonNull(zone, 'zone');\n if (zone instanceof ZoneOffset && offset.equals(zone) === false) {\n throw new IllegalArgumentException('ZoneId must match ZoneOffset');\n }\n return new ZonedDateTime(localDateTime, offset, zone);\n }\n\n //-----------------------------------------------------------------------\n /**\n * Obtains an instance of {@link ZonedDateTime} from a temporal object.\n *\n * A {@link TemporalAccessor} represents some form of date and time information.\n * This factory converts the arbitrary temporal object to an instance of {@link ZonedDateTime}.\n *\n * The conversion will first obtain a {@link ZoneId}. It will then try to obtain an instant.\n * If that fails it will try to obtain a local date-time.\n * The zoned date time will either be a combination of {@link ZoneId} and instant,\n * or {@link ZoneId} and local date-time.\n *\n * This method matches the signature of the functional interface {@link TemporalQuery}\n * allowing it to be used in queries via method reference, {@link ZonedDateTime::from}.\n *\n * @param {!TemporalAccessor} temporal - the temporal object to convert, not null\n * @return {ZonedDateTime} the zoned date-time, not null\n * @throws DateTimeException if unable to convert to an {@link ZonedDateTime}\n */\n static from(temporal) {\n requireNonNull(temporal, 'temporal');\n if (temporal instanceof ZonedDateTime) {\n return temporal;\n }\n const zone = ZoneId.from(temporal);\n if (temporal.isSupported(ChronoField.INSTANT_SECONDS)) {\n const zdt = ZonedDateTime._from(temporal, zone);\n if(zdt != null) return zdt;\n }\n const ldt = LocalDateTime.from(temporal);\n return ZonedDateTime.of2(ldt, zone);\n }\n\n static _from(temporal, zone){\n try {\n return ZonedDateTime.__from(temporal, zone);\n } catch (ex) {\n if(!(ex instanceof DateTimeException)) throw ex;\n // ignore\n }\n }\n\n static __from(temporal, zone){\n const epochSecond = temporal.getLong(ChronoField.INSTANT_SECONDS);\n const nanoOfSecond = temporal.get(ChronoField.NANO_OF_SECOND);\n return ZonedDateTime._create(epochSecond, nanoOfSecond, zone);\n }\n\n //-----------------------------------------------------------------------\n /**\n * Obtains an instance of {@link ZonedDateTime} from a text string such as\n * `2007-12-03T10:15:30+01:00[Europe/Paris]`.\n *\n * The string must represent a valid date-time and is parsed using\n * {@link org.threeten.bp.format.DateTimeFormatter#ISO_ZONED_DATE_TIME}.\n *\n * @param {!string} text - the text to parse such as '2007-12-03T10:15:30+01:00[Europe/Paris]', not null\n * @param {!DateTimeFormatter} [formatter=DateTimeFormatter.ISO_ZONED_DATE_TIME] - the formatter to use\n * @return {ZonedDateTime} the parsed zoned date-time, not null\n * @throws DateTimeParseException if the text cannot be parsed\n */\n static parse(text, formatter = DateTimeFormatter.ISO_ZONED_DATE_TIME) {\n requireNonNull(formatter, 'formatter');\n return formatter.parse(text, ZonedDateTime.FROM);\n }\n\n //-----------------------------------------------------------------------\n /**\n * Constructor.\n *\n * @param {LocalDateTime} dateTime - the date-time, validated as not null\n * @param {ZoneOffset} offset - the zone offset, validated as not null\n * @param {ZoneUd} zone - the time-zone, validated as not null\n * @private\n */\n constructor(dateTime, offset, zone) {\n requireNonNull(dateTime, 'dateTime');\n requireNonNull(offset, 'offset');\n requireNonNull(zone, 'zone');\n\n super();\n\n /**\n * The local date-time.\n */\n this._dateTime = dateTime;\n /**\n * The offset from UTC/Greenwich.\n */\n this._offset = offset;\n /**\n * The time-zone.\n */\n this._zone = zone;\n }\n\n /**\n * Resolves the new local date-time using this zone ID, retaining the offset if possible.\n *\n * @param {LocalDateTime} newDateTime - the new local date-time, not null\n * @return {ZonedDateTime} the zoned date-time, not null\n */\n _resolveLocal(newDateTime) {\n requireNonNull(newDateTime, 'newDateTime');\n return ZonedDateTime.ofLocal(newDateTime, this._zone, this._offset);\n }\n\n /**\n * Resolves the new local date-time using the offset to identify the instant.\n *\n * @param {LocalDateTime} newDateTime - the new local date-time, not null\n * @return {ZonedDateTime} the zoned date-time, not null\n */\n _resolveInstant(newDateTime) {\n return ZonedDateTime.ofInstant3(newDateTime, this._offset, this._zone);\n }\n\n /**\n * Resolves the offset into this zoned date-time.\n *\n * This ignores the offset, unless it can be used in an overlap.\n *\n * @param {ZoneOffset} offset - the offset, not null\n * @return {ZonedDateTime} the zoned date-time, not null\n */\n _resolveOffset(offset) {\n if (offset.equals(this._offset) === false && this._zone.rules().isValidOffset(this._dateTime, offset)) {\n return new ZonedDateTime(this._dateTime, offset, this._zone);\n }\n return this;\n }\n\n //-----------------------------------------------------------------------\n /**\n * Checks if the specified field is supported.\n *\n * This checks if this date-time can be queried for the specified field.\n * If false, then calling {@link range} and {@link get} will throw an exception.\n *\n * If the field is a {@link ChronoField} then the query is implemented here.\n * The supported fields are:\n *\n * * {@link NANO_OF_SECOND}\n * * {@link NANO_OF_DAY}\n * * {@link MICRO_OF_SECOND}\n * * {@link MICRO_OF_DAY}\n * * {@link MILLI_OF_SECOND}\n * * {@link MILLI_OF_DAY}\n * * {@link SECOND_OF_MINUTE}\n * * {@link SECOND_OF_DAY}\n * * {@link MINUTE_OF_HOUR}\n * * {@link MINUTE_OF_DAY}\n * * {@link HOUR_OF_AMPM}\n * * {@link CLOCK_HOUR_OF_AMPM}\n * * {@link HOUR_OF_DAY}\n * * {@link CLOCK_HOUR_OF_DAY}\n * * {@link AMPM_OF_DAY}\n * * {@link DAY_OF_WEEK}\n * * {@link ALIGNED_DAY_OF_WEEK_IN_MONTH}\n * * {@link ALIGNED_DAY_OF_WEEK_IN_YEAR}\n * * {@link DAY_OF_MONTH}\n * * {@link DAY_OF_YEAR}\n * * {@link EPOCH_DAY}\n * * {@link ALIGNED_WEEK_OF_MONTH}\n * * {@link ALIGNED_WEEK_OF_YEAR}\n * * {@link MONTH_OF_YEAR}\n * * {@link EPOCH_MONTH}\n * * {@link YEAR_OF_ERA}\n * * {@link YEAR}\n * * {@link ERA}\n * * {@link INSTANT_SECONDS}\n * * {@link OFFSET_SECONDS}\n *\n * All other {@link ChronoField} instances will return false.\n *\n * If the field is not a {@link ChronoField}, then the result of this method\n * is obtained by invoking {@link TemporalField.isSupportedBy}\n * passing `this` as the argument.\n * Whether the field is supported is determined by the field.\n *\n * @param {TemporalField|TemporalUnit} fieldOrUnit - the field to check, null returns false\n * @return {boolean} true if the field is supported on this date-time, false if not\n */\n isSupported(fieldOrUnit) {\n if(fieldOrUnit instanceof ChronoField){\n return true;\n } else if (fieldOrUnit instanceof ChronoUnit) {\n return fieldOrUnit.isDateBased() || fieldOrUnit.isTimeBased();\n }\n return (fieldOrUnit != null && fieldOrUnit.isSupportedBy(this));\n }\n\n\n /**\n * Gets the range of valid values for the specified field.\n *\n * The range object expresses the minimum and maximum valid values for a field.\n * This date-time is used to enhance the accuracy of the returned range.\n * If it is not possible to return the range, because the field is not supported\n * or for some other reason, an exception is thrown.\n *\n * If the field is a {@link ChronoField} then the query is implemented here.\n * The supported fields (see {@link isSupported}) will return\n * appropriate range instances.\n * All other {@link ChronoField} instances will throw a {@link DateTimeException}.\n *\n * If the field is not a {@link ChronoField}, then the result of this method\n * is obtained by invoking {@link TemporalField.rangeRefinedBy}\n * passing `this` as the argument.\n * Whether the range can be obtained is determined by the field.\n *\n * @param {TemporalField} field - the field to query the range for, not null\n * @return {ValueRange} the range of valid values for the field, not null\n * @throws DateTimeException if the range for the field cannot be obtained\n */\n range(field) {\n if (field instanceof ChronoField) {\n if (field === ChronoField.INSTANT_SECONDS || field === ChronoField.OFFSET_SECONDS) {\n return field.range();\n }\n return this._dateTime.range(field);\n }\n return field.rangeRefinedBy(this);\n }\n\n /**\n * Gets the value of the specified field from this date-time as an `int`.\n *\n * This queries this date-time for the value for the specified field.\n * The returned value will always be within the valid range of values for the field.\n * If it is not possible to return the value, because the field is not supported\n * or for some other reason, an exception is thrown.\n *\n * If the field is a {@link ChronoField} then the query is implemented here.\n * The supported fields (see {@link isSupported}) will return valid\n * values based on this date-time, except {@link NANO_OF_DAY}, {@link MICRO_OF_DAY},\n * {@link EPOCH_DAY}, {@link EPOCH_MONTH} and {@link INSTANT_SECONDS} which are too\n * large to fit in an `int` and throw a {@link DateTimeException}.\n * All other {@link ChronoField} instances will throw a {@link DateTimeException}.\n *\n * If the field is not a {@link ChronoField}, then the result of this method\n * is obtained by invoking {@link TemporalField.getFrom}\n * passing `this` as the argument. Whether the value can be obtained,\n * and what the value represents, is determined by the field.\n *\n * @param {!TemporalField} field - the field to get, not null\n * @return {number} the value for the field\n * @throws DateTimeException if a value for the field cannot be obtained\n * @throws ArithmeticException if numeric overflow occurs\n */\n get(field) {\n return this.getLong(field);\n }\n\n /**\n * Gets the value of the specified field from this date-time as a `long`.\n *\n * This queries this date-time for the value for the specified field.\n * If it is not possible to return the value, because the field is not supported\n * or for some other reason, an exception is thrown.\n *\n * If the field is a {@link ChronoField} then the query is implemented here.\n * The supported fields (see {@link isSupported}) will return valid\n * values based on this date-time.\n * All other {@link ChronoField} instances will throw a {@link DateTimeException}.\n *\n * If the field is not a {@link ChronoField}, then the result of this method\n * is obtained by invoking {@link TemporalField.getFrom}\n * passing `this` as the argument. Whether the value can be obtained,\n * and what the value represents, is determined by the field.\n *\n * @param {!TemporalField} field the field to get, not null\n * @return {number} the value for the field\n * @throws DateTimeException if a value for the field cannot be obtained\n * @throws ArithmeticException if numeric overflow occurs\n */\n getLong(field) {\n if (field instanceof ChronoField) {\n switch (field) {\n case ChronoField.INSTANT_SECONDS: return this.toEpochSecond();\n case ChronoField.OFFSET_SECONDS: return this._offset.totalSeconds();\n }\n return this._dateTime.getLong(field);\n }\n requireNonNull(field, 'field');\n return field.getFrom(this);\n }\n\n //-----------------------------------------------------------------------\n /**\n * Gets the zone offset, such as '+01:00'.\n *\n * This is the offset of the local date-time from UTC/Greenwich.\n *\n * @return {ZoneOffset}the zone offset, not null\n */\n offset() {\n return this._offset;\n }\n\n /**\n * Returns a copy of this date-time changing the zone offset to the\n * earlier of the two valid offsets at a local time-line overlap.\n *\n * This method only has any effect when the local time-line overlaps, such as\n * at an autumn daylight savings cutover. In this scenario, there are two\n * valid offsets for the local date-time. Calling this method will return\n * a zoned date-time with the earlier of the two selected.\n *\n * If this method is called when it is not an overlap, `this`\n * is returned.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @return {ZonedDateTime} a {@link ZonedDateTime} based on this date-time with the earlier offset, not null\n */\n withEarlierOffsetAtOverlap() {\n const trans = this._zone.rules().transition(this._dateTime);\n if (trans != null && trans.isOverlap()) {\n const earlierOffset = trans.offsetBefore();\n if (earlierOffset.equals(this._offset) === false) {\n return new ZonedDateTime(this._dateTime, earlierOffset, this._zone);\n }\n }\n return this;\n }\n\n /**\n * Returns a copy of this date-time changing the zone offset to the\n * later of the two valid offsets at a local time-line overlap.\n *\n * This method only has any effect when the local time-line overlaps, such as\n * at an autumn daylight savings cutover. In this scenario, there are two\n * valid offsets for the local date-time. Calling this method will return\n * a zoned date-time with the later of the two selected.\n *\n * If this method is called when it is not an overlap, `this`\n * is returned.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @return {ZonedDateTime} a {@link ZonedDateTime} based on this date-time with the later offset, not null\n */\n withLaterOffsetAtOverlap() {\n const trans = this._zone.rules().transition(this.toLocalDateTime());\n if (trans != null) {\n const laterOffset = trans.offsetAfter();\n if (laterOffset.equals(this._offset) === false) {\n return new ZonedDateTime(this._dateTime, laterOffset, this._zone);\n }\n }\n return this;\n }\n\n //-----------------------------------------------------------------------\n /**\n * Gets the time-zone, such as 'Europe/Paris'.\n *\n * This returns the zone ID. This identifies the time-zone {@link ZoneRules}\n * that determine when and how the offset from UTC/Greenwich changes.\n *\n * The zone ID may be same as the offset (see {@link getOffset}).\n * If this is true, then any future calculations, such as addition or subtraction,\n * have no complex edge cases due to time-zone rules.\n * See also {@link withFixedOffsetZone}.\n *\n * @return {ZoneId} the time-zone, not null\n */\n zone() {\n return this._zone;\n }\n\n /**\n * Returns a copy of this date-time with a different time-zone,\n * retaining the local date-time if possible.\n *\n * This method changes the time-zone and retains the local date-time.\n * The local date-time is only changed if it is invalid for the new zone,\n * determined using the same approach as\n * {@link ofLocal}.\n *\n * To change the zone and adjust the local date-time,\n * use {@link withZoneSameInstant}.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {ZoneId} zone - the time-zone to change to, not null\n * @return {ZonedDateTime} a {@link ZonedDateTime} based on this date-time with the requested zone, not null\n */\n withZoneSameLocal(zone) {\n requireNonNull(zone, 'zone');\n return this._zone.equals(zone) ? this : ZonedDateTime.ofLocal(this._dateTime, zone, this._offset);\n }\n\n /**\n * Returns a copy of this date-time with a different time-zone,\n * retaining the instant.\n *\n * This method changes the time-zone and retains the instant.\n * This normally results in a change to the local date-time.\n *\n * This method is based on retaining the same instant, thus gaps and overlaps\n * in the local time-line have no effect on the result.\n *\n * To change the offset while keeping the local time,\n * use {@link withZoneSameLocal}.\n *\n * @param {ZoneId} zone - the time-zone to change to, not null\n * @return {ZonedDateTime} a {@link ZonedDateTime} based on this date-time with the requested zone, not null\n * @throws DateTimeException if the result exceeds the supported date range\n */\n withZoneSameInstant(zone) {\n requireNonNull(zone, 'zone');\n return this._zone.equals(zone) ? this :\n ZonedDateTime._create(this._dateTime.toEpochSecond(this._offset), this._dateTime.nano(), zone);\n }\n\n /**\n * Returns a copy of this date-time with the zone ID set to the offset.\n *\n * This returns a zoned date-time where the zone ID is the same as {@link getOffset}.\n * The local date-time, offset and instant of the result will be the same as in this date-time.\n *\n * Setting the date-time to a fixed single offset means that any future\n * calculations, such as addition or subtraction, have no complex edge cases\n * due to time-zone rules.\n * This might also be useful when sending a zoned date-time across a network,\n * as most protocols, such as ISO-8601, only handle offsets,\n * and not region-based zone IDs.\n *\n * This is equivalent to {@link ZonedDateTime.of}.\n *\n * @return {ZonedDateTime} a {@link ZonedDateTime} with the zone ID set to the offset, not null\n */\n withFixedOffsetZone() {\n return this._zone.equals(this._offset) ? this : new ZonedDateTime(this._dateTime, this._offset, this._offset);\n }\n\n //-----------------------------------------------------------------------\n /**\n * Gets the year field.\n *\n * This method returns the primitive `int` value for the year.\n *\n * The year returned by this method is proleptic as per {@link get}.\n * To obtain the year-of-era, use `get(YEAR_OF_ERA)`.\n *\n * @return {number} the year, from MIN_YEAR to MAX_YEAR\n */\n year() {\n return this._dateTime.year();\n }\n\n /**\n * Gets the month-of-year field from 1 to 12.\n *\n * This method returns the month as an `int` from 1 to 12.\n * Application code is frequently clearer if the enum {@link Month}\n * is used by calling {@link getMonth}.\n *\n * @return {number} the month-of-year, from 1 to 12\n * @see #month()\n */\n monthValue() {\n return this._dateTime.monthValue();\n }\n\n /**\n * Gets the month-of-year field using the {@link Month} enum.\n *\n * This method returns the enum {@link Month} for the month.\n * This avoids confusion as to what `int` values mean.\n * If you need access to the primitive `int` value, use {@link Month#getValue}.\n *\n * @return {Month} the month-of-year, not null\n * @see #getMonthValue()\n */\n month() {\n return this._dateTime.month();\n }\n\n /**\n * Gets the day-of-month field.\n *\n * This method returns the primitive `int` value for the day-of-month.\n *\n * @return {number} the day-of-month, from 1 to 31\n */\n dayOfMonth() {\n return this._dateTime.dayOfMonth();\n }\n\n /**\n * Gets the day-of-year field.\n *\n * This method returns the primitive `int` value for the day-of-year.\n *\n * @return {number} the day-of-year, from 1 to 365, or 366 in a leap year\n */\n dayOfYear() {\n return this._dateTime.dayOfYear();\n }\n\n /**\n * Gets the day-of-week field, which is an enum {@link DayOfWeek}.\n *\n * This method returns the enum {@link DayOfWeek} for the day-of-week.\n * This avoids confusion as to what `int` values mean.\n * If you need access to the primitive `int` value, use {@link DayOfWeek#getValue}.\n *\n * Additional information can be obtained from the {@link DayOfWeek}.\n * This includes textual names of the values.\n *\n * @return {DayOfWeek} the day-of-week, not null\n */\n dayOfWeek() {\n return this._dateTime.dayOfWeek();\n }\n\n //-----------------------------------------------------------------------\n /**\n * Gets the hour-of-day field.\n *\n * @return {number} the hour-of-day, from 0 to 23\n */\n hour() {\n return this._dateTime.hour();\n }\n\n /**\n * Gets the minute-of-hour field.\n *\n * @return {number} the minute-of-hour, from 0 to 59\n */\n minute() {\n return this._dateTime.minute();\n }\n\n /**\n * Gets the second-of-minute field.\n *\n * @return {number} the second-of-minute, from 0 to 59\n */\n second() {\n return this._dateTime.second();\n }\n\n /**\n * Gets the nano-of-second field.\n *\n * @return {number} the nano-of-second, from 0 to 999,999,999\n */\n nano() {\n return this._dateTime.nano();\n }\n\n //-----------------------------------------------------------------------\n\n /**\n * Returns an adjusted copy of this date-time.\n *\n * This returns a new {@link ZonedDateTime}, based on this one, with the date-time adjusted.\n * The adjustment takes place using the specified adjuster strategy object.\n * Read the documentation of the adjuster to understand what adjustment will be made.\n *\n * A simple adjuster might simply set the one of the fields, such as the year field.\n * A more complex adjuster might set the date to the last day of the month.\n * A selection of common adjustments is provided in {@link TemporalAdjusters}.\n * These include finding the 'last day of the month' and 'next Wednesday'.\n * Key date-time classes also implement the {@link TemporalAdjuster} interface,\n * such as {@link Month} and {@link MonthDay}.\n * The adjuster is responsible for handling special cases, such as the varying\n * lengths of month and leap years.\n *\n * For example this code returns a date on the last day of July:\n *

\n     *  import static org.threeten.bp.Month.*;\n     *  import static org.threeten.bp.temporal.Adjusters.*;\n     *\n     *  result = zonedDateTime.with(JULY).with(lastDayOfMonth());\n     * 
\n *\n * The classes {@link LocalDate} and {@link LocalTime} implement {@link TemporalAdjuster},\n * thus this method can be used to change the date, time or offset:\n *
\n     *  result = zonedDateTime.with(date);\n     *  result = zonedDateTime.with(time);\n     * 
\n *\n * {@link ZoneOffset} also implements {@link TemporalAdjuster} however it is less likely\n * that setting the offset will have the effect you expect. When an offset is passed in,\n * the local date-time is combined with the new offset to form an {@link Instant}.\n * The instant and original zone are then used to create the result.\n * This algorithm means that it is quite likely that the output has a different offset\n * to the specified offset. It will however work correctly when passing in the offset\n * applicable for the instant of the zoned date-time, and will work correctly if passing\n * one of the two valid offsets during a daylight savings overlap when the same local time\n * occurs twice.\n *\n * The result of this method is obtained by invoking the\n * {@link TemporalAdjuster#adjustInto} method on the\n * specified adjuster passing `this` as the argument.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {TemporalAdjuster} adjuster - the adjuster to use, not null\n * @return {ZonedDateTime} a {@link ZonedDateTime} based on `this` with the adjustment made, not null\n * @throws DateTimeException if the adjustment cannot be made\n * @throws ArithmeticException if numeric overflow occurs\n */\n _withAdjuster(adjuster) {\n // optimizations\n if (adjuster instanceof LocalDate) {\n return this._resolveLocal(LocalDateTime.of(adjuster, this._dateTime.toLocalTime()));\n } else if (adjuster instanceof LocalTime) {\n return this._resolveLocal(LocalDateTime.of(this._dateTime.toLocalDate(), adjuster));\n } else if (adjuster instanceof LocalDateTime) {\n return this._resolveLocal(adjuster);\n } else if (adjuster instanceof Instant) {\n const instant = adjuster;\n return ZonedDateTime._create(instant.epochSecond(), instant.nano(), this._zone);\n } else if (adjuster instanceof ZoneOffset) {\n return this._resolveOffset(adjuster);\n }\n return super._withAdjuster(adjuster);\n }\n\n /**\n * Returns a copy of this date-time with the specified field set to a new value.\n *\n * This returns a {@link ZonedDateTime}, based on this one, with the value\n * for the specified field changed.\n * This can be used to change any supported field, such as the year, month or day-of-month.\n * If it is not possible to set the value, because the field is not supported or for\n * some other reason, an exception is thrown.\n *\n * In some cases, changing the specified field can cause the resulting date-time to become invalid,\n * such as changing the month from 31st January to February would make the day-of-month invalid.\n * In cases like this, the field is responsible for resolving the date. Typically it will choose\n * the previous valid date, which would be the last valid day of February in this example.\n *\n * If the field is a {@link ChronoField} then the adjustment is implemented here.\n *\n * The {@link INSTANT_SECONDS} field will return a date-time with the specified instant.\n * The zone and nano-of-second are unchanged.\n * The result will have an offset derived from the new instant and original zone.\n * If the new instant value is outside the valid range then a {@link DateTimeException} will be thrown.\n *\n * The {@link OFFSET_SECONDS} field will typically be ignored.\n * The offset of a {@link ZonedDateTime} is controlled primarily by the time-zone.\n * As such, changing the offset does not generally make sense, because there is only\n * one valid offset for the local date-time and zone.\n * If the zoned date-time is in a daylight savings overlap, then the offset is used\n * to switch between the two valid offsets. In all other cases, the offset is ignored.\n * If the new offset value is outside the valid range then a {@link DateTimeException} will be thrown.\n *\n * The other supported fields (see {@link isSupported}) will behave as in {@link LocalDateTime#with}.\n * The zone is not part of the calculation and will be unchanged.\n * When converting back to {@link ZonedDateTime}, if the local date-time is in an overlap,\n * then the offset will be retained if possible, otherwise the earlier offset will be used.\n * If in a gap, the local date-time will be adjusted forward by the length of the gap.\n *\n * All other {@link ChronoField} instances will throw an {@link UnsupportedTemporalTypeException}.\n *\n * If the field is not a {@link ChronoField}, then the result of this method\n * is obtained by invoking {@link TemporalField.adjustInto}\n * passing `this` as the argument. In this case, the field determines\n * whether and how to adjust the instant.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {TemporalField} field - the field to set in the result, not null\n * @param {number} newValue - the new value of the field in the result\n * @return {ZonedDateTime} a {@link ZonedDateTime} based on `this` with the specified field set, not null\n * @throws DateTimeException if the field cannot be set\n * @throws UnsupportedTemporalTypeException if the field is not supported\n * @throws ArithmeticException if numeric overflow occurs\n */\n _withField(field, newValue) {\n if (field instanceof ChronoField) {\n switch (field) {\n case ChronoField.INSTANT_SECONDS: return ZonedDateTime._create(newValue, this.nano(), this._zone);\n case ChronoField.OFFSET_SECONDS: {\n const offset = ZoneOffset.ofTotalSeconds(field.checkValidIntValue(newValue));\n return this._resolveOffset(offset);\n }\n }\n return this._resolveLocal(this._dateTime.with(field, newValue));\n }\n return field.adjustInto(this, newValue);\n }\n\n //-----------------------------------------------------------------------\n /**\n * Returns a copy of this {@link ZonedDateTime} with the year value altered.\n *\n * This operates on the local time-line,\n * changing the year (see {@link LocalDateTime#withYear}) of the local date-time.\n * This is then converted back to a {@link ZonedDateTime}, using the zone ID\n * to obtain the offset.\n *\n * When converting back to {@link ZonedDateTime}, if the local date-time is in an overlap,\n * then the offset will be retained if possible, otherwise the earlier offset will be used.\n * If in a gap, the local date-time will be adjusted forward by the length of the gap.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {number} year - the year to set in the result, from MIN_YEAR to MAX_YEAR\n * @return {ZonedDateTime} a {@link ZonedDateTime} based on this date-time with the requested year, not null\n * @throws DateTimeException if the year value is invalid\n */\n withYear(year) {\n return this._resolveLocal(this._dateTime.withYear(year));\n }\n\n /**\n * Returns a copy of this {@link ZonedDateTime} with the month-of-year value altered.\n *\n * This operates on the local time-line,\n * changing the month (see {@link LocalDateTime#withMonth}) of the local date-time.\n * This is then converted back to a {@link ZonedDateTime}, using the zone ID\n * to obtain the offset.\n *\n * When converting back to {@link ZonedDateTime}, if the local date-time is in an overlap,\n * then the offset will be retained if possible, otherwise the earlier offset will be used.\n * If in a gap, the local date-time will be adjusted forward by the length of the gap.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {number} month - the month-of-year to set in the result, from 1 (January) to 12 (December)\n * @return {ZonedDateTime} a {@link ZonedDateTime} based on this date-time with the requested month, not null\n * @throws DateTimeException if the month-of-year value is invalid\n */\n withMonth(month) {\n return this._resolveLocal(this._dateTime.withMonth(month));\n }\n\n /**\n * Returns a copy of this {@link ZonedDateTime} with the day-of-month value altered.\n *\n * This operates on the local time-line,\n * changing the day-of-month (see {@link LocalDateTime#withDayOfMonth}) of the local date-time.\n * This is then converted back to a {@link ZonedDateTime}, using the zone ID\n * to obtain the offset.\n *\n * When converting back to {@link ZonedDateTime}, if the local date-time is in an overlap,\n * then the offset will be retained if possible, otherwise the earlier offset will be used.\n * If in a gap, the local date-time will be adjusted forward by the length of the gap.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {number} dayOfMonth - the day-of-month to set in the result, from 1 to 28-31\n * @return {ZonedDateTime} a {@link ZonedDateTime} based on this date-time with the requested day, not null\n * @throws DateTimeException if the day-of-month value is invalid\n * @throws DateTimeException if the day-of-month is invalid for the month-year\n */\n withDayOfMonth(dayOfMonth) {\n return this._resolveLocal(this._dateTime.withDayOfMonth(dayOfMonth));\n }\n\n /**\n * Returns a copy of this {@link ZonedDateTime} with the day-of-year altered.\n *\n * This operates on the local time-line,\n * changing the day-of-year (see {@link LocalDateTime#withDayOfYear}) of the local date-time.\n * This is then converted back to a {@link ZonedDateTime}, using the zone ID\n * to obtain the offset.\n *\n * When converting back to {@link ZonedDateTime}, if the local date-time is in an overlap,\n * then the offset will be retained if possible, otherwise the earlier offset will be used.\n * If in a gap, the local date-time will be adjusted forward by the length of the gap.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {number} dayOfYear - the day-of-year to set in the result, from 1 to 365-366\n * @return {ZonedDateTime} a {@link ZonedDateTime} based on this date with the requested day, not null\n * @throws DateTimeException if the day-of-year value is invalid\n * @throws DateTimeException if the day-of-year is invalid for the year\n */\n withDayOfYear(dayOfYear) {\n return this._resolveLocal(this._dateTime.withDayOfYear(dayOfYear));\n }\n\n //-----------------------------------------------------------------------\n /**\n * Returns a copy of this {@link ZonedDateTime} with the hour-of-day value altered.\n *\n * This operates on the local time-line,\n * changing the time (see {@link LocalDateTime#withHour}) of the local date-time.\n * This is then converted back to a {@link ZonedDateTime}, using the zone ID\n * to obtain the offset.\n *\n * When converting back to {@link ZonedDateTime}, if the local date-time is in an overlap,\n * then the offset will be retained if possible, otherwise the earlier offset will be used.\n * If in a gap, the local date-time will be adjusted forward by the length of the gap.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {number} hour - the hour-of-day to set in the result, from 0 to 23\n * @return {ZonedDateTime} a {@link ZonedDateTime} based on this date-time with the requested hour, not null\n * @throws DateTimeException if the hour value is invalid\n */\n withHour(hour) {\n return this._resolveLocal(this._dateTime.withHour(hour));\n }\n\n /**\n * Returns a copy of this {@link ZonedDateTime} with the minute-of-hour value altered.\n *\n * This operates on the local time-line,\n * changing the time (see {@link LocalDateTime#withMinute}) of the local date-time.\n * This is then converted back to a {@link ZonedDateTime}, using the zone ID\n * to obtain the offset.\n *\n * When converting back to {@link ZonedDateTime}, if the local date-time is in an overlap,\n * then the offset will be retained if possible, otherwise the earlier offset will be used.\n * If in a gap, the local date-time will be adjusted forward by the length of the gap.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {number} minute - the minute-of-hour to set in the result, from 0 to 59\n * @return {ZonedDateTime} a {@link ZonedDateTime} based on this date-time with the requested minute, not null\n * @throws DateTimeException if the minute value is invalid\n */\n withMinute(minute) {\n return this._resolveLocal(this._dateTime.withMinute(minute));\n }\n\n /**\n * Returns a copy of this {@link ZonedDateTime} with the second-of-minute value altered.\n *\n * This operates on the local time-line,\n * changing the time (see {@link LocalDateTime#withSecond}) of the local date-time.\n * This is then converted back to a {@link ZonedDateTime}, using the zone ID\n * to obtain the offset.\n *\n * When converting back to {@link ZonedDateTime}, if the local date-time is in an overlap,\n * then the offset will be retained if possible, otherwise the earlier offset will be used.\n * If in a gap, the local date-time will be adjusted forward by the length of the gap.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {number} second - the second-of-minute to set in the result, from 0 to 59\n * @return {ZonedDateTime} a {@link ZonedDateTime} based on this date-time with the requested second, not null\n * @throws DateTimeException if the second value is invalid\n */\n withSecond(second) {\n return this._resolveLocal(this._dateTime.withSecond(second));\n }\n\n /**\n * Returns a copy of this {@link ZonedDateTime} with the nano-of-second value altered.\n *\n * This operates on the local time-line,\n * changing the time (see {@link LocalDateTime#withNano}) of the local date-time.\n * This is then converted back to a {@link ZonedDateTime}, using the zone ID\n * to obtain the offset.\n *\n * When converting back to {@link ZonedDateTime}, if the local date-time is in an overlap,\n * then the offset will be retained if possible, otherwise the earlier offset will be used.\n * If in a gap, the local date-time will be adjusted forward by the length of the gap.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {number} nanoOfSecond - the nano-of-second to set in the result, from 0 to 999,999,999\n * @return {ZonedDateTime} a {@link ZonedDateTime} based on this date-time with the requested nanosecond, not null\n * @throws DateTimeException if the nano value is invalid\n */\n withNano(nanoOfSecond) {\n return this._resolveLocal(this._dateTime.withNano(nanoOfSecond));\n }\n\n //-----------------------------------------------------------------------\n /**\n * Returns a copy of this {@link ZonedDateTime} with the time truncated.\n *\n * Truncation returns a copy of the original date-time with fields\n * smaller than the specified unit set to zero.\n * For example, truncating with {@link ChronoUnit#MINUTES}\n * will set the second-of-minute and nano-of-second field to zero.\n *\n * The unit must have a duration (see {@link TemporalUnit#getDuration})\n * that divides into the length of a standard day without remainder.\n * This includes all supplied time units on {@link ChronoUnit} and\n * {@link ChronoUnit#DAYS}. Other units throw an exception.\n *\n * This operates on the local time-line, truncating the underlying local date-time.\n * This is then converted back to a {@link ZonedDateTime}, using the zone ID to obtain the offset.\n *\n * When converting back to {@link ZonedDateTime}, if the local date-time is in an overlap,\n * then the offset will be retained if possible, otherwise the earlier offset will be used.\n * If in a gap, the local date-time will be adjusted forward by the length of the gap.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {TemporalUnit} unit - the unit to truncate to, not null\n * @return {ZonedDateTime} a {@link ZonedDateTime} based on this date-time with the time truncated, not null\n * @throws DateTimeException if unable to truncate\n */\n truncatedTo(unit) {\n return this._resolveLocal(this._dateTime.truncatedTo(unit));\n }\n\n //-----------------------------------------------------------------------\n\n /**\n * Returns a copy of this date-time with the specified period added.\n *\n * This method returns a new date-time based on this date-time with the specified period added.\n * This can be used to add any period that is defined by a unit, for example to add years, months or days.\n * The unit is responsible for the details of the calculation, including the resolution\n * of any edge cases in the calculation.\n *\n * The calculation for date and time units differ.\n *\n * Date units operate on the local time-line.\n * The period is first added to the local date-time, then converted back\n * to a zoned date-time using the zone ID.\n * The conversion uses {@link ofLocal}\n * with the offset before the addition.\n *\n * Time units operate on the instant time-line.\n * The period is first added to the local date-time, then converted back to\n * a zoned date-time using the zone ID.\n * The conversion uses {@link ofInstant}\n * with the offset before the addition.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {number} amountToAdd - the amount of the unit to add to the result, may be negative\n * @param {TemporalUnit} unit - the unit of the period to add, not null\n * @return {ZonedDateTime} a {@link ZonedDateTime} based on this date-time with the specified period added, not null\n * @throws DateTimeException if the unit cannot be added to this type\n */\n _plusUnit(amountToAdd, unit) {\n if (unit instanceof ChronoUnit) {\n if (unit.isDateBased()) {\n return this._resolveLocal(this._dateTime.plus(amountToAdd, unit));\n } else {\n return this._resolveInstant(this._dateTime.plus(amountToAdd, unit));\n }\n }\n requireNonNull(unit, 'unit');\n return unit.addTo(this, amountToAdd);\n }\n\n //-----------------------------------------------------------------------\n /**\n * Returns a copy of this {@link ZonedDateTime} with the specified period in years added.\n *\n * This operates on the local time-line, adding years to the local date-time.\n * This is then converted back to a {@link ZonedDateTime}, using the zone ID\n * to obtain the offset.\n *\n * When converting back to {@link ZonedDateTime}, if the local date-time is in an overlap,\n * then the offset will be retained if possible, otherwise the earlier offset will be used.\n * If in a gap, the local date-time will be adjusted forward by the length of the gap.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {number} years - the years to add, may be negative\n * @return {ZonedDateTime} a {@link ZonedDateTime} based on this date-time with the years added, not null\n * @throws DateTimeException if the result exceeds the supported date range\n */\n plusYears(years) {\n return this._resolveLocal(this._dateTime.plusYears(years));\n }\n\n /**\n * Returns a copy of this {@link ZonedDateTime} with the specified period in months added.\n *\n * This operates on the local time-line, adding months to the local date-time.\n * This is then converted back to a {@link ZonedDateTime}, using the zone ID\n * to obtain the offset.\n *\n * When converting back to {@link ZonedDateTime}, if the local date-time is in an overlap,\n * then the offset will be retained if possible, otherwise the earlier offset will be used.\n * If in a gap, the local date-time will be adjusted forward by the length of the gap.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {number} months - the months to add, may be negative\n * @return {ZonedDateTime} a {@link ZonedDateTime} based on this date-time with the months added, not null\n * @throws DateTimeException if the result exceeds the supported date range\n */\n plusMonths(months) {\n return this._resolveLocal(this._dateTime.plusMonths(months));\n }\n\n /**\n * Returns a copy of this {@link ZonedDateTime} with the specified period in weeks added.\n *\n * This operates on the local time-line, adding weeks to the local date-time.\n * This is then converted back to a {@link ZonedDateTime}, using the zone ID\n * to obtain the offset.\n *\n * When converting back to {@link ZonedDateTime}, if the local date-time is in an overlap,\n * then the offset will be retained if possible, otherwise the earlier offset will be used.\n * If in a gap, the local date-time will be adjusted forward by the length of the gap.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {number} weeks - the weeks to add, may be negative\n * @return {ZonedDateTime}a {@link ZonedDateTime} based on this date-time with the weeks added, not null\n * @throws DateTimeException if the result exceeds the supported date range\n */\n plusWeeks(weeks) {\n return this._resolveLocal(this._dateTime.plusWeeks(weeks));\n }\n\n /**\n * Returns a copy of this {@link ZonedDateTime} with the specified period in days added.\n *\n * This operates on the local time-line, adding days to the local date-time.\n * This is then converted back to a {@link ZonedDateTime}, using the zone ID\n * to obtain the offset.\n *\n * When converting back to {@link ZonedDateTime}, if the local date-time is in an overlap,\n * then the offset will be retained if possible, otherwise the earlier offset will be used.\n * If in a gap, the local date-time will be adjusted forward by the length of the gap.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {number} days - the days to add, may be negative\n * @return {ZonedDateTime}a {@link ZonedDateTime} based on this date-time with the days added, not null\n * @throws DateTimeException if the result exceeds the supported date range\n */\n plusDays(days) {\n return this._resolveLocal(this._dateTime.plusDays(days));\n }\n\n //-----------------------------------------------------------------------\n /**\n * Returns a copy of this {@link ZonedDateTime} with the specified period in hours added.\n *\n * This operates on the instant time-line, such that adding one hour will\n * always be a duration of one hour later.\n * This may cause the local date-time to change by an amount other than one hour.\n * Note that this is a different approach to that used by days, months and years,\n * thus adding one day is not the same as adding 24 hours.\n *\n * For example, consider a time-zone where the spring DST cutover means that the\n * local times 01:00 to 01:59 occur twice changing from offset +02:00 to +01:00.\n *\n * * Adding one hour to 00:30+02:00 will result in 01:30+02:00\n * * Adding one hour to 01:30+02:00 will result in 01:30+01:00\n * * Adding one hour to 01:30+01:00 will result in 02:30+01:00\n * * Adding three hours to 00:30+02:00 will result in 02:30+01:00\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {number} hours - the hours to add, may be negative\n * @return {ZonedDateTime} a {@link ZonedDateTime} based on this date-time with the hours added, not null\n * @throws DateTimeException if the result exceeds the supported date range\n */\n plusHours(hours) {\n return this._resolveInstant(this._dateTime.plusHours(hours));\n }\n\n /**\n * Returns a copy of this {@link ZonedDateTime} with the specified period in minutes added.\n *\n * This operates on the instant time-line, such that adding one minute will\n * always be a duration of one minute later.\n * This may cause the local date-time to change by an amount other than one minute.\n * Note that this is a different approach to that used by days, months and years.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {number} minutes - the minutes to add, may be negative\n * @return {ZonedDateTime} a {@link ZonedDateTime} based on this date-time with the minutes added, not null\n * @throws DateTimeException if the result exceeds the supported date range\n */\n plusMinutes(minutes) {\n return this._resolveInstant(this._dateTime.plusMinutes(minutes));\n }\n\n /**\n * Returns a copy of this {@link ZonedDateTime} with the specified period in seconds added.\n *\n * This operates on the instant time-line, such that adding one second will\n * always be a duration of one second later.\n * This may cause the local date-time to change by an amount other than one second.\n * Note that this is a different approach to that used by days, months and years.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {number} seconds - the seconds to add, may be negative\n * @return {ZonedDateTime} a {@link ZonedDateTime} based on this date-time with the seconds added, not null\n * @throws DateTimeException if the result exceeds the supported date range\n */\n plusSeconds(seconds) {\n return this._resolveInstant(this._dateTime.plusSeconds(seconds));\n }\n\n /**\n * Returns a copy of this {@link ZonedDateTime} with the specified period in nanoseconds added.\n *\n * This operates on the instant time-line, such that adding one nano will\n * always be a duration of one nano later.\n * This may cause the local date-time to change by an amount other than one nano.\n * Note that this is a different approach to that used by days, months and years.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {number} nanos - the nanos to add, may be negative\n * @return {ZonedDateTime} a {@link ZonedDateTime} based on this date-time with the nanoseconds added, not null\n * @throws DateTimeException if the result exceeds the supported date range\n */\n plusNanos(nanos) {\n return this._resolveInstant(this._dateTime.plusNanos(nanos));\n }\n\n //-----------------------------------------------------------------------\n\n /**\n * Returns a copy of this date-time with the specified period subtracted.\n *\n * This method returns a new date-time based on this date-time with the specified period subtracted.\n * This can be used to subtract any period that is defined by a unit, for example to subtract years, months or days.\n * The unit is responsible for the details of the calculation, including the resolution\n * of any edge cases in the calculation.\n *\n * The calculation for date and time units differ.\n *\n * Date units operate on the local time-line.\n * The period is first subtracted from the local date-time, then converted back\n * to a zoned date-time using the zone ID.\n * The conversion uses {@link ofLocal}\n * with the offset before the subtraction.\n *\n * Time units operate on the instant time-line.\n * The period is first subtracted from the local date-time, then converted back to\n * a zoned date-time using the zone ID.\n * The conversion uses {@link ofInstant}\n * with the offset before the subtraction.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {number} amountToSubtract - the amount of the unit to subtract from the result, may be negative\n * @param {TemporalUnit} unit - the unit of the period to subtract, not null\n * @return {ZonedDateTime} a {@link ZonedDateTime} based on this date-time with the specified period subtracted, not null\n * @throws DateTimeException if the unit cannot be added to this type\n */\n _minusUnit(amountToSubtract, unit) {\n return this._plusUnit(-1 * amountToSubtract, unit);\n }\n\n //-----------------------------------------------------------------------\n /**\n * Returns a copy of this {@link ZonedDateTime} with the specified period in years subtracted.\n *\n * This operates on the local time-line, subtracting years from the local date-time.\n * This is then converted back to a {@link ZonedDateTime}, using the zone ID\n * to obtain the offset.\n *\n * When converting back to {@link ZonedDateTime}, if the local date-time is in an overlap,\n * then the offset will be retained if possible, otherwise the earlier offset will be used.\n * If in a gap, the local date-time will be adjusted forward by the length of the gap.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {number} years - the years to subtract, may be negative\n * @return {ZonedDateTime} a {@link ZonedDateTime} based on this date-time with the years subtracted, not null\n * @throws DateTimeException if the result exceeds the supported date range\n */\n minusYears(years) {\n return this.plusYears(-1 * years);\n }\n\n /**\n * Returns a copy of this {@link ZonedDateTime} with the specified period in months subtracted.\n *\n * This operates on the local time-line, subtracting months from the local date-time.\n * This is then converted back to a {@link ZonedDateTime}, using the zone ID\n * to obtain the offset.\n *\n * When converting back to {@link ZonedDateTime}, if the local date-time is in an overlap,\n * then the offset will be retained if possible, otherwise the earlier offset will be used.\n * If in a gap, the local date-time will be adjusted forward by the length of the gap.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {number} months - the months to subtract, may be negative\n * @return {ZonedDateTime} a {@link ZonedDateTime} based on this date-time with the months subtracted, not null\n * @throws DateTimeException if the result exceeds the supported date range\n */\n minusMonths(months) {\n return this.plusMonths(-1 * months);\n }\n\n /**\n * Returns a copy of this {@link ZonedDateTime} with the specified period in weeks subtracted.\n *\n * This operates on the local time-line, subtracting weeks from the local date-time.\n * This is then converted back to a {@link ZonedDateTime}, using the zone ID\n * to obtain the offset.\n *\n * When converting back to {@link ZonedDateTime}, if the local date-time is in an overlap,\n * then the offset will be retained if possible, otherwise the earlier offset will be used.\n * If in a gap, the local date-time will be adjusted forward by the length of the gap.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {number} weeks - the weeks to subtract, may be negative\n * @return {ZonedDateTime} a {@link ZonedDateTime} based on this date-time with the weeks subtracted, not null\n * @throws DateTimeException if the result exceeds the supported date range\n */\n minusWeeks(weeks) {\n return this.plusWeeks(-1 * weeks);\n }\n\n /**\n * Returns a copy of this {@link ZonedDateTime} with the specified period in days subtracted.\n *\n * This operates on the local time-line, subtracting days from the local date-time.\n * This is then converted back to a {@link ZonedDateTime}, using the zone ID\n * to obtain the offset.\n *\n * When converting back to {@link ZonedDateTime}, if the local date-time is in an overlap,\n * then the offset will be retained if possible, otherwise the earlier offset will be used.\n * If in a gap, the local date-time will be adjusted forward by the length of the gap.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {number} days - the days to subtract, may be negative\n * @return {ZonedDateTime} a {@link ZonedDateTime} based on this date-time with the days subtracted, not null\n * @throws DateTimeException if the result exceeds the supported date range\n */\n minusDays(days) {\n return this.plusDays(-1 * days);\n }\n\n //-----------------------------------------------------------------------\n /**\n * Returns a copy of this {@link ZonedDateTime} with the specified period in hours subtracted.\n *\n * This operates on the instant time-line, such that subtracting one hour will\n * always be a duration of one hour earlier.\n * This may cause the local date-time to change by an amount other than one hour.\n * Note that this is a different approach to that used by days, months and years,\n * thus subtracting one day is not the same as adding 24 hours.\n *\n * For example, consider a time-zone where the spring DST cutover means that the\n * local times 01:00 to 01:59 occur twice changing from offset +02:00 to +01:00.\n *\n * * Subtracting one hour from 02:30+01:00 will result in 01:30+02:00\n * * Subtracting one hour from 01:30+01:00 will result in 01:30+02:00\n * * Subtracting one hour from 01:30+02:00 will result in 00:30+01:00\n * * Subtracting three hours from 02:30+01:00 will result in 00:30+02:00\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {number} hours - the hours to subtract, may be negative\n * @return {ZonedDateTime} a {@link ZonedDateTime} based on this date-time with the hours subtracted, not null\n * @throws DateTimeException if the result exceeds the supported date range\n */\n minusHours(hours) {\n return this.plusHours(-1 * hours);\n }\n\n /**\n * Returns a copy of this {@link ZonedDateTime} with the specified period in minutes subtracted.\n *\n * This operates on the instant time-line, such that subtracting one minute will\n * always be a duration of one minute earlier.\n * This may cause the local date-time to change by an amount other than one minute.\n * Note that this is a different approach to that used by days, months and years.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {number} minutes - the minutes to subtract, may be negative\n * @return {ZonedDateTime} a {@link ZonedDateTime} based on this date-time with the minutes subtracted, not null\n * @throws DateTimeException if the result exceeds the supported date range\n */\n minusMinutes(minutes) {\n return this.plusMinutes(-1 * minutes);\n }\n\n /**\n * Returns a copy of this {@link ZonedDateTime} with the specified period in seconds subtracted.\n *\n * This operates on the instant time-line, such that subtracting one second will\n * always be a duration of one second earlier.\n * This may cause the local date-time to change by an amount other than one second.\n * Note that this is a different approach to that used by days, months and years.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {number} seconds - the seconds to subtract, may be negative\n * @return {ZonedDateTime} a {@link ZonedDateTime} based on this date-time with the seconds subtracted, not null\n * @throws DateTimeException if the result exceeds the supported date range\n */\n minusSeconds(seconds) {\n return this.plusSeconds(-1 * seconds);\n }\n\n /**\n * Returns a copy of this {@link ZonedDateTime} with the specified period in nanoseconds subtracted.\n *\n * This operates on the instant time-line, such that subtracting one nano will\n * always be a duration of one nano earlier.\n * This may cause the local date-time to change by an amount other than one nano.\n * Note that this is a different approach to that used by days, months and years.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {number} nanos - the nanos to subtract, may be negative\n * @return {ZonedDateTime} a {@link ZonedDateTime} based on this date-time with the nanoseconds subtracted, not null\n * @throws DateTimeException if the result exceeds the supported date range\n */\n minusNanos(nanos) {\n return this.plusNanos(-1 * nanos);\n }\n\n //-----------------------------------------------------------------------\n /**\n * Queries this date-time using the specified query.\n *\n * This queries this date-time using the specified query strategy object.\n * The {@link TemporalQuery} object defines the logic to be used to\n * obtain the result. Read the documentation of the query to understand\n * what the result of this method will be.\n *\n * The result of this method is obtained by invoking the\n * {@link TemporalQuery#queryFrom} method on the\n * specified query passing `this` as the argument.\n *\n * @param {TemporalQuery} query - the query to invoke, not null\n * @return {*} the query result, null may be returned (defined by the query)\n * @throws DateTimeException if unable to query (defined by the query)\n * @throws ArithmeticException if numeric overflow occurs (defined by the query)\n */\n query(query) {\n if (query === TemporalQueries.localDate()) {\n return this.toLocalDate();\n }\n requireNonNull(query, 'query');\n return super.query(query);\n }\n\n /**\n * Calculates the period between this date-time and another date-time in\n * terms of the specified unit.\n *\n * This calculates the period between two date-times in terms of a single unit.\n * The start and end points are `this` and the specified date-time.\n * The result will be negative if the end is before the start.\n * For example, the period in days between two date-times can be calculated\n * using {@link startDateTime.until}.\n *\n * The {@link Temporal} passed to this method must be a {@link ZonedDateTime}.\n * If the time-zone differs between the two zoned date-times, the specified\n * end date-time is normalized to have the same zone as this date-time.\n *\n * The calculation returns a whole number, representing the number of\n * complete units between the two date-times.\n * For example, the period in months between 2012-06-15T00:00Z and 2012-08-14T23:59Z\n * will only be one month as it is one minute short of two months.\n *\n * This method operates in association with {@link TemporalUnit#between}.\n * The result of this method is a `long` representing the amount of\n * the specified unit. By contrast, the result of {@link between} is an\n * object that can be used directly in addition/subtraction:\n *
\n     *   long period = start.until(end, MONTHS);   // this method\n     *   dateTime.plus(MONTHS.between(start, end));      // use in plus/minus\n     * 
\n *\n * The calculation is implemented in this method for {@link ChronoUnit}.\n * The units {@link NANOS}, {@link MICROS}, {@link MILLIS}, {@link SECONDS},\n * {@link MINUTES}, {@link HOURS} and {@link HALF_DAYS}, {@link DAYS},\n * {@link WEEKS}, {@link MONTHS}, {@link YEARS}, {@link DECADES},\n * {@link CENTURIES}, {@link MILLENNIA} and {@link ERAS} are supported.\n * Other {@link ChronoUnit} values will throw an exception.\n *\n * The calculation for date and time units differ.\n *\n * Date units operate on the local time-line, using the local date-time.\n * For example, the period from noon on day 1 to noon the following day\n * in days will always be counted as exactly one day, irrespective of whether\n * there was a daylight savings change or not.\n *\n * Time units operate on the instant time-line.\n * The calculation effectively converts both zoned date-times to instants\n * and then calculates the period between the instants.\n * For example, the period from noon on day 1 to noon the following day\n * in hours may be 23, 24 or 25 hours (or some other amount) depending on\n * whether there was a daylight savings change or not.\n *\n * If the unit is not a {@link ChronoUnit}, then the result of this method\n * is obtained by invoking {@link TemporalUnit.between}\n * passing `this` as the first argument and the input temporal as\n * the second argument.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {Temporal} endExclusive the end date-time, which is converted to a {@link ZonedDateTime}, not null\n * @param {TemporalUnit} unit the unit to measure the period in, not null\n * @return {number} the amount of the period between this date-time and the end date-time\n * @throws DateTimeException if the period cannot be calculated\n * @throws ArithmeticException if numeric overflow occurs\n */\n until(endExclusive, unit) {\n let end = ZonedDateTime.from(endExclusive);\n if (unit instanceof ChronoUnit) {\n end = end.withZoneSameInstant(this._zone);\n if (unit.isDateBased()) {\n return this._dateTime.until(end._dateTime, unit);\n } else {\n const difference = this._offset.totalSeconds() - end._offset.totalSeconds();\n const adjustedEnd = end._dateTime.plusSeconds(difference);\n return this._dateTime.until(adjustedEnd, unit);\n }\n }\n return unit.between(this, end);\n }\n\n //-----------------------------------------------------------------------\n /**\n * Gets the {@link LocalDateTime} part of this date-time.\n *\n * This returns a {@link LocalDateTime} with the same year, month, day and time\n * as this date-time.\n *\n * @return {LocalDateTime} the local date-time part of this date-time, not null\n */\n toLocalDateTime() {\n return this._dateTime;\n }\n\n /**\n * Gets the {@link LocalDate} part of this date-time.\n *\n * This returns a {@link LocalDate} with the same year, month and day\n * as this date-time.\n *\n * @return {LocalDate} the date part of this date-time, not null\n */\n toLocalDate() {\n return this._dateTime.toLocalDate();\n }\n\n /**\n * Gets the {@link LocalTime} part of this date-time.\n *\n * This returns a {@link LocalTime} with the same hour, minute, second and\n * nanosecond as this date-time.\n *\n * @return {LocalTime} the time part of this date-time, not null\n */\n toLocalTime() {\n return this._dateTime.toLocalTime();\n }\n\n /**\n * Converts this date-time to an {@link OffsetDateTime}.\n *\n * This creates an offset date-time using the local date-time and offset.\n * The zone ID is ignored.\n *\n * @return {OffsetDateTime} an offset date-time representing the same local date-time and offset, not null\n */\n toOffsetDateTime() {\n return OffsetDateTime.of(this._dateTime, this._offset);\n }\n\n //-----------------------------------------------------------------------\n /**\n * Checks if this date-time is equal to another date-time.\n *\n * The comparison is based on the offset date-time and the zone.\n * Only objects of type {@link ZonedDateTime} are compared, other types return false.\n *\n * @param {*} other the object to check, null returns false\n * @return {boolean} true if this is equal to the other date-time\n */\n equals(other) {\n if (this === other) {\n return true;\n }\n if (other instanceof ZonedDateTime) {\n return this._dateTime.equals(other._dateTime) &&\n this._offset.equals(other._offset) &&\n this._zone.equals(other._zone);\n }\n return false;\n }\n\n /**\n * A hash code for this date-time.\n *\n * @return {number} a suitable hash code\n */\n hashCode() {\n return MathUtil.hashCode(this._dateTime.hashCode(), this._offset.hashCode(), this._zone.hashCode());\n }\n\n //-----------------------------------------------------------------------\n /**\n * Outputs this date-time as a string, such as\n * `2007-12-03T10:15:30+01:00[Europe/Paris]`.\n *\n * The format consists of the {@link LocalDateTime} followed by the {@link ZoneOffset}.\n * If the {@link ZoneId} is not the same as the offset, then the ID is output.\n * The output is compatible with ISO-8601 if the offset and ID are the same.\n *\n * @return {string} a string representation of this date-time, not null\n */\n toString() {\n let str = this._dateTime.toString() + this._offset.toString();\n if (this._offset !== this._zone) {\n str += `[${this._zone.toString()}]`;\n }\n return str;\n }\n\n /**\n *\n * @return {string} same as {@link ZonedDateTime.toString}\n */\n toJSON() {\n return this.toString();\n }\n\n /**\n * Outputs this date-time as a string using the formatter.\n *\n * @param {DateTimeFormatter} formatter the formatter to use, not null\n * @return {string} the formatted date-time string, not null\n * @throws DateTimeException if an error occurs during printing\n */\n format(formatter) {\n return super.format(formatter);\n }\n\n}\n\nexport function _init(){\n ZonedDateTime.FROM = createTemporalQuery('ZonedDateTime.FROM', (temporal) => {\n return ZonedDateTime.from(temporal);\n });\n}\n","/**\n * @copyright (c) 2016-present, Philipp Thürwächter & Pattrick Hüper & js-joda contributors\n * @copyright (c) 2007-present, Stephen Colebourne & Michael Nascimento Santos\n * @license BSD-3-Clause (see LICENSE in the root directory of this source tree)\n */\n\nimport { ChronoField } from './temporal/ChronoField';\nimport { ChronoUnit } from './temporal/ChronoUnit';\nimport { Temporal } from './temporal/Temporal';\nimport { Clock } from './Clock';\nimport { DateTimeFormatter } from './format/DateTimeFormatter';\nimport { Instant } from './Instant';\nimport { IsoChronology } from './chrono/IsoChronology';\nimport { LocalDateTime } from './LocalDateTime';\nimport { LocalDate } from './LocalDate';\nimport { LocalTime } from './LocalTime';\nimport { MathUtil } from './MathUtil';\nimport { OffsetTime } from './OffsetTime';\nimport { TemporalQueries } from './temporal/TemporalQueries';\nimport { ZonedDateTime } from './ZonedDateTime';\nimport { ZoneId } from './ZoneId';\nimport { ZoneOffset } from './ZoneOffset';\nimport { DateTimeException, IllegalArgumentException } from './errors';\n\nimport { createTemporalQuery } from './temporal/TemporalQuery';\nimport { requireInstance, requireNonNull } from './assert';\n\n/**\n * A date-time with an offset from UTC/Greenwich in the ISO-8601 calendar system,\n * such as 2007-12-23T10:15:30+01:00.\n */\nexport class OffsetDateTime extends Temporal {\n /**\n * @param {TemporaroAccessor} temporal\n * @return {OffsetDateTime}\n */\n static from(temporal) {\n requireNonNull(temporal, 'temporal');\n if (temporal instanceof OffsetDateTime) {\n return temporal;\n }\n try {\n const offset = ZoneOffset.from(temporal);\n try {\n const ldt = LocalDateTime.from(temporal);\n return OffsetDateTime.of(ldt, offset);\n } catch (_) {\n const instant = Instant.from(temporal);\n return OffsetDateTime.ofInstant(instant, offset);\n }\n } catch (ex) {\n throw new DateTimeException(`Unable to obtain OffsetDateTime TemporalAccessor: ${temporal}, type ${temporal.constructor != null ? temporal.constructor.name : ''}`);\n }\n }\n\n /**\n * @param {Clock|ZoneId|null} clockOrZone\n * @return {OffsetDateTime}\n */\n static now(clockOrZone) {\n if (arguments.length === 0) {\n return OffsetDateTime.now(Clock.systemDefaultZone());\n } else {\n requireNonNull(clockOrZone, 'clockOrZone');\n if (clockOrZone instanceof ZoneId) {\n return OffsetDateTime.now(Clock.system(clockOrZone));\n } else if (clockOrZone instanceof Clock) {\n const now = clockOrZone.instant(); // called once\n return OffsetDateTime.ofInstant(now, clockOrZone.zone().rules().offset(now));\n } else {\n throw new IllegalArgumentException('clockOrZone must be an instance of ZoneId or Clock');\n }\n }\n }\n\n /**\n * @return {OffsetDateTime}\n */\n static of() {\n if (arguments.length <= 2) {\n return OffsetDateTime.ofDateTime.apply(this, arguments);\n } else if (arguments.length === 3) {\n return OffsetDateTime.ofDateAndTime.apply(this, arguments);\n } else {\n return OffsetDateTime.ofNumbers.apply(this, arguments);\n }\n }\n\n static ofDateTime(dateTime, offset) {\n return new OffsetDateTime(dateTime, offset);\n }\n\n static ofDateAndTime(date, time, offset) {\n const dt = LocalDateTime.of(date, time);\n return new OffsetDateTime(dt, offset);\n }\n\n static ofNumbers(year, month, dayOfMonth, hour=0, minute=0, second=0, nanoOfSecond=0, offset) {\n const dt = LocalDateTime.of(year, month, dayOfMonth, hour, minute, second, nanoOfSecond);\n return new OffsetDateTime(dt, offset);\n }\n\n /**\n * @param {Instant} instant\n * @param {ZoneId} zone\n * @return {OffsetDateTime}\n */\n static ofInstant(instant, zone){\n requireNonNull(instant, 'instant');\n requireNonNull(zone, 'zone');\n const rules = zone.rules();\n const offset = rules.offset(instant);\n const ldt = LocalDateTime.ofEpochSecond(instant.epochSecond(), instant.nano(), offset);\n return new OffsetDateTime(ldt, offset);\n }\n\n /**\n * @param {string} text\n * @param {DateTimeFormatter|undefined} formatter\n * @return {OffsetTime}\n */\n static parse(text, formatter = DateTimeFormatter.ISO_OFFSET_DATE_TIME){\n requireNonNull(formatter, 'formatter');\n return formatter.parse(text, OffsetDateTime.FROM);\n }\n\n // TODO: Need java.util.Comparater interface.\n // static timeLineOrder() {\n //\n // }\n\n //-----------------------------------------------------------------------\n\n\n /**\n * @param {LocalDateTime} dateTime\n * @param {ZoneOffset} offset\n * @private\n */\n constructor(dateTime, offset) {\n super();\n requireNonNull(dateTime, 'dateTime');\n requireInstance(dateTime, LocalDateTime, 'dateTime');\n requireNonNull(offset, 'offset');\n requireInstance(offset, ZoneOffset, 'offset');\n this._dateTime = dateTime;\n this._offset = offset;\n }\n\n /**\n *\n * @param {Temporal} temporal\n * @return {Temporal}\n */\n adjustInto(temporal) {\n return temporal\n .with(ChronoField.EPOCH_DAY, this.toLocalDate().toEpochDay())\n .with(ChronoField.NANO_OF_DAY, this.toLocalTime().toNanoOfDay())\n .with(ChronoField.OFFSET_SECONDS, this.offset().totalSeconds());\n }\n\n until(endExclusive, unit) {\n let end = OffsetDateTime.from(endExclusive);\n if (unit instanceof ChronoUnit) {\n end = end.withOffsetSameInstant(this._offset);\n return this._dateTime.until(end._dateTime, unit);\n }\n return unit.between(this, end);\n }\n\n /**\n * @param {ZoneId} zone\n * @return {ZonedDateTime}\n */\n atZoneSameInstant(zone) {\n return ZonedDateTime.ofInstant(this._dateTime, this._offset, zone);\n }\n\n /**\n * @param {ZoneId} zone\n * @return {ZonedDateTime}\n */\n atZoneSimilarLocal(zone) {\n return ZonedDateTime.ofLocal(this._dateTime, zone, this._offset);\n }\n\n query(query) {\n requireNonNull(query, 'query');\n if (query === TemporalQueries.chronology()) {\n return IsoChronology.INSTANCE;\n } else if (query === TemporalQueries.precision()) {\n return ChronoUnit.NANOS;\n } else if (query === TemporalQueries.offset() || query === TemporalQueries.zone()) {\n return this.offset();\n } else if (query === TemporalQueries.localDate()) {\n return this.toLocalDate();\n } else if (query === TemporalQueries.localTime()) {\n return this.toLocalTime();\n } else if (query === TemporalQueries.zoneId()) {\n return null;\n }\n return super.query(query);\n }\n\n get(field) {\n if (field instanceof ChronoField) {\n switch (field) {\n case ChronoField.INSTANT_SECONDS: throw new DateTimeException(`Field too large for an int: ${field}`);\n case ChronoField.OFFSET_SECONDS: return this.offset().totalSeconds();\n }\n return this._dateTime.get(field);\n }\n return super.get(field);\n }\n\n getLong(field) {\n if (field instanceof ChronoField) {\n switch (field) {\n case ChronoField.INSTANT_SECONDS: return this.toEpochSecond();\n case ChronoField.OFFSET_SECONDS: return this.offset().totalSeconds();\n }\n return this._dateTime.getLong(field);\n }\n return field.getFrom(this);\n }\n\n /**\n * @return {ZoneOffset}\n */\n offset() {\n return this._offset;\n }\n\n /**\n * @return {number} the year, from MIN_YEAR to MAX_YEAR\n */\n year() {\n return this._dateTime.year();\n }\n\n /**\n * @return {number} the month-of-year, from 1 to 12\n * @see #month()\n */\n monthValue() {\n return this._dateTime.monthValue();\n }\n\n /**\n * @return {{number} }the month-of-year, not null\n * @see #monthValue()\n */\n month() {\n return this._dateTime.month();\n }\n\n /**\n * @return {number} the day-of-month, from 1 to 31\n */\n dayOfMonth() {\n return this._dateTime.dayOfMonth();\n }\n\n /**\n * @return {number} the day-of-year, from 1 to 365, or 366 in a leap year\n */\n dayOfYear() {\n return this._dateTime.dayOfYear();\n }\n\n /**\n * @return {number} the day-of-week, not null\n */\n dayOfWeek() {\n return this._dateTime.dayOfWeek();\n }\n\n /**\n * @return {number} the hour-of-day, from 0 to 23\n */\n hour() {\n return this._dateTime.hour();\n }\n\n /**\n * @return {number} the minute-of-hour, from 0 to 59\n */\n minute() {\n return this._dateTime.minute();\n }\n\n /**\n * @return {number} the second-of-minute, from 0 to 59\n */\n second() {\n return this._dateTime.second();\n }\n\n /**\n * @return {number} the nano-of-second, from 0 to 999,999,999\n */\n nano() {\n return this._dateTime.nano();\n }\n\n //-----------------------------------------------------------------------\n /**\n * @return {LocalDateTime}the local date-time part of this date-time, not null\n */\n toLocalDateTime() {\n return this._dateTime;\n }\n\n /**\n * @return {LocalDate} the date part of this date-time, not null\n */\n toLocalDate() {\n return this._dateTime.toLocalDate();\n }\n\n /**\n * @return {LocalTime} the time part of this date-time, not null\n */\n toLocalTime() {\n return this._dateTime.toLocalTime();\n }\n\n /**\n * @return {OffsetTime} an OffsetTime representing the time and offset, not null\n */\n toOffsetTime() {\n return OffsetTime.of(this._dateTime.toLocalTime(), this._offset);\n }\n\n /**\n * @return {ZonedDateTime}a zoned date-time representing the same local date-time and offset, not null\n */\n toZonedDateTime() {\n return ZonedDateTime.of(this._dateTime, this._offset);\n }\n\n /**\n * @return {Instant} an {@code Instant} representing the same instant, not null\n */\n toInstant() {\n return this._dateTime.toInstant(this._offset);\n }\n\n /**\n * @return {number} the number of seconds from the epoch of 1970-01-01T00:00:00Z\n */\n toEpochSecond() {\n return this._dateTime.toEpochSecond(this._offset);\n }\n\n isSupported(fieldOrUnit) {\n if (fieldOrUnit instanceof ChronoField) {\n return fieldOrUnit.isDateBased() || fieldOrUnit.isTimeBased();\n }\n if (fieldOrUnit instanceof ChronoUnit) {\n return fieldOrUnit.isDateBased() || fieldOrUnit.isTimeBased();\n }\n return fieldOrUnit != null && fieldOrUnit.isSupportedBy(this);\n }\n\n range(field) {\n if (field instanceof ChronoField) {\n if (field === ChronoField.INSTANT_SECONDS || field === ChronoField.OFFSET_SECONDS) {\n return field.range();\n }\n return this._dateTime.range(field);\n }\n return field.rangeRefinedBy(this);\n }\n\n _withAdjuster(adjuster) {\n requireNonNull(adjuster);\n // optimizations\n if (adjuster instanceof LocalDate || adjuster instanceof LocalTime || adjuster instanceof LocalDateTime) {\n return this._withDateTimeOffset(this._dateTime.with(adjuster), this._offset);\n } else if (adjuster instanceof Instant) {\n return OffsetDateTime.ofInstant(adjuster, this._offset);\n } else if (adjuster instanceof ZoneOffset) {\n return this._withDateTimeOffset(this._dateTime, adjuster);\n } else if (adjuster instanceof OffsetDateTime) {\n return adjuster;\n }\n return adjuster.adjustInto(this);\n }\n\n _withField(field, newValue) {\n requireNonNull(field);\n if (field instanceof ChronoField) {\n const f = field;\n switch (f) {\n case ChronoField.INSTANT_SECONDS: return OffsetDateTime.ofInstant(Instant.ofEpochSecond(newValue, this.nano()), this._offset);\n case ChronoField.OFFSET_SECONDS: {\n return this._withDateTimeOffset(this._dateTime, ZoneOffset.ofTotalSeconds(f.checkValidIntValue(newValue)));\n }\n }\n return this._withDateTimeOffset(this._dateTime.with(field, newValue), this._offset);\n }\n return field.adjustInto(this, newValue);\n }\n\n _withDateTimeOffset(dateTime, offset) {\n if (this._dateTime === dateTime && this._offset.equals(offset)) {\n return this;\n }\n return new OffsetDateTime(dateTime, offset);\n }\n\n /**\n * @param {int} year\n * @return {OffsetDateTime}\n */\n withYear(year) {\n return this._withDateTimeOffset(this._dateTime.withYear(year), this._offset);\n }\n\n /**\n * @param {int} month\n * @return {OffsetDateTime}\n */\n withMonth(month) {\n return this._withDateTimeOffset(this._dateTime.withMonth(month), this._offset);\n }\n\n /**\n * @param {int} dayOfMonth\n * @return {OffsetDateTime}\n */\n withDayOfMonth(dayOfMonth) {\n return this._withDateTimeOffset(this._dateTime.withDayOfMonth(dayOfMonth), this._offset);\n }\n\n /**\n * @param {int} dayOfYear\n * @return {OffsetDateTime}\n */\n withDayOfYear(dayOfYear) {\n return this._withDateTimeOffset(this._dateTime.withDayOfYear(dayOfYear), this._offset);\n }\n\n /**\n * @param {int} hour\n * @return {OffsetDateTime}\n */\n withHour(hour) {\n return this._withDateTimeOffset(this._dateTime.withHour(hour), this._offset);\n }\n\n /**\n * @param {int} minute\n * @return {OffsetDateTime}\n */\n withMinute(minute) {\n return this._withDateTimeOffset(this._dateTime.withMinute(minute), this._offset);\n }\n\n /**\n * @param {int} second\n * @return {OffsetDateTime}\n */\n withSecond(second) {\n return this._withDateTimeOffset(this._dateTime.withSecond(second), this._offset);\n }\n\n /**\n * @param {int} nanoOfSecond\n * @return {OffsetDateTime}\n */\n withNano(nanoOfSecond) {\n return this._withDateTimeOffset(this._dateTime.withNano(nanoOfSecond), this._offset);\n }\n\n /**\n * @param {ZoneOffset} offset\n * @return {OffsetDateTime}\n */\n withOffsetSameLocal(offset) {\n requireNonNull(offset, 'offset');\n return this._withDateTimeOffset(this._dateTime, offset);\n }\n\n /**\n * @param {ZoneOffset} offset\n * @return {OffsetDateTime}\n */\n withOffsetSameInstant(offset) {\n requireNonNull(offset, 'offset');\n if (offset.equals(this._offset)) {\n return this;\n }\n const difference = offset.totalSeconds() - this._offset.totalSeconds();\n const adjusted = this._dateTime.plusSeconds(difference);\n return new OffsetDateTime(adjusted, offset);\n }\n\n /**\n * @param {TemporalUnit} unit\n * @return {OffsetDateTime}\n */\n truncatedTo(unit) {\n return this._withDateTimeOffset(this._dateTime.truncatedTo(unit), this._offset);\n }\n\n _plusAmount(amount) {\n requireNonNull(amount, 'amount');\n return amount.addTo(this);\n }\n\n _plusUnit(amountToAdd, unit) {\n if (unit instanceof ChronoUnit) {\n return this._withDateTimeOffset(this._dateTime.plus(amountToAdd, unit), this._offset);\n }\n return unit.addTo(this, amountToAdd);\n }\n\n /**\n * @param {int} years\n * @return {OffsetTime}\n */\n plusYears(years) {\n return this._withDateTimeOffset(this._dateTime.plusYears(years), this._offset);\n }\n\n /**\n * @param {int} months\n * @return {OffsetTime}\n */\n plusMonths(months) {\n return this._withDateTimeOffset(this._dateTime.plusMonths(months), this._offset);\n }\n\n /**\n * @param {int} weeks\n * @return {OffsetTime}\n */\n plusWeeks(weeks) {\n return this._withDateTimeOffset(this._dateTime.plusWeeks(weeks), this._offset);\n }\n\n /**\n * @param {int} days\n * @return {OffsetTime}\n */\n plusDays(days) {\n return this._withDateTimeOffset(this._dateTime.plusDays(days), this._offset);\n }\n\n /**\n * @param {int} hours\n * @return {OffsetTime}\n */\n plusHours(hours) {\n return this._withDateTimeOffset(this._dateTime.plusHours(hours), this._offset);\n }\n\n /**\n * @param {int} minutes\n * @return {OffsetTime}\n */\n plusMinutes(minutes) {\n return this._withDateTimeOffset(this._dateTime.plusMinutes(minutes), this._offset);\n }\n\n /**\n * @param {int} seconds\n * @return {OffsetTime}\n */\n plusSeconds(seconds) {\n return this._withDateTimeOffset(this._dateTime.plusSeconds(seconds), this._offset);\n }\n\n /**\n * @param {int} nanos\n * @return {OffsetTime}\n */\n plusNanos(nanos) {\n return this._withDateTimeOffset(this._dateTime.plusNanos(nanos), this._offset);\n }\n\n _minusAmount(amount) {\n requireNonNull(amount);\n return amount.subtractFrom(this);\n }\n\n _minusUnit(amountToSubtract, unit) {\n return this.plus(-1 * amountToSubtract, unit);\n }\n\n /**\n * @param {int} years\n * @return {OffsetTime}\n */\n minusYears(years) {\n return this._withDateTimeOffset(this._dateTime.minusYears(years), this._offset);\n }\n\n /**\n * @param {int} months\n * @return {OffsetTime}\n */\n minusMonths(months) {\n return this._withDateTimeOffset(this._dateTime.minusMonths(months), this._offset);\n }\n\n /**\n * @param {int} weeks\n * @return {OffsetTime}\n */\n minusWeeks(weeks) {\n return this._withDateTimeOffset(this._dateTime.minusWeeks(weeks), this._offset);\n }\n\n /**\n * @param {int} days\n * @return {OffsetTime}\n */\n minusDays(days) {\n return this._withDateTimeOffset(this._dateTime.minusDays(days), this._offset);\n }\n\n /**\n * @param {int} hours\n * @return {OffsetTime}\n */\n minusHours(hours) {\n return this._withDateTimeOffset(this._dateTime.minusHours(hours), this._offset);\n }\n\n /**\n * @param {int} minutes\n * @return {OffsetTime}\n */\n minusMinutes(minutes) {\n return this._withDateTimeOffset(this._dateTime.minusMinutes(minutes), this._offset);\n }\n\n /**\n * @param {int} seconds\n * @return {OffsetTime}\n */\n minusSeconds(seconds) {\n return this._withDateTimeOffset(this._dateTime.minusSeconds(seconds), this._offset);\n }\n\n /**\n * @param {int} nanos\n * @return {OffsetTime}\n */\n minusNanos(nanos) {\n return this._withDateTimeOffset(this._dateTime.minusNanos(nanos), this._offset);\n }\n\n compareTo(other) {\n requireNonNull(other, 'other');\n requireInstance(other, OffsetDateTime, 'other');\n if (this.offset().equals(other.offset())) {\n return this.toLocalDateTime().compareTo(other.toLocalDateTime());\n }\n let cmp = MathUtil.compareNumbers(this.toEpochSecond(), other.toEpochSecond());\n if (cmp === 0) {\n cmp = this.toLocalTime().nano() - other.toLocalTime().nano();\n if (cmp === 0) {\n cmp = this.toLocalDateTime().compareTo(other.toLocalDateTime());\n }\n }\n return cmp;\n }\n\n /**\n * @param {OffsetDateTime} other\n * @return {boolean}\n */\n isAfter(other) {\n requireNonNull(other, 'other');\n const thisEpochSec = this.toEpochSecond();\n const otherEpochSec = other.toEpochSecond();\n return thisEpochSec > otherEpochSec || (thisEpochSec === otherEpochSec && this.toLocalTime().nano() > other.toLocalTime().nano());\n }\n\n /**\n * @param {OffsetDateTime} other\n * @return {boolean}\n */\n isBefore(other) {\n requireNonNull(other, 'other');\n const thisEpochSec = this.toEpochSecond();\n const otherEpochSec = other.toEpochSecond();\n return thisEpochSec < otherEpochSec || (thisEpochSec === otherEpochSec && this.toLocalTime().nano() < other.toLocalTime().nano());\n }\n\n /**\n * @param {OffsetDateTime} other\n * @return {boolean}\n */\n isEqual(other) {\n requireNonNull(other, 'other');\n return this.toEpochSecond() === other.toEpochSecond() && this.toLocalTime().nano() === other.toLocalTime().nano();\n }\n\n //-----------------------------------------------------------------------\n /**\n * @param other\n * @return {boolean}\n */\n equals(other) {\n if (this === other) {\n return true;\n }\n if (other instanceof OffsetDateTime) {\n return this._dateTime.equals(other._dateTime) && this._offset.equals(other._offset);\n }\n return false;\n }\n\n /**\n * @return {number}\n */\n hashCode() {\n return this._dateTime.hashCode() ^ this._offset.hashCode();\n }\n\n toString() {\n return this._dateTime.toString() + this._offset.toString();\n }\n\n /**\n *\n * @return {string} same as {@link LocalDateTime.toString}\n */\n toJSON() {\n return this.toString();\n }\n\n /**\n * @param {DateTimeFormatter} formatter\n * @return {string}\n */\n format(formatter) {\n requireNonNull(formatter, 'formatter');\n return formatter.format(this);\n }\n}\n\n\nexport function _init() {\n OffsetDateTime.MIN = LocalDateTime.MIN.atOffset(ZoneOffset.MAX);\n\n OffsetDateTime.MAX = LocalDateTime.MAX.atOffset(ZoneOffset.MIN);\n\n OffsetDateTime.FROM = createTemporalQuery('OffsetDateTime.FROM', (temporal) => {\n return OffsetDateTime.from(temporal);\n });\n}\n","/**\n * @copyright (c) 2016, Philipp Thürwächter & Pattrick Hüper\n * @copyright (c) 2007-present, Stephen Colebourne & Michael Nascimento Santos\n * @license BSD-3-Clause (see LICENSE in the root directory of this source tree)\n */\n\nimport { assert, requireNonNull, requireInstance } from './assert';\n\nimport { MathUtil } from './MathUtil';\nimport { DateTimeException, UnsupportedTemporalTypeException, NullPointerException, IllegalArgumentException } from './errors';\n\nimport { IsoChronology } from './chrono/IsoChronology';\nimport { ChronoField } from './temporal/ChronoField';\nimport { ChronoUnit } from './temporal/ChronoUnit';\nimport { ChronoLocalDate } from './chrono/ChronoLocalDate';\nimport { TemporalQueries } from './temporal/TemporalQueries';\nimport { createTemporalQuery } from './temporal/TemporalQuery';\nimport { ValueRange } from './temporal/ValueRange';\nimport { DateTimeFormatter } from './format/DateTimeFormatter';\n\nimport { Clock } from './Clock';\nimport { DayOfWeek } from './DayOfWeek';\nimport { OffsetDateTime } from './OffsetDateTime';\nimport { OffsetTime } from './OffsetTime';\nimport { Month } from './Month';\nimport { Period } from './Period';\nimport { YearConstants } from './YearConstants';\nimport { LocalTime } from './LocalTime';\nimport { LocalDateTime } from './LocalDateTime';\nimport { Year } from './Year';\nimport { ZoneId } from './ZoneId';\nimport { ZoneOffset } from './ZoneOffset';\nimport { ZonedDateTime } from './ZonedDateTime';\n\n/**\n * The number of days in a 400 year cycle.\n */\nconst DAYS_PER_CYCLE = 146097;\n\n/**\n* The number of days from year zero to year 1970.\n* There are five 400 year cycles from year zero to 2000.\n* There are 7 leap years from 1970 to 2000.\n*/\nconst DAYS_0000_TO_1970 = (DAYS_PER_CYCLE * 5) - (30 * 365 + 7);\n\n/**\n * A date without a time-zone in the ISO-8601 calendar system,\n * such as 2007-12-03.\n *\n * LocalDate is an immutable date-time object that represents a date,\n * often viewed as year-month-day. Other date fields, such as day-of-year,\n * day-of-week and week-of-year, can also be accessed.\n * For example, the value \"2nd October 2007\" can be stored in a LocalDate.\n *\n * This class does not store or represent a time or time-zone.\n * Instead, it is a description of the date, as used for birthdays.\n * It cannot represent an instant on the time-line without additional information\n * such as an offset or time-zone.\n *\n * The ISO-8601 calendar system is the modern civil calendar system used today\n * in most of the world. It is equivalent to the proleptic Gregorian calendar\n * system, in which today's rules for leap years are applied for all time.\n * For most applications written today, the ISO-8601 rules are entirely suitable.\n * However, any application that makes use of historical dates, and requires them\n * to be accurate will find the ISO-8601 approach unsuitable.\n *\n * ### Static properties of Class {@link LocalDate}\n *\n * LocalDate.MIN = LocalDate.of(Year.MIN_VALUE, 1, 1);\n *\n * The minimum supported {@link LocalDate}\n * This could be used by an application as a \"far past\" date.\n *\n * LocalDate.MAX = LocalDate.of(Year.MAX_VALUE, 12, 31);\n *\n * The maximum supported {@link LocalDate}\n * This could be used by an application as a \"far future\" date.\n *\n * LocalDate.EPOCH_0\n *\n * The date at epoch day 0, that is 1970-01-01.\n */\n\nexport class LocalDate extends ChronoLocalDate{\n\n /**\n * Obtains the current date from the system clock in the default time-zone or\n * if specified, the current date from the specified clock or\n * if argument is a ZoneId this will query a clock with the specified ZoneId.\n *\n * This will query the specified clock to obtain the current date - today.\n * Using this method allows the use of an alternate clock for testing.\n *\n * @param {Clock|ZoneId} [clockOrZone=Clock.systemDefaultZone()] - the clock or zone to use,\n * if null, the system clock and default time-zone is used.\n * @return {LocalDate} the current date, not null\n */\n static now(clockOrZone) {\n let clock;\n if(clockOrZone == null){\n clock = Clock.systemDefaultZone();\n } else if(clockOrZone instanceof ZoneId){\n clock = Clock.system(clockOrZone);\n } else {\n clock = clockOrZone;\n }\n return LocalDate.ofInstant(clock.instant(), clock.zone());\n }\n\n /**\n * obtain a LocalDate from an Instant in the specified time-zone or, if null\n * in the system default time-zone\n *\n * @param {!Instant} instant\n * @param {ZoneId} [zone=ZoneId.systemDefault()], defaults to ZoneId.systemDefault()\n * @returns {LocalDate} the current date, not null\n */\n static ofInstant(instant, zone=ZoneId.systemDefault()){\n requireNonNull(instant, 'instant');\n const offset = zone.rules().offset(instant);\n const epochSec = instant.epochSecond() + offset.totalSeconds();\n const epochDay = MathUtil.floorDiv(epochSec, LocalTime.SECONDS_PER_DAY);\n return LocalDate.ofEpochDay(epochDay);\n }\n\n /**\n * Obtains an instance of {@link LocalDate} from a year, month and day.\n *\n * This returns a {@link LocalDate} with the specified year, month and day-of-month.\n * The day must be valid for the year and month, otherwise an exception will be thrown.\n *\n * @param {!number} year - the year to represent, from {@link Year.MIN_VALUE} to {@link Year.MAX_VALUE}\n * @param {!(Month|Number)} month - the month-of-year to represent, from 1 (January) to 12 (December)\n * @param {!number} dayOfMonth - the day-of-month to represent, from 1 to 31\n * @return {LocalDate} the local date, not null\n * @throws {DateTimeException} if the value of any field is out of range,\n * or if the day-of-month is invalid for the month-year\n */\n static of(year, month, dayOfMonth) {\n return new LocalDate(year, month, dayOfMonth);\n }\n\n /**\n * Obtains an instance of {@link LocalDate} from a year and day-of-year.\n *\n * This returns a {@link LocalDate} with the specified year and day-of-year.\n * The day-of-year must be valid for the year, otherwise an exception will be thrown.\n *\n * @param {!number} year - the year to represent, from {@link Year.MIN_VALUE} to {@link Year.MAX_VALUE}\n * @param {!number} dayOfYear - the day-of-year to represent, from 1 to 366\n * @return {LocalDate} the local date, not null\n * @throws {DateTimeException} if the value of any field is out of range,\n * or if the day-of-year is invalid for the year\n */\n static ofYearDay(year, dayOfYear) {\n ChronoField.YEAR.checkValidValue(year);\n //TODO: ChronoField.DAY_OF_YEAR.checkValidValue(dayOfYear);\n const leap = IsoChronology.isLeapYear(year);\n if (dayOfYear === 366 && leap === false) {\n assert(false, `Invalid date 'DayOfYear 366' as '${year}' is not a leap year`, DateTimeException);\n }\n let moy = Month.of(Math.floor((dayOfYear - 1) / 31 + 1));\n const monthEnd = moy.firstDayOfYear(leap) + moy.length(leap) - 1;\n if (dayOfYear > monthEnd) {\n moy = moy.plus(1);\n }\n const dom = dayOfYear - moy.firstDayOfYear(leap) + 1;\n return new LocalDate(year, moy.value(), dom);\n }\n\n /**\n * Obtains an instance of LocalDate from the epoch day count.\n *\n * This returns a LocalDate with the specified epoch-day.\n * The {@link ChronoField.EPOCH_DAY} is a simple incrementing count\n * of days where day 0 is 1970-01-01. Negative numbers represent earlier days.\n *\n * @param {number} [epochDay=0] - the Epoch Day to convert, based on the epoch 1970-01-01\n * @return {LocalDate} the local date, not null\n * @throws {AssertionError} if the epoch days exceeds the supported date range\n */\n static ofEpochDay(epochDay=0) {\n let adjust, adjustCycles, doyEst, yearEst, zeroDay;\n zeroDay = epochDay + DAYS_0000_TO_1970;\n zeroDay -= 60;\n adjust = 0;\n if (zeroDay < 0) {\n adjustCycles = MathUtil.intDiv(zeroDay + 1, DAYS_PER_CYCLE) - 1;\n adjust = adjustCycles * 400;\n zeroDay += -adjustCycles * DAYS_PER_CYCLE;\n }\n yearEst = MathUtil.intDiv(400 * zeroDay + 591, DAYS_PER_CYCLE);\n doyEst = zeroDay - (365 * yearEst + MathUtil.intDiv(yearEst, 4) - MathUtil.intDiv(yearEst, 100) + MathUtil.intDiv(yearEst, 400));\n if (doyEst < 0) {\n yearEst--;\n doyEst = zeroDay - (365 * yearEst + MathUtil.intDiv(yearEst, 4) - MathUtil.intDiv(yearEst, 100) + MathUtil.intDiv(yearEst, 400));\n }\n yearEst += adjust;\n const marchDoy0 = doyEst;\n const marchMonth0 = MathUtil.intDiv(marchDoy0 * 5 + 2, 153);\n const month = (marchMonth0 + 2) % 12 + 1;\n const dom = marchDoy0 - MathUtil.intDiv(marchMonth0 * 306 + 5, 10) + 1;\n yearEst += MathUtil.intDiv(marchMonth0, 10);\n const year = yearEst;\n return new LocalDate(year, month, dom);\n }\n\n /**\n * Obtains an instance of {@link LocalDate} from a temporal object.\n *\n * A {@link TemporalAccessor} represents some form of date and time information.\n * This factory converts the arbitrary temporal object to an instance of {@link LocalDate}.\n *\n * The conversion uses the {@link TemporalQueries.localDate} query, which relies\n * on extracting the {@link ChronoField.EPOCH_DAY} field.\n *\n * This method matches the signature of the functional interface {@link TemporalQuery}\n * allowing it to be used as a query via method reference, {@link LocalDate::from}.\n *\n * @param {!TemporalAccessor} temporal - the temporal object to convert, not null\n * @return {LocalDate} the local date, not null\n * @throws {DateTimeException} if unable to convert to a {@link LocalDate}\n */\n static from(temporal) {\n requireNonNull(temporal, 'temporal');\n const date = temporal.query(TemporalQueries.localDate());\n if (date == null) {\n throw new DateTimeException(\n `Unable to obtain LocalDate from TemporalAccessor: ${temporal}, type ${temporal.constructor != null ? temporal.constructor.name : ''}`);\n }\n return date;\n }\n\n /**\n * Obtains an instance of {@link LocalDate} from a text string using a specific formatter.\n *\n * The text is parsed using the formatter, returning a date.\n *\n * @param {!string} text - the text to parse, not null\n * @param {DateTimeFormatter} [formatter=DateTimeFormatter.ISO_LOCAL_DATE] - the formatter to use, default is\n * {@link DateTimeFormatter.ISO_LOCAL_DATE}\n * @return {LocalDate} the parsed local date, not null\n * @throws {DateTimeParseException} if the text cannot be parsed\n */\n static parse(text, formatter = DateTimeFormatter.ISO_LOCAL_DATE){\n assert(formatter != null, 'formatter', NullPointerException);\n return formatter.parse(text, LocalDate.FROM);\n }\n\n /**\n * Resolves the date, resolving days past the end of month.\n *\n * @param {!number} year - the year to represent, validated from {@link Year.MIN_VALUE} to {@link Year.MAX_VALUE}\n * @param {!number} month - the month-of-year to represent, validated from 1 to 12\n * @param {!number} day - the day-of-month to represent, validated from 1 to 31\n * @return {LocalDate} resolved date, not null\n */\n static _resolvePreviousValid(year, month, day) {\n switch (month) {\n case 2:\n day = Math.min(day, IsoChronology.isLeapYear(year) ? 29 : 28);\n break;\n case 4:\n case 6:\n case 9:\n case 11:\n day = Math.min(day, 30);\n break;\n }\n return LocalDate.of(year, month, day);\n }\n\n /**\n * Do not call the constructor directly, use the of*() factories instead like {@link LocalDate.of}\n *\n * @param {!number} year\n * @param {!(Month|number)} month\n * @param {!number} dayOfMonth\n * @private\n */\n constructor(year, month, dayOfMonth){\n super();\n requireNonNull(year, 'year');\n requireNonNull(month, 'month');\n requireNonNull(dayOfMonth, 'dayOfMonth');\n\n if (month instanceof Month) {\n month = month.value();\n }\n this._year = MathUtil.safeToInt(year);\n this._month = MathUtil.safeToInt(month);\n this._day = MathUtil.safeToInt(dayOfMonth);\n LocalDate._validate(this._year, this._month, this._day);\n }\n\n\n /**\n *\n * @param {!number} year\n * @param {!number} month\n * @param {!number} dayOfMonth\n * @throws {DateTimeException} if date values are invalid\n * @private\n */\n static _validate(year, month, dayOfMonth) {\n let dom;\n ChronoField.YEAR.checkValidValue(year);\n ChronoField.MONTH_OF_YEAR.checkValidValue(month);\n ChronoField.DAY_OF_MONTH.checkValidValue(dayOfMonth);\n\n if (dayOfMonth > 28) {\n dom = 31;\n switch (month) {\n case 2:\n dom = IsoChronology.isLeapYear(year) ? 29 : 28;\n break;\n case 4:\n case 6:\n case 9:\n case 11:\n dom = 30;\n }\n if (dayOfMonth > dom) {\n if (dayOfMonth === 29) {\n assert(false, `Invalid date 'February 29' as '${year}' is not a leap year`, DateTimeException);\n } else {\n assert(false, `Invalid date '${year}' '${month}' '${dayOfMonth}'`, DateTimeException);\n }\n }\n }\n }\n\n /**\n * Checks if the specified field is supported.\n *\n * This checks if this date can be queried for the specified field.\n * If false, then calling the {@link LocalDate.range} range and\n * {@link LocalDate.get} get methods will throw an exception.\n *\n * If the field is a {@link ChronoField} then the query is implemented here.\n * The {@link LocalDate.isSupported} supported fields will return valid\n * values based on this date-time.\n * The supported fields are:\n *\n * * {@link ChronoField.DAY_OF_WEEK}\n * * {@link ChronoField.ALIGNED_DAY_OF_WEEK_IN_MONTH}\n * * {@link ChronoField.ALIGNED_DAY_OF_WEEK_IN_YEAR}\n * * {@link ChronoField.DAY_OF_MONTH}\n * * {@link ChronoField.DAY_OF_YEAR}\n * * {@link ChronoField.EPOCH_DAY}\n * * {@link ChronoField.ALIGNED_WEEK_OF_MONTH}\n * * {@link ChronoField.ALIGNED_WEEK_OF_YEAR}\n * * {@link ChronoField.MONTH_OF_YEAR}\n * * {@link ChronoField.EPOCH_MONTH}\n * * {@link ChronoField.YEAR_OF_ERA}\n * * {@link ChronoField.YEAR}\n * * {@link ChronoField.ERA}\n *\n * All other {@link ChronoField} instances will return false.\n *\n * If the field is not a {@link ChronoField}, then the result of this method\n * is obtained by invoking {@link TemporalField.isSupportedBy}\n * passing this as the argument.\n * Whether the field is supported is determined by the field.\n *\n * @param {TemporalField} field the field to check, null returns false\n * @return {boolean} true if the field is supported on this date, false if not\n */\n isSupported(field) {\n return super.isSupported(field);\n }\n\n /**\n * Gets the range of valid values for the specified field.\n *\n * The range object expresses the minimum and maximum valid values for a field.\n * This date is used to enhance the accuracy of the returned range.\n * If it is not possible to return the range, because the field is not supported\n * or for some other reason, an exception is thrown.\n *\n * If the field is a {@link ChronoField} then the query is implemented here.\n * The {@link LocalDate.isSupported} supported fields will return\n * appropriate range instances.\n * All other {@link ChronoField} instances will throw a {@link DateTimeException}.\n *\n * If the field is not a {@link ChronoField}, then the result of this method\n * is obtained by invoking {@link TemporalField.rangeRefinedBy}\n * passing this as the argument.\n * Whether the range can be obtained is determined by the field.\n *\n * @param {TemporalField} field the field to query the range for, not null\n * @return {ValueRange} the range of valid values for the field, not null\n * @throws {DateTimeException} if the range for the field cannot be obtained\n */\n range(field) {\n if (field instanceof ChronoField) {\n if (field.isDateBased()) {\n switch (field) {\n case ChronoField.DAY_OF_MONTH: return ValueRange.of(1, this.lengthOfMonth());\n case ChronoField.DAY_OF_YEAR: return ValueRange.of(1, this.lengthOfYear());\n case ChronoField.ALIGNED_WEEK_OF_MONTH: return ValueRange.of(1, this.month() === Month.FEBRUARY && this.isLeapYear() === false ? 4 : 5);\n case ChronoField.YEAR_OF_ERA:\n return (this._year <= 0 ? ValueRange.of(1, Year.MAX_VALUE + 1) : ValueRange.of(1, Year.MAX_VALUE));\n }\n return field.range();\n }\n throw new UnsupportedTemporalTypeException(`Unsupported field: ${field}`);\n }\n return field.rangeRefinedBy(this);\n }\n\n /**\n * Gets the value of the specified field from this date as an `int`.\n *\n * This queries this date for the value for the specified field.\n * The returned value will always be within the valid range of values for the field.\n * If it is not possible to return the value, because the field is not supported\n * or for some other reason, an exception is thrown.\n *\n * If the field is a {@link ChronoField} then the query is implemented here.\n * The {@link LocalDate.isSupported} supported fields will return valid\n * values based on this date, except {@link ChronoField.EPOCH_DAY} and {@link ChronoField.EPOCH_MONTH}\n * which are too large to fit in an `int` and throw a {@link DateTimeException}.\n * All other {@link ChronoField} instances will throw a {@link DateTimeException}.\n *\n * If the field is not a {@link ChronoField}, then the result of this method\n * is obtained by invoking {@link TemporalField.getFrom}\n * passing this as the argument. Whether the value can be obtained,\n * and what the value represents, is determined by the field.\n *\n * @param {!TemporalField} field the field to get, not null\n * @return the value for the field\n * @throws {DateTimeException} if a value for the field cannot be obtained\n * @throws {ArithmeticException} if numeric overflow occurs\n */\n get(field) {\n return this.getLong(field);\n }\n\n /**\n * see {LocalDate.get}, get and getLong are identical in javascript, because we are only limited by\n * {@link MathUtil.MIN_SAFE_INTEGER}/ {@link MathUtil.MAX_SAFE_INTEGER}\n *\n * @param {!TemporalField} field\n * @returns {*}\n */\n getLong(field) {\n assert(field != null, '', NullPointerException);\n if (field instanceof ChronoField) {\n return this._get0(field);\n }\n return field.getFrom(this);\n }\n\n /**\n * TODO tests are missing for the ALIGNED_* ChronoFields\n *\n * @param {!TemporalField} field\n * @returns {*}\n * @private\n */\n _get0(field) {\n switch (field) {\n case ChronoField.DAY_OF_WEEK: return this.dayOfWeek().value();\n case ChronoField.ALIGNED_DAY_OF_WEEK_IN_MONTH: return MathUtil.intMod((this._day - 1), 7) + 1;\n case ChronoField.ALIGNED_DAY_OF_WEEK_IN_YEAR: return MathUtil.intMod((this.dayOfYear() - 1), 7) + 1;\n case ChronoField.DAY_OF_MONTH: return this._day;\n case ChronoField.DAY_OF_YEAR: return this.dayOfYear();\n case ChronoField.EPOCH_DAY: return this.toEpochDay();\n case ChronoField.ALIGNED_WEEK_OF_MONTH: return MathUtil.intDiv((this._day - 1), 7) + 1;\n case ChronoField.ALIGNED_WEEK_OF_YEAR: return MathUtil.intDiv((this.dayOfYear() - 1), 7) + 1;\n case ChronoField.MONTH_OF_YEAR: return this._month;\n case ChronoField.PROLEPTIC_MONTH: return this._prolepticMonth();\n case ChronoField.YEAR_OF_ERA: return (this._year >= 1 ? this._year : 1 - this._year);\n case ChronoField.YEAR: return this._year;\n case ChronoField.ERA: return (this._year >= 1 ? 1 : 0);\n }\n throw new UnsupportedTemporalTypeException(`Unsupported field: ${field}`);\n }\n\n /**\n *\n * @return {number}\n * @private\n */\n _prolepticMonth() {\n return (this._year * 12) + (this._month - 1);\n }\n\n /**\n * Gets the chronology of this date, which is the ISO calendar system.\n *\n * The {@link Chronology} represents the calendar system in use.\n * The ISO-8601 calendar system is the modern civil calendar system used today\n * in most of the world. It is equivalent to the proleptic Gregorian calendar\n * system, in which today's rules for leap years are applied for all time.\n *\n * @return {Chronology} the ISO chronology, not null\n */\n chronology() {\n return IsoChronology.INSTANCE;\n }\n\n /**\n *\n * @return {number} gets the year\n */\n year() {\n return this._year;\n }\n\n /**\n *\n * @return {number} gets the month value\n */\n monthValue() {\n return this._month;\n }\n\n /**\n *\n * @returns {Month} month\n */\n month() {\n return Month.of(this._month);\n }\n\n /**\n *\n * @return {number} gets the day of month\n */\n dayOfMonth() {\n return this._day;\n }\n\n /**\n * Gets the day-of-year field.\n *\n * This method returns the primitive int value for the day-of-year.\n *\n * @return {number} the day-of-year, from 1 to 365, or 366 in a leap year\n */\n dayOfYear() {\n return this.month().firstDayOfYear(this.isLeapYear()) + this._day - 1;\n }\n\n /**\n * Gets the day-of-week field, which is an enum {@link DayOfWeek}.\n *\n * This method returns the enum {@link DayOfWeek} for the day-of-week.\n * This avoids confusion as to what `int` values mean.\n * If you need access to the primitive `int` value then the enum\n * provides the {@link DayOfWeek.value} int value.\n *\n * Additional information can be obtained from the {@link DayOfWeek}.\n * This includes textual names of the values.\n *\n * @return {DayOfWeek} the day-of-week, not null\n */\n dayOfWeek() {\n const dow0 = MathUtil.floorMod(this.toEpochDay() + 3, 7);\n return DayOfWeek.of(dow0 + 1);\n }\n\n /**\n * Checks if the year is a leap year, according to the ISO proleptic\n * calendar system rules.\n *\n * This method applies the current rules for leap years across the whole time-line.\n * In general, a year is a leap year if it is divisible by four without\n * remainder. However, years divisible by 100, are not leap years, with\n * the exception of years divisible by 400 which are.\n *\n * For example, 1904 is a leap year it is divisible by 4.\n * 1900 was not a leap year as it is divisible by 100, however 2000 was a\n * leap year as it is divisible by 400.\n *\n * The calculation is proleptic - applying the same rules into the far future and far past.\n * This is historically inaccurate, but is correct for the ISO-8601 standard.\n *\n * @return {boolean} true if the year is leap, false otherwise\n */\n isLeapYear() {\n return IsoChronology.isLeapYear(this._year);\n }\n\n /**\n * Returns the length of the month represented by this date.\n *\n * This returns the length of the month in days.\n * For example, a date in January would return 31.\n *\n * @return {number} the length of the month in days\n */\n lengthOfMonth() {\n switch (this._month) {\n case 2:\n return (this.isLeapYear() ? 29 : 28);\n case 4:\n case 6:\n case 9:\n case 11:\n return 30;\n default:\n return 31;\n }\n }\n\n /**\n * Returns the length of the year represented by this date.\n *\n * This returns the length of the year in days, either 365 or 366.\n *\n * @return {number} 366 if the year is leap, 365 otherwise\n */\n lengthOfYear() {\n return (this.isLeapYear() ? 366 : 365);\n }\n\n /**\n * Returns an adjusted copy of this date.\n *\n * This returns a new {@link LocalDate}, based on this one, with the date adjusted.\n * The adjustment takes place using the specified adjuster strategy object.\n * Read the documentation of the adjuster to understand what adjustment will be made.\n *\n * A simple adjuster might simply set the one of the fields, such as the year field.\n * A more complex adjuster might set the date to the last day of the month.\n * A selection of common adjustments is provided in {@link TemporalAdjusters}.\n * These include finding the \"last day of the month\" and \"next Wednesday\".\n * Key date-time classes also implement the {@link TemporalAdjuster} interface,\n * such as {@link Month} and {@link MonthDay}.\n * The adjuster is responsible for handling special cases, such as the varying\n * lengths of month and leap years.\n *\n * For example this code returns a date on the last day of July:\n *
\n     *  import static org.threeten.bp.Month.*;\n     *  import static org.threeten.bp.temporal.Adjusters.*;\n     *\n     *  result = localDate.with(JULY).with(lastDayOfMonth());\n     * 
\n *\n * The result of this method is obtained by invoking the\n * {@link TemporalAdjuster.adjustInto} method on the\n * specified adjuster passing `this` as the argument.\n *\n * @param {!TemporalAdjuster} adjuster - the adjuster to use, not null\n * @return {LocalDate} a {@link LocalDate} based on `this` with the adjustment made, not null\n * @throws {DateTimeException} if the adjustment cannot be made\n * @throws {ArithmeticException} if numeric overflow occurs\n */\n _withAdjuster(adjuster) {\n requireNonNull(adjuster, 'adjuster');\n // optimizations\n if (adjuster instanceof LocalDate) {\n return adjuster;\n }\n return super._withAdjuster(adjuster);\n }\n\n /**\n * Returns a copy of this date with the specified field set to a new value.\n *\n * This returns a new {@link LocalDate}, based on this one, with the value\n * for the specified field changed.\n * This can be used to change any supported field, such as the year, month or day-of-month.\n * If it is not possible to set the value, because the field is not supported or for\n * some other reason, an exception is thrown.\n *\n * In some cases, changing the specified field can cause the resulting date to become invalid,\n * such as changing the month from 31st January to February would make the day-of-month invalid.\n * In cases like this, the field is responsible for resolving the date. Typically it will choose\n * the previous valid date, which would be the last valid day of February in this example.\n *\n * If the field is a {@link ChronoField} then the adjustment is implemented here.\n * The supported fields behave as follows:\n *\n * * {@link DAY_OF_WEEK} -\n * Returns a {@link LocalDate} with the specified day-of-week.\n * The date is adjusted up to 6 days forward or backward within the boundary\n * of a Monday to Sunday week.\n * * {@link ALIGNED_DAY_OF_WEEK_IN_MONTH} -\n * Returns a {@link LocalDate} with the specified aligned-day-of-week.\n * The date is adjusted to the specified month-based aligned-day-of-week.\n * Aligned weeks are counted such that the first week of a given month starts\n * on the first day of that month.\n * This may cause the date to be moved up to 6 days into the following month.\n * * {@link ALIGNED_DAY_OF_WEEK_IN_YEAR} -\n * Returns a {@link LocalDate} with the specified aligned-day-of-week.\n * The date is adjusted to the specified year-based aligned-day-of-week.\n * Aligned weeks are counted such that the first week of a given year starts\n * on the first day of that year.\n * This may cause the date to be moved up to 6 days into the following year.\n * * {@link DAY_OF_MONTH} -\n * Returns a {@link LocalDate} with the specified day-of-month.\n * The month and year will be unchanged. If the day-of-month is invalid for the\n * year and month, then a {@link DateTimeException} is thrown.\n * * {@link DAY_OF_YEAR} -\n * Returns a {@link LocalDate} with the specified day-of-year.\n * The year will be unchanged. If the day-of-year is invalid for the\n * year, then a {@link DateTimeException} is thrown.\n * * {@link EPOCH_DAY} -\n * Returns a {@link LocalDate} with the specified epoch-day.\n * This completely replaces the date and is equivalent to {@link ofEpochDay}.\n * * {@link ALIGNED_WEEK_OF_MONTH} -\n * Returns a {@link LocalDate} with the specified aligned-week-of-month.\n * Aligned weeks are counted such that the first week of a given month starts\n * on the first day of that month.\n * This adjustment moves the date in whole week chunks to match the specified week.\n * The result will have the same day-of-week as this date.\n * This may cause the date to be moved into the following month.\n * * {@link ALIGNED_WEEK_OF_YEAR} -\n * Returns a {@link LocalDate} with the specified aligned-week-of-year.\n * Aligned weeks are counted such that the first week of a given year starts\n * on the first day of that year.\n * This adjustment moves the date in whole week chunks to match the specified week.\n * The result will have the same day-of-week as this date.\n * This may cause the date to be moved into the following year.\n * * {@link MONTH_OF_YEAR} -\n * Returns a {@link LocalDate} with the specified month-of-year.\n * The year will be unchanged. The day-of-month will also be unchanged,\n * unless it would be invalid for the new month and year. In that case, the\n * day-of-month is adjusted to the maximum valid value for the new month and year.\n * * {@link PROLEPTIC_MONTH} -\n * Returns a {@link LocalDate} with the specified proleptic-month.\n * The day-of-month will be unchanged, unless it would be invalid for the new month\n * and year. In that case, the day-of-month is adjusted to the maximum valid value\n * for the new month and year.\n * * {@link YEAR_OF_ERA} -\n * Returns a {@link LocalDate} with the specified year-of-era.\n * The era and month will be unchanged. The day-of-month will also be unchanged,\n * unless it would be invalid for the new month and year. In that case, the\n * day-of-month is adjusted to the maximum valid value for the new month and year.\n * * {@link YEAR} -\n * Returns a {@link LocalDate} with the specified year.\n * The month will be unchanged. The day-of-month will also be unchanged,\n * unless it would be invalid for the new month and year. In that case, the\n * day-of-month is adjusted to the maximum valid value for the new month and year.\n * * {@link ERA} -\n * Returns a {@link LocalDate} with the specified era.\n * The year-of-era and month will be unchanged. The day-of-month will also be unchanged,\n * unless it would be invalid for the new month and year. In that case, the\n * day-of-month is adjusted to the maximum valid value for the new month and year.\n *\n * In all cases, if the new value is outside the valid range of values for the field\n * then a {@link DateTimeException} will be thrown.\n *\n * All other {@link ChronoField} instances will throw a {@link DateTimeException}.\n *\n * If the field is not a {@link ChronoField}, then the result of this method\n * is obtained by invoking {@link TemporalField.adjustInto}\n * passing `this` as the argument. In this case, the field determines\n * whether and how to adjust the instant.\n *\n * @param {TemporalField} field - the field to set in the result, not null\n * @param {number} newValue - the new value of the field in the result\n * @return {LocalDate} a {@link LocalDate} based on `this` with the specified field set, not null\n * @throws {DateTimeException} if the field cannot be set\n * @throws {ArithmeticException} if numeric overflow occurs\n */\n _withField(field, newValue) {\n assert(field != null, 'field', NullPointerException);\n if (field instanceof ChronoField) {\n const f = field;\n f.checkValidValue(newValue);\n switch (f) {\n case ChronoField.DAY_OF_WEEK: return this.plusDays(newValue - this.dayOfWeek().value());\n case ChronoField.ALIGNED_DAY_OF_WEEK_IN_MONTH: return this.plusDays(newValue - this.getLong(ChronoField.ALIGNED_DAY_OF_WEEK_IN_MONTH));\n case ChronoField.ALIGNED_DAY_OF_WEEK_IN_YEAR: return this.plusDays(newValue - this.getLong(ChronoField.ALIGNED_DAY_OF_WEEK_IN_YEAR));\n case ChronoField.DAY_OF_MONTH: return this.withDayOfMonth(newValue);\n case ChronoField.DAY_OF_YEAR: return this.withDayOfYear(newValue);\n case ChronoField.EPOCH_DAY: return LocalDate.ofEpochDay(newValue);\n case ChronoField.ALIGNED_WEEK_OF_MONTH: return this.plusWeeks(newValue - this.getLong(ChronoField.ALIGNED_WEEK_OF_MONTH));\n case ChronoField.ALIGNED_WEEK_OF_YEAR: return this.plusWeeks(newValue - this.getLong(ChronoField.ALIGNED_WEEK_OF_YEAR));\n case ChronoField.MONTH_OF_YEAR: return this.withMonth(newValue);\n case ChronoField.PROLEPTIC_MONTH: return this.plusMonths(newValue - this.getLong(ChronoField.PROLEPTIC_MONTH));\n case ChronoField.YEAR_OF_ERA: return this.withYear((this._year >= 1 ? newValue : 1 - newValue));\n case ChronoField.YEAR: return this.withYear(newValue);\n case ChronoField.ERA: return (this.getLong(ChronoField.ERA) === newValue ? this : this.withYear(1 - this._year));\n }\n throw new UnsupportedTemporalTypeException(`Unsupported field: ${field}`);\n }\n return field.adjustInto(this, newValue);\n }\n\n /**\n * Returns a copy of this date with the year altered.\n * If the day-of-month is invalid for the year, it will be changed to the last valid day of the month.\n *\n * @param {!number} year the year to set in the result, from {@link Year.MIN_VALUE} to {@link Year.MAX_VALUE}\n * @return {LocalDate} a {@link LocalDate} based on this date with the requested year, not null\n * @throws {DateTimeException} if the year value is invalid\n */\n withYear(year) {\n if (this._year === year) {\n return this;\n }\n ChronoField.YEAR.checkValidValue(year);\n return LocalDate._resolvePreviousValid(year, this._month, this._day);\n }\n\n /**\n * Returns a copy of this date with the month-of-year altered.\n * If the day-of-month is invalid for the year, it will be changed to the last valid day of the month.\n *\n * @param {!(Month|number)} month - the month-of-year to set in the result, from 1 (January) to 12 (December)\n * @return {LocalDate} a {@link LocalDate} based on this date with the requested month, not null\n * @throws {DateTimeException} if the month-of-year value is invalid\n */\n withMonth(month) {\n const m = (month instanceof Month) ? month.value() : month;\n if (this._month === m) {\n return this;\n }\n ChronoField.MONTH_OF_YEAR.checkValidValue(m);\n return LocalDate._resolvePreviousValid(this._year, m, this._day);\n }\n\n /**\n * Returns a copy of this {@link LocalDate} with the day-of-month altered.\n *\n * If the resulting date is invalid, an exception is thrown.\n *\n * @param {!number} dayOfMonth - the day-of-month to set in the result, from 1 to 28-31\n * @return {LocalDate} based on this date with the requested day, not null\n * @throws {DateTimeException} if the day-of-month value is invalid,\n * or if the day-of-month is invalid for the month-year\n */\n withDayOfMonth(dayOfMonth) {\n if (this._day === dayOfMonth) {\n return this;\n }\n return LocalDate.of(this._year, this._month, dayOfMonth);\n }\n\n /**\n * Returns a copy of this date with the day-of-year altered.\n * If the resulting date is invalid, an exception is thrown.\n *\n * @param dayOfYear the day-of-year to set in the result, from 1 to 365-366\n * @return {LocalDate} a {@link LocalDate} based on this date with the requested day, not null\n * @throws {DateTimeException} if the day-of-year value is invalid\n * @throws {DateTimeException} if the day-of-year is invalid for the year\n */\n withDayOfYear(dayOfYear) {\n if (this.dayOfYear() === dayOfYear) {\n return this;\n }\n return LocalDate.ofYearDay(this._year, dayOfYear);\n }\n\n /**\n * Returns a copy of this date with the specified period added.\n *\n * This method returns a new date based on this date with the specified period added.\n * This can be used to add any period that is defined by a unit, for example to add years, months or days.\n * The unit is responsible for the details of the calculation, including the resolution\n * of any edge cases in the calculation.\n *\n * @param {!number} amountToAdd - the amount of the unit to add to the result, may be negative\n * @param {!TemporalUnit} unit - the unit of the period to add, not null\n * @return {LocalDate} a {@link LocalDate} based on this date with the specified period added, not null\n * @throws {DateTimeException} if the unit cannot be added to this type\n */\n _plusUnit(amountToAdd, unit) {\n requireNonNull(amountToAdd, 'amountToAdd');\n requireNonNull(unit, 'unit');\n if (unit instanceof ChronoUnit) {\n switch (unit) {\n case ChronoUnit.DAYS: return this.plusDays(amountToAdd);\n case ChronoUnit.WEEKS: return this.plusWeeks(amountToAdd);\n case ChronoUnit.MONTHS: return this.plusMonths(amountToAdd);\n case ChronoUnit.YEARS: return this.plusYears(amountToAdd);\n case ChronoUnit.DECADES: return this.plusYears(MathUtil.safeMultiply(amountToAdd, 10));\n case ChronoUnit.CENTURIES: return this.plusYears(MathUtil.safeMultiply(amountToAdd, 100));\n case ChronoUnit.MILLENNIA: return this.plusYears(MathUtil.safeMultiply(amountToAdd, 1000));\n case ChronoUnit.ERAS: return this.with(ChronoField.ERA, MathUtil.safeAdd(this.getLong(ChronoField.ERA), amountToAdd));\n }\n throw new UnsupportedTemporalTypeException(`Unsupported unit: ${unit}`);\n }\n return unit.addTo(this, amountToAdd);\n }\n\n /**\n * Returns a copy of this {@link LocalDate} with the specified period in years added.\n *\n * This method adds the specified amount to the years field in three steps:\n *\n * 1. Add the input years to the year field\n * 2. Check if the resulting date would be invalid\n * 3. Adjust the day-of-month to the last valid day if necessary\n *\n * For example, 2008-02-29 (leap year) plus one year would result in the\n * invalid date 2009-02-29 (standard year). Instead of returning an invalid\n * result, the last valid day of the month, 2009-02-28, is selected instead.\n *\n * @param {!number} yearsToAdd - the years to add, may be negative\n * @return {LocalDate} a {@link LocalDate} based on this date with the years added, not null\n * @throws {DateTimeException} if the result exceeds the supported date range\n */\n plusYears(yearsToAdd) {\n if (yearsToAdd === 0) {\n return this;\n }\n const newYear = ChronoField.YEAR.checkValidIntValue(this._year + yearsToAdd); // safe overflow\n return LocalDate._resolvePreviousValid(newYear, this._month, this._day);\n }\n\n /**\n * Returns a copy of this {@link LocalDate} with the specified period in months added.\n *\n * This method adds the specified amount to the months field in three steps:\n *\n * 1. Add the input months to the month-of-year field\n * 2. Check if the resulting date would be invalid\n * 3. Adjust the day-of-month to the last valid day if necessary\n *\n * For example, 2007-03-31 plus one month would result in the invalid date\n * 2007-04-31. Instead of returning an invalid result, the last valid day\n * of the month, 2007-04-30, is selected instead.\n *\n * @param {number} monthsToAdd - the months to add, may be negative\n * @return {LocalDate} a {@link LocalDate} based on this date with the months added, not null\n * @throws {DateTimeException} if the result exceeds the supported date range\n */\n plusMonths(monthsToAdd) {\n if (monthsToAdd === 0) {\n return this;\n }\n const monthCount = this._year * 12 + (this._month - 1);\n const calcMonths = monthCount + monthsToAdd; // safe overflow\n const newYear = ChronoField.YEAR.checkValidIntValue(MathUtil.floorDiv(calcMonths, 12));\n const newMonth = MathUtil.floorMod(calcMonths, 12) + 1;\n return LocalDate._resolvePreviousValid(newYear, newMonth, this._day);\n }\n\n /**\n * Returns a copy of this {@link LocalDate} with the specified period in weeks added.\n *\n * This method adds the specified amount in weeks to the days field incrementing\n * the month and year fields as necessary to ensure the result remains valid.\n * The result is only invalid if the maximum/minimum year is exceeded.\n *\n * For example, 2008-12-31 plus one week would result in 2009-01-07.\n *\n * @param {!number} weeksToAdd - the weeks to add, may be negative\n * @return {LocalDate} a {@link LocalDate} based on this date with the weeks added, not null\n * @throws {DateTimeException} if the result exceeds the supported date range\n */\n plusWeeks(weeksToAdd) {\n return this.plusDays(MathUtil.safeMultiply(weeksToAdd, 7));\n }\n\n\n /**\n * Returns a copy of this LocalDate with the specified number of days added.\n *\n * This method adds the specified amount to the days field incrementing the\n * month and year fields as necessary to ensure the result remains valid.\n * The result is only invalid if the maximum/minimum year is exceeded.\n *\n * For example, 2008-12-31 plus one day would result in 2009-01-01.\n *\n * @param {number} daysToAdd - the days to add, may be negative\n * @return {LocalDate} a LocalDate based on this date with the days added, not null\n * @throws AssertionError if the result exceeds the supported date range\n */\n plusDays(daysToAdd) {\n if (daysToAdd === 0) {\n return this;\n }\n const mjDay = MathUtil.safeAdd(this.toEpochDay(), daysToAdd);\n return LocalDate.ofEpochDay(mjDay);\n }\n\n /**\n * Returns a copy of this date with the specified period subtracted.\n *\n * This method returns a new date based on this date with the specified period subtracted.\n * This can be used to subtract any period that is defined by a unit, for example to subtract years, months or days.\n * The unit is responsible for the details of the calculation, including the resolution\n * of any edge cases in the calculation.\n *\n * @param {!number} amountToSubtract - the amount of the unit to subtract from the result, may be negative\n * @param {!TemporalUnit} unit the unit of the period to subtract, not null\n * @return {LocalDate} a {@link LocalDate} based on this date with the specified period subtracted, not null\n * @throws {DateTimeException} if the unit cannot be added to this type\n */\n _minusUnit(amountToSubtract, unit) {\n requireNonNull(amountToSubtract, 'amountToSubtract');\n requireNonNull(unit, 'unit');\n return this._plusUnit(-1 * amountToSubtract, unit);\n }\n\n /**\n * Returns a copy of this {@link LocalDate} with the specified period in years subtracted.\n *\n * This method subtracts the specified amount from the years field in three steps:\n *\n * 1. Subtract the input years to the year field\n * 2. Check if the resulting date would be invalid\n * 3. Adjust the day-of-month to the last valid day if necessary\n *\n * For example, 2008-02-29 (leap year) minus one year would result in the\n * invalid date 2007-02-29 (standard year). Instead of returning an invalid\n * result, the last valid day of the month, 2007-02-28, is selected instead.\n *\n * @param {!number} yearsToSubtract - the years to subtract, may be negative\n * @return {LocalDate} a {@link LocalDate} based on this date with the years subtracted, not null\n * @throws {DateTimeException} if the result exceeds the supported date range\n */\n minusYears(yearsToSubtract) {\n return this.plusYears(yearsToSubtract * -1);\n }\n\n /**\n * Returns a copy of this {@link LocalDate} with the specified period in months subtracted.\n *\n * This method subtracts the specified amount from the months field in three steps:\n *\n * 1. Subtract the input months to the month-of-year field\n * 2. Check if the resulting date would be invalid\n * 3. Adjust the day-of-month to the last valid day if necessary\n *\n * For example, 2007-03-31 minus one month would result in the invalid date\n * 2007-02-31. Instead of returning an invalid result, the last valid day\n * of the month, 2007-02-28, is selected instead.\n *\n * @param {!number} monthsToSubtract - the months to subtract, may be negative\n * @return {LocalDate} a {@link LocalDate} based on this date with the months subtracted, not null\n * @throws {DateTimeException} if the result exceeds the supported date range\n */\n minusMonths(monthsToSubtract) {\n return this.plusMonths(monthsToSubtract * -1);\n }\n\n /**\n * Returns a copy of this {@link LocalDate} with the specified period in weeks subtracted.\n *\n * This method subtracts the specified amount in weeks from the days field decrementing\n * the month and year fields as necessary to ensure the result remains valid.\n * The result is only invalid if the maximum/minimum year is exceeded.\n *\n * For example, 2009-01-07 minus one week would result in 2008-12-31.\n *\n * @param {!number} weeksToSubtract - the weeks to subtract, may be negative\n * @return {LocalDate} a {@link LocalDate} based on this date with the weeks subtracted, not null\n * @throws {DateTimeException} if the result exceeds the supported date range\n */\n minusWeeks(weeksToSubtract) {\n return this.plusWeeks(weeksToSubtract * -1);\n }\n\n /*\n * Returns a copy of this LocalDate with the specified number of days subtracted.\n *\n * This method subtracts the specified amount from the days field decrementing the\n * month and year fields as necessary to ensure the result remains valid.\n * The result is only invalid if the maximum/minimum year is exceeded.\n *\n * For example, 2009-01-01 minus one day would result in 2008-12-31.\n *\n * @param {number} daysToSubtract - the days to subtract, may be negative\n * @return {LocalDate} a LocalDate based on this date with the days subtracted, not null\n * @throws AssertionError if the result exceeds the supported date range\n */\n minusDays(daysToSubtract) {\n return this.plusDays(daysToSubtract * -1);\n }\n\n /**\n * Queries this date using the specified query.\n *\n * This queries this date using the specified query strategy object.\n * The {@link TemporalQuery} object defines the logic to be used to\n * obtain the result. Read the documentation of the query to understand\n * what the result of this method will be.\n *\n * The result of this method is obtained by invoking the\n * {@link TemporalQuery#queryFrom} method on the\n * specified query passing `this` as the argument.\n *\n * @param {TemporalQuery} query - the query to invoke, not null\n * @return the query result, null may be returned (defined by the query)\n * @throws {DateTimeException} if unable to query (defined by the query)\n * @throws {ArithmeticException} if numeric overflow occurs (defined by the query)\n */\n query(query) {\n requireNonNull(query, 'query');\n if (query === TemporalQueries.localDate()) {\n return this;\n }\n return super.query(query);\n }\n\n /**\n * Adjusts the specified temporal object to have the same date as this object.\n *\n * This returns a temporal object of the same observable type as the input\n * with the date changed to be the same as this.\n *\n * The adjustment is equivalent to using {@link Temporal#with}\n * passing {@link ChronoField.EPOCH_DAY} as the field.\n *\n * In most cases, it is clearer to reverse the calling pattern by using\n * {@link Temporal#with}:\n *
\n     *   // these two lines are equivalent, but the second approach is recommended\n     *   temporal = thisLocalDate.adjustInto(temporal);\n     *   temporal = temporal.with(thisLocalDate);\n     * 
\n *\n * @param {!TemporalAdjuster} temporal - the target object to be adjusted, not null\n * @return the adjusted object, not null\n * @throws {DateTimeException} if unable to make the adjustment\n * @throws {ArithmeticException} if numeric overflow occurs\n */\n adjustInto(temporal) {\n return super.adjustInto(temporal);\n }\n\n /**\n * function overloading for {@link LocalDate.until}\n *\n * called with 1 (or less) arguments {{@link LocalDate.until1}} is called\n * otherwise {@link LocalDate.until2}\n *\n * @param {!TemporalAccessor} p1\n * @param {TemporalUnit} p2 - not null if called with 2 arguments\n * @return {number|Period}\n */\n until(p1, p2){\n if(arguments.length < 2){\n return this.until1(p1);\n } else {\n return this.until2(p1, p2);\n }\n }\n\n /**\n * Calculates the period between this date and another date in\n * terms of the specified unit.\n *\n * This calculates the period between two dates in terms of a single unit.\n * The start and end points are `this` and the specified date.\n * The result will be negative if the end is before the start.\n * The {@link Temporal} passed to this method must be a {@link LocalDate}.\n * For example, the period in days between two dates can be calculated\n * using {@link startDate.until}.\n *\n * The calculation returns a whole number, representing the number of\n * complete units between the two dates.\n * For example, the period in months between 2012-06-15 and 2012-08-14\n * will only be one month as it is one day short of two months.\n *\n * This method operates in association with {@link TemporalUnit#between}.\n * The result of this method is a `long` representing the amount of\n * the specified unit. By contrast, the result of {@link between} is an\n * object that can be used directly in addition/subtraction:\n *
\n     *   long period = start.until(end, MONTHS);   // this method\n     *   dateTime.plus(MONTHS.between(start, end));      // use in plus/minus\n     * 
\n *\n * The calculation is implemented in this method for {@link ChronoUnit}.\n * The units {@link DAYS}, {@link WEEKS}, {@link MONTHS}, {@link YEARS},\n * {@link DECADES}, {@link CENTURIES}, {@link MILLENNIA} and {@link ERAS}\n * are supported. Other {@link ChronoUnit} values will throw an exception.\n *\n * If the unit is not a {@link ChronoUnit}, then the result of this method\n * is obtained by invoking {@link TemporalUnit.between}\n * passing `this` as the first argument and the input temporal as\n * the second argument.\n *\n * @param {!TemporalAccessor} endExclusive - the end date, which is converted to a {@link LocalDate}, not null\n * @param {!TemporalUnit} unit - the unit to measure the period in, not null\n * @return {number} the amount of the period between this date and the end date\n * @throws {DateTimeException} if the period cannot be calculated\n * @throws {ArithmeticException} if numeric overflow occurs\n */\n until2(endExclusive, unit) {\n const end = LocalDate.from(endExclusive);\n if (unit instanceof ChronoUnit) {\n switch (unit) {\n case ChronoUnit.DAYS: return this.daysUntil(end);\n case ChronoUnit.WEEKS: return MathUtil.intDiv(this.daysUntil(end), 7);\n case ChronoUnit.MONTHS: return this._monthsUntil(end);\n case ChronoUnit.YEARS: return MathUtil.intDiv(this._monthsUntil(end), 12);\n case ChronoUnit.DECADES: return MathUtil.intDiv(this._monthsUntil(end), 120);\n case ChronoUnit.CENTURIES: return MathUtil.intDiv(this._monthsUntil(end), 1200);\n case ChronoUnit.MILLENNIA: return MathUtil.intDiv(this._monthsUntil(end), 12000);\n case ChronoUnit.ERAS: return end.getLong(ChronoField.ERA) - this.getLong(ChronoField.ERA);\n }\n throw new UnsupportedTemporalTypeException(`Unsupported unit: ${unit}`);\n }\n return unit.between(this, end);\n }\n\n /**\n *\n * @param {!LocalDate} end\n * @returns {number}\n * @protected\n */\n daysUntil(end) {\n return end.toEpochDay() - this.toEpochDay(); // no overflow\n }\n\n /**\n *\n * @param {!LocalDate} end\n * @returns {number}\n * @private\n */\n _monthsUntil(end) {\n const packed1 = this._prolepticMonth() * 32 + this.dayOfMonth(); // no overflow\n const packed2 = end._prolepticMonth() * 32 + end.dayOfMonth(); // no overflow\n return MathUtil.intDiv((packed2 - packed1), 32);\n }\n\n /**\n * Calculates the period between this date and another date as a {@link Period}.\n *\n * This calculates the period between two dates in terms of years, months and days.\n * The start and end points are `this` and the specified date.\n * The result will be negative if the end is before the start.\n *\n * The calculation is performed using the ISO calendar system.\n * If necessary, the input date will be converted to ISO.\n *\n * The start date is included, but the end date is not.\n * The period is calculated by removing complete months, then calculating\n * the remaining number of days, adjusting to ensure that both have the same sign.\n * The number of months is then normalized into years and months based on a 12 month year.\n * A month is considered to be complete if the end day-of-month is greater\n * than or equal to the start day-of-month.\n * For example, from `2010-01-15` to `2011-03-18` is \"1 year, 2 months and 3 days\".\n *\n * The result of this method can be a negative period if the end is before the start.\n * The negative sign will be the same in each of year, month and day.\n *\n * There are two equivalent ways of using this method.\n * The first is to invoke this method.\n * The second is to use {@link Period#between}:\n *
\n     *   // these two lines are equivalent\n     *   period = start.until(end);\n     *   period = Period.between(start, end);\n     * 
\n * The choice should be made based on which makes the code more readable.\n *\n * @param {!TemporalAccessor} endDate - the end date, exclusive, which may be in any chronology, not null\n * @return {Period} the period between this date and the end date, not null\n */\n until1(endDate) {\n const end = LocalDate.from(endDate);\n let totalMonths = end._prolepticMonth() - this._prolepticMonth(); // safe\n let days = end._day - this._day;\n if (totalMonths > 0 && days < 0) {\n totalMonths--;\n const calcDate = this.plusMonths(totalMonths);\n days = (end.toEpochDay() - calcDate.toEpochDay()); // safe\n } else if (totalMonths < 0 && days > 0) {\n totalMonths++;\n days -= end.lengthOfMonth();\n }\n const years = MathUtil.intDiv(totalMonths, 12); // safe\n const months = MathUtil.intMod(totalMonths, 12); // safe\n return Period.of(years, months, days);\n }\n\n\n //-----------------------------------------------------------------------\n /**\n * function overloading for {@link LocalDate.atTime}\n *\n * if called with 1 argument {@link LocalDate.atTime1} is called\n * otherwise {@link LocalDate.atTime4}\n *\n * @return {LocalDateTime|OffsetDateTime} the local date-time formed from this date and the specified params\n */\n atTime(){\n if(arguments.length===1){\n return this.atTime1.apply(this, arguments);\n } else {\n return this.atTime4.apply(this, arguments);\n }\n }\n\n /**\n * Combines this date with a time to create a {@link LocalDateTime}.\n *\n * This returns a {@link LocalDateTime} formed from this date at the specified time.\n * All possible combinations of date and time are valid.\n *\n * @param {LocalTime} time - the time to combine with, not null\n * @return {LocalDateTime|OffsetDateTime} the date-time formed from this date and the specified time, not null\n */\n atTime1(time) {\n requireNonNull(time, 'time');\n if (time instanceof LocalTime) {\n return LocalDateTime.of(this, time);\n } else if (time instanceof OffsetTime) {\n return this._atTimeOffsetTime(time);\n } else {\n throw new IllegalArgumentException(`time must be an instance of LocalTime or OffsetTime${ \n time && time.constructor && time.constructor.name ? `, but is ${time.constructor.name}` : ''}`);\n }\n }\n\n /**\n * Combines this date with a time to create a {@link LocalDateTime}.\n *\n * This returns a {@link LocalDateTime} formed from this date at the\n * specified hour, minute, second and nanosecond.\n * The individual time fields must be within their valid range.\n * All possible combinations of date and time are valid.\n *\n * @param {!number} hour - the hour-of-day to use, from 0 to 23\n * @param {!number} minute - the minute-of-hour to use, from 0 to 59\n * @param {number} [second=0] - the second-of-minute to represent, from 0 to 59\n * @param {number} [nanoOfSecond=0] - the nano-of-second to represent, from 0 to 999,999,999\n * @return {LocalDateTime} the local date-time formed from this date and the specified time, not null\n * @throws {DateTimeException} if the value of any field is out of range\n */\n atTime4(hour, minute, second=0, nanoOfSecond=0) {\n return this.atTime1(LocalTime.of(hour, minute, second, nanoOfSecond));\n }\n\n /**\n * Combines this date with an offset time to create an {@link OffsetDateTime}.\n *\n * This returns an {@link OffsetDateTime} formed from this date at the specified time.\n * All possible combinations of date and time are valid.\n *\n * @param {OffsetTime} time - the time to combine with, not null\n * @return {OffsetDateTime} the offset date-time formed from this date and the specified time, not null\n */\n _atTimeOffsetTime(time) { // atTime(offsetTime)\n return OffsetDateTime.of(LocalDateTime.of(this, time.toLocalTime()), time.offset());\n }\n\n /**\n * Combines this date with the time of midnight to create a {@link LocalDateTime}\n * at the start of this date.\n *\n * This returns a {@link LocalDateTime} formed from this date at the time of\n * midnight, 00:00, at the start of this date.\n *\n * If zone is not null, this returns a {@link ZonedDateTime} formed from this date at the\n * specified zone, with the time set to be the earliest valid time according\n * to the rules in the time-zone.\n *\n * Time-zone rules, such as daylight savings, mean that not every local date-time\n * is valid for the specified zone, thus the local date-time may not be midnight.\n *\n * In most cases, there is only one valid offset for a local date-time.\n * In the case of an overlap, there are two valid offsets, and the earlier one is used,\n * corresponding to the first occurrence of midnight on the date.\n * In the case of a gap, the zoned date-time will represent the instant just after the gap.\n *\n * If the zone ID is a {@link ZoneOffset}, then the result always has a time of midnight.\n *\n * To convert to a specific time in a given time-zone call {@link atTime}\n * followed by {@link LocalDateTime#atZone}.\n *\n * @param {ZoneId} zone - optional ZoneId or ZoneOffset\n * @return {LocalDateTime|ZonedDateTime} the local date-time of midnight at the start of this date, not null\n */\n atStartOfDay(zone) {\n if(zone != null){\n return this._atStartOfDayWithZone(zone);\n } else {\n return LocalDateTime.of(this, LocalTime.MIDNIGHT);\n }\n }\n\n /**\n * Combines this date with a time-zone to create a {@link ZonedDateTime}\n * at the start of the day\n *\n * This returns a {@link ZonedDateTime} formed from this date at the\n * specified zone, with the time set to be the earliest valid time according\n * to the rules in the time-zone.\n *\n * Time-zone rules, such as daylight savings, mean that not every local date-time\n * is valid for the specified zone, thus the local date-time may not be midnight.\n *\n * In most cases, there is only one valid offset for a local date-time.\n * In the case of an overlap, there are two valid offsets, and the earlier one is used,\n * corresponding to the first occurrence of midnight on the date.\n * In the case of a gap, the zoned date-time will represent the instant just after the gap.\n *\n * If the zone ID is a {@link ZoneOffset}, then the result always has a time of midnight.\n *\n * To convert to a specific time in a given time-zone call {@link atTime}\n * followed by {@link LocalDateTime#atZone}.\n *\n * @param {!ZoneId} zone - the zone ID to use, not null\n * @return {ZonedDateTime} the zoned date-time formed from this date and the earliest valid time for the zone, not null\n */\n _atStartOfDayWithZone(zone) {\n requireNonNull(zone, 'zone');\n let ldt = this.atTime(LocalTime.MIDNIGHT);\n // need to handle case where there is a gap from 11:30 to 00:30\n // standard ZDT factory would result in 01:00 rather than 00:30\n if (zone instanceof ZoneOffset === false) {\n const trans = zone.rules().transition(ldt);\n if (trans != null && trans.isGap()) {\n ldt = trans.dateTimeAfter();\n }\n }\n return ZonedDateTime.of(ldt, zone);\n }\n\n\n /**\n * Converts this date to the Epoch Day.\n *\n * The Epoch Day count is a simple incrementing count of days where day 0 is 1970-01-01 (ISO).\n * This definition is the same for all chronologies, enabling conversion.\n *\n * @return {number} the Epoch Day equivalent to this date\n */\n toEpochDay() {\n const y = this._year;\n const m = this._month;\n let total = 0;\n total += 365 * y;\n if (y >= 0) {\n total += MathUtil.intDiv(y + 3, 4) - MathUtil.intDiv(y + 99, 100) + MathUtil.intDiv(y + 399, 400);\n } else {\n total -= MathUtil.intDiv(y, -4) - MathUtil.intDiv(y, -100) + MathUtil.intDiv(y, -400);\n }\n total += MathUtil.intDiv(367 * m - 362, 12);\n total += this.dayOfMonth() - 1;\n if (m > 2) {\n total--;\n if (!IsoChronology.isLeapYear(y)) {\n total--;\n }\n }\n return total - DAYS_0000_TO_1970;\n }\n\n /**\n * Compares this date to another date.\n *\n * The comparison is primarily based on the date, from earliest to latest.\n * It is \"consistent with equals\", as defined by {@link Comparable}.\n *\n * If all the dates being compared are instances of {@link LocalDate},\n * then the comparison will be entirely based on the date.\n * If some dates being compared are in different chronologies, then the\n * chronology is also considered, see {@link ChronoLocalDate.compareTo}.\n *\n * @param {!LocalDate} other - the other date to compare to, not null\n * @return {number} the comparator value, negative if less, positive if greater\n */\n compareTo(other) {\n requireNonNull(other, 'other');\n requireInstance(other, LocalDate, 'other');\n return this._compareTo0(other);\n // return super.compareTo(other); if not instanceof LocalDate\n }\n\n /**\n *\n * @param {!LocalDate} otherDate\n * @returns {number}\n * @private\n */\n _compareTo0(otherDate) {\n let cmp = (this._year - otherDate._year);\n if (cmp === 0) {\n cmp = (this._month - otherDate._month);\n if (cmp === 0) {\n cmp = (this._day - otherDate._day);\n }\n }\n return cmp;\n }\n\n /**\n * Checks if this date is after the specified date.\n *\n * This checks to see if this date represents a point on the\n * local time-line after the other date.\n *
\n     *   LocalDate a = LocalDate.of(2012, 6, 30);\n     *   LocalDate b = LocalDate.of(2012, 7, 1);\n     *   a.isAfter(b) == false\n     *   a.isAfter(a) == false\n     *   b.isAfter(a) == true\n     * 
\n *\n * This method only considers the position of the two dates on the local time-line.\n * It does not take into account the chronology, or calendar system.\n * This is different from the comparison in {@link compareTo},\n * but is the same approach as {@link DATE_COMPARATOR}.\n *\n * @param {!LocalDate} other - the other date to compare to, not null\n * @return {boolean} true if this date is after the specified date\n */\n isAfter(other) {\n return this.compareTo(other) > 0;\n // return super.isAfter(other) if not instanceof LocalDate\n }\n\n /**\n * Checks if this date is before the specified date.\n *\n * This checks to see if this date represents a point on the\n * local time-line before the other date.\n *
\n     *   LocalDate a = LocalDate.of(2012, 6, 30);\n     *   LocalDate b = LocalDate.of(2012, 7, 1);\n     *   a.isBefore(b) == true\n     *   a.isBefore(a) == false\n     *   b.isBefore(a) == false\n     * 
\n *\n * This method only considers the position of the two dates on the local time-line.\n * It does not take into account the chronology, or calendar system.\n * This is different from the comparison in {@link compareTo},\n * but is the same approach as {@link DATE_COMPARATOR}.\n *\n * @param {!LocalDate} other - the other date to compare to, not null\n * @return {boolean} true if this date is before the specified date\n */\n isBefore(other) {\n return this.compareTo(other) < 0;\n // return super.isBefore(other) if not instanceof LocalDate\n }\n\n /**\n * Checks if this date is equal to the specified date.\n *\n * This checks to see if this date represents the same point on the\n * local time-line as the other date.\n *
\n     *   LocalDate a = LocalDate.of(2012, 6, 30);\n     *   LocalDate b = LocalDate.of(2012, 7, 1);\n     *   a.isEqual(b) == false\n     *   a.isEqual(a) == true\n     *   b.isEqual(a) == false\n     * 
\n *\n * This method only considers the position of the two dates on the local time-line.\n * It does not take into account the chronology, or calendar system.\n * This is different from the comparison in {@link compareTo}\n * but is the same approach as {@link DATE_COMPARATOR}.\n *\n * @param {!LocalDate} other - the other date to compare to, not null\n * @return {boolean} true if this date is equal to the specified date\n */\n isEqual(other) {\n return this.compareTo(other) === 0;\n // return super.isEqual(other) if not instanceof LocalDate\n }\n\n /**\n * Checks if this date is equal to another date.\n *\n * Compares this LocalDate with another ensuring that the date is the same.\n *\n * Only objects of type LocalDate are compared, other types return false.\n *\n * @param {*} other - the object to check, null returns false\n * @return {boolean} true if this is equal to the other date\n */\n equals(other) {\n if (this === other) {\n return true;\n }\n if (other instanceof LocalDate) {\n return this._compareTo0(other) === 0;\n }\n return false;\n }\n\n /**\n * A hash code for this date.\n *\n * @return {number} a suitable hash code\n */\n hashCode() {\n const yearValue = this._year;\n const monthValue = this._month;\n const dayValue = this._day;\n return MathUtil.hash((yearValue & 0xFFFFF800) ^ ((yearValue << 11) + (monthValue << 6) + (dayValue)));\n }\n\n /**\n * Outputs this date as a String, such as 2007-12-03.\n * The output will be in the ISO-8601 format uuuu-MM-dd.\n *\n * @return {string} a string representation of this date, not null\n */\n toString() {\n let dayString, monthString, yearString;\n\n const yearValue = this._year;\n const monthValue = this._month;\n const dayValue = this._day;\n\n const absYear = Math.abs(yearValue);\n\n if (absYear < 1000) {\n if (yearValue < 0) {\n yearString = `-${(`${yearValue - 10000}`).slice(-4)}`;\n } else {\n yearString = (`${yearValue + 10000}`).slice(-4);\n }\n } else {\n if (yearValue > 9999) {\n yearString = `+${yearValue}`;\n } else {\n yearString = `${yearValue}`;\n }\n }\n\n if (monthValue < 10) {\n monthString = `-0${monthValue}`;\n } else {\n monthString = `-${monthValue}`;\n }\n\n if (dayValue < 10) {\n dayString = `-0${dayValue}`;\n } else {\n dayString = `-${dayValue}`;\n }\n\n return yearString + monthString + dayString;\n }\n\n /**\n *\n * @return {string} same as {@link LocalDate.toString}\n */\n toJSON() {\n return this.toString();\n }\n\n /**\n * Outputs this date as a string using the formatter.\n *\n * @param {DateTimeFormatter} formatter the formatter to use, not null\n * @return {String} the formatted date string, not null\n * @throws DateTimeException if an error occurs during printing\n */\n format(formatter) {\n requireNonNull(formatter, 'formatter');\n requireInstance(formatter, DateTimeFormatter, 'formatter');\n return super.format(formatter);\n }\n}\n\nexport function _init() {\n /**\n * The minimum supported {@link LocalDate}\n * This could be used by an application as a \"far past\" date.\n */\n LocalDate.MIN = LocalDate.of(YearConstants.MIN_VALUE, 1, 1);\n /**\n * The maximum supported {@link LocalDate}\n * This could be used by an application as a \"far future\" date.\n */\n LocalDate.MAX = LocalDate.of(YearConstants.MAX_VALUE, 12, 31);\n /**\n * The date at epoch day 0, that is 1970-01-01.\n */\n LocalDate.EPOCH_0 = LocalDate.ofEpochDay(0);\n\n LocalDate.FROM = createTemporalQuery('LocalDate.FROM', (temporal) => {\n return LocalDate.from(temporal);\n });\n}\n","/*\n * @copyright (c) 2016, Philipp Thürwächter & Pattrick Hüper\n * @copyright (c) 2007-present, Stephen Colebourne & Michael Nascimento Santos\n * @license BSD-3-Clause (see LICENSE in the root directory of this source tree)\n */\n\nimport { requireNonNull, requireInstance } from '../assert';\nimport { MathUtil } from '../MathUtil';\n\nimport { LocalDate } from '../LocalDate';\nimport { Instant } from '../Instant';\nimport { ZoneOffset } from '../ZoneOffset';\nimport { ChronoUnit } from '../temporal/ChronoUnit';\nimport { ChronoField } from '../temporal/ChronoField';\nimport { Temporal } from '../temporal/Temporal';\nimport { TemporalQueries } from '../temporal/TemporalQueries';\n\n/**\n * A date-time without a time-zone in an arbitrary chronology, intended\n * for advanced globalization use cases.\n *\n * **Most applications should declare method signatures, fields and variables\n * as {@link LocalDateTime}, not this interface.**\n *\n * A {@link ChronoLocalDateTime} is the abstract representation of a local date-time\n * where the {@link Chronology}, or calendar system, is pluggable.\n * The date-time is defined in terms of fields expressed by {@link TemporalField},\n * where most common implementations are defined in {@link ChronoField}.\n * The chronology defines how the calendar system operates and the meaning of\n * the standard fields.\n *\n * #### When to use this interface\n *\n * The design of the API encourages the use of {@link LocalDateTime} rather than this\n * interface, even in the case where the application needs to deal with multiple\n * calendar systems. The rationale for this is explored in detail in {@link ChronoLocalDate}.\n *\n * Ensure that the discussion in {@link ChronoLocalDate} has been read and understood\n * before using this interface.\n *\n * ### Specification for implementors\n *\n * This interface must be implemented with care to ensure other classes operate correctly.\n * All implementations that can be instantiated must be final, immutable and thread-safe.\n * Subclasses should be Serializable wherever possible.\n *\n * In JDK 8, this is an interface with default methods.\n * Since there are no default methods in JDK 7, an abstract class is used.\n *\n * @param D the date type\n */\nexport class ChronoLocalDateTime extends Temporal {\n /* \n extends DefaultInterfaceTemporal\n implements Temporal, TemporalAdjuster, Comparable> */\n\n //-----------------------------------------------------------------------\n /**\n * Gets the chronology of this date-time.\n *\n * The {@link Chronology} represents the calendar system in use.\n * The era and other fields in {@link ChronoField} are defined by the chronology.\n *\n * @return the chronology, not null\n */\n chronology() {\n return this.toLocalDate().chronology();\n }\n\n /**\n *\n * @param {TemporalQuery} query\n * @returns {*}\n */\n query(query) {\n if (query === TemporalQueries.chronology()) {\n return this.chronology();\n } else if (query === TemporalQueries.precision()) {\n return ChronoUnit.NANOS;\n } else if (query === TemporalQueries.localDate()) {\n return LocalDate.ofEpochDay(this.toLocalDate().toEpochDay());\n } else if (query === TemporalQueries.localTime()) {\n return this.toLocalTime();\n } else if (query === TemporalQueries.zone() || query === TemporalQueries.zoneId() || query === TemporalQueries.offset()) {\n return null;\n }\n return super.query(query);\n }\n\n adjustInto(temporal) {\n return temporal\n .with(ChronoField.EPOCH_DAY, this.toLocalDate().toEpochDay())\n .with(ChronoField.NANO_OF_DAY, this.toLocalTime().toNanoOfDay());\n }\n\n //-----------------------------------------------------------------------\n /**\n * Converts this date-time to an {@link Instant}.\n *\n * This combines this local date-time and the specified offset to form\n * an {@link Instant}.\n *\n * @param {ZoneOffset} offset the offset to use for the conversion, not null\n * @return {Instant} an {@link Instant} representing the same instant, not null\n */\n toInstant(offset) {\n requireInstance(offset, ZoneOffset, 'zoneId');\n return Instant.ofEpochSecond(this.toEpochSecond(offset), this.toLocalTime().nano());\n }\n\n /**\n * Converts this date-time to the number of seconds from the epoch\n * of 1970-01-01T00:00:00Z.\n *\n * This combines this local date-time and the specified offset to calculate the\n * epoch-second value, which is the number of elapsed seconds from 1970-01-01T00:00:00Z.\n * Instants on the time-line after the epoch are positive, earlier are negative.\n *\n * @param {ZoneOffset} offset the offset to use for the conversion, not null\n * @return {number} the number of seconds from the epoch of 1970-01-01T00:00:00Z\n */\n toEpochSecond(offset) {\n requireNonNull(offset, 'offset');\n const epochDay = this.toLocalDate().toEpochDay();\n let secs = epochDay * 86400 + this.toLocalTime().toSecondOfDay();\n secs -= offset.totalSeconds();\n return MathUtil.safeToInt(secs);\n }\n\n}\n","/*\n * @copyright (c) 2016, Philipp Thürwächter & Pattrick Hüper\n * @copyright (c) 2007-present, Stephen Colebourne & Michael Nascimento Santos\n * @license BSD-3-Clause (see LICENSE in the root directory of this source tree)\n */\n\nimport { MathUtil } from './MathUtil';\nimport { requireNonNull, requireInstance } from './assert';\nimport { DateTimeException, UnsupportedTemporalTypeException } from './errors';\n\nimport { Clock } from './Clock';\nimport { Instant } from './Instant';\nimport { LocalDate } from './LocalDate';\nimport { LocalTime } from './LocalTime';\nimport { OffsetDateTime } from './OffsetDateTime';\nimport { ZonedDateTime } from './ZonedDateTime';\nimport { ZoneId } from './ZoneId';\nimport { ZoneOffset } from './ZoneOffset';\n\n\nimport { DateTimeFormatter } from './format/DateTimeFormatter';\nimport { ChronoField } from './temporal/ChronoField';\nimport { ChronoUnit } from './temporal/ChronoUnit';\nimport { TemporalQueries } from './temporal/TemporalQueries';\nimport { createTemporalQuery } from './temporal/TemporalQuery';\n\nimport { ChronoLocalDateTime } from './chrono/ChronoLocalDateTime';\n\n/**\n * A date-time without a time-zone in the ISO-8601 calendar system,\n * such as `2007-12-03T10:15:30`.\n *\n * {@link LocalDateTime} is an immutable date-time object that represents a date-time,\n * often viewed as year-month-day-hour-minute-second. Other date and time fields,\n * such as day-of-year, day-of-week and week-of-year, can also be accessed.\n * Time is represented to nanosecond precision.\n * For example, the value '2nd October 2007 at 13:45.30.123456789' can be\n * stored in a {@link LocalDateTime}.\n *\n * This class does not store or represent a time-zone.\n * Instead, it is a description of the date, as used for birthdays, combined with\n * the local time as seen on a wall clock.\n * It cannot represent an instant on the time-line without additional information\n * such as an offset or time-zone.\n *\n * The ISO-8601 calendar system is the modern civil calendar system used today\n * in most of the world. It is equivalent to the proleptic Gregorian calendar\n * system, in which today's rules for leap years are applied for all time.\n * For most applications written today, the ISO-8601 rules are entirely suitable.\n * However, any application that makes use of historical dates, and requires them\n * to be accurate will find the ISO-8601 approach unsuitable.\n *\n * ### Static properties of Class {@link LocalTime}\n *\n * LocalDateTime.MIN\n *\n * The minimum supported {@link LocalDateTime}, '-999999999-01-01T00:00:00'.\n * This is the local date-time of midnight at the start of the minimum date.\n * This combines {@link LocalDate#MIN} and {@link LocalTime#MIN}.\n * This could be used by an application as a 'far past' date-time.\n *\n * LocalDateTime.MAX\n *\n * The maximum supported {@link LocalDateTime}, '+999999999-12-31T23:59:59.999999999'.\n * This is the local date-time just before midnight at the end of the maximum date.\n * This combines {@link LocalDate#MAX} and {@link LocalTime#MAX}.\n * This could be used by an application as a 'far future' date-time.\n *\n */\nexport class LocalDateTime extends ChronoLocalDateTime\n/** extends ChronoLocalDateTime\nimplements Temporal, TemporalAdjuster, Serializable */ {\n\n\n /**\n * Obtains the current date-time from from the specified clock or the system clock in the specified time-zone.\n *\n * If the argument is an instance of Clock this will query the specified clock to obtain the current date-time.\n * Using this method allows the use of an alternate clock for testing.\n * The alternate clock may be introduced using dependency injection.\n *\n * If the argument is an instance of ZoneId this will query the system clock (see {@link Clock#system}) to obtain the current date-time.\n * Specifying the time-zone avoids dependence on the default time-zone.\n *\n * If nor argument is applied, the system default time zone is used to obtain the current date-time.\n *\n * Using this method will prevent the ability to use an alternate clock for testing\n * because the clock is hard-coded.\n *\n * @param {Clock|ZoneId} clockOrZone - the zone ID or clock to use, if null Clock.systemDefaultZone() is used.\n * @return {LocalDateTime} the current date-time using the system clock, not null\n */\n static now(clockOrZone) {\n if (clockOrZone == null){\n return LocalDateTime._now(Clock.systemDefaultZone());\n } else if (clockOrZone instanceof Clock){\n return LocalDateTime._now(clockOrZone);\n } else {\n return LocalDateTime._now(Clock.system(clockOrZone));\n }\n }\n\n /**\n * Obtains the current date-time from the specified clock.\n *\n * This will query the specified clock to obtain the current date-time.\n * Using this method allows the use of an alternate clock for testing.\n * The alternate clock may be introduced using dependency injection.\n *\n * @param {Clock} clock - the clock to use, defaults to Clock.systemDefaultZone()\n * @return {LocalDateTime} the current date-time, not null\n */\n static _now(clock) {\n requireNonNull(clock, 'clock');\n return LocalDateTime.ofInstant(clock.instant(), clock.zone());\n\n // this is an alternative implementation with better performance.\n // const epochMilli = clock.millis();\n // const offset = clock.zone().rules().offsetOfEpochMilli(epochMilli);\n // return LocalDateTime._ofEpochMillis(epochMilli, offset);\n\n }\n\n /**\n * @see comment at {LocalDateTime._now}\n * @param {number} epochMilli\n * @param {ZoneOffset} offset\n * @return {LocalDateTime} the date-time, not null\n *\n */\n static _ofEpochMillis(epochMilli, offset){\n const localSecond = MathUtil.floorDiv(epochMilli, 1000) + offset.totalSeconds();\n const localEpochDay = MathUtil.floorDiv(localSecond, LocalTime.SECONDS_PER_DAY);\n const secsOfDay = MathUtil.floorMod(localSecond, LocalTime.SECONDS_PER_DAY);\n const nanoOfSecond = MathUtil.floorMod(epochMilli, 1000) * 1000000;\n const date = LocalDate.ofEpochDay(localEpochDay);\n const time = LocalTime.ofSecondOfDay(secsOfDay, nanoOfSecond);\n return new LocalDateTime(date, time);\n\n }\n\n //-----------------------------------------------------------------------\n /**\n * function overloading for {@link LocalDateTime.of}\n *\n * if called with 2 arguments and first argument is an instance of LocalDate and second is an\n * instance of LocalTime, then {@link LocalDateTime.ofDateAndTime} is executed.\n *\n * Otherwise {@link LocalDateTime.ofNumbers} is executed.\n *\n * @returns {LocalDateTime}\n */\n static of(){\n if (arguments.length <= 2){\n return LocalDateTime.ofDateAndTime.apply(this, arguments);\n } else {\n return LocalDateTime.ofNumbers.apply(this, arguments);\n }\n }\n /**\n * Obtains an instance of {@link LocalDateTime} from year, month,\n * day, hour, minute, second and nanosecond.\n *\n * The day must be valid for the year and month, otherwise an exception will be thrown.\n *\n * @param {number} [year] - the year to represent, from MIN_YEAR to MAX_YEAR\n * @param {number} [month] - the month-of-year to represent, from 1 to 12 or from a Month\n * @param {number} [dayOfMonth] - the day-of-month to represent, from 1 to 31\n * @param {number} [hour=0] - the hour-of-day to represent, from 0 to 23\n * @param {number} [minute=0] - the minute-of-hour to represent, from 0 to 59\n * @param {number} [second=0] - the second-of-minute to represent, from 0 to 59\n * @param {number} [nanoOfSecond=0] - the nano-of-second to represent, from 0 to 999,999,999\n * @return {LocalDateTime} the local date-time, not null\n * @throws {DateTimeException} if the value of any field is out of range\n * @throws {DateTimeException} if the day-of-month is invalid for the month-year\n */\n static ofNumbers(year, month, dayOfMonth, hour=0, minute=0, second=0, nanoOfSecond=0) {\n const date = LocalDate.of(year, month, dayOfMonth);\n const time = LocalTime.of(hour, minute, second, nanoOfSecond);\n return new LocalDateTime(date, time);\n }\n\n /**\n * Obtains an instance of {@link LocalDateTime} from a date and time.\n *\n * @param {!LocalDate} date - the local date, not null\n * @param {!LocalTime} time - the local time, not null\n * @return {LocalDateTime} the local date-time, not null\n */\n static ofDateAndTime(date, time) {\n requireNonNull(date, 'date');\n requireNonNull(time, 'time');\n return new LocalDateTime(date, time);\n }\n\n //-------------------------------------------------------------------------\n /**\n * Obtains an instance of {@link LocalDateTime} from an {@link Instant} and zone ID.\n *\n * This creates a local date-time based on the specified instant.\n * First, the offset from UTC/Greenwich is obtained using the zone ID and instant,\n * which is simple as there is only one valid offset for each instant.\n * Then, the instant and offset are used to calculate the local date-time.\n *\n * @param {!Instant} instant the instant to create the date-time from, not null\n * @param {!ZoneId} [zone=ZoneId.systemDefault()] the time-zone, which may be an offset, defaults to ZoneId.systemDefault()\n * @return {LocalDateTime} the local date-time, not null\n * @throws {DateTimeException} if the result exceeds the supported range\n */\n static ofInstant(instant, zone=ZoneId.systemDefault()) {\n requireNonNull(instant, 'instant');\n requireInstance(instant, Instant, 'instant');\n requireNonNull(zone, 'zone');\n const offset = zone.rules().offset(instant);\n return LocalDateTime.ofEpochSecond(instant.epochSecond(), instant.nano(), offset);\n }\n\n /**\n * Obtains an instance of {@link LocalDateTime} using seconds from the\n * epoch of 1970-01-01T00:00:00Z.\n *\n * This allows the {@link ChronoField.INSTANT_SECONDS} epoch-second field\n * to be converted to a local date-time. This is primarily intended for\n * low-level conversions rather than general application usage.\n *\n * @param {number} epochSecond - the number of seconds from the epoch of 1970-01-01T00:00:00Z\n * @param {number|!ZoneOffset} nanoOfSecond - the nanosecond within the second, from 0 to 999,999,999\n * @param {ZoneOffset} offset - the zone offset, not null if called with 3 arguments\n * @return {LocalDateTime} the local date-time, not null\n * @throws {DateTimeException} if the result exceeds the supported range\n */\n static ofEpochSecond(epochSecond=0, nanoOfSecond=0, offset) {\n if(arguments.length === 2 && nanoOfSecond instanceof ZoneOffset){\n offset = nanoOfSecond;\n nanoOfSecond = 0;\n }\n requireNonNull(offset, 'offset');\n const localSecond = epochSecond + offset.totalSeconds(); // overflow caught later\n const localEpochDay = MathUtil.floorDiv(localSecond, LocalTime.SECONDS_PER_DAY);\n const secsOfDay = MathUtil.floorMod(localSecond, LocalTime.SECONDS_PER_DAY);\n const date = LocalDate.ofEpochDay(localEpochDay);\n const time = LocalTime.ofSecondOfDay(secsOfDay, nanoOfSecond);\n return new LocalDateTime(date, time);\n }\n\n //-----------------------------------------------------------------------\n /**\n * Obtains an instance of {@link LocalDateTime} from a temporal object.\n *\n * A {@link TemporalAccessor} represents some form of date and time information.\n * This factory converts the arbitrary temporal object to an instance of {@link LocalDateTime}.\n *\n * The conversion extracts and combines {@link LocalDate} and {@link LocalTime}.\n *\n * This method matches the signature of the functional interface {@link TemporalQuery}\n * allowing it to be used as a query via method reference, {@link LocalDateTime::from}.\n *\n * @param {!TemporalAccessor} temporal - the temporal object to convert, not null\n * @return {LocalDateTime} {LocalDateTime} the local date-time, not null\n * @throws {DateTimeException} if unable to convert to a {@link LocalDateTime}\n */\n static from(temporal) {\n requireNonNull(temporal, 'temporal');\n if (temporal instanceof LocalDateTime) {\n return temporal;\n } else if (temporal instanceof ZonedDateTime) {\n return temporal.toLocalDateTime();\n }\n try {\n const date = LocalDate.from(temporal);\n const time = LocalTime.from(temporal);\n return new LocalDateTime(date, time);\n } catch (ex) {\n throw new DateTimeException(`Unable to obtain LocalDateTime TemporalAccessor: ${temporal}, type ${temporal.constructor != null ? temporal.constructor.name : ''}`);\n }\n }\n\n //-----------------------------------------------------------------------\n /**\n * Obtains an instance of {@link LocalDateTime} from a text string using a specific formatter.\n *\n * The text is parsed using the formatter, returning a date-time.\n *\n * @param {!string} text - the text to parse, not null\n * @param {DateTimeFormatter} [formatter=DateTimeFormatter.ISO_LOCAL_DATE_TIME] - the formatter to use,\n * defaults to DateTimeFormatter.ISO_LOCAL_DATE_TIME\n * @return {LocalDateTime} the parsed local date-time, not null\n * @throws {DateTimeParseException} if the text cannot be parsed\n */\n static parse(text, formatter = DateTimeFormatter.ISO_LOCAL_DATE_TIME) {\n requireNonNull(formatter, 'formatter');\n return formatter.parse(text, LocalDateTime.FROM);\n }\n\n //-----------------------------------------------------------------------\n /**\n * Constructor.\n *\n * @param {LocalDate} date - the date part of the date-time, validated not null\n * @param {LocalTime} time - the time part of the date-time, validated not null\n * @private\n */\n constructor(date, time) {\n super();\n requireInstance(date, LocalDate, 'date');\n requireInstance(time, LocalTime, 'time');\n this._date = date;\n this._time = time;\n }\n\n /**\n * Returns a copy of this date-time with the new date and time, checking\n * to see if a new object is in fact required.\n *\n * @param {LocalDate} newDate - the date of the new date-time, not null\n * @param {LocalTime} newTime - the time of the new date-time, not null\n * @return {LocalDateTime} the date-time, not null\n */\n _withDateTime(newDate, newTime) {\n if (this._date.equals(newDate) && this._time.equals(newTime)) {\n return this;\n }\n return new LocalDateTime(newDate, newTime);\n }\n\n //-----------------------------------------------------------------------\n /**\n * Checks if the specified field is supported.\n *\n * This checks if this date-time can be queried for the specified field.\n * If false, then calling the {@link LocalDateTime.range} range and\n * {@link LocalDateTime.get} get methods will throw an exception.\n *\n * If the field is a {@link ChronoField} then the query is implemented here.\n * The supported fields are:\n *\n * * {@link ChronoField.NANO_OF_SECOND}\n * * {@link ChronoField.NANO_OF_DAY}\n * * {@link ChronoField.MICRO_OF_SECOND}\n * * {@link ChronoField.MICRO_OF_DAY}\n * * {@link ChronoField.MILLI_OF_SECOND}\n * * {@link ChronoField.MILLI_OF_DAY}\n * * {@link ChronoField.SECOND_OF_MINUTE}\n * * {@link ChronoField.SECOND_OF_DAY}\n * * {@link ChronoField.MINUTE_OF_HOUR}\n * * {@link ChronoField.MINUTE_OF_DAY}\n * * {@link ChronoField.HOUR_OF_AMPM}\n * * {@link ChronoField.CLOCK_HOUR_OF_AMPM}\n * * {@link ChronoField.HOUR_OF_DAY}\n * * {@link ChronoField.CLOCK_HOUR_OF_DAY}\n * * {@link ChronoField.AMPM_OF_DAY}\n * * {@link ChronoField.DAY_OF_WEEK}\n * * {@link ChronoField.ALIGNED_DAY_OF_WEEK_IN_MONTH}\n * * {@link ChronoField.ALIGNED_DAY_OF_WEEK_IN_YEAR}\n * * {@link ChronoField.DAY_OF_MONTH}\n * * {@link ChronoField.DAY_OF_YEAR}\n * * {@link ChronoField.EPOCH_DAY}\n * * {@link ChronoField.ALIGNED_WEEK_OF_MONTH}\n * * {@link ChronoField.ALIGNED_WEEK_OF_YEAR}\n * * {@link ChronoField.MONTH_OF_YEAR}\n * * {@link ChronoField.EPOCH_MONTH}\n * * {@link ChronoField.YEAR_OF_ERA}\n * * {@link ChronoField.YEAR}\n * * {@link ChronoField.ERA}\n *\n * All other {@link ChronoField} instances will return false.\n *\n * If the field is not a {@link ChronoField}, then the result of this method\n * is obtained by invoking {@link TemporalField.isSupportedBy}\n * passing `this` as the argument.\n * Whether the field is supported is determined by the field.\n *\n * @param {TemporalField|TemporalUnit} fieldOrUnit - the field to check, null returns false\n * @return {boolean} true if the field is supported on this date-time, false if not\n */\n isSupported(fieldOrUnit) {\n if (fieldOrUnit instanceof ChronoField) {\n return fieldOrUnit.isDateBased() || fieldOrUnit.isTimeBased();\n } else if (fieldOrUnit instanceof ChronoUnit) {\n return fieldOrUnit.isDateBased() || fieldOrUnit.isTimeBased();\n }\n return fieldOrUnit != null && fieldOrUnit.isSupportedBy(this);\n }\n\n /**\n * Gets the range of valid values for the specified field.\n *\n * The range object expresses the minimum and maximum valid values for a field.\n * This date-time is used to enhance the accuracy of the returned range.\n * If it is not possible to return the range, because the field is not supported\n * or for some other reason, an exception is thrown.\n *\n * If the field is a {@link ChronoField} then the query is implemented here.\n * The supported fields (see {@link isSupported}) will return\n * appropriate range instances.\n * All other {@link ChronoField} instances will throw a {@link DateTimeException}.\n *\n * If the field is not a {@link ChronoField}, then the result of this method\n * is obtained by invoking {@link TemporalField.rangeRefinedBy}\n * passing `this` as the argument.\n * Whether the range can be obtained is determined by the field.\n *\n * @param {!TemporalField} field - the field to query the range for, not null\n * @return {ValueRange} the range of valid values for the field, not null\n * @throws {DateTimeException} if the range for the field cannot be obtained\n */\n range(field) {\n if (field instanceof ChronoField) {\n return (field.isTimeBased() ? this._time.range(field) : this._date.range(field));\n }\n return field.rangeRefinedBy(this);\n }\n\n /**\n * Gets the value of the specified field from this date-time as an `int`.\n *\n * This queries this date-time for the value for the specified field.\n * The returned value will always be within the valid range of values for the field.\n * If it is not possible to return the value, because the field is not supported\n * or for some other reason, an exception is thrown.\n *\n * If the field is a {@link ChronoField} then the query is implemented here.\n * The supported fields (see {@link isSupported}) will return valid\n * values based on this date-time, except {@link NANO_OF_DAY}, {@link MICRO_OF_DAY},\n * {@link EPOCH_DAY} and {@link EPOCH_MONTH} which are too large to fit in\n * an `int` and throw a {@link DateTimeException}.\n * All other {@link ChronoField} instances will throw a {@link DateTimeException}.\n *\n * If the field is not a {@link ChronoField}, then the result of this method\n * is obtained by invoking {@link TemporalField.getFrom}\n * passing `this` as the argument. Whether the value can be obtained,\n * and what the value represents, is determined by the field.\n *\n * @param {!TemporalField} field - the field to get, not null\n * @return {number} the value for the field\n * @throws {DateTimeException} if a value for the field cannot be obtained\n * @throws {ArithmeticException} if numeric overflow occurs\n */\n get(field) {\n if (field instanceof ChronoField) {\n return (field.isTimeBased() ? this._time.get(field) : this._date.get(field));\n }\n return super.get(field);\n }\n\n /**\n * Gets the value of the specified field from this date-time as a `long`.\n *\n * This queries this date-time for the value for the specified field.\n * If it is not possible to return the value, because the field is not supported\n * or for some other reason, an exception is thrown.\n *\n * If the field is a {@link ChronoField} then the query is implemented here.\n * The supported fields (see {@link isSupported}) will return valid\n * values based on this date-time.\n * All other {@link ChronoField} instances will throw a {@link DateTimeException}.\n *\n * If the field is not a {@link ChronoField}, then the result of this method\n * is obtained by invoking {@link TemporalField.getFrom}\n * passing `this` as the argument. Whether the value can be obtained,\n * and what the value represents, is determined by the field.\n *\n * @param {!TemporalField} field - the field to get, not null\n * @return {number} the value for the field\n * @throws {DateTimeException} if a value for the field cannot be obtained\n * @throws {ArithmeticException} if numeric overflow occurs\n */\n getLong(field) {\n requireNonNull(field, 'field');\n if (field instanceof ChronoField) {\n return (field.isTimeBased() ? this._time.getLong(field) : this._date.getLong(field));\n }\n return field.getFrom(this);\n }\n\n //-----------------------------------------------------------------------\n /**\n * Gets the year field.\n *\n * This method returns the primitive `int` value for the year.\n *\n * The year returned by this method is proleptic as per `get(YEAR)`.\n * To obtain the year-of-era, use `get(YEAR_OF_ERA)`.\n *\n * @return {number} the year, from MIN_YEAR to MAX_YEAR\n */\n year() {\n return this._date.year();\n }\n\n /**\n * Gets the month-of-year field from 1 to 12.\n *\n * This method returns the month as an `int` from 1 to 12.\n * Application code is frequently clearer if the enum {@link Month}\n * is used by calling {@link getMonth}.\n *\n * @return {number} the month-of-year, from 1 to 12\n * @see #getMonth()\n */\n monthValue() {\n return this._date.monthValue();\n }\n\n /**\n * Gets the month-of-year field using the {@link Month} enum.\n *\n * This method returns the enum {@link Month} for the month.\n * This avoids confusion as to what `int` values mean.\n * If you need access to the primitive `int` value, use\n * {@link Month#getValue}.\n *\n * @return {Month} the month-of-year, not null\n * @see #getMonthValue()\n */\n month() {\n return this._date.month();\n }\n\n /**\n * Gets the day-of-month field.\n *\n * This method returns the primitive `int` value for the day-of-month.\n *\n * @return {number} the day-of-month, from 1 to 31\n */\n dayOfMonth() {\n return this._date.dayOfMonth();\n }\n\n /**\n * Gets the day-of-year field.\n *\n * This method returns the primitive `int` value for the day-of-year.\n *\n * @return {number} the day-of-year, from 1 to 365, or 366 in a leap year\n */\n dayOfYear() {\n return this._date.dayOfYear();\n }\n\n /**\n * Gets the day-of-week field, which is an enum {@link DayOfWeek}.\n *\n * This method returns the enum {@link DayOfWeek} for the day-of-week.\n * This avoids confusion as to what `int` values mean.\n * If you need access to the primitive `int` value, use\n * {@link DayOfWeek#getValue}.\n *\n * Additional information can be obtained from the {@link DayOfWeek}.\n * This includes textual names of the values.\n *\n * @return {DayOfWeek} the day-of-week, not null\n */\n dayOfWeek() {\n return this._date.dayOfWeek();\n }\n\n //-----------------------------------------------------------------------\n /**\n * Gets the hour-of-day field.\n *\n * @return {number} the hour-of-day, from 0 to 23\n */\n hour() {\n return this._time.hour();\n }\n\n /**\n * Gets the minute-of-hour field.\n *\n * @return {number} the minute-of-hour, from 0 to 59\n */\n minute() {\n return this._time.minute();\n }\n\n /**\n * Gets the second-of-minute field.\n *\n * @return {number} the second-of-minute, from 0 to 59\n */\n second() {\n return this._time.second();\n }\n\n /**\n * Gets the nano-of-second field.\n *\n * @return {number} the nano-of-second, from 0 to 999,999,999\n */\n nano() {\n return this._time.nano();\n }\n\n //-----------------------------------------------------------------------\n\n /**\n * Returns an adjusted copy of this date-time.\n *\n * This returns a new {@link LocalDateTime}, based on this one, with the date-time adjusted.\n * The adjustment takes place using the specified adjuster strategy object.\n * Read the documentation of the adjuster to understand what adjustment will be made.\n *\n * A simple adjuster might simply set the one of the fields, such as the year field.\n * A more complex adjuster might set the date to the last day of the month.\n * A selection of common adjustments is provided in {@link TemporalAdjusters}.\n * These include finding the 'last day of the month' and 'next Wednesday'.\n * Key date-time classes also implement the {@link TemporalAdjuster} interface,\n * such as {@link Month} and {@link MonthDay}.\n * The adjuster is responsible for handling special cases, such as the varying\n * lengths of month and leap years.\n *\n * For example this code returns a date on the last day of July:\n *
\n     *  import static org.threeten.bp.Month.*;\n     *  import static org.threeten.bp.temporal.Adjusters.*;\n     *\n     *  result = localDateTime.with(JULY).with(lastDayOfMonth());\n     * 
\n *\n * The classes {@link LocalDate} and {@link LocalTime} implement {@link TemporalAdjuster},\n * thus this method can be used to change the date, time or offset:\n *
\n     *  result = localDateTime.with(date);\n     *  result = localDateTime.with(time);\n     * 
\n *\n * The result of this method is obtained by invoking the\n * {@link TemporalAdjuster#adjustInto} method on the\n * specified adjuster passing `this` as the argument.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {TemporalAdjuster} adjuster the adjuster to use, not null\n * @return {LocalDateTime} a {@link LocalDateTime} based on `this` with the adjustment made, not null\n * @throws {DateTimeException} if the adjustment cannot be made\n * @throws {ArithmeticException} if numeric overflow occurs\n */\n _withAdjuster(adjuster) {\n requireNonNull(adjuster, 'adjuster');\n // optimizations\n if (adjuster instanceof LocalDate) {\n return this._withDateTime(adjuster, this._time);\n } else if (adjuster instanceof LocalTime) {\n return this._withDateTime(this._date, adjuster);\n } else if (adjuster instanceof LocalDateTime) {\n return adjuster;\n }\n return super._withAdjuster(adjuster);\n }\n\n /**\n * Returns a copy of this date-time with the specified field set to a new value.\n *\n * This returns a new {@link LocalDateTime}, based on this one, with the value\n * for the specified field changed.\n * This can be used to change any supported field, such as the year, month or day-of-month.\n * If it is not possible to set the value, because the field is not supported or for\n * some other reason, an exception is thrown.\n *\n * In some cases, changing the specified field can cause the resulting date-time to become invalid,\n * such as changing the month from 31st January to February would make the day-of-month invalid.\n * In cases like this, the field is responsible for resolving the date. Typically it will choose\n * the previous valid date, which would be the last valid day of February in this example.\n *\n * If the field is a {@link ChronoField} then the adjustment is implemented here.\n * The supported fields (see {@link isSupported}) will behave as in\n * {@link LocalDate#with} or {@link LocalTime#with}.\n * All other {@link ChronoField} instances will throw a {@link DateTimeException}.\n *\n * If the field is not a {@link ChronoField}, then the result of this method\n * is obtained by invoking {@link TemporalField.adjustInto}\n * passing `this` as the argument. In this case, the field determines\n * whether and how to adjust the instant.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {TemporalField} field - the field to set in the result, not null\n * @param {number} newValue - the new value of the field in the result\n * @return {LocalDateTime} a {@link LocalDateTime} based on `this` with the specified field set, not null\n * @throws {DateTimeException} if the field cannot be set\n * @throws {ArithmeticException} if numeric overflow occurs\n */\n _withField(field, newValue) {\n requireNonNull(field, 'field');\n if (field instanceof ChronoField) {\n if (field.isTimeBased()) {\n return this._withDateTime(this._date, this._time.with(field, newValue));\n } else {\n return this._withDateTime(this._date.with(field, newValue), this._time);\n }\n }\n return field.adjustInto(this, newValue);\n }\n\n //-----------------------------------------------------------------------\n /**\n * Returns a copy of this {@link LocalDateTime} with the year altered.\n * The time does not affect the calculation and will be the same in the result.\n * If the day-of-month is invalid for the year, it will be changed to the last valid day of the month.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {number} year - the year to set in the result, from MIN_YEAR to MAX_YEAR\n * @return {LocalDateTime} a {@link LocalDateTime} based on this date-time with the requested year, not null\n * @throws {DateTimeException} if the year value is invalid\n */\n withYear(year) {\n return this._withDateTime(this._date.withYear(year), this._time);\n }\n\n /**\n * Returns a copy of this {@link LocalDateTime} with the month-of-year altered.\n * The time does not affect the calculation and will be the same in the result.\n * If the day-of-month is invalid for the year, it will be changed to the last valid day of the month.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {!(number|Month)} month - the month-of-year to set in the result, from 1 (January) to 12 (December)\n * @return {LocalDateTime} a {@link LocalDateTime} based on this date-time with the requested month, not null\n * @throws {DateTimeException} if the month-of-year value is invalid\n */\n withMonth(month) {\n return this._withDateTime(this._date.withMonth(month), this._time);\n }\n\n /**\n * Returns a copy of this {@link LocalDateTime} with the day-of-month altered.\n * If the resulting {@link LocalDateTime} is invalid, an exception is thrown.\n * The time does not affect the calculation and will be the same in the result.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {number} dayOfMonth - the day-of-month to set in the result, from 1 to 28-31\n * @return {LocalDateTime} a {@link LocalDateTime} based on this date-time with the requested day, not null\n * @throws {DateTimeException} if the day-of-month value is invalid\n * @throws {DateTimeException} if the day-of-month is invalid for the month-year\n */\n withDayOfMonth(dayOfMonth) {\n return this._withDateTime(this._date.withDayOfMonth(dayOfMonth), this._time);\n }\n\n /**\n * Returns a copy of this {@link LocalDateTime} with the day-of-year altered.\n * If the resulting {@link LocalDateTime} is invalid, an exception is thrown.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {number} dayOfYear - the day-of-year to set in the result, from 1 to 365-366\n * @return {LocalDateTime} a {@link LocalDateTime} based on this date with the requested day, not null\n * @throws {DateTimeException} if the day-of-year value is invalid\n * @throws {DateTimeException} if the day-of-year is invalid for the year\n */\n withDayOfYear(dayOfYear) {\n return this._withDateTime(this._date.withDayOfYear(dayOfYear), this._time);\n }\n\n //-----------------------------------------------------------------------\n /**\n * Returns a copy of this {@link LocalDateTime} with the hour-of-day value altered.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {number} hour - the hour-of-day to set in the result, from 0 to 23\n * @return {LocalDateTime} a {@link LocalDateTime} based on this date-time with the requested hour, not null\n * @throws {DateTimeException} if the hour value is invalid\n */\n withHour(hour) {\n const newTime = this._time.withHour(hour);\n return this._withDateTime(this._date, newTime);\n }\n\n /**\n * Returns a copy of this {@link LocalDateTime} with the minute-of-hour value altered.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {number} minute - the minute-of-hour to set in the result, from 0 to 59\n * @return {LocalDateTime} a {@link LocalDateTime} based on this date-time with the requested minute, not null\n * @throws {DateTimeException} if the minute value is invalid\n */\n withMinute(minute) {\n const newTime = this._time.withMinute(minute);\n return this._withDateTime(this._date, newTime);\n }\n\n /**\n * Returns a copy of this {@link LocalDateTime} with the second-of-minute value altered.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {number} second - the second-of-minute to set in the result, from 0 to 59\n * @return {LocalDateTime} a {@link LocalDateTime} based on this date-time with the requested second, not null\n * @throws {DateTimeException} if the second value is invalid\n */\n withSecond(second) {\n const newTime = this._time.withSecond(second);\n return this._withDateTime(this._date, newTime);\n }\n\n /**\n * Returns a copy of this {@link LocalDateTime} with the nano-of-second value altered.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {number} nanoOfSecond - the nano-of-second to set in the result, from 0 to 999,999,999\n * @return {LocalDateTime} a {@link LocalDateTime} based on this date-time with the requested nanosecond, not null\n * @throws {DateTimeException} if the nano value is invalid\n */\n withNano(nanoOfSecond) {\n const newTime = this._time.withNano(nanoOfSecond);\n return this._withDateTime(this._date, newTime);\n }\n\n //-----------------------------------------------------------------------\n /**\n * Returns a copy of this {@link LocalDateTime} with the time truncated.\n *\n * Truncation returns a copy of the original date-time with fields\n * smaller than the specified unit set to zero.\n * For example, truncating with {@link ChronoUnit#MINUTES}\n * will set the second-of-minute and nano-of-second field to zero.\n *\n * The unit must have a duration (see {@link TemporalUnit#getDuration})\n * that divides into the length of a standard day without remainder.\n * This includes all supplied time units on {@link ChronoUnit} and\n * {@link ChronoUnit#DAYS}. Other units throw an exception.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {TemporalUnit} unit - the unit to truncate to, not null\n * @return {LocalDateTime} a {@link LocalDateTime} based on this date-time with the time truncated, not null\n * @throws {DateTimeException} if unable to truncate\n */\n truncatedTo(unit) {\n return this._withDateTime(this._date, this._time.truncatedTo(unit));\n }\n\n //-----------------------------------------------------------------------\n\n /**\n * Returns a copy of this date-time with the specified period added.\n *\n * This method returns a new date-time based on this date-time with the specified period added.\n * This can be used to add any period that is defined by a unit, for example to add years, months or days.\n * The unit is responsible for the details of the calculation, including the resolution\n * of any edge cases in the calculation.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {number} amountToAdd - the amount of the unit to add to the result, may be negative\n * @param {!TemporalUnit} unit - the unit of the period to add, not null\n * @return {LocalDateTime} a {@link LocalDateTime} based on this date-time with the specified period added, not null\n * @throws {DateTimeException} if the unit cannot be added to this type\n */\n _plusUnit(amountToAdd, unit) {\n requireNonNull(unit, 'unit');\n if (unit instanceof ChronoUnit) {\n switch (unit) {\n case ChronoUnit.NANOS: return this.plusNanos(amountToAdd);\n case ChronoUnit.MICROS: return this.plusDays(MathUtil.intDiv(amountToAdd, LocalTime.MICROS_PER_DAY)).plusNanos(MathUtil.intMod(amountToAdd, LocalTime.MICROS_PER_DAY) * 1000);\n case ChronoUnit.MILLIS: return this.plusDays(MathUtil.intDiv(amountToAdd, LocalTime.MILLIS_PER_DAY)).plusNanos(MathUtil.intMod(amountToAdd, LocalTime.MILLIS_PER_DAY) * 1000000);\n case ChronoUnit.SECONDS: return this.plusSeconds(amountToAdd);\n case ChronoUnit.MINUTES: return this.plusMinutes(amountToAdd);\n case ChronoUnit.HOURS: return this.plusHours(amountToAdd);\n case ChronoUnit.HALF_DAYS: return this.plusDays(MathUtil.intDiv(amountToAdd, 256)).plusHours(MathUtil.intMod(amountToAdd, 256) * 12); // no overflow (256 is multiple of 2)\n }\n return this._withDateTime(this._date.plus(amountToAdd, unit), this._time);\n }\n return unit.addTo(this, amountToAdd);\n }\n\n //-----------------------------------------------------------------------\n /**\n * Returns a copy of this {@link LocalDateTime} with the specified period in years added.\n *\n * This method adds the specified amount to the years field in three steps:\n *\n * 1. Add the input years to the year field\n * 2. Check if the resulting date would be invalid\n * 3. Adjust the day-of-month to the last valid day if necessary\n *\n * For example, 2008-02-29 (leap year) plus one year would result in the\n * invalid date 2009-02-29 (standard year). Instead of returning an invalid\n * result, the last valid day of the month, 2009-02-28, is selected instead.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {number} years - the years to add, may be negative\n * @return {LocalDateTime} a {@link LocalDateTime} based on this date-time with the years added, not null\n * @throws {DateTimeException} if the result exceeds the supported date range\n */\n plusYears(years) {\n const newDate = this._date.plusYears(years);\n return this._withDateTime(newDate, this._time);\n }\n\n /**\n * Returns a copy of this {@link LocalDateTime} with the specified period in months added.\n *\n * This method adds the specified amount to the months field in three steps:\n *\n * 1. Add the input months to the month-of-year field\n * 2. Check if the resulting date would be invalid\n * 3. Adjust the day-of-month to the last valid day if necessary\n *\n * For example, 2007-03-31 plus one month would result in the invalid date\n * 2007-04-31. Instead of returning an invalid result, the last valid day\n * of the month, 2007-04-30, is selected instead.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {number} months - the months to add, may be negative\n * @return {LocalDateTime} a {@link LocalDateTime} based on this date-time with the months added, not null\n * @throws {DateTimeException} if the result exceeds the supported date range\n */\n plusMonths(months) {\n const newDate = this._date.plusMonths(months);\n return this._withDateTime(newDate, this._time);\n }\n\n /**\n * Returns a copy of this {@link LocalDateTime} with the specified period in weeks added.\n *\n * This method adds the specified amount in weeks to the days field incrementing\n * the month and year fields as necessary to ensure the result remains valid.\n * The result is only invalid if the maximum/minimum year is exceeded.\n *\n * For example, 2008-12-31 plus one week would result in 2009-01-07.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {number} weeks - the weeks to add, may be negative\n * @return {LocalDateTime} a {@link LocalDateTime} based on this date-time with the weeks added, not null\n * @throws {DateTimeException} if the result exceeds the supported date range\n */\n plusWeeks(weeks) {\n const newDate = this._date.plusWeeks(weeks);\n return this._withDateTime(newDate, this._time);\n }\n\n /**\n * Returns a copy of this {@link LocalDateTime} with the specified period in days added.\n *\n * This method adds the specified amount to the days field incrementing the\n * month and year fields as necessary to ensure the result remains valid.\n * The result is only invalid if the maximum/minimum year is exceeded.\n *\n * For example, 2008-12-31 plus one day would result in 2009-01-01.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {number} days - the days to add, may be negative\n * @return {LocalDateTime} a {@link LocalDateTime} based on this date-time with the days added, not null\n * @throws {DateTimeException} if the result exceeds the supported date range\n */\n plusDays(days) {\n const newDate = this._date.plusDays(days);\n return this._withDateTime(newDate, this._time);\n }\n\n //-----------------------------------------------------------------------\n /**\n * Returns a copy of this {@link LocalDateTime} with the specified period in hours added.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {number} hours - the hours to add, may be negative\n * @return {LocalDateTime} a {@link LocalDateTime} based on this date-time with the hours added, not null\n * @throws {DateTimeException} if the result exceeds the supported date range\n */\n plusHours(hours) {\n return this._plusWithOverflow(this._date, hours, 0, 0, 0, 1);\n }\n\n /**\n * Returns a copy of this {@link LocalDateTime} with the specified period in minutes added.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {number} minutes - the minutes to add, may be negative\n * @return {LocalDateTime} a {@link LocalDateTime} based on this date-time with the minutes added, not null\n * @throws {DateTimeException} if the result exceeds the supported date range\n */\n plusMinutes(minutes) {\n return this._plusWithOverflow(this._date, 0, minutes, 0, 0, 1);\n }\n\n /**\n * Returns a copy of this {@link LocalDateTime} with the specified period in seconds added.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {number} seconds - the seconds to add, may be negative\n * @return {LocalDateTime} a {@link LocalDateTime} based on this date-time with the seconds added, not null\n * @throws {DateTimeException} if the result exceeds the supported date range\n */\n plusSeconds(seconds) {\n return this._plusWithOverflow(this._date, 0, 0, seconds, 0, 1);\n }\n\n /**\n * Returns a copy of this {@link LocalDateTime} with the specified period in nanoseconds added.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {number} nanos - the nanos to add, may be negative\n * @return {LocalDateTime} a {@link LocalDateTime} based on this date-time with the nanoseconds added, not null\n * @throws {DateTimeException} if the result exceeds the supported date range\n */\n plusNanos(nanos) {\n return this._plusWithOverflow(this._date, 0, 0, 0, nanos, 1);\n }\n\n //-----------------------------------------------------------------------\n\n /**\n * Returns a copy of this date-time with the specified period subtracted.\n *\n * This method returns a new date-time based on this date-time with the specified period subtracted.\n * This can be used to subtract any period that is defined by a unit, for example to subtract years, months or days.\n * The unit is responsible for the details of the calculation, including the resolution\n * of any edge cases in the calculation.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {number} amountToSubtract - the amount of the unit to subtract from the result, may be negative\n * @param {TemporalUnit} unit - the unit of the period to subtract, not null\n * @return {LocalDateTime} a {@link LocalDateTime} based on this date-time with the specified period subtracted, not null\n * @throws {DateTimeException} if the unit cannot be added to this type\n */\n _minusUnit(amountToSubtract, unit) {\n requireNonNull(unit, 'unit');\n return this._plusUnit(-1 * amountToSubtract, unit);\n }\n\n //-----------------------------------------------------------------------\n /**\n * Returns a copy of this {@link LocalDateTime} with the specified period in years subtracted.\n *\n * This method subtracts the specified amount from the years field in three steps:\n *\n * 1. Subtract the input years from the year field\n * 2. Check if the resulting date would be invalid\n * 3. Adjust the day-of-month to the last valid day if necessary\n *\n * For example, 2008-02-29 (leap year) minus one year would result in the\n * invalid date 2009-02-29 (standard year). Instead of returning an invalid\n * result, the last valid day of the month, 2009-02-28, is selected instead.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {number} years - the years to subtract, may be negative\n * @return {LocalDateTime} a {@link LocalDateTime} based on this date-time with the years subtracted, not null\n * @throws {DateTimeException} if the result exceeds the supported date range\n */\n minusYears(years) {\n return this.plusYears(-1 * years);\n }\n\n /**\n * Returns a copy of this {@link LocalDateTime} with the specified period in months subtracted.\n *\n * This method subtracts the specified amount from the months field in three steps:\n *\n * 1. Subtract the input months from the month-of-year field\n * 2. Check if the resulting date would be invalid\n * 3. Adjust the day-of-month to the last valid day if necessary\n *\n * For example, 2007-03-31 minus one month would result in the invalid date\n * 2007-04-31. Instead of returning an invalid result, the last valid day\n * of the month, 2007-04-30, is selected instead.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {number} months - the months to subtract, may be negative\n * @return {LocalDateTime} a {@link LocalDateTime} based on this date-time with the months subtracted, not null\n * @throws {DateTimeException} if the result exceeds the supported date range\n */\n minusMonths(months) {\n return this.plusMonths(-1 * months);\n }\n\n /**\n * Returns a copy of this {@link LocalDateTime} with the specified period in weeks subtracted.\n *\n * This method subtracts the specified amount in weeks from the days field decrementing\n * the month and year fields as necessary to ensure the result remains valid.\n * The result is only invalid if the maximum/minimum year is exceeded.\n *\n * For example, 2009-01-07 minus one week would result in 2008-12-31.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {number} weeks - the weeks to subtract, may be negative\n * @return {LocalDateTime} a {@link LocalDateTime} based on this date-time with the weeks subtracted, not null\n * @throws {DateTimeException} if the result exceeds the supported date range\n */\n minusWeeks(weeks) {\n return this.plusWeeks(-1 * weeks);\n }\n\n /**\n * Returns a copy of this {@link LocalDateTime} with the specified period in days subtracted.\n *\n * This method subtracts the specified amount from the days field incrementing the\n * month and year fields as necessary to ensure the result remains valid.\n * The result is only invalid if the maximum/minimum year is exceeded.\n *\n * For example, 2009-01-01 minus one day would result in 2008-12-31.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {number} days - the days to subtract, may be negative\n * @return {LocalDateTime} a {@link LocalDateTime} based on this date-time with the days subtracted, not null\n * @throws {DateTimeException} if the result exceeds the supported date range\n */\n minusDays(days) {\n return this.plusDays(-1 * days);\n }\n\n //-----------------------------------------------------------------------\n /**\n * Returns a copy of this {@link LocalDateTime} with the specified period in hours subtracted.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {number} hours - the hours to subtract, may be negative\n * @return {LocalDateTime} a {@link LocalDateTime} based on this date-time with the hours subtracted, not null\n * @throws {DateTimeException} if the result exceeds the supported date range\n */\n minusHours(hours) {\n return this._plusWithOverflow(this._date, hours, 0, 0, 0, -1);\n }\n\n /**\n * Returns a copy of this {@link LocalDateTime} with the specified period in minutes subtracted.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {number} minutes - the minutes to subtract, may be negative\n * @return {LocalDateTime} a {@link LocalDateTime} based on this date-time with the minutes subtracted, not null\n * @throws {DateTimeException} if the result exceeds the supported date range\n */\n minusMinutes(minutes) {\n return this._plusWithOverflow(this._date, 0, minutes, 0, 0, -1);\n }\n\n /**\n * Returns a copy of this {@link LocalDateTime} with the specified period in seconds subtracted.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {number} seconds - the seconds to subtract, may be negative\n * @return {LocalDateTime} a {@link LocalDateTime} based on this date-time with the seconds subtracted, not null\n * @throws {DateTimeException} if the result exceeds the supported date range\n */\n minusSeconds(seconds) {\n return this._plusWithOverflow(this._date, 0, 0, seconds, 0, -1);\n }\n\n /**\n * Returns a copy of this {@link LocalDateTime} with the specified period in nanoseconds subtracted.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {Number} nanos - the nanos to subtract, may be negative\n * @return {LocalDateTime} based on this date-time with the nanoseconds subtracted, not null\n * @throws {DateTimeException} if the result exceeds the supported date range\n */\n minusNanos(nanos) {\n return this._plusWithOverflow(this._date, 0, 0, 0, nanos, -1);\n }\n\n //-----------------------------------------------------------------------\n /**\n * Returns a copy of this {@link LocalDateTime} with the specified period added.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {LocalDate} newDate the new date to base the calculation on, not null\n * @param {Number} hours - the hours to add, may be negative\n * @param {Number} minutes - the minutes to add, may be negative\n * @param {Number} seconds - the seconds to add, may be negative\n * @param {Number} nanos - the nanos to add, may be negative\n * @param {Number} sign - the sign to determine add or subtract\n * @return {LocalDateTime} the combined result, not null\n */\n _plusWithOverflow(newDate, hours, minutes, seconds, nanos, sign) {\n // 9223372036854775808 long, 2147483648 int\n if (hours === 0 && minutes === 0 && seconds === 0 && nanos === 0) {\n return this._withDateTime(newDate, this._time);\n }\n let totDays = MathUtil.intDiv(nanos, LocalTime.NANOS_PER_DAY) + // max/24*60*60*1B\n MathUtil.intDiv(seconds, LocalTime.SECONDS_PER_DAY) + // max/24*60*60\n MathUtil.intDiv(minutes, LocalTime.MINUTES_PER_DAY) + // max/24*60\n MathUtil.intDiv(hours, LocalTime.HOURS_PER_DAY); // max/24\n totDays *= sign; // total max*0.4237...\n let totNanos = MathUtil.intMod(nanos, LocalTime.NANOS_PER_DAY) + // max 86400000000000\n (MathUtil.intMod(seconds, LocalTime.SECONDS_PER_DAY)) * LocalTime.NANOS_PER_SECOND + // max 86400000000000\n (MathUtil.intMod(minutes, LocalTime.MINUTES_PER_DAY)) * LocalTime.NANOS_PER_MINUTE + // max 86400000000000\n (MathUtil.intMod(hours, LocalTime.HOURS_PER_DAY)) * LocalTime.NANOS_PER_HOUR; // max 86400000000000\n const curNoD = this._time.toNanoOfDay(); // max 86400000000000\n totNanos = totNanos * sign + curNoD; // total 432000000000000\n totDays += MathUtil.floorDiv(totNanos, LocalTime.NANOS_PER_DAY);\n const newNoD = MathUtil.floorMod(totNanos, LocalTime.NANOS_PER_DAY);\n const newTime = (newNoD === curNoD ? this._time : LocalTime.ofNanoOfDay(newNoD));\n return this._withDateTime(newDate.plusDays(totDays), newTime);\n }\n\n //-----------------------------------------------------------------------\n /**\n * Queries this date-time using the specified query.\n *\n * This queries this date-time using the specified query strategy object.\n * The {@link TemporalQuery} object defines the logic to be used to\n * obtain the result. Read the documentation of the query to understand\n * what the result of this method will be.\n *\n * The result of this method is obtained by invoking the\n * {@link TemporalQuery#queryFrom} method on the\n * specified query passing `this` as the argument.\n *\n * @param {TemporalQuery} query the query to invoke, not null\n * @return {*} the query result, null may be returned (defined by the query)\n * @throws {DateTimeException} if unable to query (defined by the query)\n * @throws {ArithmeticException} if numeric overflow occurs (defined by the query)\n */\n query(query) {\n requireNonNull(query, 'query');\n if (query === TemporalQueries.localDate()) {\n return this.toLocalDate();\n }\n return super.query(query);\n }\n\n /**\n * Adjusts the specified temporal object to have the same date and time as this object.\n *\n * This returns a temporal object of the same observable type as the input\n * with the date and time changed to be the same as this.\n *\n * The adjustment is equivalent to using {@link Temporal#with}\n * twice, passing {@link ChronoField#EPOCH_DAY} and\n * {@link ChronoField#NANO_OF_DAY} as the fields.\n *\n * In most cases, it is clearer to reverse the calling pattern by using\n * {@link Temporal#with}:\n *
\n     *   // these two lines are equivalent, but the second approach is recommended\n     *   temporal = thisLocalDateTime.adjustInto(temporal);\n     *   temporal = temporal.with(thisLocalDateTime);\n     * 
\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {TemporalAdjuster} temporal - the target object to be adjusted, not null\n * @return {LocalDateTime} the adjusted object, not null\n * @throws {DateTimeException} if unable to make the adjustment\n * @throws {ArithmeticException} if numeric overflow occurs\n */\n adjustInto(temporal) {\n return super.adjustInto(temporal);\n }\n\n /**\n * Calculates the period between this date-time and another date-time in\n * terms of the specified unit.\n *\n * This calculates the period between two date-times in terms of a single unit.\n * The start and end points are `this` and the specified date-time.\n * The result will be negative if the end is before the start.\n * The {@link Temporal} passed to this method must be a {@link LocalDateTime}.\n * For example, the period in days between two date-times can be calculated\n * using `startDateTime.until(endDateTime, DAYS)`.\n *\n * The calculation returns a whole number, representing the number of\n * complete units between the two date-times.\n * For example, the period in months between 2012-06-15T00:00 and 2012-08-14T23:59\n * will only be one month as it is one minute short of two months.\n *\n * This method operates in association with {@link TemporalUnit#between}.\n * The result of this method is a `long` representing the amount of\n * the specified unit. By contrast, the result of {@link between} is an\n * object that can be used directly in addition/subtraction:\n *
\n     *   long period = start.until(end, MONTHS);   // this method\n     *   dateTime.plus(MONTHS.between(start, end));      // use in plus/minus\n     * 
\n *\n * The calculation is implemented in this method for {@link ChronoUnit}.\n * The units {@link NANOS}, {@link MICROS}, {@link MILLIS}, {@link SECONDS},\n * {@link MINUTES}, {@link HOURS} and {@link HALF_DAYS}, {@link DAYS},\n * {@link WEEKS}, {@link MONTHS}, {@link YEARS}, {@link DECADES},\n * {@link CENTURIES}, {@link MILLENNIA} and {@link ERAS} are supported.\n * Other {@link ChronoUnit} values will throw an exception.\n *\n * If the unit is not a {@link ChronoUnit}, then the result of this method\n * is obtained by invoking {@link TemporalUnit.between}\n * passing `this` as the first argument and the input temporal as\n * the second argument.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {Temporal} endExclusive - the end date-time, which is converted to a {@link LocalDateTime}, not null\n * @param {TemporalUnit} unit - the unit to measure the period in, not null\n * @return {number} the amount of the period between this date-time and the end date-time\n * @throws {DateTimeException} if the period cannot be calculated\n * @throws {ArithmeticException} if numeric overflow occurs\n */\n until(endExclusive, unit) {\n requireNonNull(endExclusive, 'endExclusive');\n requireNonNull(unit, 'unit');\n const end = LocalDateTime.from(endExclusive);\n if (unit instanceof ChronoUnit) {\n if (unit.isTimeBased()) {\n let daysUntil = this._date.daysUntil(end._date);\n let timeUntil = end._time.toNanoOfDay() - this._time.toNanoOfDay();\n if (daysUntil > 0 && timeUntil < 0) {\n daysUntil--;\n timeUntil += LocalTime.NANOS_PER_DAY;\n } else if (daysUntil < 0 && timeUntil > 0) {\n daysUntil++;\n timeUntil -= LocalTime.NANOS_PER_DAY;\n }\n let amount = daysUntil;\n switch (unit) {\n case ChronoUnit.NANOS:\n amount = MathUtil.safeMultiply(amount, LocalTime.NANOS_PER_DAY);\n return MathUtil.safeAdd(amount, timeUntil);\n case ChronoUnit.MICROS:\n amount = MathUtil.safeMultiply(amount, LocalTime.MICROS_PER_DAY);\n return MathUtil.safeAdd(amount, MathUtil.intDiv(timeUntil, 1000));\n case ChronoUnit.MILLIS:\n amount = MathUtil.safeMultiply(amount, LocalTime.MILLIS_PER_DAY);\n return MathUtil.safeAdd(amount, MathUtil.intDiv(timeUntil, 1000000));\n case ChronoUnit.SECONDS:\n amount = MathUtil.safeMultiply(amount, LocalTime.SECONDS_PER_DAY);\n return MathUtil.safeAdd(amount, MathUtil.intDiv(timeUntil, LocalTime.NANOS_PER_SECOND));\n case ChronoUnit.MINUTES:\n amount = MathUtil.safeMultiply(amount, LocalTime.MINUTES_PER_DAY);\n return MathUtil.safeAdd(amount, MathUtil.intDiv(timeUntil, LocalTime.NANOS_PER_MINUTE));\n case ChronoUnit.HOURS:\n amount = MathUtil.safeMultiply(amount, LocalTime.HOURS_PER_DAY);\n return MathUtil.safeAdd(amount, MathUtil.intDiv(timeUntil, LocalTime.NANOS_PER_HOUR));\n case ChronoUnit.HALF_DAYS:\n amount = MathUtil.safeMultiply(amount, 2);\n return MathUtil.safeAdd(amount, MathUtil.intDiv(timeUntil, (LocalTime.NANOS_PER_HOUR * 12)));\n }\n throw new UnsupportedTemporalTypeException(`Unsupported unit: ${unit}`);\n }\n let endDate = end._date;\n const endTime = end._time;\n if (endDate.isAfter(this._date) && endTime.isBefore(this._time)) {\n endDate = endDate.minusDays(1);\n } else if (endDate.isBefore(this._date) && endTime.isAfter(this._time)) {\n endDate = endDate.plusDays(1);\n }\n return this._date.until(endDate, unit);\n }\n return unit.between(this, end);\n }\n\n //-----------------------------------------------------------------------\n /**\n * Combines this date-time with an offset to create an {@link OffsetDateTime}.\n *\n * This returns an {@link OffsetDateTime} formed from this date-time at the specified offset.\n * All possible combinations of date-time and offset are valid.\n *\n * @param {ZoneOffset} offset the offset to combine with, not null\n * @return {OffsetDateTime} the offset date-time formed from this date-time and the specified offset, not null\n */\n atOffset(offset) {\n return OffsetDateTime.of(this, offset);\n }\n\n /**\n * Combines this date-time with a time-zone to create a {@link ZonedDateTime}.\n *\n * This returns a {@link ZonedDateTime} formed from this date-time at the\n * specified time-zone. The result will match this date-time as closely as possible.\n * Time-zone rules, such as daylight savings, mean that not every local date-time\n * is valid for the specified zone, thus the local date-time may be adjusted.\n *\n * The local date-time is resolved to a single instant on the time-line.\n * This is achieved by finding a valid offset from UTC/Greenwich for the local\n * date-time as defined by the {@link ZoneRules} of the zone ID.\n *\n * In most cases, there is only one valid offset for a local date-time.\n * In the case of an overlap, where clocks are set back, there are two valid offsets.\n * This method uses the earlier offset typically corresponding to 'summer'.\n *\n * In the case of a gap, where clocks jump forward, there is no valid offset.\n * Instead, the local date-time is adjusted to be later by the length of the gap.\n * For a typical one hour daylight savings change, the local date-time will be\n * moved one hour later into the offset typically corresponding to 'summer'.\n *\n * To obtain the later offset during an overlap, call\n * {@link ZonedDateTime#withLaterOffsetAtOverlap} on the result of this method.\n * To throw an exception when there is a gap or overlap, use\n * {@link ZonedDateTime#ofStrict}.\n *\n * @param {ZoneId} zone the time-zone to use, not null\n * @return {ZonedDateTime} the zoned date-time formed from this date-time, not null\n */\n atZone(zone) {\n return ZonedDateTime.of(this, zone);\n }\n\n //-----------------------------------------------------------------------\n /**\n * Gets the {@link LocalDate} part of this date-time.\n *\n * This returns a {@link LocalDate} with the same year, month and day\n * as this date-time.\n *\n * @return {LocalDate} the date part of this date-time, not null\n */\n toLocalDate() {\n return this._date;\n }\n\n /**\n * Gets the {@link LocalTime} part of this date-time.\n *\n * This returns a {@link LocalTime} with the same hour, minute, second and\n * nanosecond as this date-time.\n *\n * @return {LocalTime} the time part of this date-time, not null\n */\n toLocalTime() {\n return this._time;\n }\n\n //-----------------------------------------------------------------------\n /**\n * Compares this date-time to another date-time.\n *\n * The comparison is primarily based on the date-time, from earliest to latest.\n * It is 'consistent with equals', as defined by {@link Comparable}.\n *\n * If all the date-times being compared are instances of {@link LocalDateTime},\n * then the comparison will be entirely based on the date-time.\n * If some dates being compared are in different chronologies, then the\n * chronology is also considered, see {@link ChronoLocalDateTime#compareTo}.\n *\n * @param {!LocalDateTime} other - the other date-time to compare to, not null\n * @return {number} the comparator value, negative if less, positive if greater\n */\n compareTo(other) {\n requireNonNull(other, 'other');\n requireInstance(other, LocalDateTime, 'other');\n return this._compareTo0(other);\n // return super.compareTo(other); if not instance of LocalDateTime\n }\n\n /**\n *\n * @param {!LocalDateTime} other\n * @returns {number}\n * @private\n */\n _compareTo0(other) {\n let cmp = this._date.compareTo(other.toLocalDate());\n if (cmp === 0) {\n cmp = this._time.compareTo(other.toLocalTime());\n }\n return cmp;\n }\n\n /**\n * Checks if this date-time is after the specified date-time.\n *\n * This checks to see if this date-time represents a point on the\n * local time-line after the other date-time.\n *
\n     *   LocalDate a = LocalDateTime.of(2012, 6, 30, 12, 00);\n     *   LocalDate b = LocalDateTime.of(2012, 7, 1, 12, 00);\n     *   a.isAfter(b) == false\n     *   a.isAfter(a) == false\n     *   b.isAfter(a) == true\n     * 
\n *\n * This method only considers the position of the two date-times on the local time-line.\n * It does not take into account the chronology, or calendar system.\n * This is different from the comparison in {@link compareTo},\n * but is the same approach as {@link DATE_TIME_COMPARATOR}.\n *\n * @param {LocalDateTime} other - the other date-time to compare to, not null\n * @return {boolean} true if this date-time is after the specified date-time\n */\n isAfter(other) {\n return this.compareTo(other) > 0;\n // return super.isAfter(other); if not instance of LocalDateTime\n }\n\n /**\n * Checks if this date-time is before the specified date-time.\n *\n * This checks to see if this date-time represents a point on the\n * local time-line before the other date-time.\n *
\n     *   LocalDate a = LocalDateTime.of(2012, 6, 30, 12, 00);\n     *   LocalDate b = LocalDateTime.of(2012, 7, 1, 12, 00);\n     *   a.isBefore(b) == true\n     *   a.isBefore(a) == false\n     *   b.isBefore(a) == false\n     * 
\n *\n * This method only considers the position of the two date-times on the local time-line.\n * It does not take into account the chronology, or calendar system.\n * This is different from the comparison in {@link compareTo},\n * but is the same approach as {@link DATE_TIME_COMPARATOR}.\n *\n * @param {LocalDateTime} other - the other date-time to compare to, not null\n * @return {boolean} true if this date-time is before the specified date-time\n */\n isBefore(other) {\n return this.compareTo(other) < 0;\n // return super.isBefore(other); if not instance of LocalDateTime\n }\n\n /**\n * Checks if this date-time is equal to the specified date-time.\n *\n * This checks to see if this date-time represents the same point on the\n * local time-line as the other date-time.\n *
\n     *   LocalDate a = LocalDateTime.of(2012, 6, 30, 12, 00);\n     *   LocalDate b = LocalDateTime.of(2012, 7, 1, 12, 00);\n     *   a.isEqual(b) == false\n     *   a.isEqual(a) == true\n     *   b.isEqual(a) == false\n     * 
\n *\n * This method only considers the position of the two date-times on the local time-line.\n * It does not take into account the chronology, or calendar system.\n * This is different from the comparison in {@link compareTo},\n * but is the same approach as {@link DATE_TIME_COMPARATOR}.\n *\n * @param {LocalDateTime} other - the other date-time to compare to, not null\n * @return {boolean} true if this date-time is equal to the specified date-time\n */\n isEqual(other) {\n return this.compareTo(other) === 0;\n // return super.isEqual(other); if not instance of LocalDateTime\n }\n\n //-----------------------------------------------------------------------\n /**\n * Checks if this date-time is equal to another date-time.\n *\n * Compares this {@link LocalDateTime} with another ensuring that the date-time is the same.\n * Only objects of type {@link LocalDateTime} are compared, other types return false.\n *\n * @param {*} other - the object to check, null returns false\n * @return {boolean} true if this is equal to the other date-time\n */\n equals(other) {\n if (this === other) {\n return true;\n }\n if (other instanceof LocalDateTime) {\n return this._date.equals(other._date) && this._time.equals(other._time);\n }\n return false;\n }\n\n /**\n * A hash code for this date-time.\n *\n * @return {number} a suitable hash code\n */\n hashCode() {\n return this._date.hashCode() ^ this._time.hashCode();\n }\n\n //-----------------------------------------------------------------------\n /**\n * Outputs this date-time as a string, such as `2007-12-03T10:15:30`.\n *\n * The output will be one of the following ISO-8601 formats:\n *\n * * `yyyy-MM-dd'T'HH:mm`\n * * `yyyy-MM-dd'T'HH:mm:ss`\n * * `yyyy-MM-dd'T'HH:mm:ss.SSS`\n * * `yyyy-MM-dd'T'HH:mm:ss.SSSSSS`\n * * `yyyy-MM-dd'T'HH:mm:ss.SSSSSSSSS`\n *\n * The format used will be the shortest that outputs the full value of\n * the time where the omitted parts are implied to be zero.\n *\n * @return {string} a string representation of this date-time, not null\n */\n toString() {\n return `${this._date.toString()}T${this._time.toString()}`;\n }\n\n /**\n *\n * @return {string} same as {@link LocalDateTime.toString}\n */\n toJSON() {\n return this.toString();\n }\n\n /**\n * Outputs this date-time as a string using the formatter.\n *\n * @param {!DateTimeFormatter} formatter the formatter to use, not null\n * @return {String} the formatted date-time string, not null\n * @throws {DateTimeException} if an error occurs during printing\n */\n format(formatter) {\n requireNonNull(formatter, 'formatter');\n return formatter.format(this);\n }\n\n}\n\nexport function _init(){\n /**\n * The minimum supported {@link LocalDateTime}, '-999999999-01-01T00:00:00'.\n * This is the local date-time of midnight at the start of the minimum date.\n * This combines {@link LocalDate#MIN} and {@link LocalTime#MIN}.\n * This could be used by an application as a 'far past' date-time.\n */\n LocalDateTime.MIN = LocalDateTime.of(LocalDate.MIN, LocalTime.MIN);\n\n /**\n * The maximum supported {@link LocalDateTime}, '+999999999-12-31T23:59:59.999999999'.\n * This is the local date-time just before midnight at the end of the maximum date.\n * This combines {@link LocalDate#MAX} and {@link LocalTime#MAX}.\n * This could be used by an application as a 'far future' date-time.\n */\n LocalDateTime.MAX = LocalDateTime.of(LocalDate.MAX, LocalTime.MAX);\n\n LocalDateTime.FROM = createTemporalQuery('LocalDateTime.FROM', (temporal) => {\n return LocalDateTime.from(temporal);\n });\n}\n","/**\n * @copyright (c) 2016, Philipp Thürwächter & Pattrick Hüper\n * @copyright (c) 2007-present, Stephen Colebourne & Michael Nascimento Santos\n * @license BSD-3-Clause (see LICENSE in the root directory of this source tree)\n */\n\n\nimport { MathUtil } from './MathUtil';\nimport { requireNonNull, requireInstance } from './assert';\nimport { DateTimeException, UnsupportedTemporalTypeException } from './errors';\n\nimport { Clock } from './Clock';\nimport { LocalDateTime } from './LocalDateTime';\nimport { ZoneId } from './ZoneId';\nimport { OffsetTime } from './OffsetTime';\n\nimport { DateTimeFormatter } from './format/DateTimeFormatter';\n\nimport { ChronoField } from './temporal/ChronoField';\nimport { ChronoUnit } from './temporal/ChronoUnit';\nimport { Temporal } from './temporal/Temporal';\nimport { TemporalField } from './temporal/TemporalField';\nimport { TemporalQueries } from './temporal/TemporalQueries';\nimport { createTemporalQuery } from './temporal/TemporalQuery';\n\n/**\n * A time without time-zone in the ISO-8601 calendar system,\n * such as `10:15:30`.\n *\n * {@link LocalTime} is an immutable date-time object that represents a time,\n * often viewed as hour-minute-second.\n * Time is represented to nanosecond precision.\n * For example, the value '13:45.30.123456789' can be stored in a {@link LocalTime}.\n *\n * It does not store or represent a date or time-zone.\n * Instead, it is a description of the local time as seen on a wall clock.\n * It cannot represent an instant on the time-line without additional information\n * such as an offset or time-zone.\n *\n * The ISO-8601 calendar system is the modern civil calendar system used today\n * in most of the world. This API assumes that all calendar systems use the same\n * representation, this class, for time-of-day.\n *\n * ### Static properties of Class {@link LocalTime}\n *\n * LocalTime.MIN\n *\n * The minimum supported {@link LocalTime}, '00:00'.\n * This is the time of midnight at the start of the day.\n *\n * LocalTime.MAX\n *\n * The maximum supported {@link LocalTime}, '23:59:59.999999999'.\n * This is the time just before midnight at the end of the day.\n *\n * LocalTime.MIDNIGHT\n *\n * The time of midnight at the start of the day, '00:00'.\n *\n * LocalTime.NOON\n *\n * The time of noon in the middle of the day, '12:00'.\n *\n * LocalTime.HOURS_PER_DAY\n *\n * Hours per day.\n *\n * LocalTime.MINUTES_PER_HOUR\n *\n * Minutes per hour.\n *\n * LocalTime.MINUTES_PER_DAY\n *\n * Minutes per day.\n *\n * LocalTime.SECONDS_PER_MINUTE\n *\n * Seconds per minute.\n *\n * LocalTime.SECONDS_PER_HOUR\n *\n * Seconds per hour.\n *\n * LocalTime.SECONDS_PER_DAY\n *\n * Seconds per day.\n *\n * LocalTime.MILLIS_PER_DAY\n *\n * Milliseconds per day.\n *\n * LocalTime.MICROS_PER_DAY\n *\n * Microseconds per day.\n *\n * LocalTime.NANOS_PER_SECOND\n *\n * Nanos per second.\n *\n * LocalTime.NANOS_PER_MINUTE\n *\n * Nanos per minute.\n *\n * LocalTime.NANOS_PER_HOUR\n *\n * Nanos per hour.\n *\n * LocalTime.NANOS_PER_DAY\n *\n * Nanos per day.\n *\n */\nexport class LocalTime extends Temporal /** implements Temporal, TemporalAdjuster */ {\n /**\n * Obtains the current time from the specified clock.\n * If no argument is specified the system default clock is queried,\n * if a zone-id is passed a system clock with the specified zone is queried.\n *\n * This will query the specified clock to obtain the current time.\n * Using this method allows the use of an alternate clock for testing.\n * The alternate clock may be introduced using dependency injection.\n *\n * @param {Clock|ZoneId} clockOrZone - the zone ID or clock to use, if null Clock.systemDefaultZone() is used.\n * @return {LocalTime} the current time using the system clock, not null\n */\n static now(clockOrZone) {\n if (clockOrZone == null){\n return LocalTime._now(Clock.systemDefaultZone());\n } else if (clockOrZone instanceof Clock){\n return LocalTime._now(clockOrZone);\n } else {\n return LocalTime._now(Clock.system(clockOrZone));\n }\n }\n\n /**\n * Obtains the current time from the specified clock.\n *\n * This will query the specified clock to obtain the current time.\n * Using this method allows the use of an alternate clock for testing.\n * The alternate clock may be introduced using dependency injection (see {@link Clock}).\n *\n * @param {Clock} [clock=Clock.systemDefaultZone()] - the clock to use, not null\n * @return {LocalTime} the current time, not null\n */\n static _now(clock = Clock.systemDefaultZone()) {\n requireNonNull(clock, 'clock');// inline OffsetTime factory to avoid creating object and InstantProvider checks\n return LocalTime.ofInstant(clock.instant(), clock.zone());\n }\n\n /**\n * obtain a LocalTime from an Instant in the specified time-zone or, if null\n * in the system default time-zone\n *\n * @param {!Instant} instant\n * @param {ZoneId} [zone=ZoneId.systemDefault()], defaults to ZoneId.systemDefault()\n * @returns {LocalTime} the current date, not null\n */\n static ofInstant(instant, zone=ZoneId.systemDefault()){\n const offset = zone.rules().offset(instant);\n let secsOfDay = MathUtil.intMod(instant.epochSecond(), LocalTime.SECONDS_PER_DAY);\n secsOfDay = MathUtil.intMod((secsOfDay + offset.totalSeconds()), LocalTime.SECONDS_PER_DAY);\n if (secsOfDay < 0) {\n secsOfDay += LocalTime.SECONDS_PER_DAY;\n }\n return LocalTime.ofSecondOfDay(secsOfDay, instant.nano());\n }\n\n /**\n * Obtains an instance of {@link LocalTime} from an hour, minute, second and nanosecond.\n *\n * This factory may return a cached value, but applications must not rely on this.\n *\n * @param {number} [hour=0] - the hour-of-day to represent, from 0 to 23\n * @param {number} [minute=0] - the minute-of-hour to represent, from 0 to 59\n * @param {number} [second=0] - the second-of-minute to represent, from 0 to 59\n * @param {number} [nanoOfSecond=0] - the nano-of-second to represent, from 0 to 999,999,999\n * @return {LocalTime} the local time, not null\n * @throws {DateTimeException} if the value of any field is out of range\n */\n static of(hour, minute, second, nanoOfSecond) {\n return new LocalTime(hour, minute, second, nanoOfSecond);\n }\n\n /**\n * Obtains an instance of {@link LocalTime} from a second-of-day value, with\n * associated nanos of second.\n *\n * This factory may return a cached value, but applications must not rely on this.\n *\n * @param {number} [secondOfDay=0] - the second-of-day, from `0` to `24 * 60 * 60 - 1`\n * @param {number} [nanoOfSecond=0] - the nano-of-second, from `0` to `999,999,999`\n * @return {LocalTime} the local time, not null\n * @throws {DateTimeException} if the either input value is invalid\n */\n static ofSecondOfDay(secondOfDay=0, nanoOfSecond=0) {\n ChronoField.SECOND_OF_DAY.checkValidValue(secondOfDay);\n ChronoField.NANO_OF_SECOND.checkValidValue(nanoOfSecond);\n const hours = MathUtil.intDiv(secondOfDay, LocalTime.SECONDS_PER_HOUR);\n secondOfDay -= hours * LocalTime.SECONDS_PER_HOUR;\n const minutes = MathUtil.intDiv(secondOfDay, LocalTime.SECONDS_PER_MINUTE);\n secondOfDay -= minutes * LocalTime.SECONDS_PER_MINUTE;\n return new LocalTime(hours, minutes, secondOfDay, nanoOfSecond);\n }\n\n /**\n * Obtains an instance of {@link LocalTime} from a nanos-of-day value.\n *\n * This factory may return a cached value, but applications must not rely on this.\n *\n * @param {number} [nanoOfDay=0] - the nano of day, from `0` to `24 * 60 * 60 * 1,000,000,000 - 1`\n * @return {LocalTime} the local time, not null\n * @throws {DateTimeException} if the nanos of day value is invalid\n */\n static ofNanoOfDay(nanoOfDay=0) {\n ChronoField.NANO_OF_DAY.checkValidValue(nanoOfDay);\n const hours = MathUtil.intDiv(nanoOfDay, LocalTime.NANOS_PER_HOUR);\n nanoOfDay -= hours * LocalTime.NANOS_PER_HOUR;\n const minutes = MathUtil.intDiv(nanoOfDay, LocalTime.NANOS_PER_MINUTE);\n nanoOfDay -= minutes * LocalTime.NANOS_PER_MINUTE;\n const seconds = MathUtil.intDiv(nanoOfDay, LocalTime.NANOS_PER_SECOND);\n nanoOfDay -= seconds * LocalTime.NANOS_PER_SECOND;\n return new LocalTime(hours, minutes, seconds, nanoOfDay);\n }\n\n //-----------------------------------------------------------------------\n /**\n * Obtains an instance of {@link LocalTime} from a temporal object.\n *\n * A {@link TemporalAccessor} represents some form of date and time information.\n * This factory converts the arbitrary temporal object to an instance of {@link LocalTime}.\n *\n * The conversion uses the {@link TemporalQueries#localTime} query, which relies\n * on extracting {@link ChronoField#NANO_OF_DAY}.\n *\n * This method matches the signature of the functional interface {@link TemporalQuery}\n * allowing it to be used in queries via method reference, {@link LocalTime::from}.\n *\n * @param {!TemporalAccessor} temporal - the temporal object to convert, not null\n * @return {LocalTime} the local time, not null\n * @throws {DateTimeException} if unable to convert to a {@link LocalTime}\n */\n static from(temporal) {\n requireNonNull(temporal, 'temporal');\n const time = temporal.query(TemporalQueries.localTime());\n if (time == null) {\n throw new DateTimeException(`Unable to obtain LocalTime TemporalAccessor: ${temporal}, type ${temporal.constructor != null ? temporal.constructor.name : ''}`);\n }\n return time;\n }\n\n /**\n * Obtains an instance of {@link LocalTime} from a text string using a specific formatter.\n *\n * The text is parsed using the formatter, returning a time.\n *\n * @param {!String} text - the text to parse, not null\n * @param {DateTimeFormatter} [formatter=DateTimeFormatter.ISO_LOCAL_TIME] - the formatter to use, default is\n * {@link DateTimeFormatter.ISO_LOCAL_TIME}\n * @return {LocalTime} the parsed local time, not null\n * @throws {DateTimeParseException} if the text cannot be parsed\n */\n static parse(text, formatter=DateTimeFormatter.ISO_LOCAL_TIME) {\n requireNonNull(formatter, 'formatter');\n return formatter.parse(text, LocalTime.FROM);\n }\n\n /**\n * Constructor, previously validated.\n *\n * @param {number} [hour=0] - the hour-of-day to represent, validated from 0 to 23\n * @param {number} [minute=0] - the minute-of-hour to represent, validated from 0 to 59\n * @param {number} [second=0] - the second-of-minute to represent, validated from 0 to 59\n * @param {number} [nanoOfSecond=0] - the nano-of-second to represent, validated from 0 to 999,999,999\n * @private\n */\n constructor(hour=0, minute=0, second=0, nanoOfSecond=0) {\n super();\n const _hour = MathUtil.safeToInt(hour);\n const _minute = MathUtil.safeToInt(minute);\n const _second = MathUtil.safeToInt(second);\n const _nanoOfSecond = MathUtil.safeToInt(nanoOfSecond);\n LocalTime._validate(_hour, _minute, _second, _nanoOfSecond);\n if (_minute === 0 && _second === 0 && _nanoOfSecond === 0) {\n if (!LocalTime.HOURS[_hour]) {\n this._hour = _hour;\n this._minute = _minute;\n this._second = _second;\n this._nano = _nanoOfSecond;\n LocalTime.HOURS[_hour] = this;\n }\n return LocalTime.HOURS[_hour];\n }\n this._hour = _hour;\n this._minute = _minute;\n this._second = _second;\n this._nano = _nanoOfSecond;\n }\n\n static _validate(hour, minute, second, nanoOfSecond){\n ChronoField.HOUR_OF_DAY.checkValidValue(hour);\n ChronoField.MINUTE_OF_HOUR.checkValidValue(minute);\n ChronoField.SECOND_OF_MINUTE.checkValidValue(second);\n ChronoField.NANO_OF_SECOND.checkValidValue(nanoOfSecond);\n\n }\n //-----------------------------------------------------------------------\n /**\n * Checks if the specified field is supported.\n *\n * This checks if this time can be queried for the specified field.\n * If false, then calling {@link range} and {@link get} will throw an exception.\n *\n * If the field is a {@link ChronoField} then the query is implemented here.\n * The supported fields are:\n *\n * * {@link ChronoField.NANO_OF_SECOND}\n * * {@link ChronoField.NANO_OF_DAY}\n * * {@link ChronoField.MICRO_OF_SECOND}\n * * {@link ChronoField.MICRO_OF_DAY}\n * * {@link ChronoField.MILLI_OF_SECOND}\n * * {@link ChronoField.MILLI_OF_DAY}\n * * {@link ChronoField.SECOND_OF_MINUTE}\n * * {@link ChronoField.SECOND_OF_DAY}\n * * {@link ChronoField.MINUTE_OF_HOUR}\n * * {@link ChronoField.MINUTE_OF_DAY}\n * * {@link ChronoField.HOUR_OF_AMPM}\n * * {@link ChronoField.CLOCK_HOUR_OF_AMPM}\n * * {@link ChronoField.HOUR_OF_DAY}\n * * {@link ChronoField.CLOCK_HOUR_OF_DAY}\n * * {@link ChronoField.AMPM_OF_DAY}\n *\n * All other {@link ChronoField} instances will return false.\n *\n * If the field is not a {@link ChronoField}, then the result of this method\n * is obtained by invoking {@link TemporalField.isSupportedBy}\n * passing this as the argument.\n * Whether the field is supported is determined by the field.\n *\n * @param {ChronoField|ChronoUnit} fieldOrUnit - the field to check, null returns false\n * @return {boolean} true if the field is supported on this time, false if not\n */\n isSupported(fieldOrUnit) {\n if (fieldOrUnit instanceof ChronoField) {\n return fieldOrUnit.isTimeBased();\n } else if (fieldOrUnit instanceof ChronoUnit) {\n return fieldOrUnit.isTimeBased();\n }\n return fieldOrUnit != null && fieldOrUnit.isSupportedBy(this);\n }\n\n /**\n * Gets the range of valid values for the specified field.\n *\n * The range object expresses the minimum and maximum valid values for a field.\n * This time is used to enhance the accuracy of the returned range.\n * If it is not possible to return the range, because the field is not supported\n * or for some other reason, an exception is thrown.\n *\n * If the field is a {@link ChronoField} then the query is implemented here.\n * The supported fields (see {@link isSupported}) will return\n * appropriate range instances.\n * All other {@link ChronoField} instances will throw a {@link DateTimeException}.\n *\n * If the field is not a {@link ChronoField}, then the result of this method\n * is obtained by invoking {@link TemporalField.rangeRefinedBy}\n * passing this as the argument.\n * Whether the range can be obtained is determined by the field.\n *\n * @param {ChronoField} field - the field to query the range for, not null\n * @return {ValueRange} the range of valid values for the field, not null\n * @throws {DateTimeException} if the range for the field cannot be obtained\n */\n range(field) {\n requireNonNull(field);\n return super.range(field);\n }\n\n /**\n * Gets the value of the specified field from this time as an `int`.\n *\n * This queries this time for the value for the specified field.\n * The returned value will always be within the valid range of values for the field.\n * If it is not possible to return the value, because the field is not supported\n * or for some other reason, an exception is thrown.\n *\n * If the field is a {@link ChronoField} then the query is implemented here.\n * The supported fields (see {@link isSupported}) will return valid\n * values based on this time, except {@link ChronoField.NANO_OF_DAY} and {@link ChronoField.MICRO_OF_DAY}\n * which are too large to fit in an `int` and throw a {@link DateTimeException}.\n * All other {@link ChronoField} instances will throw a {@link DateTimeException}.\n *\n * If the field is not a {@link ChronoField}, then the result of this method\n * is obtained by invoking {@link TemporalField.getFrom}\n * passing this as the argument. Whether the value can be obtained,\n * and what the value represents, is determined by the field.\n *\n * @param {ChronoField} field - the field to get, not null\n * @return {number} the value for the field\n * @throws {DateTimeException} if a value for the field cannot be obtained\n * @throws {ArithmeticException} if numeric overflow occurs\n */\n get(field) {\n return this.getLong(field);\n }\n\n /**\n * Gets the value of the specified field from this time as a `long`.\n *\n * This queries this time for the value for the specified field.\n * If it is not possible to return the value, because the field is not supported\n * or for some other reason, an exception is thrown.\n *\n * If the field is a {@link ChronoField} then the query is implemented here.\n * The supported fields (see {@link isSupported}) will return valid\n * values based on this time.\n * All other {@link ChronoField} instances will throw a {@link DateTimeException}.\n *\n * If the field is not a {@link ChronoField}, then the result of this method\n * is obtained by invoking {@link TemporalField.from}\n * passing this as the argument. Whether the value can be obtained,\n * and what the value represents, is determined by the field.\n *\n * @param {ChronoField} field - the field to get, not null\n * @return {number} the value for the field\n * @throws {DateTimeException} if a value for the field cannot be obtained\n * @throws {ArithmeticException} if numeric overflow occurs\n */\n getLong(field) {\n requireNonNull(field, 'field');\n if (field instanceof ChronoField) {\n return this._get0(field);\n }\n return field.getFrom(this);\n }\n\n /**\n *\n * @param {ChronoField} field\n * @returns {number}\n * @private\n */\n _get0(field) {\n switch (field) {\n case ChronoField.NANO_OF_SECOND: return this._nano;\n case ChronoField.NANO_OF_DAY: return this.toNanoOfDay();\n case ChronoField.MICRO_OF_SECOND: return MathUtil.intDiv(this._nano, 1000);\n case ChronoField.MICRO_OF_DAY: return MathUtil.intDiv(this.toNanoOfDay(), 1000);\n case ChronoField.MILLI_OF_SECOND: return MathUtil.intDiv(this._nano, 1000000);\n case ChronoField.MILLI_OF_DAY: return MathUtil.intDiv(this.toNanoOfDay(), 1000000);\n case ChronoField.SECOND_OF_MINUTE: return this._second;\n case ChronoField.SECOND_OF_DAY: return this.toSecondOfDay();\n case ChronoField.MINUTE_OF_HOUR: return this._minute;\n case ChronoField.MINUTE_OF_DAY: return this._hour * 60 + this._minute;\n case ChronoField.HOUR_OF_AMPM: return MathUtil.intMod(this._hour, 12);\n case ChronoField.CLOCK_HOUR_OF_AMPM: {\n const ham = MathUtil.intMod(this._hour, 12);\n return (ham % 12 === 0 ? 12 : ham);\n }\n case ChronoField.HOUR_OF_DAY: return this._hour;\n case ChronoField.CLOCK_HOUR_OF_DAY: return (this._hour === 0 ? 24 : this._hour);\n case ChronoField.AMPM_OF_DAY: return MathUtil.intDiv(this._hour, 12);\n }\n throw new UnsupportedTemporalTypeException(`Unsupported field: ${field}`);\n }\n\n //-----------------------------------------------------------------------\n /**\n * Gets the hour-of-day field.\n *\n * @return {number} the hour-of-day, from 0 to 23\n */\n hour() {\n return this._hour;\n }\n\n /**\n * Gets the minute-of-hour field.\n *\n * @return {number} the minute-of-hour, from 0 to 59\n */\n minute() {\n return this._minute;\n }\n\n /**\n * Gets the second-of-minute field.\n *\n * @return {number} the second-of-minute, from 0 to 59\n */\n second() {\n return this._second;\n }\n\n /**\n * Gets the nano-of-second field.\n *\n * @return {number} the nano-of-second, from 0 to 999,999,999\n */\n nano() {\n return this._nano;\n }\n\n /**\n * Returns an adjusted copy of this time.\n *\n * This returns a new {@link LocalTime}, based on this one, with the time adjusted.\n * The adjustment takes place using the specified adjuster strategy object.\n * Read the documentation of the adjuster to understand what adjustment will be made.\n *\n * A simple adjuster might simply set the one of the fields, such as the hour field.\n * A more complex adjuster might set the time to the last hour of the day.\n *\n * The result of this method is obtained by invoking the\n * {@link TemporalAdjuster.adjustInto} method on the\n * specified adjuster passing this as the argument.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {TemporalAdjuster} adjuster - the adjuster to use, not null\n * @return {LocalTime} a {@link LocalTime} based on this with the adjustment made, not null\n * @throws {DateTimeException} if the adjustment cannot be made\n * @throws {ArithmeticException} if numeric overflow occurs\n */\n _withAdjuster(adjuster) {\n requireNonNull(adjuster, 'adjuster');\n // optimizations\n if (adjuster instanceof LocalTime) {\n return adjuster;\n }\n return super._withAdjuster(adjuster);\n }\n\n /**\n * Returns a copy of this time with the specified field set to a new value.\n *\n * This returns a new {@link LocalTime}, based on this one, with the value\n * for the specified field changed.\n * This can be used to change any supported field, such as the hour, minute or second.\n * If it is not possible to set the value, because the field is not supported or for\n * some other reason, an exception is thrown.\n *\n * If the field is a {@link ChronoField} then the adjustment is implemented here.\n * The supported fields behave as follows:\n *\n * * {@link ChronoField.NANO_OF_SECOND} -\n * Returns a {@link LocalTime} with the specified nano-of-second.\n * The hour, minute and second will be unchanged.\n * * {@link ChronoField.NANO_OF_DAY} -\n * Returns a {@link LocalTime} with the specified nano-of-day.\n * This completely replaces the time and is equivalent to {@link ofNanoOfDay}.\n * * {@link ChronoField.MICRO_OF_SECOND} -\n * Returns a {@link LocalTime} with the nano-of-second replaced by the specified\n * micro-of-second multiplied by 1,000.\n * The hour, minute and second will be unchanged.\n * * {@link ChronoField.MICRO_OF_DAY} -\n * Returns a {@link LocalTime} with the specified micro-of-day.\n * This completely replaces the time and is equivalent to using {@link ofNanoOfDay}\n * with the micro-of-day multiplied by 1,000.\n * * {@link ChronoField.MILLI_OF_SECOND} -\n * Returns a {@link LocalTime} with the nano-of-second replaced by the specified\n * milli-of-second multiplied by 1,000,000.\n * The hour, minute and second will be unchanged.\n * * {@link ChronoField.MILLI_OF_DAY} -\n * Returns a {@link LocalTime} with the specified milli-of-day.\n * This completely replaces the time and is equivalent to using {@link ofNanoOfDay}\n * with the milli-of-day multiplied by 1,000,000.\n * * {@link ChronoField.SECOND_OF_MINUTE} -\n * Returns a {@link LocalTime} with the specified second-of-minute.\n * The hour, minute and nano-of-second will be unchanged.\n * * {@link ChronoField.SECOND_OF_DAY} -\n * Returns a {@link LocalTime} with the specified second-of-day.\n * The nano-of-second will be unchanged.\n * * {@link ChronoField.MINUTE_OF_HOUR} -\n * Returns a {@link LocalTime} with the specified minute-of-hour.\n * The hour, second-of-minute and nano-of-second will be unchanged.\n * * {@link ChronoField.MINUTE_OF_DAY} -\n * Returns a {@link LocalTime} with the specified minute-of-day.\n * The second-of-minute and nano-of-second will be unchanged.\n * * {@link ChronoField.HOUR_OF_AMPM} -\n * Returns a {@link LocalTime} with the specified hour-of-am-pm.\n * The AM/PM, minute-of-hour, second-of-minute and nano-of-second will be unchanged.\n * * {@link ChronoField.CLOCK_HOUR_OF_AMPM} -\n * Returns a {@link LocalTime} with the specified clock-hour-of-am-pm.\n * The AM/PM, minute-of-hour, second-of-minute and nano-of-second will be unchanged.\n * * {@link ChronoField.HOUR_OF_DAY} -\n * Returns a {@link LocalTime} with the specified hour-of-day.\n * The minute-of-hour, second-of-minute and nano-of-second will be unchanged.\n * * {@link ChronoField.CLOCK_HOUR_OF_DAY} -\n * Returns a {@link LocalTime} with the specified clock-hour-of-day.\n * The minute-of-hour, second-of-minute and nano-of-second will be unchanged.\n * * {@link ChronoField.AMPM_OF_DAY} -\n * Returns a {@link LocalTime} with the specified AM/PM.\n * The hour-of-am-pm, minute-of-hour, second-of-minute and nano-of-second will be unchanged.\n *\n * In all cases, if the new value is outside the valid range of values for the field\n * then a {@link DateTimeException} will be thrown.\n *\n * All other {@link ChronoField} instances will throw a {@link DateTimeException}.\n *\n * If the field is not a {@link ChronoField}, then the result of this method\n * is obtained by invoking {@link TemporalField.adjustInto}\n * passing this as the argument. In this case, the field determines\n * whether and how to adjust the instant.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {!TemporalField} field - the field to set in the result, not null\n * @param {number} newValue - the new value of the field in the result\n * @return {LocalTime} a {@link LocalTime} based on this with the specified field set, not null\n * @throws {DateTimeException} if the field cannot be set\n * @throws {ArithmeticException} if numeric overflow occurs\n */\n _withField(field, newValue) {\n requireNonNull(field, 'field');\n requireInstance(field, TemporalField, 'field');\n if (field instanceof ChronoField) {\n field.checkValidValue(newValue);\n switch (field) {\n case ChronoField.NANO_OF_SECOND: return this.withNano(newValue);\n case ChronoField.NANO_OF_DAY: return LocalTime.ofNanoOfDay(newValue);\n case ChronoField.MICRO_OF_SECOND: return this.withNano(newValue * 1000);\n case ChronoField.MICRO_OF_DAY: return LocalTime.ofNanoOfDay(newValue * 1000);\n case ChronoField.MILLI_OF_SECOND: return this.withNano( newValue * 1000000);\n case ChronoField.MILLI_OF_DAY: return LocalTime.ofNanoOfDay(newValue * 1000000);\n case ChronoField.SECOND_OF_MINUTE: return this.withSecond(newValue);\n case ChronoField.SECOND_OF_DAY: return this.plusSeconds(newValue - this.toSecondOfDay());\n case ChronoField.MINUTE_OF_HOUR: return this.withMinute(newValue);\n case ChronoField.MINUTE_OF_DAY: return this.plusMinutes(newValue - (this._hour * 60 + this._minute));\n case ChronoField.HOUR_OF_AMPM: return this.plusHours(newValue - MathUtil.intMod(this._hour, 12));\n case ChronoField.CLOCK_HOUR_OF_AMPM: return this.plusHours((newValue === 12 ? 0 : newValue) - MathUtil.intMod(this._hour, 12));\n case ChronoField.HOUR_OF_DAY: return this.withHour(newValue);\n case ChronoField.CLOCK_HOUR_OF_DAY: return this.withHour((newValue === 24 ? 0 : newValue));\n case ChronoField.AMPM_OF_DAY: return this.plusHours((newValue - MathUtil.intDiv(this._hour, 12)) * 12);\n }\n throw new UnsupportedTemporalTypeException(`Unsupported field: ${field}`);\n }\n return field.adjustInto(this, newValue);\n }\n\n //-----------------------------------------------------------------------\n /**\n * Returns a copy of this {@link LocalTime} with the hour-of-day value altered.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {number} [hour=0] - the hour-of-day to set in the result, from 0 to 23\n * @return {LocalTime} a {@link LocalTime} based on this time with the requested hour, not null\n * @throws {DateTimeException} if the hour value is invalid\n */\n withHour(hour=0) {\n if (this._hour === hour) {\n return this;\n }\n return new LocalTime(hour, this._minute, this._second, this._nano);\n }\n\n /**\n * Returns a copy of this {@link LocalTime} with the minute-of-hour value altered.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {number} [minute=0] - the minute-of-hour to set in the result, from 0 to 59\n * @return {LocalTime} a {@link LocalTime} based on this time with the requested minute, not null\n * @throws {DateTimeException} if the minute value is invalid\n */\n withMinute(minute=0) {\n if (this._minute === minute) {\n return this;\n }\n return new LocalTime(this._hour, minute, this._second, this._nano);\n }\n\n /**\n * Returns a copy of this {@link LocalTime} with the second-of-minute value altered.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {number} [second=0] - the second-of-minute to set in the result, from 0 to 59\n * @return {LocalTime} a {@link LocalTime} based on this time with the requested second, not null\n * @throws {DateTimeException} if the second value is invalid\n */\n withSecond(second=0) {\n if (this._second === second) {\n return this;\n }\n return new LocalTime(this._hour, this._minute, second, this._nano);\n }\n\n /**\n * Returns a copy of this {@link LocalTime} with the nano-of-second value altered.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {number} [nanoOfSecond=0] - the nano-of-second to set in the result, from 0 to 999,999,999\n * @return {LocalTime} a {@link LocalTime} based on this time with the requested nanosecond, not null\n * @throws {DateTimeException} if the nanos value is invalid\n */\n withNano(nanoOfSecond=0) {\n if (this._nano === nanoOfSecond) {\n return this;\n }\n return new LocalTime(this._hour, this._minute, this._second, nanoOfSecond);\n }\n\n //-----------------------------------------------------------------------\n /**\n * Returns a copy of this {@link LocalTime} with the time truncated.\n *\n * Truncating the time returns a copy of the original time with fields\n * smaller than the specified unit set to zero.\n * For example, truncating with the {@link ChronoUnit.MINUTES} minutes unit\n * will set the second-of-minute and nano-of-second field to zero.\n *\n * The unit must have a duration (see {@link TemporalUnit#getDuration})\n * that divides into the length of a standard day without remainder.\n * This includes all supplied time units on {@link ChronoUnit} and\n * {@link ChronoUnit.DAYS}. Other units throw an exception.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {!ChronoUnit} unit - the unit to truncate to, not null\n * @return {LocalTime} a {@link LocalTime} based on this time with the time truncated, not null\n * @throws {DateTimeException} if unable to truncate\n */\n truncatedTo(unit) {\n requireNonNull(unit, 'unit');\n if (unit === ChronoUnit.NANOS) {\n return this;\n }\n const unitDur = unit.duration();\n if (unitDur.seconds() > LocalTime.SECONDS_PER_DAY) {\n throw new DateTimeException('Unit is too large to be used for truncation');\n }\n const dur = unitDur.toNanos();\n if (MathUtil.intMod(LocalTime.NANOS_PER_DAY, dur) !== 0) {\n throw new DateTimeException('Unit must divide into a standard day without remainder');\n }\n const nod = this.toNanoOfDay();\n return LocalTime.ofNanoOfDay(MathUtil.intDiv(nod, dur) * dur);\n }\n\n //-----------------------------------------------------------------------\n\n /**\n * Returns a copy of this time with the specified period added.\n *\n * This method returns a new time based on this time with the specified period added.\n * This can be used to add any period that is defined by a unit, for example to add hours, minutes or seconds.\n * The unit is responsible for the details of the calculation, including the resolution\n * of any edge cases in the calculation.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {number} amountToAdd - the amount of the unit to add to the result, may be negative\n * @param {TemporalUnit} unit - the unit of the period to add, not null\n * @return {LocalTime} a {@link LocalTime} based on this time with the specified period added, not null\n * @throws {DateTimeException} if the unit cannot be added to this type\n */\n _plusUnit(amountToAdd, unit) {\n requireNonNull(unit, 'unit');\n if (unit instanceof ChronoUnit) {\n switch (unit) {\n case ChronoUnit.NANOS: return this.plusNanos(amountToAdd);\n case ChronoUnit.MICROS: return this.plusNanos(MathUtil.intMod(amountToAdd, LocalTime.MICROS_PER_DAY) * 1000);\n case ChronoUnit.MILLIS: return this.plusNanos(MathUtil.intMod(amountToAdd, LocalTime.MILLIS_PER_DAY) * 1000000);\n case ChronoUnit.SECONDS: return this.plusSeconds(amountToAdd);\n case ChronoUnit.MINUTES: return this.plusMinutes(amountToAdd);\n case ChronoUnit.HOURS: return this.plusHours(amountToAdd);\n case ChronoUnit.HALF_DAYS: return this.plusHours(MathUtil.intMod(amountToAdd, 2) * 12);\n }\n throw new UnsupportedTemporalTypeException(`Unsupported unit: ${unit}`);\n }\n return unit.addTo(this, amountToAdd);\n }\n\n //-----------------------------------------------------------------------\n /**\n * Returns a copy of this {@link LocalTime} with the specified period in hours added.\n *\n * This adds the specified number of hours to this time, returning a new time.\n * The calculation wraps around midnight.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {number} hoursToAdd - the hours to add, may be negative\n * @return {LocalTime} a {@link LocalTime} based on this time with the hours added, not null\n */\n plusHours(hoursToAdd) {\n if (hoursToAdd === 0) {\n return this;\n }\n\n const newHour = MathUtil.intMod(MathUtil.intMod(hoursToAdd, LocalTime.HOURS_PER_DAY) + this._hour + LocalTime.HOURS_PER_DAY, LocalTime.HOURS_PER_DAY);\n return new LocalTime(newHour, this._minute, this._second, this._nano);\n }\n\n /**\n * Returns a copy of this {@link LocalTime} with the specified period in minutes added.\n *\n * This adds the specified number of minutes to this time, returning a new time.\n * The calculation wraps around midnight.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {number} minutesToAdd - the minutes to add, may be negative\n * @return {LocalTime} a {@link LocalTime} based on this time with the minutes added, not null\n */\n plusMinutes(minutesToAdd) {\n if (minutesToAdd === 0) {\n return this;\n }\n const mofd = this._hour * LocalTime.MINUTES_PER_HOUR + this._minute;\n const newMofd = MathUtil.intMod(MathUtil.intMod(minutesToAdd, LocalTime.MINUTES_PER_DAY) + mofd + LocalTime.MINUTES_PER_DAY, LocalTime.MINUTES_PER_DAY);\n if (mofd === newMofd) {\n return this;\n }\n const newHour = MathUtil.intDiv(newMofd, LocalTime.MINUTES_PER_HOUR);\n const newMinute = MathUtil.intMod(newMofd, LocalTime.MINUTES_PER_HOUR);\n return new LocalTime(newHour, newMinute, this._second, this._nano);\n }\n\n /**\n * Returns a copy of this {@link LocalTime} with the specified period in seconds added.\n *\n * This adds the specified number of seconds to this time, returning a new time.\n * The calculation wraps around midnight.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {number} secondsToAdd - the seconds to add, may be negative\n * @return {LocalTime} a {@link LocalTime} based on this time with the seconds added, not null\n */\n plusSeconds(secondsToAdd) {\n if (secondsToAdd === 0) {\n return this;\n }\n const sofd = this._hour * LocalTime.SECONDS_PER_HOUR +\n this._minute * LocalTime.SECONDS_PER_MINUTE + this._second;\n const newSofd = MathUtil.intMod((MathUtil.intMod(secondsToAdd, LocalTime.SECONDS_PER_DAY) + sofd + LocalTime.SECONDS_PER_DAY), LocalTime.SECONDS_PER_DAY);\n if (sofd === newSofd) {\n return this;\n }\n const newHour = MathUtil.intDiv(newSofd, LocalTime.SECONDS_PER_HOUR);\n const newMinute = MathUtil.intMod(MathUtil.intDiv(newSofd, LocalTime.SECONDS_PER_MINUTE), LocalTime.MINUTES_PER_HOUR);\n const newSecond = MathUtil.intMod(newSofd, LocalTime.SECONDS_PER_MINUTE);\n return new LocalTime(newHour, newMinute, newSecond, this._nano);\n }\n\n /**\n * Returns a copy of this {@link LocalTime} with the specified period in nanoseconds added.\n *\n * This adds the specified number of nanoseconds to this time, returning a new time.\n * The calculation wraps around midnight.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {number} nanosToAdd - the nanos to add, may be negative\n * @return {LocalTime} a {@link LocalTime} based on this time with the nanoseconds added, not null\n */\n plusNanos(nanosToAdd) {\n if (nanosToAdd === 0) {\n return this;\n }\n const nofd = this.toNanoOfDay();\n const newNofd = MathUtil.intMod((MathUtil.intMod(nanosToAdd, LocalTime.NANOS_PER_DAY) + nofd + LocalTime.NANOS_PER_DAY), LocalTime.NANOS_PER_DAY);\n if (nofd === newNofd) {\n return this;\n }\n const newHour = MathUtil.intDiv(newNofd, LocalTime.NANOS_PER_HOUR);\n const newMinute = MathUtil.intMod(MathUtil.intDiv(newNofd, LocalTime.NANOS_PER_MINUTE), LocalTime.MINUTES_PER_HOUR);\n const newSecond = MathUtil.intMod(MathUtil.intDiv(newNofd, LocalTime.NANOS_PER_SECOND), LocalTime.SECONDS_PER_MINUTE);\n const newNano = MathUtil.intMod(newNofd, LocalTime.NANOS_PER_SECOND);\n return new LocalTime(newHour, newMinute, newSecond, newNano);\n }\n\n //-----------------------------------------------------------------------\n\n /**\n * Returns a copy of this time with the specified period subtracted.\n *\n * This method returns a new time based on this time with the specified period subtracted.\n * This can be used to subtract any period that is defined by a unit, for example to subtract hours, minutes or seconds.\n * The unit is responsible for the details of the calculation, including the resolution\n * of any edge cases in the calculation.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {number} amountToSubtract - the amount of the unit to subtract from the result, may be negative\n * @param {ChronoUnit} unit - the unit of the period to subtract, not null\n * @return {LocalTime} a {@link LocalTime} based on this time with the specified period subtracted, not null\n * @throws {DateTimeException} if the unit cannot be added to this type\n */\n _minusUnit(amountToSubtract, unit) {\n requireNonNull(unit, 'unit');\n return this._plusUnit(-1 * amountToSubtract, unit);\n }\n\n //-----------------------------------------------------------------------\n /**\n * Returns a copy of this {@link LocalTime} with the specified period in hours subtracted.\n *\n * This subtracts the specified number of hours from this time, returning a new time.\n * The calculation wraps around midnight.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {number} hoursToSubtract - the hours to subtract, may be negative\n * @return {LocalTime} a {@link LocalTime} based on this time with the hours subtracted, not null\n */\n minusHours(hoursToSubtract) {\n return this.plusHours(-1 * MathUtil.intMod(hoursToSubtract, LocalTime.HOURS_PER_DAY));\n }\n\n /**\n * Returns a copy of this {@link LocalTime} with the specified period in minutes subtracted.\n *\n * This subtracts the specified number of minutes from this time, returning a new time.\n * The calculation wraps around midnight.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {number} minutesToSubtract - the minutes to subtract, may be negative\n * @return {LocalTime} a {@link LocalTime} based on this time with the minutes subtracted, not null\n */\n minusMinutes(minutesToSubtract) {\n return this.plusMinutes(-1 * MathUtil.intMod(minutesToSubtract, LocalTime.MINUTES_PER_DAY));\n }\n\n /**\n * Returns a copy of this {@link LocalTime} with the specified period in seconds subtracted.\n *\n * This subtracts the specified number of seconds from this time, returning a new time.\n * The calculation wraps around midnight.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {number} secondsToSubtract - the seconds to subtract, may be negative\n * @return {LocalTime} a {@link LocalTime} based on this time with the seconds subtracted, not null\n */\n minusSeconds(secondsToSubtract) {\n return this.plusSeconds(-1 * MathUtil.intMod(secondsToSubtract, LocalTime.SECONDS_PER_DAY));\n }\n\n /**\n * Returns a copy of this {@link LocalTime} with the specified period in nanoseconds subtracted.\n *\n * This subtracts the specified number of nanoseconds from this time, returning a new time.\n * The calculation wraps around midnight.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {number} nanosToSubtract - the nanos to subtract, may be negative\n * @return {LocalTime} a {@link LocalTime} based on this time with the nanoseconds subtracted, not null\n */\n minusNanos(nanosToSubtract) {\n return this.plusNanos(-1 * MathUtil.intMod(nanosToSubtract, LocalTime.NANOS_PER_DAY));\n }\n\n //-----------------------------------------------------------------------\n /**\n * Queries this time using the specified query.\n *\n * This queries this time using the specified query strategy object.\n * The {@link TemporalQuery} object defines the logic to be used to\n * obtain the result. Read the documentation of the query to understand\n * what the result of this method will be.\n *\n * The result of this method is obtained by invoking the\n * {@link TemporalQuery#queryFrom} method on the\n * specified query passing this as the argument.\n *\n * @param {TemporalQuery} query - the query to invoke, not null\n * @return {*} the query result, null may be returned (defined by the query)\n * @throws {DateTimeException} if unable to query (defined by the query)\n * @throws {ArithmeticException} if numeric overflow occurs (defined by the query)\n */\n query(query) {\n requireNonNull(query, 'query');\n if (query === TemporalQueries.precision()) {\n return ChronoUnit.NANOS;\n } else if (query === TemporalQueries.localTime()) {\n return this;\n }\n // inline TemporalAccessor.super.query(query) as an optimization\n if (query === TemporalQueries.chronology() || query === TemporalQueries.zoneId() ||\n query === TemporalQueries.zone() || query === TemporalQueries.offset() ||\n query === TemporalQueries.localDate()) {\n return null;\n }\n return query.queryFrom(this);\n }\n\n /**\n * Adjusts the specified temporal object to have the same time as this object.\n *\n * This returns a temporal object of the same observable type as the input\n * with the time changed to be the same as this.\n *\n * The adjustment is equivalent to using {@link Temporal.with}\n * passing {@link ChronoField.NANO_OF_DAY} as the field.\n *\n * In most cases, it is clearer to reverse the calling pattern by using\n * {@link Temporal.with}:\n *
\n     *   // these two lines are equivalent, but the second approach is recommended\n     *   temporal = thisLocalTime.adjustInto(temporal);\n     *   temporal = temporal.with(thisLocalTime);\n     * 
\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {TemporalAdjuster} temporal - the target object to be adjusted, not null\n * @return {Temporal} the adjusted object, not null\n * @throws {DateTimeException} if unable to make the adjustment\n * @throws {ArithmeticException} if numeric overflow occurs\n */\n adjustInto(temporal) {\n return temporal.with(LocalTime.NANO_OF_DAY, this.toNanoOfDay());\n }\n\n /**\n * Calculates the period between this time and another time in\n * terms of the specified unit.\n *\n * This calculates the period between two times in terms of a single unit.\n * The start and end points are this and the specified time.\n * The result will be negative if the end is before the start.\n * The {@link Temporal} passed to this method must be a {@link LocalTime}.\n * For example, the period in hours between two times can be calculated\n * using {@link startTime.until}.\n *\n * The calculation returns a whole number, representing the number of\n * complete units between the two times.\n * For example, the period in hours between 11:30 and 13:29 will only\n * be one hour as it is one minute short of two hours.\n *\n * This method operates in association with {@link TemporalUnit.between}.\n * The result of this method is a `long` representing the amount of\n * the specified unit. By contrast, the result of {@link between} is an\n * object that can be used directly in addition/subtraction:\n *
\n     *   long period = start.until(end, HOURS);   // this method\n     *   dateTime.plus(HOURS.between(start, end));      // use in plus/minus\n     * 
\n *\n * The calculation is implemented in this method for {@link ChronoUnit}.\n * The units {@link ChronoUnit.NANOS}, {@link ChronoUnit.MICROS}, {@link ChronoUnit.MILLIS}, {@link ChronoUnit.SECONDS},\n * {@link ChronoUnit.MINUTES}, {@link ChronoUnit.HOURS} and {@link ChronoUnit.HALF_DAYS} are supported.\n * Other {@link ChronoUnit} values will throw an exception.\n *\n * If the unit is not a {@link ChronoUnit}, then the result of this method\n * is obtained by invoking {@link TemporalUnit.between}\n * passing this as the first argument and the input temporal as\n * the second argument.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {TemporalAccessor} endExclusive - the end time, which is converted to a {@link LocalTime}, not null\n * @param {TemporalUnit} unit - the unit to measure the period in, not null\n * @return {number} the amount of the period between this time and the end time\n * @throws {DateTimeException} if the period cannot be calculated\n * @throws {ArithmeticException} if numeric overflow occurs\n */\n until(endExclusive, unit) {\n requireNonNull(endExclusive, 'endExclusive');\n requireNonNull(unit, 'unit');\n const end = LocalTime.from(endExclusive);\n if (unit instanceof ChronoUnit) {\n const nanosUntil = end.toNanoOfDay() - this.toNanoOfDay(); // no overflow\n switch (unit) {\n case ChronoUnit.NANOS: return nanosUntil;\n case ChronoUnit.MICROS: return MathUtil.intDiv(nanosUntil, 1000);\n case ChronoUnit.MILLIS: return MathUtil.intDiv(nanosUntil, 1000000);\n case ChronoUnit.SECONDS: return MathUtil.intDiv(nanosUntil, LocalTime.NANOS_PER_SECOND);\n case ChronoUnit.MINUTES: return MathUtil.intDiv(nanosUntil, LocalTime.NANOS_PER_MINUTE);\n case ChronoUnit.HOURS: return MathUtil.intDiv(nanosUntil, LocalTime.NANOS_PER_HOUR);\n case ChronoUnit.HALF_DAYS: return MathUtil.intDiv(nanosUntil, (12 * LocalTime.NANOS_PER_HOUR));\n }\n throw new UnsupportedTemporalTypeException(`Unsupported unit: ${unit}`);\n }\n return unit.between(this, end);\n }\n\n //-----------------------------------------------------------------------\n /**\n * Combines this time with a date to create a {@link LocalDateTime}.\n *\n * This returns a {@link LocalDateTime} formed from this time at the specified date.\n * All possible combinations of date and time are valid.\n *\n * @param {LocalDate} date - the date to combine with, not null\n * @return {LocalDateTime} the local date-time formed from this time and the specified date, not null\n */\n atDate(date) {\n return LocalDateTime.of(date, this);\n }\n\n /**\n * Combines this time with an offset to create an {@link OffsetTime}.\n *\n * This returns an {@link OffsetTime} formed from this time at the specified offset.\n * All possible combinations of time and offset are valid.\n *\n * @param {OffsetTime} offset - the offset to combine with, not null\n * @return {OffsetTime} the offset time formed from this time and the specified offset, not null\n */\n atOffset(offset) {\n return OffsetTime.of(this, offset);\n }\n\n //-----------------------------------------------------------------------\n /**\n * Extracts the time as seconds of day, from `0` to `24 * 60 * 60 - 1`.\n *\n * @return {number} the second-of-day equivalent to this time\n */\n toSecondOfDay() {\n let total = this._hour * LocalTime.SECONDS_PER_HOUR;\n total += this._minute * LocalTime.SECONDS_PER_MINUTE;\n total += this._second;\n return total;\n }\n\n /**\n * Extracts the time as nanos of day, from `0` to `24 * 60 * 60 * 1,000,000,000 - 1`.\n *\n * @return {number} the nano of day equivalent to this time\n */\n toNanoOfDay() {\n let total = this._hour * LocalTime.NANOS_PER_HOUR;\n total += this._minute * LocalTime.NANOS_PER_MINUTE;\n total += this._second * LocalTime.NANOS_PER_SECOND;\n total += this._nano;\n return total;\n }\n\n //-----------------------------------------------------------------------\n /**\n * Compares this {@link LocalTime} to another time.\n *\n * The comparison is based on the time-line position of the local times within a day.\n * It is 'consistent with equals', as defined by {@link Comparable}.\n *\n * @param {LocalTime} other - the other time to compare to, not null\n * @return {number} the comparator value, negative if less, positive if greater\n * @throws {NullPointerException} if `other` is null\n */\n compareTo(other) {\n requireNonNull(other, 'other');\n requireInstance(other, LocalTime, 'other');\n let cmp = MathUtil.compareNumbers(this._hour, other._hour);\n if (cmp === 0) {\n cmp = MathUtil.compareNumbers(this._minute, other._minute);\n if (cmp === 0) {\n cmp = MathUtil.compareNumbers(this._second, other._second);\n if (cmp === 0) {\n cmp = MathUtil.compareNumbers(this._nano, other._nano);\n }\n }\n }\n return cmp;\n }\n\n /**\n * Checks if this {@link LocalTime} is after the specified time.\n *\n * The comparison is based on the time-line position of the time within a day.\n *\n * @param {LocalTime} other - the other time to compare to, not null\n * @return {boolean} true if this is after the specified time\n * @throws {NullPointerException} if `other` is null\n */\n isAfter(other) {\n return this.compareTo(other) > 0;\n }\n\n /**\n * Checks if this {@link LocalTime} is before the specified time.\n *\n * The comparison is based on the time-line position of the time within a day.\n *\n * @param {LocalTime} other - the other time to compare to, not null\n * @return {boolean} true if this point is before the specified time\n * @throws {NullPointerException} if `other` is null\n */\n isBefore(other) {\n return this.compareTo(other) < 0;\n }\n\n //-----------------------------------------------------------------------\n /**\n * Checks if this time is equal to another time.\n *\n * The comparison is based on the time-line position of the time within a day.\n *\n * Only objects of type {@link LocalTime} are compared, other types return false.\n * To compare the date of two {@link TemporalAccessor} instances, use\n * {@link ChronoField#NANO_OF_DAY} as a comparator.\n *\n * @param {*} other - the object to check, null returns false\n * @return {boolean} true if this is equal to the other time\n */\n equals(other) {\n if (this === other) {\n return true;\n }\n if (other instanceof LocalTime) {\n return this._hour === other._hour && this._minute === other._minute &&\n this._second === other._second && this._nano === other._nano;\n }\n return false;\n }\n\n /**\n * A hash code for this time.\n *\n * @return {number} a suitable hash code\n */\n hashCode() {\n const nod = this.toNanoOfDay();\n return MathUtil.hash(nod);\n }\n\n //-----------------------------------------------------------------------\n /**\n * Outputs this time as a string, such as `10:15`.\n *\n * The output will be one of the following ISO-8601 formats:\n *\n * * {@link HH:mm}\n * * {@link HH:mm:ss}\n * * {@link HH:mm:ss.SSS}\n * * {@link HH:mm:ss.SSSSSS}\n * * {@link HH:mm:ss.SSSSSSSSS}\n *\n * The format used will be the shortest that outputs the full value of\n * the time where the omitted parts are implied to be zero.\n *\n * @return {string} a string representation of this time, not null\n */\n toString() {\n let buf = '';\n const hourValue = this._hour;\n const minuteValue = this._minute;\n const secondValue = this._second;\n const nanoValue = this._nano;\n buf += hourValue < 10 ? '0' : '';\n buf += hourValue;\n buf += minuteValue < 10 ? ':0' : ':';\n buf += minuteValue;\n if (secondValue > 0 || nanoValue > 0) {\n buf += secondValue < 10 ? ':0' : ':';\n buf += secondValue;\n if (nanoValue > 0) {\n buf += '.';\n if(MathUtil.intMod(nanoValue, 1000000) === 0) {\n buf += (`${MathUtil.intDiv(nanoValue, 1000000) + 1000}`).substring(1);\n } else if (MathUtil.intMod(nanoValue, 1000) === 0) {\n buf += (`${MathUtil.intDiv(nanoValue, 1000) + 1000000}`).substring(1);\n } else {\n buf += (`${nanoValue + 1000000000}`).substring(1);\n }\n }\n }\n return buf;\n }\n\n /**\n *\n * @return {string} same as {@link LocalTime.toString}\n */\n toJSON() {\n return this.toString();\n }\n\n /**\n * Outputs this time as a string using the formatter.\n *\n * @param {DateTimeFormatter} formatter - the formatter to use, not null\n * @return {string} the formatted time string, not null\n * @throws {DateTimeException} if an error occurs during printing\n */\n format(formatter) {\n requireNonNull(formatter, 'formatter');\n return formatter.format(this);\n }\n}\n\nexport function _init() {\n /**\n * Constants for the local time of each hour.\n */\n LocalTime.HOURS = [];\n for (let hour = 0; hour < 24; hour++) {\n LocalTime.of(hour, 0, 0, 0);\n }\n\n /**\n * The minimum supported {@link LocalTime}, '00:00'.\n * This is the time of midnight at the start of the day.\n */\n LocalTime.MIN = LocalTime.HOURS[0];\n /**\n * The maximum supported {@link LocalTime}, '23:59:59.999999999'.\n * This is the time just before midnight at the end of the day.\n */\n LocalTime.MAX = new LocalTime(23, 59, 59, 999999999);\n /**\n * The time of midnight at the start of the day, '00:00'.\n */\n LocalTime.MIDNIGHT = LocalTime.HOURS[0];\n /**\n * The time of noon in the middle of the day, '12:00'.\n */\n LocalTime.NOON = LocalTime.HOURS[12];\n\n LocalTime.FROM = createTemporalQuery('LocalTime.FROM', (temporal) => {\n return LocalTime.from(temporal);\n });\n}\n\n/**\n * Hours per day.\n */\nLocalTime.HOURS_PER_DAY = 24;\n/**\n * Minutes per hour.\n */\nLocalTime.MINUTES_PER_HOUR = 60;\n/**\n * Minutes per day.\n */\nLocalTime.MINUTES_PER_DAY = LocalTime.MINUTES_PER_HOUR * LocalTime.HOURS_PER_DAY;\n/**\n * Seconds per minute.\n */\nLocalTime.SECONDS_PER_MINUTE = 60;\n/**\n * Seconds per hour.\n */\nLocalTime.SECONDS_PER_HOUR = LocalTime.SECONDS_PER_MINUTE * LocalTime.MINUTES_PER_HOUR;\n/**\n * Seconds per day.\n */\nLocalTime.SECONDS_PER_DAY = LocalTime.SECONDS_PER_HOUR * LocalTime.HOURS_PER_DAY;\n/**\n * Milliseconds per day.\n */\nLocalTime.MILLIS_PER_DAY = LocalTime.SECONDS_PER_DAY * 1000;\n/**\n * Microseconds per day.\n */\nLocalTime.MICROS_PER_DAY = LocalTime.SECONDS_PER_DAY * 1000000;\n/**\n * Nanos per second.\n */\nLocalTime.NANOS_PER_SECOND = 1000000000;\n/**\n * Nanos per minute.\n */\nLocalTime.NANOS_PER_MINUTE = LocalTime.NANOS_PER_SECOND * LocalTime.SECONDS_PER_MINUTE;\n/**\n * Nanos per hour.\n */\nLocalTime.NANOS_PER_HOUR = LocalTime.NANOS_PER_MINUTE * LocalTime.MINUTES_PER_HOUR;\n/**\n * Nanos per day.\n */\nLocalTime.NANOS_PER_DAY = LocalTime.NANOS_PER_HOUR * LocalTime.HOURS_PER_DAY;\n","/**\n * @copyright (c) 2016, Philipp Thürwächter & Pattrick Hüper\n * @copyright (c) 2007-present, Stephen Colebourne & Michael Nascimento Santos\n * @license BSD-3-Clause (see LICENSE in the root directory of this source tree)\n */\n\nimport { requireNonNull, requireInstance } from './assert';\nimport { DateTimeException, UnsupportedTemporalTypeException } from './errors';\n\nimport { Clock } from './Clock';\nimport { LocalTime } from './LocalTime';\nimport { ZonedDateTime } from './ZonedDateTime';\nimport { MathUtil } from './MathUtil';\nimport { OffsetDateTime } from './OffsetDateTime';\n\nimport { Temporal } from './temporal/Temporal';\nimport { ChronoField } from './temporal/ChronoField';\nimport { ChronoUnit } from './temporal/ChronoUnit';\nimport { TemporalQueries } from './temporal/TemporalQueries';\nimport { TemporalUnit } from './temporal/TemporalUnit';\nimport { createTemporalQuery } from './temporal/TemporalQuery';\nimport { DateTimeFormatter } from './format/DateTimeFormatter';\n\nconst NANOS_PER_MILLI = 1000000;\n\n/**\n * An instantaneous point on the time-line.\n *\n * This class models a single instantaneous point on the time-line.\n * This might be used to record event time-stamps in the application.\n *\n * Time-scale\n *\n * The length of the solar day is the standard way that humans measure time.\n * This has traditionally been subdivided into 24 hours of 60 minutes of 60 seconds,\n * forming a 86400 second day.\n *\n * Modern timekeeping is based on atomic clocks which precisely define an SI second\n * relative to the transitions of a Caesium atom. The length of an SI second was defined\n * to be very close to the 86400th fraction of a day.\n *\n * Unfortunately, as the Earth rotates the length of the day varies.\n * In addition, over time the average length of the day is getting longer as the Earth slows.\n * As a result, the length of a solar day in 2012 is slightly longer than 86400 SI seconds.\n * The actual length of any given day and the amount by which the Earth is slowing\n * are not predictable and can only be determined by measurement.\n * The UT1 time-scale captures the accurate length of day, but is only available some\n * time after the day has completed.\n *\n * The UTC time-scale is a standard approach to bundle up all the additional fractions\n * of a second from UT1 into whole seconds, known as *leap-seconds*.\n * A leap-second may be added or removed depending on the Earth's rotational changes.\n * As such, UTC permits a day to have 86399 SI seconds or 86401 SI seconds where\n * necessary in order to keep the day aligned with the Sun.\n *\n * The modern UTC time-scale was introduced in 1972, introducing the concept of whole leap-seconds.\n * Between 1958 and 1972, the definition of UTC was complex, with minor sub-second leaps and\n * alterations to the length of the notional second. As of 2012, discussions are underway\n * to change the definition of UTC again, with the potential to remove leap seconds or\n * introduce other changes.\n *\n * Given the complexity of accurate timekeeping described above, this Java API defines\n * its own time-scale, the *Java Time-Scale*.\n *\n * The Java Time-Scale divides each calendar day into exactly 86400\n * subdivisions, known as seconds. These seconds may differ from the\n * SI second. It closely matches the de facto international civil time\n * scale, the definition of which changes from time to time.\n *\n * The Java Time-Scale has slightly different definitions for different\n * segments of the time-line, each based on the consensus international\n * time scale that is used as the basis for civil time. Whenever the\n * internationally-agreed time scale is modified or replaced, a new\n * segment of the Java Time-Scale must be defined for it. Each segment\n * must meet these requirements:\n *\n * * the Java Time-Scale shall closely match the underlying international\n * civil time scale;\n * * the Java Time-Scale shall exactly match the international civil\n * time scale at noon each day;\n * * the Java Time-Scale shall have a precisely-defined relationship to\n * the international civil time scale.\n *\n * There are currently, as of 2013, two segments in the Java time-scale.\n *\n * For the segment from 1972-11-03 (exact boundary discussed below) until\n * further notice, the consensus international time scale is UTC (with\n * leap seconds). In this segment, the Java Time-Scale is identical to\n * [UTC-SLS](http://www.cl.cam.ac.uk/~mgk25/time/utc-sls/).\n * This is identical to UTC on days that do not have a leap second.\n * On days that do have a leap second, the leap second is spread equally\n * over the last 1000 seconds of the day, maintaining the appearance of\n * exactly 86400 seconds per day.\n *\n * For the segment prior to 1972-11-03, extending back arbitrarily far,\n * the consensus international time scale is defined to be UT1, applied\n * proleptically, which is equivalent to the (mean) solar time on the\n * prime meridian (Greenwich). In this segment, the Java Time-Scale is\n * identical to the consensus international time scale. The exact\n * boundary between the two segments is the instant where UT1 = UTC\n * between 1972-11-03T00:00 and 1972-11-04T12:00.\n *\n * Implementations of the Java time-scale using the JSR-310 API are not\n * required to provide any clock that is sub-second accurate, or that\n * progresses monotonically or smoothly. Implementations are therefore\n * not required to actually perform the UTC-SLS slew or to otherwise be\n * aware of leap seconds. JSR-310 does, however, require that\n * implementations must document the approach they use when defining a\n * clock representing the current instant.\n * See {@link Clock} for details on the available clocks.\n *\n * The Java time-scale is used for all date-time classes.\n * This includes {@link Instant}, {@link LocalDate}, {@link LocalTime}, {@link OffsetDateTime},\n * {@link ZonedDateTime} and {@link Duration}.\n *\n * ### Static properties of Class {@link Instant}\n *\n * Instant.EPOCH\n *\n * Instant.MIN\n *\n * Instant.MAX\n *\n * Instant.MIN_SECONDS\n *\n * Instant.MAX_SECONDS\n *\n */\nexport class Instant extends Temporal {\n\n /**\n * Obtains the current instant from the system clock, or if specified\n * the current instant from the specified clock.\n *\n * This will query the specified clock to obtain the current time.\n *\n * @param {Clock} [clock=Clock.systemUTC()] - the clock to use, defaults to the system clock\n * @return {Instant} the current instant, not null\n */\n static now(clock = Clock.systemUTC()){\n return clock.instant();\n }\n\n /**\n * Obtains an instance of {@link Instant} using seconds from the\n * epoch of 1970-01-01T00:00:00Z.\n *\n * @param {number} epochSecond - the number of seconds from 1970-01-01T00:00:00Z\n * @param {number} nanoAdjustment nanoseconds start from the start of epochSecond, if null the nanosecond field is set to zero.\n * @return {Instant} an instant, not null\n * @throws DateTimeException if the instant exceeds the maximum or minimum instant\n */\n static ofEpochSecond(epochSecond, nanoAdjustment=0){\n const secs = epochSecond + MathUtil.floorDiv(nanoAdjustment, LocalTime.NANOS_PER_SECOND);\n const nos = MathUtil.floorMod(nanoAdjustment, LocalTime.NANOS_PER_SECOND);\n return Instant._create(secs, nos);\n }\n\n /**\n * Obtains an instance of {@link Instant} using milliseconds from the\n * epoch of 1970-01-01T00:00:00Z.\n *\n * The seconds and nanoseconds are extracted from the specified milliseconds.\n *\n * @param {number} epochMilli - the number of milliseconds from 1970-01-01T00:00:00Z\n * @return {Instant} an instant, not null\n * @throws DateTimeException if the instant exceeds the maximum or minimum instant\n */\n static ofEpochMilli(epochMilli) {\n const secs = MathUtil.floorDiv(epochMilli, 1000);\n const mos = MathUtil.floorMod(epochMilli, 1000);\n return Instant._create(secs, mos * 1000000);\n }\n\n /**\n * Obtains an instance of {@link Instant} using microseconds from the\n * epoch of 1970-01-01T00:00:00Z.\n *\n * @param {number} epochMicro - the number of microseconds from 1970-01-01T00:00:00Z\n * @return {Instant} an instant, not null\n * @throws DateTimeException if the instant exceeds the maximum or minimum instant\n */\n static ofEpochMicro(epochMicro) {\n const secs = MathUtil.floorDiv(epochMicro, 1000000);\n const mos = MathUtil.floorMod(epochMicro, 1000000);\n return Instant._create(secs, mos * 1000);\n }\n\n /**\n * Obtains an instance of {@link Instant} from a temporal object.\n *\n * A {@link TemporalAccessor} represents some form of date and time information.\n * This factory converts the arbitrary temporal object to an instance of {@link Instant}.\n *\n * The conversion extracts the {@link ChronoField#INSTANT_SECONDS}\n * and {@link ChronoField#NANO_OF_SECOND} fields.\n *\n * This method matches the signature of the functional interface {@link TemporalQuery}\n * allowing it to be used as a query via method reference, {@link Instant::from}.\n *\n * @param {TemporalAccessor} temporal - the temporal object to convert, not null\n * @return {Instant} the instant, not null\n * @throws DateTimeException if unable to convert to an {@link Instant}\n */\n static from(temporal) {\n try {\n const instantSecs = temporal.getLong(ChronoField.INSTANT_SECONDS);\n const nanoOfSecond = temporal.get(ChronoField.NANO_OF_SECOND);\n return Instant.ofEpochSecond(instantSecs, nanoOfSecond);\n } catch (ex) {\n throw new DateTimeException(`Unable to obtain Instant from TemporalAccessor: ${ \n temporal}, type ${typeof temporal}`, ex);\n }\n }\n\n /**\n * Obtains an instance of {@link Instant} from a text string such as\n * `2007-12-03T10:15:30.000Z`.\n *\n * The string must represent a valid instant in UTC and is parsed using\n * {@link DateTimeFormatter#ISO_INSTANT}.\n *\n * @param {string} text - the text to parse, not null\n * @return {Instant} the parsed instant, not null\n * @throws DateTimeParseException if the text cannot be parsed\n */\n static parse(text) {\n return DateTimeFormatter.ISO_INSTANT.parse(text, Instant.FROM);\n }\n\n /**\n *\n * @param {number} seconds\n * @param {number} nanoOfSecond\n * @returns {Instant}\n * @private\n */\n static _create(seconds, nanoOfSecond){\n if(seconds === 0 && nanoOfSecond === 0){\n return Instant.EPOCH;\n }\n return new Instant(seconds, nanoOfSecond);\n }\n\n /**\n *\n * @param {number} seconds\n * @param {number} nanoOfSecond\n * @private\n */\n static _validate(seconds, nanoOfSecond){\n if (seconds < Instant.MIN_SECONDS || seconds > Instant.MAX_SECONDS) {\n throw new DateTimeException('Instant exceeds minimum or maximum instant');\n }\n if (nanoOfSecond < 0 || nanoOfSecond > LocalTime.NANOS_PER_SECOND) {\n throw new DateTimeException('Instant exceeds minimum or maximum instant');\n }\n }\n\n /**\n *\n * @param {number} seconds\n * @param {number} nanoOfSecond\n * @private\n */\n constructor(seconds, nanoOfSecond){\n super();\n Instant._validate(seconds, nanoOfSecond);\n this._seconds = MathUtil.safeToInt(seconds);\n this._nanos = MathUtil.safeToInt(nanoOfSecond);\n }\n\n /**\n * Checks if the specified field is supported.\n *\n * This checks if this instant can be queried for the specified field.\n * If false, then calling {@link range} and {@link get} will throw an exception.\n *\n * If the field is a {@link ChronoField} then the query is implemented here.\n * The supported fields are:\n *\n * * {@link NANO_OF_SECOND}\n * * {@link MICRO_OF_SECOND}\n * * {@link MILLI_OF_SECOND}\n * * {@link INSTANT_SECONDS}\n *\n * All other {@link ChronoField} instances will return false.\n *\n * If the field is not a {@link ChronoField}, then the result of this method\n * is obtained by invoking {@link TemporalField.isSupportedBy}\n * passing `this` as the argument.\n * Whether the field is supported is determined by the field.\n *\n * @param {TemporalField|TemporalUnit} fieldOrUnit - the field to check, null returns false\n * @return {boolean} true if the field is supported on this instant, false if not\n */\n isSupported(fieldOrUnit) {\n if (fieldOrUnit instanceof ChronoField) {\n return fieldOrUnit === ChronoField.INSTANT_SECONDS || fieldOrUnit === ChronoField.NANO_OF_SECOND || fieldOrUnit === ChronoField.MICRO_OF_SECOND || fieldOrUnit === ChronoField.MILLI_OF_SECOND;\n }\n if (fieldOrUnit instanceof ChronoUnit) {\n return fieldOrUnit.isTimeBased() || fieldOrUnit === ChronoUnit.DAYS;\n }\n return fieldOrUnit != null && fieldOrUnit.isSupportedBy(this);\n }\n\n /**\n * Gets the range of valid values for the specified field.\n *\n * The range object expresses the minimum and maximum valid values for a field.\n * This instant is used to enhance the accuracy of the returned range.\n * If it is not possible to return the range, because the field is not supported\n * or for some other reason, an exception is thrown.\n *\n * If the field is a {@link ChronoField} then the query is implemented here.\n * The supported fields (see {@link isSupported}) will return\n * appropriate range instances.\n * All other {@link ChronoField} instances will throw a {@link DateTimeException}.\n *\n * If the field is not a {@link ChronoField}, then the result of this method\n * is obtained by invoking {@link TemporalField.rangeRefinedBy}\n * passing `this` as the argument.\n * Whether the range can be obtained is determined by the field.\n *\n * @param {TemporalField} field - the field to query the range for, not null\n * @return {ValueRange} the range of valid values for the field, not null\n * @throws DateTimeException if the range for the field cannot be obtained\n */\n range(field) {\n return super.range(field);\n }\n\n /**\n * Gets the value of the specified field from this instant as an `int`.\n *\n * This queries this instant for the value for the specified field.\n * The returned value will always be within the valid range of values for the field.\n * If it is not possible to return the value, because the field is not supported\n * or for some other reason, an exception is thrown.\n *\n * If the field is a {@link ChronoField} then the query is implemented here.\n * The supported fields (see {@link isSupported}) will return valid\n * values based on this date-time, except {@link INSTANT_SECONDS} which is too\n * large to fit in an `int` and throws a {@link DateTimeException}.\n * All other {@link ChronoField} instances will throw a {@link DateTimeException}.\n *\n * If the field is not a {@link ChronoField}, then the result of this method\n * is obtained by invoking {@link TemporalField.getFrom}\n * passing `this` as the argument. Whether the value can be obtained,\n * and what the value represents, is determined by the field.\n *\n * @param {TemporalField} field - the field to get, not null\n * @return {number} the value for the field\n * @throws DateTimeException if a value for the field cannot be obtained\n * @throws ArithmeticException if numeric overflow occurs\n */\n get(field) {\n return this.getLong(field);\n }\n\n /**\n * Gets the value of the specified field from this instant as a `long`.\n *\n * This queries this instant for the value for the specified field.\n * If it is not possible to return the value, because the field is not supported\n * or for some other reason, an exception is thrown.\n *\n * If the field is a {@link ChronoField} then the query is implemented here.\n * The supported fields (see {@link isSupported}) will return valid\n * values based on this date-time.\n * All other {@link ChronoField} instances will throw a {@link DateTimeException}.\n *\n * If the field is not a {@link ChronoField}, then the result of this method\n * is obtained by invoking {@link TemporalField.getFrom}\n * passing `this` as the argument. Whether the value can be obtained,\n * and what the value represents, is determined by the field.\n *\n * @param {TemporalField} field - the field to get, not null\n * @return {number} the value for the field\n * @throws DateTimeException if a value for the field cannot be obtained\n * @throws ArithmeticException if numeric overflow occurs\n */\n getLong(field) {\n if (field instanceof ChronoField) {\n switch (field) {\n case ChronoField.NANO_OF_SECOND: return this._nanos;\n case ChronoField.MICRO_OF_SECOND: return MathUtil.intDiv(this._nanos, 1000);\n case ChronoField.MILLI_OF_SECOND: return MathUtil.intDiv(this._nanos, NANOS_PER_MILLI);\n case ChronoField.INSTANT_SECONDS: return this._seconds;\n }\n throw new UnsupportedTemporalTypeException(`Unsupported field: ${field}`);\n }\n return field.getFrom(this);\n }\n\n /**\n * Gets the number of seconds from the Java epoch of 1970-01-01T00:00:00Z.\n *\n * The epoch second count is a simple incrementing count of seconds where\n * second 0 is 1970-01-01T00:00:00Z.\n * The nanosecond part of the day is returned by {@link getNanosOfSecond}.\n *\n * @return {number} the seconds from the epoch of 1970-01-01T00:00:00Z\n */\n epochSecond(){\n return this._seconds;\n }\n\n /**\n * Gets the number of nanoseconds, later along the time-line, from the start\n * of the second.\n *\n * The nanosecond-of-second value measures the total number of nanoseconds from\n * the second returned by {@link getEpochSecond}.\n *\n * @return {number} the nanoseconds within the second, always positive, never exceeds 999,999,999\n */\n nano(){\n return this._nanos;\n }\n\n //-----------------------------------------------------------------------\n /**\n * Returns a copy of this instant with the specified field set to a new value.\n *\n * This returns a new {@link Instant}, based on this one, with the value\n * for the specified field changed.\n * If it is not possible to set the value, because the field is not supported or for\n * some other reason, an exception is thrown.\n *\n * If the field is a {@link ChronoField} then the adjustment is implemented here.\n * The supported fields behave as follows:\n *\n * * {@link NANO_OF_SECOND} -\n * Returns an {@link Instant} with the specified nano-of-second.\n * The epoch-second will be unchanged.\n * * {@link MICRO_OF_SECOND} -\n * Returns an {@link Instant} with the nano-of-second replaced by the specified\n * micro-of-second multiplied by 1,000. The epoch-second will be unchanged.\n * * {@link MILLI_OF_SECOND} -\n * Returns an {@link Instant} with the nano-of-second replaced by the specified\n * milli-of-second multiplied by 1,000,000. The epoch-second will be unchanged.\n * * {@link INSTANT_SECONDS} -\n * Returns an {@link Instant} with the specified epoch-second.\n * The nano-of-second will be unchanged.\n *\n *\n * In all cases, if the new value is outside the valid range of values for the field\n * then a {@link DateTimeException} will be thrown.\n *\n * All other {@link ChronoField} instances will throw a {@link DateTimeException}.\n *\n * If the field is not a {@link ChronoField}, then the result of this method\n * is obtained by invoking {@link TemporalField.adjustInto}\n * passing `this` as the argument. In this case, the field determines\n * whether and how to adjust the instant.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {TemporalField} field - the field to set in the result, not null\n * @param {number} newValue - the new value of the field in the result\n * @return {Instant} an {@link Instant} based on `this` with the specified field set, not null\n * @throws DateTimeException if the field cannot be set\n * @throws ArithmeticException if numeric overflow occurs\n */\n _withField(field, newValue) {\n requireNonNull(field, 'field');\n if (field instanceof ChronoField) {\n field.checkValidValue(newValue);\n switch (field) {\n case ChronoField.MILLI_OF_SECOND: {\n const nval = newValue * NANOS_PER_MILLI;\n return (nval !== this._nanos? Instant._create(this._seconds, nval) : this);\n }\n case ChronoField.MICRO_OF_SECOND: {\n const nval = newValue * 1000;\n return (nval !== this._nanos? Instant._create(this._seconds, nval) : this);\n }\n case ChronoField.NANO_OF_SECOND: return (newValue !== this._nanos? Instant._create(this._seconds, newValue) : this);\n case ChronoField.INSTANT_SECONDS: return (newValue !== this._seconds ? Instant._create(newValue, this._nanos) : this);\n }\n throw new UnsupportedTemporalTypeException(`Unsupported field: ${field}`);\n }\n return field.adjustInto(this, newValue);\n }\n\n //-----------------------------------------------------------------------\n /**\n * Returns a copy of this {@link Instant} truncated to the specified unit.\n *\n * Truncating the instant returns a copy of the original with fields\n * smaller than the specified unit set to zero.\n * The fields are calculated on the basis of using a UTC offset as seen\n * in {@link toString}.\n * For example, truncating with {@link ChronoUnit#MINUTES} will\n * round down to the nearest minute, setting the seconds and nanoseconds to zero.\n *\n * The unit must have a duration (see {@link TemporalUnit#getDuration})\n * that divides into the length of a standard day without remainder.\n * This includes all supplied time units on {@link ChronoUnit} and\n * {@link ChronoUnit#DAYS}. Other units throw an exception.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {!TemporalUnit} unit - the unit to truncate to, not null\n * @return {Instant} an {@link Instant} based on this instant with the time truncated, not null\n * @throws DateTimeException if the unit is invalid for truncation\n */\n truncatedTo(unit) {\n requireNonNull(unit, 'unit');\n if (unit === ChronoUnit.NANOS) {\n return this;\n }\n const unitDur = unit.duration();\n if (unitDur.seconds() > LocalTime.SECONDS_PER_DAY) {\n throw new DateTimeException('Unit is too large to be used for truncation');\n }\n const dur = unitDur.toNanos();\n if (MathUtil.intMod(LocalTime.NANOS_PER_DAY, dur) !== 0) {\n throw new DateTimeException('Unit must divide into a standard day without remainder');\n }\n const nod = MathUtil.intMod(this._seconds, LocalTime.SECONDS_PER_DAY) * LocalTime.NANOS_PER_SECOND + this._nanos;\n const result = MathUtil.intDiv(nod, dur) * dur;\n return this.plusNanos(result - nod);\n }\n\n //-----------------------------------------------------------------------\n /**\n * @param {!number} amountToAdd\n * @param {!TemporalUnit} unit\n * @return {Instant}\n * @throws DateTimeException\n * @throws ArithmeticException\n */\n _plusUnit(amountToAdd, unit) {\n requireNonNull(amountToAdd, 'amountToAdd');\n requireNonNull(unit, 'unit');\n requireInstance(unit, TemporalUnit);\n if (unit instanceof ChronoUnit) {\n switch (unit) {\n case ChronoUnit.NANOS: return this.plusNanos(amountToAdd);\n case ChronoUnit.MICROS: return this.plusMicros(amountToAdd);\n case ChronoUnit.MILLIS: return this.plusMillis(amountToAdd);\n case ChronoUnit.SECONDS: return this.plusSeconds(amountToAdd);\n case ChronoUnit.MINUTES: return this.plusSeconds(MathUtil.safeMultiply(amountToAdd, LocalTime.SECONDS_PER_MINUTE));\n case ChronoUnit.HOURS: return this.plusSeconds(MathUtil.safeMultiply(amountToAdd, LocalTime.SECONDS_PER_HOUR));\n case ChronoUnit.HALF_DAYS: return this.plusSeconds(MathUtil.safeMultiply(amountToAdd, LocalTime.SECONDS_PER_DAY / 2));\n case ChronoUnit.DAYS: return this.plusSeconds(MathUtil.safeMultiply(amountToAdd, LocalTime.SECONDS_PER_DAY));\n }\n throw new UnsupportedTemporalTypeException(`Unsupported unit: ${unit}`);\n }\n return unit.addTo(this, amountToAdd);\n }\n\n /**\n * Returns a copy of this instant with the specified duration in seconds added.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {number} secondsToAdd the seconds to add, positive or negative\n * @return {Instant} an {@link Instant} based on this instant with the specified seconds added, not null\n * @throws DateTimeException if the result exceeds the maximum or minimum instant\n */\n plusSeconds(secondsToAdd) {\n return this._plus(secondsToAdd, 0);\n }\n\n /**\n * Returns a copy of this instant with the specified duration in milliseconds added.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {number} millisToAdd - the milliseconds to add, positive or negative\n * @return {Instant} an {@link Instant} based on this instant with the specified milliseconds added, not null\n * @throws DateTimeException if the result exceeds the maximum or minimum instant\n * @throws ArithmeticException if numeric overflow occurs\n */\n plusMillis(millisToAdd) {\n return this._plus(MathUtil.intDiv(millisToAdd, 1000), MathUtil.intMod(millisToAdd, 1000) * NANOS_PER_MILLI);\n }\n\n /**\n * Returns a copy of this instant with the specified duration in nanoseconds added.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {number} nanosToAdd - the nanoseconds to add, positive or negative\n * @return {Instant} an {@link Instant} based on this instant with the specified nanoseconds added, not null\n * @throws DateTimeException if the result exceeds the maximum or minimum instant\n */\n plusNanos(nanosToAdd) {\n return this._plus(0, nanosToAdd);\n }\n\n /**\n * Returns a copy of this instant with the specified duration in microseconds added.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {number} microsToAdd - the microseconds to add, positive or negative\n * @return {Instant} an {@link Instant} based on this instant with the specified microseconds added, not null\n * @throws DateTimeException if the result exceeds the maximum or minimum instant\n */\n plusMicros(microsToAdd) {\n return this._plus(MathUtil.intDiv(microsToAdd, 1000000), MathUtil.intMod(microsToAdd, 1000000) * 1000);\n }\n\n /**\n * Returns a copy of this instant with the specified duration added.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {number} secondsToAdd - the seconds to add, positive or negative\n * @param {number} nanosToAdd - the nanos to add, positive or negative\n * @return {Instant} an {@link Instant} based on this instant with the specified seconds added, not null\n * @throws DateTimeException if the result exceeds the maximum or minimum instant\n */\n _plus(secondsToAdd, nanosToAdd) {\n if (secondsToAdd === 0 && nanosToAdd === 0) {\n return this;\n }\n let epochSec = this._seconds + secondsToAdd;\n epochSec = epochSec + MathUtil.intDiv(nanosToAdd, LocalTime.NANOS_PER_SECOND);\n const nanoAdjustment = this._nanos + nanosToAdd % LocalTime.NANOS_PER_SECOND;\n return Instant.ofEpochSecond(epochSec, nanoAdjustment);\n }\n\n //-----------------------------------------------------------------------\n\n /**\n * @param {!number} amountToSubtract\n * @param {!TemporalUnit} unit\n * @return {Instant}\n * @throws DateTimeException\n * @throws ArithmeticException\n */\n _minusUnit(amountToSubtract, unit) {\n return this._plusUnit(-1 * amountToSubtract, unit);\n }\n\n /**\n * Returns a copy of this instant with the specified duration in seconds subtracted.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {number} secondsToSubtract - the seconds to subtract, positive or negative\n * @return {Instant} an {@link Instant} based on this instant with the specified seconds subtracted, not null\n * @throws DateTimeException if the result exceeds the maximum or minimum instant\n */\n minusSeconds(secondsToSubtract) {\n return this.plusSeconds(secondsToSubtract * -1);\n }\n\n /**\n * Returns a copy of this instant with the specified duration in milliseconds subtracted.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {number} millisToSubtract - the milliseconds to subtract, positive or negative\n * @return {Instant} an {@link Instant} based on this instant with the specified milliseconds subtracted, not null\n * @throws DateTimeException if the result exceeds the maximum or minimum instant\n * @throws ArithmeticException if numeric overflow occurs\n */\n minusMillis(millisToSubtract) {\n return this.plusMillis(-1 * millisToSubtract);\n }\n\n /**\n * Returns a copy of this instant with the specified duration in nanoseconds subtracted.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {number} nanosToSubtract the nanoseconds to subtract, positive or negative\n * @return {Instant} an {@link Instant} based on this instant with the specified nanoseconds subtracted, not null\n * @throws DateTimeException if the result exceeds the maximum or minimum instant\n * @throws ArithmeticException if numeric overflow occurs\n */\n minusNanos(nanosToSubtract) {\n return this.plusNanos(-1 * nanosToSubtract);\n }\n\n /**\n * Returns a copy of this instant with the specified duration in microseconds subtracted.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {number} microsToSubtract the microseconds to subtract, positive or negative\n * @return {Instant} an {@link Instant} based on this instant with the specified microseconds subtracted, not null\n * @throws DateTimeException if the result exceeds the maximum or minimum instant\n * @throws ArithmeticException if numeric overflow occurs\n */\n minusMicros(microsToSubtract) {\n return this.plusMicros(-1 * microsToSubtract);\n }\n\n //-------------------------------------------------------------------------\n /**\n * Queries this instant using the specified query.\n *\n * This queries this instant using the specified query strategy object.\n * The {@link TemporalQuery} object defines the logic to be used to\n * obtain the result. Read the documentation of the query to understand\n * what the result of this method will be.\n *\n * The result of this method is obtained by invoking the\n * {@link TemporalQuery#queryFrom} method on the\n * specified query passing `this` as the argument.\n *\n * @param {!TemporalQuery} query - the query to invoke, not null\n * @return {*} the query result, null may be returned (defined by the query)\n * @throws DateTimeException if unable to query (defined by the query)\n * @throws ArithmeticException if numeric overflow occurs (defined by the query)\n */\n query(query) {\n requireNonNull(query, 'query');\n if (query === TemporalQueries.precision()) {\n return ChronoUnit.NANOS;\n }\n // inline TemporalAccessor.super.query(query) as an optimization\n if (query === TemporalQueries.localDate() || query === TemporalQueries.localTime() ||\n query === TemporalQueries.chronology() || query === TemporalQueries.zoneId() ||\n query === TemporalQueries.zone() || query === TemporalQueries.offset()) {\n return null;\n }\n return query.queryFrom(this);\n }\n\n /**\n * Adjusts the specified temporal object to have this instant.\n *\n * This returns a temporal object of the same observable type as the input\n * with the instant changed to be the same as this.\n *\n * The adjustment is equivalent to using {@link Temporal#with}\n * twice, passing {@link ChronoField#INSTANT_SECONDS} and\n * {@link ChronoField#NANO_OF_SECOND} as the fields.\n *\n * In most cases, it is clearer to reverse the calling pattern by using\n * {@link Temporal#with}:\n *
\n     *   // these two lines are equivalent, but the second approach is recommended\n     *   temporal = thisInstant.adjustInto(temporal);\n     *   temporal = temporal.with(thisInstant);\n     * 
\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {!Temporal} temporal - the target object to be adjusted, not null\n * @return {Temporal} the adjusted object, not null\n * @throws DateTimeException if unable to make the adjustment\n * @throws ArithmeticException if numeric overflow occurs\n */\n adjustInto(temporal) {\n requireNonNull(temporal, 'temporal');\n return temporal.with(ChronoField.INSTANT_SECONDS, this._seconds).with(ChronoField.NANO_OF_SECOND, this._nanos);\n }\n\n /**\n * Calculates the period between this instant and another instant in\n * terms of the specified unit.\n *\n * This calculates the period between two instants in terms of a single unit.\n * The start and end points are `this` and the specified instant.\n * The result will be negative if the end is before the start.\n * The calculation returns a whole number, representing the number of\n * complete units between the two instants.\n * The {@link Temporal} passed to this method is converted to a\n * {@link Instant} using {@link from}.\n * For example, the period in days between two dates can be calculated\n * using `startInstant.until(endInstant, SECONDS)`.\n *\n * This method operates in association with {@link TemporalUnit#between}.\n * The result of this method is a `long` representing the amount of\n * the specified unit. By contrast, the result of {@link between} is an\n * object that can be used directly in addition/subtraction:\n *
\n     *   long period = start.until(end, SECONDS);   // this method\n     *   dateTime.plus(SECONDS.between(start, end));      // use in plus/minus\n     * 
\n *\n * The calculation is implemented in this method for {@link ChronoUnit}.\n * The units {@link NANOS}, {@link MICROS}, {@link MILLIS}, {@link SECONDS},\n * {@link MINUTES}, {@link HOURS}, {@link HALF_DAYS} and {@link DAYS}\n * are supported. Other {@link ChronoUnit} values will throw an exception.\n *\n * If the unit is not a {@link ChronoUnit}, then the result of this method\n * is obtained by invoking {@link TemporalUnit.between}\n * passing `this` as the first argument and the input temporal as\n * the second argument.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {Temporal} endExclusive - the end date, which is converted to an {@link Instant}, not null\n * @param {TemporalUnit} unit - the unit to measure the period in, not null\n * @return {number} the amount of the period between this date and the end date\n * @throws DateTimeException if the period cannot be calculated\n * @throws ArithmeticException if numeric overflow occurs\n */\n until(endExclusive, unit) {\n requireNonNull(endExclusive, 'endExclusive');\n requireNonNull(unit, 'unit');\n const end = Instant.from(endExclusive);\n if (unit instanceof ChronoUnit) {\n switch (unit) {\n case ChronoUnit.NANOS: return this._nanosUntil(end);\n case ChronoUnit.MICROS: return this._microsUntil(end);\n case ChronoUnit.MILLIS: return MathUtil.safeSubtract(end.toEpochMilli(), this.toEpochMilli());\n case ChronoUnit.SECONDS: return this._secondsUntil(end);\n case ChronoUnit.MINUTES: return MathUtil.intDiv(this._secondsUntil(end), LocalTime.SECONDS_PER_MINUTE);\n case ChronoUnit.HOURS: return MathUtil.intDiv(this._secondsUntil(end), LocalTime.SECONDS_PER_HOUR);\n case ChronoUnit.HALF_DAYS: return MathUtil.intDiv(this._secondsUntil(end), (12 * LocalTime.SECONDS_PER_HOUR));\n case ChronoUnit.DAYS: return MathUtil.intDiv(this._secondsUntil(end), LocalTime.SECONDS_PER_DAY);\n }\n throw new UnsupportedTemporalTypeException(`Unsupported unit: ${unit}`);\n }\n return unit.between(this, end);\n }\n\n /**\n *\n * @param {Temporal} end\n * @returns {number}\n * @private\n */\n _microsUntil(end) {\n const secsDiff = MathUtil.safeSubtract(end.epochSecond(), this.epochSecond());\n const totalMicros = MathUtil.safeMultiply(secsDiff, 1000000);\n return MathUtil.safeAdd(totalMicros, MathUtil.intDiv(end.nano() - this.nano(), 1000));\n }\n\n /**\n *\n * @param {Temporal} end\n * @returns {number}\n * @private\n */\n _nanosUntil(end) {\n const secsDiff = MathUtil.safeSubtract(end.epochSecond(), this.epochSecond());\n const totalNanos = MathUtil.safeMultiply(secsDiff, LocalTime.NANOS_PER_SECOND);\n return MathUtil.safeAdd(totalNanos, end.nano() - this.nano());\n }\n\n /**\n *\n * @param {Temporal} end\n * @returns {number}\n * @private\n */\n _secondsUntil(end) {\n let secsDiff = MathUtil.safeSubtract(end.epochSecond(), this.epochSecond());\n const nanosDiff = end.nano() - this.nano();\n if (secsDiff > 0 && nanosDiff < 0) {\n secsDiff--;\n } else if (secsDiff < 0 && nanosDiff > 0) {\n secsDiff++;\n }\n return secsDiff;\n }\n\n //-----------------------------------------------------------------------\n /**\n * Combines this instant with an offset to create an {@link OffsetDateTime}.\n *\n * This returns an {@link OffsetDateTime} formed from this instant at the\n * specified offset from UTC/Greenwich. An exception will be thrown if the\n * instant is too large to fit into an offset date-time.\n *\n * This method is equivalent to {@link OffsetDateTime#ofInstant}.\n *\n * @param {ZoneOffset} offset - the offset to combine with, not null\n * @return {OffsetDateTime} the offset date-time formed from this instant and the specified offset, not null\n * @throws DateTimeException if the result exceeds the supported range\n */\n atOffset(offset) {\n return OffsetDateTime.ofInstant(this, offset);\n }\n\n /**\n * Combines this instant with a time-zone to create a {@link ZonedDateTime}.\n *\n * This returns an {@link ZonedDateTime} formed from this instant at the\n * specified time-zone. An exception will be thrown if the instant is too\n * large to fit into a zoned date-time.\n *\n * This method is equivalent to {@link ZonedDateTime#ofInstant}.\n *\n * @param {ZoneId} zone - the zone to combine with, not null\n * @return {ZonedDateTime} the zoned date-time formed from this instant and the specified zone, not null\n * @throws DateTimeException if the result exceeds the supported range\n */\n atZone(zone) {\n return ZonedDateTime.ofInstant(this, zone);\n }\n\n //-----------------------------------------------------------------------\n /**\n * Converts this instant to the number of milliseconds from the epoch\n * of 1970-01-01T00:00:00Z.\n *\n * If this instant represents a point on the time-line too far in the future\n * or past to fit in a `long` milliseconds, then an exception is thrown.\n *\n * If this instant has greater than millisecond precision, then the conversion\n * will drop any excess precision information as though the amount in nanoseconds\n * was subject to integer division by one million.\n *\n * @return {number} the number of milliseconds since the epoch of 1970-01-01T00:00:00Z\n * @throws ArithmeticException if numeric overflow occurs\n */\n toEpochMilli() {\n const millis = MathUtil.safeMultiply(this._seconds, 1000);\n return millis + MathUtil.intDiv(this._nanos, NANOS_PER_MILLI);\n }\n\n //-----------------------------------------------------------------------\n /**\n * Compares this instant to the specified instant.\n *\n * The comparison is based on the time-line position of the instants.\n * It is \"consistent with equals\", as defined by {@link Comparable}.\n *\n * @param {Instant} otherInstant the other instant to compare to, not null\n * @return {number} the comparator value, negative if less, positive if greater\n * @throws NullPointerException if otherInstant is null\n */\n compareTo(otherInstant) {\n requireNonNull(otherInstant, 'otherInstant');\n requireInstance(otherInstant, Instant, 'otherInstant');\n const cmp = MathUtil.compareNumbers(this._seconds, otherInstant._seconds);\n if (cmp !== 0) {\n return cmp;\n }\n return this._nanos - otherInstant._nanos;\n }\n\n /**\n * Checks if this instant is after the specified instant.\n *\n * The comparison is based on the time-line position of the instants.\n *\n * @param {Instant} otherInstant the other instant to compare to, not null\n * @return {boolean} true if this instant is after the specified instant\n * @throws NullPointerException if otherInstant is null\n */\n isAfter(otherInstant) {\n return this.compareTo(otherInstant) > 0;\n }\n\n /**\n * Checks if this instant is before the specified instant.\n *\n * The comparison is based on the time-line position of the instants.\n *\n * @param {Instant} otherInstant the other instant to compare to, not null\n * @return {boolean} true if this instant is before the specified instant\n * @throws NullPointerException if otherInstant is null\n */\n isBefore(otherInstant) {\n return this.compareTo(otherInstant) < 0;\n }\n\n /**\n * Checks if this instant is equal to the specified instant.\n *\n * The comparison is based on the time-line position of the instants.\n *\n * @param {*} other - the other instant, null/ undefined returns false\n * @return {boolean} true if the other instant is equal to this one\n */\n equals(other) {\n if(this === other){\n return true;\n }\n if(other instanceof Instant){\n return this.epochSecond() === other.epochSecond() &&\n this.nano() === other.nano();\n }\n return false;\n }\n\n /**\n * Returns a hash code for this instant.\n *\n * @return {number} a suitable hash code\n */\n hashCode() {\n return MathUtil.hashCode(this._seconds, this._nanos);\n }\n\n /**\n * A string representation of this instant using ISO-8601 representation.\n *\n * The format used is the same as {@link DateTimeFormatter#ISO_INSTANT}.\n *\n * @return {string} an ISO-8601 representation of this instant, not null\n */\n toString(){\n return DateTimeFormatter.ISO_INSTANT.format(this);\n }\n\n /**\n *\n * @return {string} same as {@link LocalDate.toString}\n */\n toJSON() {\n return this.toString();\n }\n}\n\nexport function _init() {\n Instant.MIN_SECONDS = -31619119219200; // -1000000-01-01T00:00:00Z\n Instant.MAX_SECONDS = 31494816403199; // +1000000-12-31T23:59:59.999999999Z\n Instant.EPOCH = new Instant(0, 0);\n Instant.MIN = Instant.ofEpochSecond(Instant.MIN_SECONDS, 0);\n Instant.MAX = Instant.ofEpochSecond(Instant.MAX_SECONDS, 999999999);\n Instant.FROM = createTemporalQuery('Instant.FROM', (temporal) => {\n return Instant.from(temporal);\n });\n}\n","/**\n * @copyright (c) 2016, Philipp Thürwächter & Pattrick Hüper\n * @copyright (c) 2007-present, Stephen Colebourne & Michael Nascimento Santos\n * @license BSD-3-Clause (see LICENSE in the root directory of this source tree)\n */\n\nimport { abstractMethodFail, requireNonNull } from './assert';\nimport { Instant } from './Instant';\nimport { ZoneId } from './ZoneId';\nimport { ZoneOffset } from './ZoneOffset';\n\n/**\n * A clock providing access to the current instant, date and time using a time-zone.\n *\n * Instances of this class are used to find the current instant, which can be\n * interpreted using the stored time-zone to find the current date and time.\n * As such, a clock can be used instead of {@link System#currentTimeMillis}\n * and {@link TimeZone#getDefault}.\n *\n * Use of a {@link Clock} is optional. All key date-time classes also have a\n * `now()` factory method that uses the system clock in the default time zone.\n * The primary purpose of this abstraction is to allow alternate clocks to be\n * plugged in as and when required. Applications use an object to obtain the\n * current time rather than a static method. This can simplify testing.\n *\n * Best practice for applications is to pass a {@link Clock} into any method\n * that requires the current instant.\n *\n * This approach allows an alternate clock, such as {@link fixed}\n * or {@link offset} to be used during testing.\n *\n * The {@link system} factory methods provide clocks based on the best available\n * system clock This may use {@link System#currentTimeMillis}, or a higher\n * resolution clock if one is available.\n *\n * The javascript Clock implementation differs from the openjdk.\n *\n * Javascript only provides the UTC millis of epoch and the ZoneOffset in minutes of the system default time.\n * Javascript do not provide the system default ZoneId.\n *\n * the system default ZoneId is only guessable by the ZoneOffset, like moment-timezone does by returning one ZoneId\n * with the same ZoneOffset.\n *\n * Therefore we are doing a shortcut here, by defining a SystemUTCClock and a SystemDefaultClock, the Clock itself\n * is returning the ZoneOffset and not the ZoneRules as in the jdk. We should change it, when introducing the iana\n * timezone database and implementing the timezone domains.\n *\n */\n\nexport class Clock {\n /**\n * Obtains a clock that returns the current instant using the\n * system clock, converting to date and time using the Date.getTime() UTC millis.\n *\n * This clock, rather than {@link systemDefaultZone}, should be used when\n * you need the current instant without the date or time.\n *\n * @return {Clock} a clock that uses the system clock in the UTC zone, not null\n */\n static systemUTC() {\n return new SystemClock(ZoneOffset.UTC);\n }\n\n /**\n * Obtains a clock that returns the current instant using the best available\n * system clock, converting to date and time using the default time-zone.\n *\n * This clock is based on the available system clock using the Date.getTime() UTC millis\n *\n * Using this method hard codes a dependency to the default time-zone into your application.\n *\n * The UTC clock (see {@link systemUTC}) should be used when you need the current instant\n * without the date or time.\n *\n *\n * @return {Clock} a clock that uses the system clock in the default zone, not null\n * @see ZoneId#systemDefault()\n */\n static systemDefaultZone() {\n return new SystemClock(ZoneId.systemDefault());\n }\n\n /**\n *\n * @param {ZoneId} zone\n * @return {Clock} a clock that uses the specified time zone\n */\n static system(zone){\n return new SystemClock(zone);\n }\n\n /**\n * Obtains a clock that always returns the same instant.\n *\n * This clock simply returns the specified instant.\n * As such, it is not a clock in the conventional sense.\n * The main use case for this is in testing, where the fixed clock ensures\n * tests are not dependent on the current clock.\n *\n * @param {Instant} fixedInstant the instant to use as the clock, not null\n * @param {ZoneId} zoneId the zoneOffset to use as zone Offset, not null\n * @return {Clock} a clock that always returns the same instant, not null\n */\n static fixed(fixedInstant, zoneId) {\n return new FixedClock(fixedInstant, zoneId);\n }\n \n /**\n * Obtains a clock that returns instants from the specified clock with the\n * specified duration added\n *

\n * This clock wraps another clock, returning instants that are later by the\n * specified duration. If the duration is negative, the instants will be\n * earlier than the current date and time.\n * The main use case for this is to simulate running in the future or in the past.\n *

\n * A duration of zero would have no offsetting effect.\n * Passing zero will return the underlying clock.\n *

\n * The returned implementation is immutable, thread-safe and {@code Serializable}\n * providing that the base clock is.\n *\n * @param baseClock the base clock to add the duration to, not null\n * @param duration the duration to add, not null\n * @return a clock based on the base clock with the duration added, not null\n */\n static offset(baseClock, duration) {\n return new OffsetClock(baseClock, duration); \n }\n\n /**\n * Gets the current millisecond instant of the clock.\n *\n * This returns the millisecond-based instant, measured from 1970-01-01T00:00Z (UTC).\n * This is equivalent to the definition of {@link Date#getTime}.\n *\n * Most applications should avoid this method and use {@link Instant} to represent\n * an instant on the time-line rather than a raw millisecond value.\n * This method is provided to allow the use of the clock in high performance use cases\n * where the creation of an object would be unacceptable.\n *\n * The default implementation currently calls {@link instant}.\n *\n * @return the current millisecond instant from this clock, measured from\n * the Java epoch of 1970-01-01T00:00Z (UTC), not null\n */\n millis(){\n abstractMethodFail('Clock.millis');\n }\n\n /**\n * Gets the current instant of the clock.\n *\n * This returns an instant representing the current instant as defined by the clock.\n *\n * @return {Instant} the current instant from this clock, not null\n */\n instant(){\n abstractMethodFail('Clock.instant');\n }\n\n zone(){\n abstractMethodFail('Clock.zone');\n }\n \n /**\n * Returns a copy of this clock with a different time-zone.\n *

\n * A clock will typically obtain the current instant and then convert that\n * to a date or time using a time-zone. This method returns a clock with\n * similar properties but using a different time-zone.\n *\n * @return a clock based on this clock with the specified time-zone, not null\n */\n withZone(){\n abstractMethodFail('Clock.withZone');\n }\n}\n\n/**\n * Implementation of a clock that always returns the latest time from\n * {@link Date#getTime}.\n *\n * @private\n */\nclass SystemClock extends Clock {\n /**\n *\n * @param {!ZoneId} zone\n */\n constructor(zone){\n requireNonNull(zone, 'zone');\n super();\n this._zone = zone;\n }\n\n /**\n *\n * @returns {!ZoneId}\n */\n zone() {\n return this._zone;\n }\n\n /**\n *\n * @returns {number}\n */\n millis() {\n return new Date().getTime();\n }\n\n /**\n *\n * @returns {Instant}\n */\n instant() {\n return Instant.ofEpochMilli(this.millis());\n }\n \n equals(obj) { \n if (obj instanceof SystemClock) { \n return this._zone.equals(obj._zone);\n }\n return false; \n } \n \n withZone(zone) {\n if (zone.equals(this._zone)) { // intentional NPE\n return this;\n }\n return new SystemClock(zone);\n } \n\n /**\n *\n * @returns {string}\n */\n toString(){\n return `SystemClock[${this._zone.toString()}]`;\n }\n\n}\n\n/**\n * Implementation of a clock that always returns the same instant.\n * This is typically used for testing.\n * @private\n */\nclass FixedClock extends Clock{\n constructor(fixedInstant, zoneId) {\n super();\n this._instant = fixedInstant;\n this._zoneId = zoneId;\n }\n\n instant() {\n return this._instant;\n }\n\n millis(){\n return this._instant.toEpochMilli();\n }\n\n zone() {\n return this._zoneId;\n }\n\n toString(){\n return 'FixedClock[]';\n }\n \n equals(obj) { \n if (obj instanceof FixedClock) { \n return this._instant.equals(obj._instant) && this._zoneId.equals(obj._zoneId);\n }\n return false; \n }\n\n withZone(zone) {\n if (zone.equals(this._zoneId)) { // intentional NPE\n return this;\n }\n return new FixedClock(this._instant, zone);\n } \n \n}\n\n\n/**\n * Implementation of a clock that adds an offset to an underlying clock.\n */\nclass OffsetClock extends Clock {\n constructor(baseClock, offset) {\n super();\n this._baseClock = baseClock;\n this._offset = offset;\n }\n \n zone() {\n return this._baseClock.zone();\n }\n \n withZone(zone) {\n if (zone.equals(this._baseClock.zone())) { // intentional NPE\n return this;\n }\n return new OffsetClock(this._baseClock.withZone(zone), this._offset);\n }\n \n millis() {\n return this._baseClock.millis() + this._offset.toMillis();\n }\n \n instant() {\n return this._baseClock.instant().plus(this._offset);\n }\n \n equals(obj) {\n if (obj instanceof OffsetClock) { \n return this._baseClock.equals(obj._baseClock) && this._offset.equals(obj._offset);\n }\n return false;\n }\n \n toString() {\n return `OffsetClock[${this._baseClock},${this._offset}]`;\n }\n}\n","/*\n * @copyright (c) 2016, Philipp Thürwächter & Pattrick Hüper\n * @copyright (c) 2007-present, Stephen Colebourne & Michael Nascimento Santos\n * @license BSD-3-Clause (see LICENSE in the root directory of this source tree)\n */\n\nimport { requireNonNull } from '../assert';\nimport { IllegalArgumentException } from '../errors';\n\nimport { Duration } from '../Duration';\nimport { LocalDateTime } from '../LocalDateTime';\n\n/**\n * A transition between two offsets caused by a discontinuity in the local time-line.\n *\n * A transition between two offsets is normally the result of a daylight savings cutover.\n * The discontinuity is normally a gap in spring and an overlap in autumn.\n * {@link ZoneOffsetTransition} models the transition between the two offsets.\n *\n * Gaps occur where there are local date-times that simply do not not exist.\n * An example would be when the offset changes from `+03:00` to `+04:00`.\n * This might be described as 'the clocks will move forward one hour tonight at 1am'.\n *\n * Overlaps occur where there are local date-times that exist twice.\n * An example would be when the offset changes from `+04:00` to `+03:00`.\n * This might be described as 'the clocks will move back one hour tonight at 2am'.\n *\n */\nexport class ZoneOffsetTransition {\n\n //-----------------------------------------------------------------------\n /**\n * Obtains an instance defining a transition between two offsets.\n *\n * Applications should normally obtain an instance from {@link ZoneRules}.\n * This factory is only intended for use when creating {@link ZoneRules}.\n *\n * @param {LocalDateTime} transition - the transition date-time at the transition, which never\n * actually occurs, expressed local to the before offset, not null\n * @param {ZoneOffset} offsetBefore - the offset before the transition, not null\n * @param {ZoneOffset} offsetAfter - the offset at and after the transition, not null\n * @return {ZoneOffsetTransition} the transition, not null\n * @throws IllegalArgumentException if {@link offsetBefore} and {@link offsetAfter}\n * are equal, or {@link transition.getNano} returns non-zero value\n */\n static of(transition, offsetBefore, offsetAfter) {\n return new ZoneOffsetTransition(transition, offsetBefore, offsetAfter);\n }\n\n /**\n * Creates an instance defining a transition between two offsets.\n * Creates an instance from epoch-second if transition is not a LocalDateTimeInstance\n *\n * @param {(LocalDateTime \\ number)} transition - the transition date-time with the offset before the transition, not null\n * @param {ZoneOffset} offsetBefore - the offset before the transition, not null\n * @param {ZoneOffset} offsetAfter - the offset at and after the transition, not null\n * @private\n */\n constructor(transition, offsetBefore, offsetAfter) {\n requireNonNull(transition, 'transition');\n requireNonNull(offsetBefore, 'offsetBefore');\n requireNonNull(offsetAfter, 'offsetAfter');\n if (offsetBefore.equals(offsetAfter)) {\n throw new IllegalArgumentException('Offsets must not be equal');\n }\n if (transition.nano() !== 0) {\n throw new IllegalArgumentException('Nano-of-second must be zero');\n }\n if(transition instanceof LocalDateTime) {\n this._transition = transition;\n } else {\n this._transition = LocalDateTime.ofEpochSecond(transition, 0, offsetBefore);\n }\n this._offsetBefore = offsetBefore;\n this._offsetAfter = offsetAfter;\n }\n\n //-----------------------------------------------------------------------\n /**\n * Gets the transition instant.\n *\n * This is the instant of the discontinuity, which is defined as the first\n * instant that the 'after' offset applies.\n *\n * The methods {@link getInstant}, {@link getDateTimeBefore} and {@link getDateTimeAfter}\n * all represent the same instant.\n *\n * @return {Instant} the transition instant, not null\n */\n instant() {\n return this._transition.toInstant(this._offsetBefore);\n }\n\n /**\n * Gets the transition instant as an epoch second.\n *\n * @return {number} the transition epoch second\n */\n toEpochSecond() {\n return this._transition.toEpochSecond(this._offsetBefore);\n }\n\n //-------------------------------------------------------------------------\n /**\n * Gets the local transition date-time, as would be expressed with the 'before' offset.\n *\n * This is the date-time where the discontinuity begins expressed with the 'before' offset.\n * At this instant, the 'after' offset is actually used, therefore the combination of this\n * date-time and the 'before' offset will never occur.\n *\n * The combination of the 'before' date-time and offset represents the same instant\n * as the 'after' date-time and offset.\n *\n * @return {LocalDateTime} the transition date-time expressed with the before offset, not null\n */\n dateTimeBefore(){\n return this._transition;\n }\n\n /**\n * Gets the local transition date-time, as would be expressed with the 'after' offset.\n *\n * This is the first date-time after the discontinuity, when the new offset applies.\n *\n * The combination of the 'before' date-time and offset represents the same instant\n * as the 'after' date-time and offset.\n *\n * @return {LocalDateTime} the transition date-time expressed with the after offset, not null\n */\n dateTimeAfter() {\n return this._transition.plusSeconds(this.durationSeconds());\n }\n\n /**\n * Gets the offset before the transition.\n *\n * This is the offset in use before the instant of the transition.\n *\n * @return {ZoneOffset} the offset before the transition, not null\n */\n offsetBefore() {\n return this._offsetBefore;\n }\n\n /**\n * Gets the offset after the transition.\n *\n * This is the offset in use on and after the instant of the transition.\n *\n * @return {ZoneOffset} the offset after the transition, not null\n */\n offsetAfter() {\n return this._offsetAfter;\n }\n\n /**\n * Gets the duration of the transition.\n *\n * In most cases, the transition duration is one hour, however this is not always the case.\n * The duration will be positive for a gap and negative for an overlap.\n * Time-zones are second-based, so the nanosecond part of the duration will be zero.\n *\n * @return {Duration} the duration of the transition, positive for gaps, negative for overlaps\n */\n duration() {\n return Duration.ofSeconds(this.durationSeconds());\n }\n\n /**\n * Gets the duration of the transition in seconds.\n *\n * @return {number} the duration in seconds\n */\n durationSeconds() {\n return this._offsetAfter.totalSeconds() - this._offsetBefore.totalSeconds();\n }\n\n /**\n * Does this transition represent a gap in the local time-line.\n *\n * Gaps occur where there are local date-times that simply do not not exist.\n * An example would be when the offset changes from `+01:00` to `+02:00`.\n * This might be described as 'the clocks will move forward one hour tonight at 1am'.\n *\n * @return {boolean} true if this transition is a gap, false if it is an overlap\n */\n isGap() {\n return this._offsetAfter.totalSeconds() > this._offsetBefore.totalSeconds();\n }\n\n /**\n * Does this transition represent a gap in the local time-line.\n *\n * Overlaps occur where there are local date-times that exist twice.\n * An example would be when the offset changes from `+02:00` to `+01:00`.\n * This might be described as 'the clocks will move back one hour tonight at 2am'.\n *\n * @return {boolean} true if this transition is an overlap, false if it is a gap\n */\n isOverlap() {\n return this._offsetAfter.totalSeconds() < this._offsetBefore.totalSeconds();\n }\n\n /**\n * Checks if the specified offset is valid during this transition.\n *\n * This checks to see if the given offset will be valid at some point in the transition.\n * A gap will always return false.\n * An overlap will return true if the offset is either the before or after offset.\n *\n * @param {ZoneOffset} offset - the offset to check, null returns false\n * @return {boolean} true if the offset is valid during the transition\n */\n isValidOffset(offset) {\n return this.isGap() ? false : (this._offsetBefore.equals(offset) || this._offsetAfter.equals(offset));\n }\n\n /**\n * Gets the valid offsets during this transition.\n *\n * A gap will return an empty list, while an overlap will return both offsets.\n *\n * @return {ZoneOffset[]} the list of valid offsets\n */\n validOffsets() {\n if (this.isGap()){\n return [];\n } else {\n return [this._offsetBefore, this._offsetAfter];\n }\n }\n\n //-----------------------------------------------------------------------\n /**\n * Compares this transition to another based on the transition instant.\n *\n * This compares the instants of each transition.\n * The offsets are ignored, making this order inconsistent with equals.\n *\n * @param {ZoneOffsetTransition} transition - the transition to compare to, not null\n * @return {number} the comparator value, negative if less, positive if greater\n */\n compareTo(transition) {\n return this.instant().compareTo(transition.instant());\n }\n\n //-----------------------------------------------------------------------\n /**\n * Checks if this object equals another.\n *\n * The entire state of the object is compared.\n *\n * @param {*} other - the other object to compare to, null returns false\n * @return true if equal\n */\n equals(other) {\n if (other === this) {\n return true;\n }\n if (other instanceof ZoneOffsetTransition) {\n const d = other;\n return this._transition.equals(d._transition) &&\n this._offsetBefore.equals(d.offsetBefore()) && this._offsetAfter.equals(d.offsetAfter());\n }\n return false;\n }\n\n /**\n * Returns a suitable hash code.\n *\n * @return {number} the hash code\n */\n hashCode() {\n return this._transition.hashCode() ^ this._offsetBefore.hashCode() ^ (this._offsetAfter.hashCode()>>>16);\n }\n\n //-----------------------------------------------------------------------\n /**\n * Returns a string describing this object.\n *\n * @return {string} a string for debugging, not null\n */\n toString() {\n return `Transition[${this.isGap() ? 'Gap' : 'Overlap' \n } at ${this._transition.toString()}${this._offsetBefore.toString() \n } to ${this._offsetAfter}]`;\n }\n\n}\n","/*\n * @copyright (c) 2016, Philipp Thürwächter & Pattrick Hüper\n * @copyright (c) 2007-present, Stephen Colebourne & Michael Nascimento Santos\n * @license BSD-3-Clause (see LICENSE in the root directory of this source tree)\n */\n\nimport { ChronoField } from './ChronoField';\nimport { createTemporalQuery } from './TemporalQuery';\nimport { TemporalQueries } from './TemporalQueries';\n\nimport { LocalDate } from '../LocalDate';\nimport { LocalTime } from '../LocalTime';\nimport { ZoneOffset } from '../ZoneOffset';\n\n\nexport function _init() {\n //-----------------------------------------------------------------------\n /**\n * A strict query for the {@link ZoneId}.\n */\n TemporalQueries.ZONE_ID = createTemporalQuery('ZONE_ID', (temporal) => {\n return temporal.query(TemporalQueries.ZONE_ID);\n });\n\n /**\n * A query for the {@link Chronology}.\n */\n TemporalQueries.CHRONO = createTemporalQuery('CHRONO', (temporal) => {\n return temporal.query(TemporalQueries.CHRONO);\n });\n\n /**\n * A query for the smallest supported unit.\n */\n TemporalQueries.PRECISION = createTemporalQuery('PRECISION', (temporal) => {\n return temporal.query(TemporalQueries.PRECISION);\n });\n\n //-----------------------------------------------------------------------\n /**\n * A query for {@link ZoneOffset} returning null if not found.\n */\n TemporalQueries.OFFSET = createTemporalQuery('OFFSET', (temporal) => {\n if (temporal.isSupported(ChronoField.OFFSET_SECONDS)) {\n return ZoneOffset.ofTotalSeconds(temporal.get(ChronoField.OFFSET_SECONDS));\n }\n return null;\n });\n\n /**\n * A lenient query for the {@link ZoneId}, falling back to the {@link ZoneOffset}.\n */\n TemporalQueries.ZONE = createTemporalQuery('ZONE', (temporal) => {\n const zone = temporal.query(TemporalQueries.ZONE_ID);\n return (zone != null ? zone : temporal.query(TemporalQueries.OFFSET));\n });\n\n /**\n * A query for {@link LocalDate} returning null if not found.\n */\n TemporalQueries.LOCAL_DATE = createTemporalQuery('LOCAL_DATE', (temporal) => {\n if (temporal.isSupported(ChronoField.EPOCH_DAY)) {\n return LocalDate.ofEpochDay(temporal.getLong(ChronoField.EPOCH_DAY));\n }\n return null;\n });\n\n /**\n * A query for {@link LocalTime} returning null if not found.\n */\n TemporalQueries.LOCAL_TIME = createTemporalQuery('LOCAL_TIME', (temporal) => {\n if (temporal.isSupported(ChronoField.NANO_OF_DAY)) {\n return LocalTime.ofNanoOfDay(temporal.getLong(ChronoField.NANO_OF_DAY));\n }\n return null;\n });\n}\n","/*\n * @copyright (c) 2016, Philipp Thürwächter & Pattrick Hüper\n * @license BSD-3-Clause (see LICENSE in the root directory of this source tree)\n */\n\nimport { ZoneRules } from './ZoneRules';\nimport { ZoneOffset } from '../ZoneOffset';\nimport { DateTimeException } from '../errors';\n\nexport class SystemDefaultZoneRules extends ZoneRules {\n\n isFixedOffset(){\n return false;\n }\n\n /**\n *\n * @param {Instant} instant\n * @returns {ZoneOffset}\n */\n offsetOfInstant(instant){\n const offsetInMinutes = new Date(instant.toEpochMilli()).getTimezoneOffset();\n return ZoneOffset.ofTotalMinutes(offsetInMinutes * -1);\n }\n\n /**\n *\n * @param {number} epochMilli\n * @returns {ZoneOffset}\n */\n offsetOfEpochMilli(epochMilli){\n const offsetInMinutes = new Date(epochMilli).getTimezoneOffset();\n return ZoneOffset.ofTotalMinutes(offsetInMinutes * -1);\n }\n\n /**\n * This implementation is NOT returning the best value in a gap or overlap situation\n * as specified at {@link ZoneRules.offsetOfLocalDateTime}.\n *\n * The calculated offset depends Date.prototype.getTimezoneOffset and its not specified\n * at the ECMA-262 specification how to handle daylight savings gaps/ overlaps.\n *\n * The Chrome Browser version 49 is returning the next transition offset in a gap/overlap situation,\n * other browsers/ engines might do it in the same way.\n *\n * @param {LocalDateTime} localDateTime\n * @returns {ZoneOffset}\n */\n offsetOfLocalDateTime(localDateTime){\n const epochMilli = localDateTime.toEpochSecond(ZoneOffset.UTC) * 1000;\n const offsetInMinutesBeforePossibleTransition = new Date(epochMilli).getTimezoneOffset();\n const epochMilliSystemZone = epochMilli + offsetInMinutesBeforePossibleTransition * 60000;\n const offsetInMinutesAfterPossibleTransition = new Date(epochMilliSystemZone).getTimezoneOffset();\n return ZoneOffset.ofTotalMinutes(offsetInMinutesAfterPossibleTransition * -1);\n }\n\n /**\n *\n * @param localDateTime\n * @return {ZoneOffset[]}\n */\n validOffsets(localDateTime){\n return [this.offsetOfLocalDateTime(localDateTime)];\n }\n\n /**\n * @return null, not supported\n */\n transition(){\n return null;\n }\n\n /**\n *\n * @param instant\n * @return {ZoneOffset}\n */\n standardOffset(instant){\n return this.offsetOfInstant(instant);\n }\n\n /**\n * @throws DateTimeException not supported\n */\n daylightSavings(){\n this._throwNotSupported();\n }\n\n /**\n * @throws DateTimeException not supported\n */\n isDaylightSavings(){\n this._throwNotSupported();\n }\n\n /**\n *\n * @param {LocalDateTime} dateTime\n * @param {ZoneOffset} offset\n * @return {boolean}\n */\n isValidOffset(dateTime, offset) {\n return this.offsetOfLocalDateTime(dateTime).equals(offset);\n }\n\n /**\n * @throws DateTimeException not supported\n */\n nextTransition(){\n this._throwNotSupported();\n }\n\n /**\n * @throws DateTimeException not supported\n */\n previousTransition(){\n this._throwNotSupported();\n }\n\n /**\n * @throws DateTimeException not supported\n */\n transitions(){\n this._throwNotSupported();\n }\n\n /**\n * @throws DateTimeException not supported\n */\n transitionRules(){\n this._throwNotSupported();\n }\n\n /**\n * @throws DateTimeException not supported\n */\n _throwNotSupported(){\n throw new DateTimeException('not supported operation');\n }\n //-----------------------------------------------------------------------\n /**\n *\n * @param {*} other\n * @returns {boolean}\n */\n equals(other) {\n if (this === other || other instanceof SystemDefaultZoneRules) {\n return true;\n } else {\n return false;\n }\n }\n\n /**\n *\n * @returns {string}\n */\n toString() {\n return 'SYSTEM';\n }\n\n}\n","/*\n * @copyright (c) 2016, Philipp Thürwächter & Pattrick Hüper\n * @license BSD-3-Clause (see LICENSE in the root directory of this source tree)\n */\n\nimport { SystemDefaultZoneRules } from './SystemDefaultZoneRules';\nimport { ZoneId } from '../ZoneId';\n\nexport class SystemDefaultZoneId extends ZoneId {\n\n constructor(){\n super();\n this._rules = new SystemDefaultZoneRules();\n }\n\n rules(){\n return this._rules;\n }\n\n equals(other){\n if(this === other){\n return true;\n }\n return false;\n }\n\n id(){\n return 'SYSTEM';\n }\n\n}\n","/*\n * @copyright (c) 2016, Philipp Thürwächter & Pattrick Hüper\n * @copyright (c) 2007-present, Stephen Colebourne & Michael Nascimento Santos\n * @license BSD-3-Clause (see LICENSE in the root directory of this source tree)\n */\n\nimport { requireNonNull } from './assert';\nimport { DateTimeException, IllegalArgumentException } from './errors';\nimport { StringUtil } from './StringUtil';\n\nimport { ZoneOffset } from './ZoneOffset';\nimport { ZoneRegion } from './ZoneRegion';\nimport { ZoneId } from './ZoneId';\n\nimport { TemporalQueries } from './temporal/TemporalQueries';\nimport { SystemDefaultZoneId } from './zone/SystemDefaultZoneId';\nimport { ZoneRulesProvider } from './zone/ZoneRulesProvider';\n\n/**\n * @see {@link ZoneId}\n *\n * Helper class to avoid dependency cycles.\n * Static methods of the class ZoneIdFactory are added automatically to class ZoneId.\n * @private\n */\nexport class ZoneIdFactory {\n\n /**\n * Gets the system default time-zone.\n *\n *\n * @return {ZoneId} the zone ID, not null\n */\n static systemDefault() {\n return SYSTEM_DEFAULT_ZONE_ID_INSTANCE;\n }\n\n /**\n * Gets the set of available zone IDs.\n *\n * This set includes the string form of all available region-based IDs.\n * Offset-based zone IDs are not included in the returned set.\n * The ID can be passed to {@link of} to create a {@link ZoneId}.\n *\n * The set of zone IDs can increase over time, although in a typical application\n * the set of IDs is fixed. Each call to this method is thread-safe.\n *\n * @return {string[]} a modifiable copy of the set of zone IDs, not null\n */\n static getAvailableZoneIds() {\n return ZoneRulesProvider.getAvailableZoneIds();\n }\n\n /**\n * Obtains an instance of {@link ZoneId} from an ID ensuring that the\n * ID is valid and available for use.\n *\n * This method parses the ID producing a {@link ZoneId} or {@link ZoneOffset}.\n * A {@link ZoneOffset} is returned if the ID is 'Z', or starts with '+' or '-'.\n * The result will always be a valid ID for which {@link ZoneRules} can be obtained.\n *\n * Parsing matches the zone ID step by step as follows.\n *\n * * If the zone ID equals 'Z', the result is {@link ZoneOffset.UTC}.\n * * If the zone ID consists of a single letter, the zone ID is invalid\n * and {@link DateTimeException} is thrown.\n * * If the zone ID starts with '+' or '-', the ID is parsed as a\n * {@link ZoneOffset} using {@link ZoneOffset#of}.\n * * If the zone ID equals 'GMT', 'UTC' or 'UT' then the result is a {@link ZoneId}\n * with the same ID and rules equivalent to {@link ZoneOffset.UTC}.\n * * If the zone ID starts with 'UTC+', 'UTC-', 'GMT+', 'GMT-', 'UT+' or 'UT-'\n * then the ID is a prefixed offset-based ID. The ID is split in two, with\n * a two or three letter prefix and a suffix starting with the sign.\n * The suffix is parsed as a {@link ZoneOffset}.\n * The result will be a {@link ZoneId} with the specified UTC/GMT/UT prefix\n * and the normalized offset ID as per {@link ZoneOffset#getId}.\n * The rules of the returned {@link ZoneId} will be equivalent to the\n * parsed {@link ZoneOffset}.\n * * All other IDs are parsed as region-based zone IDs. Region IDs must\n * match the regular expression `[A-Za-z][A-Za-z0-9~/._+-]+`,\n * otherwise a {@link DateTimeException} is thrown. If the zone ID is not\n * in the configured set of IDs, {@link ZoneRulesException} is thrown.\n * The detailed format of the region ID depends on the group supplying the data.\n * The default set of data is supplied by the IANA Time Zone Database (TZDB).\n * This has region IDs of the form '{area}/{city}', such as 'Europe/Paris' or 'America/New_York'.\n * This is compatible with most IDs from {@link java.util.TimeZone}.\n *\n * @param {string} zoneId the time-zone ID, not null\n * @return {ZoneId} the zone ID, not null\n * @throws DateTimeException if the zone ID has an invalid format\n * @throws ZoneRulesException if the zone ID is a region ID that cannot be found\n */\n static of(zoneId) {\n requireNonNull(zoneId, 'zoneId');\n if (zoneId === 'Z') {\n return ZoneOffset.UTC;\n }\n if (zoneId.length === 1) {\n throw new DateTimeException(`Invalid zone: ${zoneId}`);\n }\n if (StringUtil.startsWith(zoneId, '+') || StringUtil.startsWith(zoneId, '-')) {\n return ZoneOffset.of(zoneId);\n }\n if (zoneId === 'UTC' || zoneId === 'GMT' || zoneId === 'GMT0' || zoneId === 'UT') {\n return new ZoneRegion(zoneId, ZoneOffset.UTC.rules());\n }\n if (StringUtil.startsWith(zoneId, 'UTC+') || StringUtil.startsWith(zoneId, 'GMT+') ||\n StringUtil.startsWith(zoneId, 'UTC-') || StringUtil.startsWith(zoneId, 'GMT-')) {\n const offset = ZoneOffset.of(zoneId.substring(3));\n if (offset.totalSeconds() === 0) {\n return new ZoneRegion(zoneId.substring(0, 3), offset.rules());\n }\n return new ZoneRegion(zoneId.substring(0, 3) + offset.id(), offset.rules());\n }\n if (StringUtil.startsWith(zoneId, 'UT+') || StringUtil.startsWith(zoneId, 'UT-')) {\n const offset = ZoneOffset.of(zoneId.substring(2));\n if (offset.totalSeconds() === 0) {\n return new ZoneRegion('UT', offset.rules());\n }\n return new ZoneRegion(`UT${offset.id()}`, offset.rules());\n }\n // javascript special case\n if(zoneId === 'SYSTEM'){\n return ZoneId.systemDefault();\n }\n return ZoneRegion.ofId(zoneId);\n }\n\n /**\n * Obtains an instance of {@link ZoneId} wrapping an offset.\n *\n * If the prefix is 'GMT', 'UTC', or 'UT' a {@link ZoneId}\n * with the prefix and the non-zero offset is returned.\n * If the prefix is empty `''` the {@link ZoneOffset} is returned.\n *\n * @param {string} prefix the time-zone ID, not null\n * @param {ZoneOffset} offset the offset, not null\n * @return {ZoneId} the zone ID, not null\n * @throws IllegalArgumentException if the prefix is not one of\n * 'GMT', 'UTC', or 'UT', or ''\n */\n static ofOffset(prefix, offset) {\n requireNonNull(prefix, 'prefix');\n requireNonNull(offset, 'offset');\n if (prefix.length === 0) {\n return offset;\n }\n if (prefix === 'GMT' || prefix === 'UTC' || prefix === 'UT') {\n if (offset.totalSeconds() === 0) {\n return new ZoneRegion(prefix, offset.rules());\n }\n return new ZoneRegion(prefix + offset.id(), offset.rules());\n }\n throw new IllegalArgumentException(`Invalid prefix, must be GMT, UTC or UT: ${prefix}`);\n }\n\n\n /**\n * Obtains an instance of {@link ZoneId} from a temporal object.\n *\n * A {@link TemporalAccessor} represents some form of date and time information.\n * This factory converts the arbitrary temporal object to an instance of {@link ZoneId}.\n *\n * The conversion will try to obtain the zone in a way that favours region-based\n * zones over offset-based zones using {@link TemporalQueries#zone}.\n *\n * This method matches the signature of the functional interface {@link TemporalQuery}\n * allowing it to be used in queries via method reference, {@link ZoneId::from}.\n *\n * @param {!TemporalAccessor} temporal - the temporal object to convert, not null\n * @return {ZoneId} the zone ID, not null\n * @throws DateTimeException if unable to convert to a {@link ZoneId}\n */\n static from(temporal) {\n requireNonNull(temporal, 'temporal');\n const obj = temporal.query(TemporalQueries.zone());\n if (obj == null) {\n throw new DateTimeException(`Unable to obtain ZoneId from TemporalAccessor: ${ \n temporal}, type ${temporal.constructor != null ? temporal.constructor.name : ''}`);\n }\n return obj;\n }\n}\n\nlet SYSTEM_DEFAULT_ZONE_ID_INSTANCE = null;\n\nexport function _init(){\n SYSTEM_DEFAULT_ZONE_ID_INSTANCE = new SystemDefaultZoneId();\n\n // a bit magic to stay a bit more to the threeten bp impl.\n ZoneId.systemDefault = ZoneIdFactory.systemDefault;\n ZoneId.getAvailableZoneIds = ZoneIdFactory.getAvailableZoneIds;\n ZoneId.of = ZoneIdFactory.of;\n ZoneId.ofOffset = ZoneIdFactory.ofOffset;\n ZoneId.from = ZoneIdFactory.from;\n ZoneOffset.from = ZoneIdFactory.from;\n\n // short cut\n ZoneId.SYSTEM = SYSTEM_DEFAULT_ZONE_ID_INSTANCE;\n ZoneId.UTC = ZoneOffset.ofTotalSeconds(0);\n}\n","/*\n * @copyright (c) 2016, Philipp Thürwächter & Pattrick Hüper\n * @license BSD-3-Clause (see LICENSE in the root directory of this source tree)\n */\n\nimport { _init as ZoneOffsetInit } from './ZoneOffset';\nimport { _init as DayOfWeekInit } from './DayOfWeek';\nimport { _init as DurationInit } from './Duration';\nimport { _init as InstantInit } from './Instant';\nimport { _init as LocalDateInit } from './LocalDate';\nimport { _init as LocalTimeInit } from './LocalTime';\nimport { _init as LocalDateTimeInit } from './LocalDateTime';\nimport { _init as MonthInit } from './Month';\nimport { _init as MonthDayInit } from './MonthDay';\nimport { _init as OffsetDateTimeInit } from './OffsetDateTime';\nimport { _init as OffsetTimeInit } from './OffsetTime';\nimport { _init as PeriodInit } from './Period';\nimport { _init as YearInit } from './Year';\nimport { _init as YearConstantsInit } from './YearConstants';\nimport { _init as YearMonthInit } from './YearMonth';\nimport { _init as ZonedDateTimeInit } from './ZonedDateTime';\nimport { _init as IsoChronologyInit } from './chrono/IsoChronology';\nimport { _init as DateTimeFormatterInit } from './format/DateTimeFormatter';\nimport { _init as ChronoFieldInit } from './temporal/ChronoField';\nimport { _init as ChronoUnitInit } from './temporal/ChronoUnit';\nimport { _init as IsoFieldsInit } from './temporal/IsoFields';\nimport { _init as DateTimeFormatterBuilderInit } from './format/DateTimeFormatterBuilder';\n\nimport { _init as TemporalQueriesInit } from './temporal/TemporalQueriesFactory';\nimport { _init as ZoneIdInit } from './ZoneIdFactory';\n\nlet isInit = false;\n\nfunction init() {\n\n if (isInit) {\n return;\n }\n\n isInit = true;\n\n YearConstantsInit();\n DurationInit();\n ChronoUnitInit();\n ChronoFieldInit();\n LocalTimeInit();\n IsoFieldsInit();\n TemporalQueriesInit();\n DayOfWeekInit();\n InstantInit();\n LocalDateInit();\n LocalDateTimeInit();\n YearInit();\n MonthInit();\n YearMonthInit();\n MonthDayInit();\n PeriodInit();\n ZoneOffsetInit();\n ZonedDateTimeInit();\n ZoneIdInit();\n IsoChronologyInit();\n DateTimeFormatterInit();\n DateTimeFormatterBuilderInit();\n OffsetDateTimeInit();\n OffsetTimeInit();\n}\n\ninit();\n","/*\n * @copyright (c) 2016, Philipp Thürwächter & Pattrick Hüper\n * @license BSD-3-Clause (see LICENSE in the root directory of this source tree)\n */\n\nimport { IllegalArgumentException } from './errors';\n\nimport { LocalDate } from './LocalDate';\nimport { LocalDateTime } from './LocalDateTime';\nimport { ZonedDateTime } from './ZonedDateTime';\nimport { ZoneId } from './ZoneId';\nimport { Instant } from './Instant';\n\nclass ToNativeJsConverter {\n /**\n * @param {!(LocalDate|LocalDateTime|ZonedDateTime|Instant)} temporal - a joda temporal instance\n * @param {ZoneId} [zone] - the zone of the temporal,\n * the default value for LocalDate and LocalDateTime is ZoneId.systemDefault().\n */\n constructor(temporal, zone){\n let zonedDateTime;\n\n if(temporal instanceof Instant) {\n this.instant = temporal;\n return;\n } else if(temporal instanceof LocalDate) {\n zone = zone == null ? ZoneId.systemDefault() : zone;\n zonedDateTime = temporal.atStartOfDay(zone);\n } else if (temporal instanceof LocalDateTime) {\n zone = zone == null ? ZoneId.systemDefault() : zone;\n zonedDateTime = temporal.atZone(zone);\n } else if (temporal instanceof ZonedDateTime) {\n if (zone == null) {\n zonedDateTime = temporal;\n } else {\n zonedDateTime = temporal.withZoneSameInstant(zone);\n }\n } else {\n throw new IllegalArgumentException(`unsupported instance for convert operation:${temporal}`);\n }\n\n this.instant = zonedDateTime.toInstant();\n }\n\n /**\n *\n * @returns {Date}\n */\n toDate() {\n return new Date(this.instant.toEpochMilli());\n }\n\n /**\n *\n * @returns {number}\n */\n toEpochMilli() {\n return this.instant.toEpochMilli();\n }\n}\n\n/**\n * converts a LocalDate, LocalDateTime or ZonedDateTime to a native Javascript Date.\n *\n * In a first step the temporal is converted to an Instant by adding implicit values.\n * \n * A LocalDate is implicit set to a LocalDateTime at start of day. \n * A LocalDateTime is implicit set to a ZonedDateTime with \n * the passed zone or if null, with the system default time zone. \n * A ZonedDateTime is converted to an Instant, if a zone is specified the zonedDateTime is adjusted to this \n * zone, keeping the same Instant.\n *\n * In a second step the instant is converted to a native Javascript Date\n *\n * default zone for LocalDate and LocalDateTime is ZoneId.systemDefault().\n *\n * @example\n * convert(localDate).toDate() // returns a javascript Date\n * convert(localDate).toEpochMilli() // returns the epochMillis\n *\n * @param {!(LocalDate|LocalDateTime|ZonedDateTime)} temporal - a joda temporal instance\n * @param {ZoneId} [zone] - the zone of the temporal\n * @returns {ToNativeJsConverter}\n */\nexport function convert(temporal, zone){\n return new ToNativeJsConverter(temporal, zone);\n}\n","/*\n * @copyright (c) 2015-present, Philipp Thürwächter, Pattrick Hüper & js-joda contributors\n * @license BSD-3-Clause (see LICENSE in the root directory of this source tree)\n */\n\nimport { requireNonNull } from './assert';\nimport { IllegalArgumentException } from './errors';\nimport { Instant, ZoneId } from './js-joda';\n\n/**\n * Creates ZonedDateTime from a javascript Date or a moment instance.\n * @param {!(Date|moment)} date - a javascript Date or a moment instance\n * @param {ZoneId} [zone = ZoneId.systemDefault()] - the zone of the returned ZonedDateTime, defaults to ZoneId.systemDefault()\n * @returns {ZonedDateTime}\n */\nexport function nativeJs(date, zone = ZoneId.systemDefault()) {\n requireNonNull(date, 'date');\n requireNonNull(zone, 'zone');\n if(date instanceof Date) {\n return Instant.ofEpochMilli(date.getTime()).atZone(zone);\n } else if(typeof date.toDate === 'function' && date.toDate() instanceof Date) {\n return Instant.ofEpochMilli(date.toDate().getTime()).atZone(zone);\n }\n throw new IllegalArgumentException('date must be a javascript Date or a moment instance');\n}\n","/**\n * @private\n *\n * @param jsJoda\n * @returns { function(jsJoda: JsJoda) }\n */\nexport function bindUse(jsJoda) {\n const used = [];\n\n /**\n * use\n *\n * Provides a way to extend the internals of js-joda\n *\n * @param {function} fn - function to extend js-joda public api\n * @returns {this} for chaining\n */\n return function use(fn) {\n if (!~used.indexOf(fn)) {\n fn(jsJoda);\n used.push(fn);\n }\n return jsJoda;\n };\n}\n","/**\n * @copyright (c) 2016, Philipp Thürwächter & Pattrick Hüper\n * @license BSD-3-Clause (see LICENSE in the root directory of this source tree)\n */\n\nimport {\n ArithmeticException,\n DateTimeException,\n DateTimeParseException,\n IllegalArgumentException,\n IllegalStateException,\n UnsupportedTemporalTypeException,\n NullPointerException\n} from './errors';\n\nimport { Clock } from './Clock';\nimport { DayOfWeek } from './DayOfWeek';\nimport { Duration } from './Duration';\nimport { Instant } from './Instant';\nimport { LocalDate } from './LocalDate';\nimport { LocalTime } from './LocalTime';\nimport { LocalDateTime } from './LocalDateTime';\nimport { Month } from './Month';\nimport { MonthDay } from './MonthDay';\nimport { OffsetDateTime } from './OffsetDateTime';\nimport { OffsetTime } from './OffsetTime';\nimport { Period } from './Period';\nimport { Year } from './Year';\nimport { YearConstants } from './YearConstants';\nimport { YearMonth } from './YearMonth';\nimport { ZonedDateTime } from './ZonedDateTime';\nimport { ZoneOffset } from './ZoneOffset';\nimport { ZoneId } from './ZoneId';\nimport { ZoneRegion } from './ZoneRegion';\n\nimport { ZoneOffsetTransition } from './zone/ZoneOffsetTransition';\nimport { ZoneRules } from './zone/ZoneRules';\nimport { ZoneRulesProvider } from './zone/ZoneRulesProvider';\n\nimport { ChronoLocalDate } from './chrono/ChronoLocalDate';\nimport { ChronoLocalDateTime } from './chrono/ChronoLocalDateTime';\nimport { ChronoZonedDateTime } from './chrono/ChronoZonedDateTime';\nimport { IsoChronology } from './chrono/IsoChronology';\n\nimport { ChronoField } from './temporal/ChronoField';\nimport { ChronoUnit } from './temporal/ChronoUnit';\nimport { IsoFields } from './temporal/IsoFields';\nimport { Temporal } from './temporal/Temporal';\nimport { TemporalAccessor } from './temporal/TemporalAccessor';\nimport { TemporalAdjuster } from './temporal/TemporalAdjuster';\nimport { TemporalAdjusters } from './temporal/TemporalAdjusters';\nimport { TemporalAmount } from './temporal/TemporalAmount';\nimport { TemporalField } from './temporal/TemporalField';\nimport { TemporalQueries } from './temporal/TemporalQueries';\nimport { TemporalQuery } from './temporal/TemporalQuery';\nimport { TemporalUnit } from './temporal/TemporalUnit';\nimport { ValueRange } from './temporal/ValueRange';\n\nimport { DateTimeFormatter } from './format/DateTimeFormatter';\nimport { DateTimeFormatterBuilder } from './format/DateTimeFormatterBuilder';\nimport { DecimalStyle } from './format/DecimalStyle';\nimport { ParsePosition } from './format/ParsePosition';\nimport { ResolverStyle } from './format/ResolverStyle';\nimport { SignStyle } from './format/SignStyle';\nimport { TextStyle } from './format/TextStyle';\n\n// init static properties\nimport './_init';\n\n// private/internal exports, e.g. for use in plugins\nimport { MathUtil } from './MathUtil';\nimport { StringUtil } from './StringUtil';\nimport { DateTimeBuilder } from './format/DateTimeBuilder';\nimport { DateTimeParseContext } from './format/DateTimeParseContext';\nimport { DateTimePrintContext } from './format/DateTimePrintContext';\nimport { StringBuilder } from './format/StringBuilder';\nimport * as assert from './assert';\n\nimport { convert } from './convert';\nimport { nativeJs } from './nativeJs';\nimport { bindUse } from './use';\n\nconst _ = {\n assert,\n DateTimeBuilder,\n DateTimeParseContext,\n DateTimePrintContext,\n MathUtil,\n StringUtil,\n StringBuilder,\n};\n\nconst jsJodaExports = {\n _,\n convert,\n nativeJs,\n ArithmeticException,\n DateTimeException,\n DateTimeParseException,\n IllegalArgumentException,\n IllegalStateException,\n UnsupportedTemporalTypeException,\n NullPointerException,\n Clock,\n DayOfWeek,\n Duration,\n Instant,\n LocalDate,\n LocalTime,\n LocalDateTime,\n OffsetTime,\n OffsetDateTime,\n Month,\n MonthDay,\n ParsePosition,\n Period,\n Year,\n YearConstants,\n YearMonth,\n ZonedDateTime,\n ZoneOffset,\n ZoneId,\n ZoneRegion,\n ZoneOffsetTransition,\n ZoneRules,\n ZoneRulesProvider,\n ChronoLocalDate,\n ChronoLocalDateTime,\n ChronoZonedDateTime,\n IsoChronology,\n ChronoField,\n ChronoUnit,\n IsoFields,\n Temporal,\n TemporalAccessor,\n TemporalAdjuster,\n TemporalAdjusters,\n TemporalAmount,\n TemporalField,\n TemporalQueries,\n TemporalQuery,\n TemporalUnit,\n ValueRange,\n DateTimeFormatter,\n DateTimeFormatterBuilder,\n DecimalStyle,\n ResolverStyle,\n SignStyle,\n TextStyle,\n};\n\n/**\n * @private\n *\n * @type { function(function(jsJoda: JsJoda) }\n */\nconst use = bindUse(jsJodaExports);\njsJodaExports.use = use;\n\nexport {\n _,\n use,\n convert,\n nativeJs,\n ArithmeticException,\n DateTimeException,\n DateTimeParseException,\n IllegalArgumentException,\n IllegalStateException,\n UnsupportedTemporalTypeException,\n NullPointerException,\n Clock,\n DayOfWeek,\n Duration,\n Instant,\n LocalDate,\n LocalTime,\n LocalDateTime,\n Month,\n MonthDay,\n OffsetTime,\n OffsetDateTime,\n Period,\n ParsePosition,\n Year,\n YearConstants,\n YearMonth,\n ZonedDateTime,\n ZoneOffset,\n ZoneId,\n ZoneRegion,\n ZoneOffsetTransition,\n ZoneRules,\n ZoneRulesProvider,\n ChronoLocalDate,\n ChronoLocalDateTime,\n ChronoZonedDateTime,\n IsoChronology,\n ChronoField,\n ChronoUnit,\n IsoFields,\n Temporal,\n TemporalAccessor,\n TemporalAdjuster,\n TemporalAdjusters,\n TemporalAmount,\n TemporalField,\n TemporalQueries,\n TemporalQuery,\n TemporalUnit,\n ValueRange,\n DateTimeFormatter,\n DateTimeFormatterBuilder,\n DecimalStyle,\n ResolverStyle,\n SignStyle,\n TextStyle,\n};\n"],"names":["createErrorType","name","init","superErrorClass","Error","JsJodaException","message","captureStackTrace","stack","constructor","apply","arguments","toString","prototype","Object","create","DateTimeException","messageWithCause","DateTimeParseException","messageForDateTimeParseException","UnsupportedTemporalTypeException","ArithmeticException","IllegalArgumentException","IllegalStateException","NullPointerException","cause","msg","text","index","parsedString","errorIndex","assert","assertion","error","requireNonNull","value","parameterName","requireInstance","_class","abstractMethodFail","methodName","TypeError","MAX_SAFE_INTEGER","MIN_SAFE_INTEGER","MathUtil","intDiv","x","y","r","roundDown","safeZero","intMod","Math","ceil","floor","floorDiv","floorMod","safeAdd","verifyInt","safeToInt","safeSubtract","safeMultiply","parseInt","_parseInt","_x","isNaN","compareNumbers","a","b","smi","int","hash","number","Infinity","result","hashCode","_len","length","numbers","Array","_key","_i","_numbers","n","Enum","_name","_proto","equals","other","toJSON","TemporalAmount","get","unit","units","addTo","temporal","subtractFrom","Symbol","toPrimitive","hint","TemporalUnit","duration","isDurationEstimated","isDateBased","isTimeBased","isSupportedBy","dateTime","periodToAdd","between","temporal1","temporal2","Duration","_TemporalAmount","_inheritsLoose","seconds","nanos","_this","call","_seconds","_nanos","ofDays","days","_create","LocalTime","SECONDS_PER_DAY","ofHours","hours","SECONDS_PER_HOUR","ofMinutes","minutes","SECONDS_PER_MINUTE","ofSeconds","nanoAdjustment","secs","NANOS_PER_SECOND","nos","ofMillis","millis","mos","ofNanos","of","amount","ZERO","plus","from","forEach","startInclusive","endExclusive","until","ChronoUnit","SECONDS","isSupported","ChronoField","NANO_OF_SECOND","startNos","getLong","adjustedEnd","with","e","parse","PATTERN","RegExp","matches","exec","negate","dayMatch","hourMatch","minuteMatch","secondMatch","fractionMatch","daysAsSecs","_parseNumber","hoursAsSecs","minsAsSecs","negativeSecs","charAt","_parseFraction","ex","parsed","multiplier","errorText","substring","parseFloat","_createSecondsNanos","_createNegateDaysHoursMinutesSecondsNanos","negated","NANOS","isZero","isNegative","nano","withSeconds","withNanos","nanoOfSecond","checkValidIntValue","plusDuration","durationOrNumber","unitOrNumber","plusAmountUnit","plusSecondsNanos","amountToAdd","DAYS","plusNanos","MICROS","MILLIS","plusMillis","plusSeconds","multipliedBy","plusDays","daysToAdd","plusHours","hoursToAdd","plusMinutes","minutesToAdd","secondsToAdd","millisToAdd","nanosToAdd","epochSec","minus","minusDuration","minusAmountUnit","secsToSubtract","nanosToSubtract","amountToSubtract","minusDays","daysToSubtract","minusHours","hoursToSubtract","minusMinutes","minutesToSubtract","minusSeconds","secondsToSubtract","minusMillis","millisToSubtract","minusNanos","multiplicand","dividedBy","divisor","secsMod","abs","toDays","toHours","toMinutes","toMillis","round","toNanos","totalNanos","compareTo","otherDuration","cmp","rval","nanoString","slice","_init","YearConstants","MIN_VALUE","MAX_VALUE","_TemporalUnit","estimatedDuration","_duration","FOREVER","e2","MINUTES","HOURS","HALF_DAYS","WEEKS","MONTHS","YEARS","DECADES","CENTURIES","MILLENNIA","ERAS","TemporalField","baseUnit","rangeUnit","range","rangeRefinedBy","getFrom","adjustInto","newValue","displayName","ValueRange","minSmallest","minLargest","maxSmallest","maxLargest","_minSmallest","_minLargest","_maxLargest","_maxSmallest","isFixed","minimum","largestMinimum","maximum","smallestMaximum","isValidValue","checkValidValue","field","isValidIntValue","isIntValue","str","_TemporalField","byName","fieldName","prop","_baseUnit","_rangeUnit","_range","dateBased","DAY_OF_WEEK","ALIGNED_DAY_OF_WEEK_IN_MONTH","ALIGNED_DAY_OF_WEEK_IN_YEAR","DAY_OF_MONTH","DAY_OF_YEAR","EPOCH_DAY","ALIGNED_WEEK_OF_MONTH","ALIGNED_WEEK_OF_YEAR","MONTH_OF_YEAR","PROLEPTIC_MONTH","YEAR_OF_ERA","YEAR","ERA","timeBased","NANO_OF_DAY","MICRO_OF_SECOND","MICRO_OF_DAY","MILLI_OF_SECOND","MILLI_OF_DAY","SECOND_OF_MINUTE","SECOND_OF_DAY","MINUTE_OF_HOUR","MINUTE_OF_DAY","HOUR_OF_AMPM","CLOCK_HOUR_OF_AMPM","HOUR_OF_DAY","CLOCK_HOUR_OF_DAY","AMPM_OF_DAY","INSTANT_SECONDS","OFFSET_SECONDS","TemporalQueries","zoneId","ZONE_ID","chronology","CHRONO","precision","PRECISION","zone","ZONE","offset","OFFSET","localDate","LOCAL_DATE","localTime","LOCAL_TIME","TemporalAccessor","query","queryFrom","TemporalQuery","_Enum","createTemporalQuery","queryFromFunction","ExtendedTemporalQuery","_TemporalQuery","DayOfWeek","_TemporalAccessor","ordinal","_ordinal","values","ENUMS","valueOf","dayOfWeek","style","locale","MONDAY","TUESDAY","WEDNESDAY","THURSDAY","FRIDAY","SATURDAY","SUNDAY","FROM","Month","_value","months","newMonthVal","leapYear","FEBRUARY","APRIL","JUNE","SEPTEMBER","NOVEMBER","minLength","maxLength","firstDayOfYear","leap","JANUARY","MARCH","MAY","JULY","AUGUST","OCTOBER","DECEMBER","firstMonthOfQuarter","IsoChronology","INSTANCE","month","Period","years","_years","_months","_days","_assertThisInitialized","ofYears","ofMonths","ofWeeks","weeks","i","unitAmount","startDate","endDate","LocalDate","_parse","yearMatch","monthMatch","weekMatch","val","withYears","withMonths","withDays","plusYears","yearsToAdd","plusMonths","monthsToAdd","minusYears","yearsToSubtract","minusMonths","monthsToSubtract","scalar","normalized","totalMonths","toTotalMonths","splitYears","splitMonths","obj","buf","ParsePosition","_index","_errorIndex","getIndex","setIndex","getErrorIndex","setErrorIndex","EnumMap","_map","putAll","otherMap","key","containsKey","hasOwnProperty","undefined","put","set","retainAll","keyList","map","remove","keyName","keySet","clear","ResolverStyle","STRICT","SMART","LENIENT","Temporal","fieldOrUnit","_minusAmount","_minusUnit","_plusUnit","_plusAmount","endTemporal","_with","adjusterOrField","_withAdjuster","_withField","adjuster","ChronoLocalDate","_Temporal","ofEpochDay","toEpochDay","format","formatter","DateTimeFormatter","StringUtil","startsWith","pattern","indexOf","len","chr","charCodeAt","ZoneId","systemDefault","getAvailableZoneIds","ofOffset","prefix","id","rules","isFixedOffset","Instant","EPOCH","ZoneRules","Fixed","instantOrLocalDateTime","offsetOfInstant","offsetOfLocalDateTime","instant","offsetOfEpochMilli","epochMilli","localDateTime","validOffsets","transition","standardOffset","daylightSavings","isDaylightSavings","isValidOffset","nextTransition","previousTransition","transitions","transitionRules","_ZoneRules","_offset","_proto2","SECONDS_CACHE","ID_CACHE","ZoneOffset","_ZoneId","totalSeconds","_validateTotalSeconds","_totalSeconds","_rules","_id","_buildId","absTotalSeconds","absHours","absMinutes","MINUTES_PER_HOUR","absSeconds","MAX_SECONDS","_validate","offsetId","first","ofHoursMinutesSeconds","pos","precededByColon","ch1","ch2","ofHoursMinutes","ofTotalSeconds","ofTotalMinutes","totalMinutes","totalSecs","UTC","MIN","MAX","DateTimeBuilder","dtb","_addFieldValue","fieldValues","chrono","date","time","leapSecond","excessDays","getFieldValue0","old","_putFieldValue0","resolve","resolverStyle","resolverFields","_mergeDate","_mergeTime","_resolveTimeInferZeroes","_resolveInstant","_checkDate","resolveDate","_addObject","val1","val2","ch","ap","hap","nod","cod","lod","sod","mod","los","cos","hod","moh","som","hodVal","mohVal","somVal","nosVal","ofNanoOfDay","ofSecondOfDay","dateOrTime","offsetSecs","atTime","atZone","build","type","DateTimeParseContext","_constructorSelf","_constructorFormatter","_constructorParam","_caseSensitive","_strict","_parsed","Parsed","symbols","_locale","_symbols","_overrideChronology","decimalStyle","_overrideZone","copy","isStrict","setStrict","strict","setLocale","startOptional","push","currentParsed","endOptional","successful","splice","isCaseSensitive","setCaseSensitive","caseSensitive","subSequenceEquals","cs1","offset1","cs2","offset2","toLowerCase","charEquals","charEqualsIgnoreCase","c1","c2","setParsedField","errorPos","successPos","currentParsedFieldValues","setParsedZone","getParsed","toParsed","setParsedLeapSecond","getEffectiveChronology","dateTimeParseContext","cloned","toBuilder","builder","overrideZone","DateTimePrintContext","localeOrFormatter","_temporal","adjust","_optional","getValueQuery","getValue","setDateTime","IsoFields","QUARTER_DAYS","Field","_isIso","_getWeekRangeByLocalDate","wby","_getWeekBasedYear","_getWeekRangeByYear","isLeapYear","_getWeek","dow0","doy0","dayOfYear","doyThu0","alignedWeek","firstThuDoy0","firstMonDoy0","withDayOfYear","week","year","doy","dow","DAY_OF_QUARTER_FIELD","_Field","QUARTER_YEARS","qoy","QUARTER_OF_YEAR","moy","curValue","partialTemporal","yearLong","qoyLong","doq","DAY_OF_QUARTER","max","QUARTER_OF_YEAR_FIELD","_Field2","_proto3","WEEK_OF_WEEK_BASED_YEAR_FIELD","_Field3","_proto4","WEEK_BASED_YEARS","wbyLong","WEEK_BASED_YEAR","dowLong","wowby","WEEK_OF_WEEK_BASED_YEAR","plusWeeks","temp","WEEK_BASED_YEAR_FIELD","_Field4","_proto5","newWby","resolved","Unit","_proto6","added","isoWeekOfWeekyear","isoWeekyear","DecimalStyle","zeroChar","positiveSignChar","negativeSignChar","decimalPointChar","_zeroDigit","_zeroDigitCharCode","_positiveSign","_negativeSign","_decimalSeparator","positiveSign","withPositiveSign","negativeSign","withNegativeSign","zeroDigit","withZeroDigit","decimalSeparator","withDecimalSeparator","convertToDigit","char","convertNumberToI18N","numericText","diff","convertedText","String","fromCharCode","availableLocales","STANDARD","SignStyle","positive","fixedWidth","NORMAL","ALWAYS","EXCEEDS_PAD","NEVER","NOT_NEGATIVE","TextStyle","isStandalone","FULL_STANDALONE","SHORT_STANDALONE","NARROW_STANDALONE","asStandalone","FULL","SHORT","NARROW","asNormal","CharLiteralPrinterParser","literal","_literal","print","context","append","position","CompositePrinterParser","printerParsers","optional","_printerParsers","withOptional","pp","setLength","FractionPrinterParser","minWidth","maxWidth","decimalPoint","fraction","convertToFraction","outputScale","min","substr","effectiveMin","effectiveMax","minEndPos","maxEndPos","total","digit","moveLeft","scale","pow","convertFromFraction","_min","_scaled","decimal","MAX_WIDTH","EXCEED_POINTS","NumberPrinterParser","signStyle","subsequentWidth","_field","_minWidth","_maxWidth","_signStyle","_subsequentWidth","withFixedWidth","withSubsequentWidth","_isFixedWidth","contextValue","_getValue","sign","negative","effMinWidth","effMaxWidth","pass","parseLen","_setValue","ReducedPrinterParser","_NumberPrinterParser","width","baseValue","baseDate","_baseValue","_baseDate","absValue","lastPart","basePart","isFixedWidth","PATTERNS","OffsetIdPrinterParser","noOffsetText","_checkPattern","bufPos","output","appendChar","noOffsetLen","array","arrayIndex","parseText","required","converted","replace","INSTANCE_ID","PadPrinterParserDecorator","printerParser","padWidth","padChar","_printerParser","_padWidth","_padChar","preLen","insert","endPos","resultPos","SettingsParser","SENSITIVE","INSENSITIVE","StringLiteralPrinterParser","ZoneRulesProvider","getRules","ZoneRegion","ofId","ZoneIdPrinterParser","description","nextChar","newContext","nextNextChar","_parsePrefixedOffset","availableZoneIds","zoneIdTree","size","ZoneIdTree","createTreeMap","maxParseLength","treeMap","parsedZoneId","parseLength","parsedSubZoneId","isLeaf","prefixPos","toUpperCase","sortedZoneIds","sort","ZoneIdTreeMap","add","_treeMap","idLength","subZoneId","subTreeMap","DateTimeFormatterBuilder","_active","_parent","_padNextWidth","_padNextChar","_valueParserIndex","_of","parent","dtFormatterBuilder","parseCaseSensitive","_appendInternalPrinterParser","parseCaseInsensitive","parseStrict","parseLenient","parseDefaulting","_appendInternal","DefaultingParser","appendValue","_appendValue1","_appendValue2","_appendValue4","_appendValuePrinterParser","appendValueReduced","_appendValueReducedFieldWidthMaxWidthBaseDate","_appendValueReducedFieldWidthMaxWidthBaseValue","activeValueParser","basePP","appendFraction","appendInstant","fractionalDigits","InstantPrinterParser","appendOffsetId","appendOffset","appendZoneId","appendPattern","_parsePattern","appendZoneText","appendText","appendLocalizedOffset","appendWeekField","FIELD_MAP","cur","start","count","pad","padNext","_parseField","zero","appendLiteral","optionalStart","optionalEnd","BASE_DATE","_padNext1","_padNext2","cpp","_toPrinterParser","toFormatter","SECONDS_PER_10000_YEARS","SECONDS_0000_TO_1970","inSecs","inNanos","inSec","inNano","zeroSecs","hi","lo","ldt","LocalDateTime","ofEpochSecond","second","div","minDigits","maxDigits","parser","ISO_LOCAL_DATE","yearParsed","day","hour","secVal","nanoVal","sec","instantSecs","toEpochSecond","StringBuilder","_str","end","parsedExcessDays","PARSED_EXCESS_DAYS","parsedLeapSecond","PARSED_LEAP_SECOND","ofPattern","_decimalStyle","_resolverStyle","_resolverFields","_chrono","_zone","withChronology","withLocale","withResolverStyle","_formatTo","appendable","parse1","parse2","_parseToBuilder","_createError","abbr","_parseUnresolved0","parseUnresolved","ISO_LOCAL_TIME","ISO_LOCAL_DATE_TIME","ISO_INSTANT","ISO_OFFSET_DATE_TIME","ISO_ZONED_DATE_TIME","BASIC_ISO_DATE","ISO_OFFSET_DATE","ISO_OFFSET_TIME","ISO_ORDINAL_DATE","ISO_WEEK_DATE","ISO_DATE","ISO_TIME","ISO_DATE_TIME","MonthDay","now","zoneIdOrClock","now0","nowZoneId","nowClock","Clock","systemDefaultZone","system","clock","dayOfMonth","monthOrNumber","ofMonthNumber","ofNumberNumber","parseString","parseStringFormatter","PARSER","_month","_day","monthValue","isValidYear","Year","isLeap","withMonth","withDayOfMonth","atYear","isAfter","isBefore","YearMonth","ofNumberMonth","_year","isSupportedField","isSupportedUnit","_getProlepticMonth","isValidDay","lengthOfMonth","lengthOfYear","f","withYear","newYear","monthCount","calcMonths","newMonth","monthsUntil","atDay","atEndOfMonth","isoYear","parseTextFormatter","isValidMonthDay","monthDay","ofYearDay","atMonth","atMonthMonth","atMonthNumber","atMonthDay","yearsUntil","TemporalAdjuster","TemporalAdjusters","firstDayOfMonth","Impl","FIRST_DAY_OF_MONTH","lastDayOfMonth","LAST_DAY_OF_MONTH","firstDayOfNextMonth","FIRST_DAY_OF_NEXT_MONTH","FIRST_DAY_OF_YEAR","lastDayOfYear","LAST_DAY_OF_YEAR","firstDayOfNextYear","FIRST_DAY_OF_NEXT_YEAR","firstInMonth","DayOfWeekInMonth","lastInMonth","dayOfWeekInMonth","next","RelativeDayOfWeek","nextOrSame","previous","previousOrSame","_TemporalAdjuster","_TemporalAdjuster2","_this2","_dowValue","curDow","dowDiff","daysDiff","_TemporalAdjuster3","relative","_this3","_relative","calDow","prolepticYear","_updateResolveMap","current","prolepticMonth","yoeLong","era","dom","aw","ad","OffsetTime","OffsetDateTime","toOffsetTime","clockOrZone","_now","ofInstant","ofTimeAndOffset","ofNumbers","minute","secsOfDay","epochSecond","_time","toNanoOfDay","atDate","_toEpochNano","isEqual","_withLocalTimeOffset","toLocalTime","truncatedTo","nanosUntil","NANOS_PER_MINUTE","NANOS_PER_HOUR","withHour","withMinute","withSecond","withNano","withOffsetSameInstant","difference","adjusted","withOffsetSameLocal","offsetNanos","compare","ChronoZonedDateTime","toLocalDate","toInstant","epochDay","toSecondOfDay","toLocalDateTime","strcmp","thisEpochSec","otherEpochSec","ZonedDateTime","_ChronoZonedDateTime","of2","of3","of8","ofLocal","dt","preferredOffset","trans","offsetAfter","some","validOffset","ofInstant2","ofInstant3","ofStrict","isGap","ofLenient","zdt","_from","__from","_dateTime","_resolveLocal","newDateTime","_resolveOffset","withEarlierOffsetAtOverlap","isOverlap","earlierOffset","offsetBefore","withLaterOffsetAtOverlap","laterOffset","withZoneSameLocal","withZoneSameInstant","withFixedOffsetZone","minusWeeks","toOffsetDateTime","_","ofDateTime","ofDateAndTime","atZoneSameInstant","atZoneSimilarLocal","toZonedDateTime","_withDateTimeOffset","atOffset","DAYS_PER_CYCLE","DAYS_0000_TO_1970","_ChronoLocalDate","monthEnd","adjustCycles","doyEst","yearEst","zeroDay","marchDoy0","marchMonth0","_resolvePreviousValid","_get0","_prolepticMonth","m","weeksToAdd","mjDay","weeksToSubtract","p1","p2","until1","until2","daysUntil","_monthsUntil","packed1","packed2","calcDate","atTime1","atTime4","_atTimeOffsetTime","atStartOfDay","_atStartOfDayWithZone","MIDNIGHT","dateTimeAfter","_compareTo0","otherDate","yearValue","dayValue","dayString","monthString","yearString","absYear","EPOCH_0","ChronoLocalDateTime","_ChronoLocalDateTime","_ofEpochMillis","localSecond","localEpochDay","_date","_withDateTime","newDate","newTime","MICROS_PER_DAY","MILLIS_PER_DAY","_plusWithOverflow","totDays","NANOS_PER_DAY","MINUTES_PER_DAY","HOURS_PER_DAY","totNanos","curNoD","newNoD","timeUntil","endTime","secondOfDay","nanoOfDay","_hour","_minute","_second","_nanoOfSecond","_nano","ham","unitDur","dur","newHour","mofd","newMofd","newMinute","sofd","newSofd","newSecond","nofd","newNofd","newNano","hourValue","minuteValue","secondValue","nanoValue","NOON","NANOS_PER_MILLI","systemUTC","ofEpochMilli","ofEpochMicro","epochMicro","MIN_SECONDS","nval","plusMicros","_plus","microsToAdd","minusMicros","microsToSubtract","_nanosUntil","_microsUntil","toEpochMilli","_secondsUntil","secsDiff","totalMicros","nanosDiff","otherInstant","SystemClock","fixed","fixedInstant","FixedClock","baseClock","OffsetClock","withZone","_Clock","Date","getTime","_Clock2","_instant","_zoneId","_Clock3","_baseClock","ZoneOffsetTransition","_transition","_offsetBefore","_offsetAfter","dateTimeBefore","durationSeconds","d","SystemDefaultZoneRules","offsetInMinutes","getTimezoneOffset","offsetInMinutesBeforePossibleTransition","epochMilliSystemZone","offsetInMinutesAfterPossibleTransition","_throwNotSupported","SystemDefaultZoneId","ZoneIdFactory","SYSTEM_DEFAULT_ZONE_ID_INSTANCE","SYSTEM","isInit","YearConstantsInit","DurationInit","ChronoUnitInit","ChronoFieldInit","LocalTimeInit","IsoFieldsInit","TemporalQueriesInit","DayOfWeekInit","InstantInit","LocalDateInit","LocalDateTimeInit","YearInit","MonthInit","YearMonthInit","MonthDayInit","PeriodInit","ZoneOffsetInit","ZonedDateTimeInit","ZoneIdInit","IsoChronologyInit","DateTimeFormatterInit","DateTimeFormatterBuilderInit","OffsetDateTimeInit","OffsetTimeInit","ToNativeJsConverter","zonedDateTime","toDate","convert","nativeJs","bindUse","jsJoda","used","use","fn","jsJodaExports"],"mappings":";;;;;AAAA;AACA;AACA;AACA;;AAEA,SAASA,eAAeA,CAACC,IAAI,EAAEC,IAAI,EAAEC,eAAe,EAAU;AAAA,EAAA,IAAzBA,eAAe,KAAA,KAAA,CAAA,EAAA;AAAfA,IAAAA,eAAe,GAAGC,KAAK,CAAA;AAAA,GAAA;EACxD,SAASC,eAAeA,CAACC,OAAO,EAAE;AAC9B,IAAA,IAAI,CAACF,KAAK,CAACG,iBAAiB,EAAE;MAC1B,IAAI,CAACC,KAAK,GAAI,IAAIJ,KAAK,EAAE,CAAEI,KAAK,CAAA;AACpC,KAAC,MAAM;MACHJ,KAAK,CAACG,iBAAiB,CAAC,IAAI,EAAE,IAAI,CAACE,WAAW,CAAC,CAAA;AACnD,KAAA;IACA,IAAI,CAACH,OAAO,GAAGA,OAAO,CAAA;IACtBJ,IAAI,IAAIA,IAAI,CAACQ,KAAK,CAAC,IAAI,EAAEC,SAAS,CAAC,CAAA;IACnC,IAAI,CAACC,QAAQ,GAAG,YAAY;AACxB,MAAA,OAAU,IAAI,CAACX,IAAI,GAAK,IAAA,GAAA,IAAI,CAACK,OAAO,CAAA;KACvC,CAAA;AACL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