{"version":3,"sources":["webpack:///webpack/universalModuleDefinition","webpack:///webpack/bootstrap 2b4167daeee6b8132183","webpack:///./src/js-joda.js","webpack:///./src/Clock.js","webpack:///./src/assert.js","webpack:///./src/errors.js","webpack:///./src/Instant.js","webpack:///./src/LocalTime.js","webpack:///./src/MathUtil.js","webpack:///./src/LocalDateTime.js","webpack:///./src/LocalDate.js","webpack:///./src/chrono/IsoChronology.js","webpack:///./src/Enum.js","webpack:///./src/Month.js","webpack:///./src/temporal/ChronoField.js","webpack:///./src/temporal/ChronoUnit.js","webpack:///./src/Duration.js","webpack:///./src/temporal/TemporalAmount.js","webpack:///./src/YearConstants.js","webpack:///./src/temporal/TemporalUnit.js","webpack:///./src/temporal/TemporalField.js","webpack:///./src/temporal/ValueRange.js","webpack:///./src/format/DateTimeFormatterBuilder.js","webpack:///./src/ZoneIdFactory.js","webpack:///./src/StringUtil.js","webpack:///./src/ZoneOffset.js","webpack:///./src/ZoneId.js","webpack:///./src/temporal/TemporalQueries.js","webpack:///./src/zone/ZoneRules.js","webpack:///./src/ZoneRegion.js","webpack:///./src/zone/SystemDefaultZoneId.js","webpack:///./src/zone/SystemDefaultZoneRules.js","webpack:///./src/chrono/ChronoLocalDate.js","webpack:///./src/format/DateTimeFormatter.js","webpack:///./src/Period.js","webpack:///./src/format/ParsePosition.js","webpack:///./src/format/DateTimeBuilder.js","webpack:///./src/format/EnumMap.js","webpack:///./src/format/ResolverStyle.js","webpack:///./src/temporal/Temporal.js","webpack:///./src/temporal/TemporalAccessor.js","webpack:///./src/format/DateTimeParseContext.js","webpack:///./src/format/DateTimePrintContext.js","webpack:///./src/format/SignStyle.js","webpack:///./src/format/StringBuilder.js","webpack:///./src/temporal/TemporalQuery.js","webpack:///./src/temporal/IsoFields.js","webpack:///./src/DayOfWeek.js","webpack:///./src/format/DecimalStyle.js","webpack:///./src/format/TextStyle.js","webpack:///./src/Year.js","webpack:///./src/MonthDay.js","webpack:///./src/YearMonth.js","webpack:///./src/ZonedDateTime.js","webpack:///./src/chrono/ChronoZonedDateTime.js","webpack:///./src/chrono/ChronoLocalDateTime.js","webpack:///./src/temporal/NativeJsTemporal.js","webpack:///./src/temporal/TemporalAdjusters.js","webpack:///./src/temporal/TemporalAdjuster.js","webpack:///./src/_init.js","webpack:///./src/temporal/TemporalQueriesFactory.js"],"names":[],"mappings":";;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,O;ACVA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,uBAAe;AACf;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;;;;;;;;;;;;;;;;mBCjCS,K;;;;;;;;;oBACA,iB;;;;;;oBAAmB,sB;;;;;;;;;uBACnB,S;;;;;;;;;sBACA,Q;;;;;;;;;qBACA,O;;;;;;;;;uBACA,S;;;;;;;;;uBACA,S;;;;;;;;;2BACA,a;;;;;;;;;mBACA,K;;;;;;;;;sBACA,Q;;;;;;;;;oBACA,M;;;;;;;;;kBACA,I;;;;;;;;;uBACA,S;;;;;;;;;2BACA,a;;;;;;;;;wBACA,U;;;;;;;;;oBACA,M;;;;;;;;;8BAED,Q;;;;;;;;;yBACA,W;;;;;;;;;wBACA,U;;;;;;;;;uBACA,S;;;;;;;;;+BACA,iB;;;;;;;;;6BACA,e;;;;;;;;;+BAEA,iB;;;;;;;;;sCACA,wB;;;;;;;;;2BACA,a;;;;AAER,yB;;;;;;;;;;;AC3BA;;AACA;;AACA;;AACA;;;;;;;;;;;;KA0Ca,K,WAAA,K;;;;;WAUF,S,wBAAY;AACf,gBAAO,IAAI,WAAJ,CAAgB,uBAAW,GAA3B,CAAP;AACH,M;;WAiBM,iB,gCAAoB;AACvB,gBAAO,IAAI,WAAJ,CAAgB,eAAO,aAAP,EAAhB,CAAP;AACH,M;;WAOM,M,mBAAO,I,EAAK;AACf,gBAAO,IAAI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AAY,SAA7B,CAArB,CAAP;AACH;AACD,gBAAO,IAAP;AACH,MAL4B,CAA7B;;AAUA,sCAAgB,UAAhB,GAA6B,wCAAoB,YAApB,EAAkC,UAAC,QAAD,EAAc;AACzE,aAAI,SAAS,WAAT,CAAqB,yBAAY,WAAjC,CAAJ,EAAmD;AAC/C,oBAAO,qBAAU,WAAV,CAAsB,SAAS,OAAT,CAAiB,yBAAY,WAA7B,CAAtB,CAAP;AACH;AACD,gBAAO,IAAP;AACH,MAL4B,CAA7B;AAMH,E","file":"js-joda.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"JSJoda\"] = factory();\n\telse\n\t\troot[\"JSJoda\"] = factory();\n})(this, function() {\nreturn \n\n\n/** WEBPACK FOOTER **\n ** webpack/universalModuleDefinition\n **/"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId])\n \t\t\treturn installedModules[moduleId].exports;\n\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\texports: {},\n \t\t\tid: moduleId,\n \t\t\tloaded: false\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.loaded = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(0);\n\n\n\n/** WEBPACK FOOTER **\n ** webpack/bootstrap 2b4167daeee6b8132183\n **/","/**\n * @copyright (c) 2016, Philipp Thuerwaechter & Pattrick Hueper\n * @license BSD-3-Clause (see LICENSE in the root directory of this source tree)\n */\n\nexport { Clock } from './Clock';\nexport { DateTimeException, DateTimeParseException } from './errors';\nexport { DayOfWeek } from './DayOfWeek';\nexport { Duration } from './Duration';\nexport { Instant } from './Instant';\nexport { LocalDate } from './LocalDate';\nexport { LocalTime } from './LocalTime';\nexport { LocalDateTime } from './LocalDateTime';\nexport { Month } from './Month';\nexport { MonthDay } from './MonthDay';\nexport { Period } from './Period';\nexport { Year } from './Year';\nexport { YearMonth } from './YearMonth';\nexport { ZonedDateTime } from './ZonedDateTime';\nexport { ZoneOffset } from './ZoneOffset';\nexport { ZoneId } from './ZoneId';\n\nexport {nativeJs} from './temporal/NativeJsTemporal';\nexport {ChronoField} from './temporal/ChronoField';\nexport {ChronoUnit} from './temporal/ChronoUnit';\nexport {IsoFields} from './temporal/IsoFields';\nexport {TemporalAdjusters} from './temporal/TemporalAdjusters';\nexport {TemporalQueries} from './temporal/TemporalQueries';\n\nexport {DateTimeFormatter} from './format/DateTimeFormatter';\nexport {DateTimeFormatterBuilder} from './format/DateTimeFormatterBuilder';\nexport {ResolverStyle} from './format/ResolverStyle';\n\nimport './_init';\n\n\n/** WEBPACK FOOTER **\n ** ./src/js-joda.js\n **/","/**\n * @copyright (c) 2016, Philipp Thuerwaechter & Pattrick Hueper\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 {@code Clock} is optional. All key date-time classes also have a\n * {@code 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 {@code Clock} into any method\n * that requires the current instant.\n *\n * This approach allows an alternate clock, such as {@link #fixed(Instant, ZoneId) fixed}\n * or {@link #offset(Clock, Duration) offset} to be used during testing.\n *
\n * The {@code 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\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 {@link #systemUTC() UTC clock} 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 {ZoneOffset} zoneOffset 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, zoneOffset) {\n return new FixedClock(fixedInstant, zoneOffset);\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/**\n * Implementation of a clock that always returns the latest time from\n * {@link Date#getTime()}.\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 /**\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 */\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\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/Clock.js\n **/","/**\n * @copyright (c) 2016, Philipp Thuerwaechter & Pattrick Hueper\n * @license BSD-3-Clause (see LICENSE in the root directory of this source tree)\n */\nimport {NullPointerException, IllegalArgumentException} from './errors';\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\nexport function requireNonNull(value, parameterName) {\n if (value == null) {\n throw new NullPointerException(parameterName + ' must not be null');\n }\n return value;\n}\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\nexport function abstractMethodFail(methodName){\n throw new TypeError('abstract mehod \"' + methodName + '\" is not implemented');\n}\n\n\n/** WEBPACK FOOTER **\n ** ./src/assert.js\n **/","/**\n * @copyright (c) 2016, Philipp Thuerwaechter & Pattrick Hueper\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 E(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\n }\n E.prototype = new superErrorClass();\n E.prototype.name = name;\n E.prototype.constructor = E;\n return E;\n}\n\nexport var DateTimeException = createErrorType('DateTimeException', messageWithCause);\nexport var DateTimeParseException = createErrorType('DateTimeParseException', messageForDateTimeParseException);\nexport var UnsupportedTemporalTypeException = createErrorType('UnsupportedTemporalTypeException', null, DateTimeException);\nexport var ArithmeticException = createErrorType('ArithmeticException');\nexport var IllegalArgumentException = createErrorType('IllegalArgumentException');\nexport var IllegalStateException = createErrorType('IllegalStateException');\nexport var 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\n\n/** WEBPACK FOOTER **\n ** ./src/errors.js\n **/","/**\n * @copyright (c) 2016, Philipp Thuerwaechter & Pattrick Hueper\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 {MathUtil} from './MathUtil';\n\nimport {Temporal} from './temporal/Temporal';\nimport {ChronoField} from './temporal/ChronoField';\nimport {ChronoUnit} from './temporal/ChronoUnit';\nimport {TemporalQueries} from './temporal/TemporalQueries';\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 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 var secs = MathUtil.floorDiv(epochMilli, 1000);\n var mos = MathUtil.floorMod(epochMilli, 1000);\n return Instant._create(secs, mos * 1000000);\n }\n\n /**\n * Obtains an instance of {@code Instant} from a temporal object.\n *
\n * A {@code TemporalAccessor} represents some form of date and time information.\n * This factory converts the arbitrary temporal object to an instance of {@code Instant}.\n *
\n * The conversion extracts the {@link ChronoField#INSTANT_SECONDS INSTANT_SECONDS}\n * and {@link ChronoField#NANO_OF_SECOND 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, {@code 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 {@code Instant}\n */\n static from(temporal) {\n try {\n let instantSecs = temporal.getLong(ChronoField.INSTANT_SECONDS);\n let 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 {@code Instant} from a text string such as\n * {@code 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 = seconds;\n this._nanos = 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 the {@link #range(TemporalField) range} and\n * {@link #get(TemporalField) 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 * If the field is not a {@code ChronoField}, then the result of this method\n * is obtained by invoking {@code TemporalField.isSupportedBy(TemporalAccessor)}\n * passing {@code 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 {@link #isSupported(TemporalField) supported fields} will return\n * appropriate range instances.\n * All other {@code ChronoField} instances will throw a {@code DateTimeException}.\n *
\n * If the field is not a {@code ChronoField}, then the result of this method\n * is obtained by invoking {@code TemporalField.rangeRefinedBy(TemporalAccessor)}\n * passing {@code 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 {@code 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 {@link #isSupported(TemporalField) supported fields} will return valid\n * values based on this date-time, except {@code INSTANT_SECONDS} which is too\n * large to fit in an {@code int} and throws a {@code DateTimeException}.\n * All other {@code ChronoField} instances will throw a {@code DateTimeException}.\n *
\n * If the field is not a {@code ChronoField}, then the result of this method\n * is obtained by invoking {@code TemporalField.getFrom(TemporalAccessor)}\n * passing {@code 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 {@code 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 {@link #isSupported(TemporalField) supported fields} will return valid\n * values based on this date-time.\n * All other {@code ChronoField} instances will throw a {@code DateTimeException}.\n *
\n * If the field is not a {@code ChronoField}, then the result of this method\n * is obtained by invoking {@code TemporalField.getFrom(TemporalAccessor)}\n * passing {@code 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 {@code 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 {@code 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 * function overloading for {@link Instant.with}\n *\n * if called with 1 argument {@link Instant.withTemporalAdjuster} is called\n * otherwise {@link Instant.with2}\n *\n * @param {!(TemporalAdjuster|TemporalField)} adjusterOrField\n * @param {number} newValue\n * @returns {Instant}\n */\n with(adjusterOrField, newValue){\n if(arguments.length === 1){\n return this.withTemporalAdjuster(adjusterOrField);\n } else {\n return this.with2(adjusterOrField, newValue);\n }\n }\n /**\n * Returns an adjusted copy of this instant.\n *
\n * This returns a new {@code Instant}, 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 * The result of this method is obtained by invoking the\n * {@link TemporalAdjuster#adjustInto(Temporal)} method on the\n * specified adjuster passing {@code 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 {Instant} an {@code Instant} based on {@code 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 withTemporalAdjuster(adjuster) {\n requireNonNull(adjuster, 'adjuster');\n return adjuster.adjustInto(this);\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 {@code 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 * In all cases, if the new value is outside the valid range of values for the field\n * then a {@code DateTimeException} will be thrown.\n *
\n * All other {@code ChronoField} instances will throw a {@code DateTimeException}.\n *
\n * If the field is not a {@code ChronoField}, then the result of this method\n * is obtained by invoking {@code TemporalField.adjustInto(Temporal, long)}\n * passing {@code 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 {@code Instant} based on {@code 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 with2(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 let nval = newValue * NANOS_PER_MILLI;\n return (nval !== this._nanos? Instant._create(this._seconds, nval) : this);\n }\n case ChronoField.MICRO_OF_SECOND: {\n let 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 {@code 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 {@code toString}.\n * For example, truncating with the {@link ChronoUnit#MINUTES MINUTES} unit will\n * round down to the nearest minute, setting the seconds and nanoseconds to zero.\n *
\n * The unit must have a {@linkplain TemporalUnit#getDuration() duration}\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 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 {@code 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 var 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 var 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 var nod = MathUtil.intMod(this._seconds, LocalTime.SECONDS_PER_DAY) * LocalTime.NANOS_PER_SECOND + this._nanos;\n var result = MathUtil.intDiv(nod, dur) * dur;\n return this.plusNanos(result - nod);\n }\n\n //-----------------------------------------------------------------------\n /**\n *\n * @param {TemporalAmount|number} amount\n * @param {TemporalUnit} unit - only required if first param is a TemporalAmount\n * @return {Instant}\n */\n plus(amount, unit){\n if(arguments.length === 1){\n return this.plus1(amount);\n } else {\n return this.plus2(amount, unit);\n }\n }\n\n /**\n * @param {!TemporalAmount} amount\n * @return {Instant}\n * @throws DateTimeException\n * @throws ArithmeticException\n */\n plus1(amount) {\n requireNonNull(amount, 'amount');\n return amount.addTo(this);\n }\n\n /**\n * @param {!number} amountToAdd\n * @param {!TemporalUnit} unit\n * @return {Instant}\n * @throws DateTimeException\n * @throws ArithmeticException\n */\n plus2(amountToAdd, unit) {\n if (unit instanceof ChronoUnit) {\n switch (unit) {\n case ChronoUnit.NANOS: return this.plusNanos(amountToAdd);\n case ChronoUnit.MICROS: return this._plus(MathUtil.intDiv(amountToAdd, 1000000), MathUtil.intMod(amountToAdd, 1000000) * 1000);\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 {@code 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 {@code 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 {@code 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 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 {@code 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 | nanosToAdd) === 0) {\n return this;\n }\n var epochSec = this._seconds + secondsToAdd;\n epochSec = epochSec + MathUtil.intDiv(nanosToAdd, LocalTime.NANOS_PER_SECOND);\n var _nanosToAdd = nanosToAdd % LocalTime.NANOS_PER_SECOND;\n var nanoAdjustment = this._nanos + _nanosToAdd;\n return Instant.ofEpochSecond(epochSec, nanoAdjustment);\n }\n\n //-----------------------------------------------------------------------\n /**\n *\n * @param {TemporalAmount|number} amount\n * @param {TemporalUnit} unit - only required if first param is a TemporalAmount\n * @return {Instant}\n */\n minus(amount, unit){\n if(arguments.length === 1){\n return this.minus1(amount);\n } else {\n return this.minus2(amount, unit);\n }\n }\n\n /**\n * @param {!TemporalAmount} amount\n * @return {Instant}\n * @throws DateTimeException\n * @throws ArithmeticException\n */\n minus1(amount) {\n requireNonNull(amount, 'amount');\n return amount.subtractFrom(this);\n }\n\n /**\n * @param {!number} amountToSubtract\n * @param {!TemporalUnit} unit\n * @return {Instant}\n * @throws DateTimeException\n * @throws ArithmeticException\n */\n minus2(amountToSubtract, unit) {\n return this.plus2(-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 {@code 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 {@code 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 {@code 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 /**\n * Queries this instant using the specified query.\n *
\n * This queries this instant using the specified query strategy object.\n * The {@code 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(TemporalAccessor)} method on the\n * specified query passing {@code 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(TemporalField, long)}\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(TemporalAdjuster)}:\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 {@code 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 {@code Temporal} passed to this method is converted to a\n * {@code Instant} using {@link #from(TemporalAccessor)}.\n * For example, the period in days between two dates can be calculated\n * using {@code startInstant.until(endInstant, SECONDS)}.\n *
\n * This method operates in association with {@link TemporalUnit#between}.\n * The result of this method is a {@code long} representing the amount of\n * the specified unit. By contrast, the result of {@code 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 {@code NANOS}, {@code MICROS}, {@code MILLIS}, {@code SECONDS},\n * {@code MINUTES}, {@code HOURS}, {@code HALF_DAYS} and {@code DAYS}\n * are supported. Other {@code ChronoUnit} values will throw an exception.\n *
\n * If the unit is not a {@code ChronoUnit}, then the result of this method\n * is obtained by invoking {@code TemporalUnit.between(Temporal, Temporal)}\n * passing {@code 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 {@code 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 let 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 MathUtil.intDiv(this._nanosUntil(end), 1000);\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 _nanosUntil(end) {\n let secsDiff = MathUtil.safeSubtract(end.epochSecond(), this.epochSecond());\n let 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 let 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 {@code OffsetDateTime}.\n *
\n * This returns an {@code 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\n * {@link OffsetDateTime#ofInstant(Instant, ZoneId) OffsetDateTime.ofInstant(this, offset)}.\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 {@code ZonedDateTime}.\n *
\n * This returns an {@code 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\n * {@link ZonedDateTime#ofInstant(Instant, ZoneId) ZonedDateTime.ofInstant(this, zone)}.\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 {@code 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 var 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 var 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 {*} otherInstant - the other instant, null/ undefined returns false\n * @return {boolean} true if the other instant is equal to this one\n */\n equals(otherInstant) {\n if(this === otherInstant){\n return true;\n }\n if(otherInstant instanceof Instant){\n return this.epochSecond() === otherInstant.epochSecond() &&\n this.nano() === otherInstant.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 ((this._seconds ^ (this._seconds >>> 24))) + 51 * 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\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\n/** WEBPACK FOOTER **\n ** ./src/Instant.js\n **/","/**\n * @copyright (c) 2016, Philipp Thuerwaechter & Pattrick Hueper\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 {assert, requireNonNull, requireInstance} from './assert';\nimport {DateTimeException, UnsupportedTemporalTypeException, IllegalArgumentException} from './errors';\n\nimport {Clock} from './Clock';\nimport {LocalDateTime} from './LocalDateTime';\nimport {ZoneId} from './ZoneId';\n\nimport {DateTimeFormatter} from './format/DateTimeFormatter';\n\nimport {ChronoField} from './temporal/ChronoField';\nimport {ChronoUnit} from './temporal/ChronoUnit';\nimport {Temporal} from './temporal/Temporal';\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 {@code 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 *
\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 {@link Clock dependency injection}.\n *\n * @param {Clock|ZoneId} clockOrZone - the zone ID or clock to use, if null Clock.systemDefaultZone() is used.\n * @return {LocalDateTime} 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 {@link Clock dependency injection}.\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 {LocalDate} the current date, not null\n */\n static ofInstant(instant, zone=ZoneId.systemDefault()){\n var offset = zone.rules().offset(instant);\n var 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 {@code 0} to {@code 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 var hours = MathUtil.intDiv(secondOfDay, LocalTime.SECONDS_PER_HOUR);\n secondOfDay -= hours * LocalTime.SECONDS_PER_HOUR;\n var 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 {@code 0} to {@code 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 var hours = MathUtil.intDiv(nanoOfDay, LocalTime.NANOS_PER_HOUR);\n nanoOfDay -= hours * LocalTime.NANOS_PER_HOUR;\n var minutes = MathUtil.intDiv(nanoOfDay, LocalTime.NANOS_PER_MINUTE);\n nanoOfDay -= minutes * LocalTime.NANOS_PER_MINUTE;\n var 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 the {@link ChronoField#NANO_OF_DAY NANO_OF_DAY} field.\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 var 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 {!String} formatter - the formatter to use, not null\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 */\n constructor(hour=0, minute=0, second=0, nanoOfSecond=0) {\n super();\n LocalTime._validate(hour, minute, second, nanoOfSecond);\n if ((minute | second | nanoOfSecond) === 0) {\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 the {@link #range(TemporalField) range} and\n * {@link #get(TemporalField) 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 * 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 {@link #isSupported(TemporalField) 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 {@code TemporalField.rangeRefinedBy(TemporalAccessor)}\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 {@code 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 {@link #isSupported(TemporalField) supported fields} 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 {@code 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 {@code 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 {@link #isSupported(TemporalField) supported fields} 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: var ham = MathUtil.intMod(this._hour, 12); return (ham % 12 === 0 ? 12 : ham);\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 * function overloading for {@link LocalDate.with}\n * \n * if called with 1 (or less) arguments {@link LocalTime.withTemporalAdjuster} is called.\n * Otherwise {@link LocalTime.with2} is called.\n *\n * @param {!(TemporalAdjuster|ChronoField)} adjusterOrField\n * @param {number} newValue - only required if called with 2 arguments\n * @return {LocalTime}\n */\n with(adjusterOrField, newValue){\n if(arguments.length < 2){\n return this.withTemporalAdjuster(adjusterOrField);\n } else {\n return this.with2(adjusterOrField, newValue);\n }\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 withTemporalAdjuster(adjuster) {\n requireNonNull(adjuster, 'adjuster');\n // optimizations\n if (adjuster instanceof LocalTime) {\n return adjuster;\n }\n assert(typeof adjuster.adjustInto === 'function', 'adjuster', IllegalArgumentException);\n return adjuster.adjustInto(this);\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 * 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 {!ChronoField} 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 with2(field, newValue) {\n requireNonNull(field, '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 {@linkplain TemporalUnit#getDuration() duration}\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 var 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 var 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 var nod = this.toNanoOfDay();\n return LocalTime.ofNanoOfDay(MathUtil.intDiv(nod, dur) * dur);\n }\n\n //-----------------------------------------------------------------------\n\n /**\n * function overloading for {@link LocalDate.plus}\n *\n * if called with 1 (or less) arguments {@link LocalTime.plus1} is called.\n * Otherwise {@link LocalTime.plus2} is called.\n *\n * @param {!(TemporalAmount|number)} amount\n * @param {ChronoUnit} unit - only required if called with 2 arguments\n * @return {LocalTime}\n */\n plus(amount, unit){\n if(arguments.length < 2){\n return this.plus1(amount);\n } else {\n return this.plus2(amount, unit);\n }\n }\n\n /**\n * Returns a copy of this date with the specified period added.\n *
\n * This method returns a new time based on this time with the specified period added.\n * The amount is typically {@link Period} but may be any other type implementing\n * the {@link TemporalAmount} interface.\n * The calculation is delegated to the specified adjuster, which typically calls\n * back to {@link #plus(long, TemporalUnit)}.\n *
\n * This instance is immutable and unaffected by this method call.\n *\n * @param {TemporalAmount} amount - the amount to add, not null\n * @return {LocalTime} a {@link LocalTime} based on this time with the addition made, not null\n * @throws {DateTimeException} if the addition cannot be made\n * @throws {ArithmeticException} if numeric overflow occurs\n */\n plus1(amount) {\n requireNonNull(amount, 'amount');\n return amount.addTo(this);\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 {ChronoUnit} 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 plus2(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 var 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 var mofd = this._hour * LocalTime.MINUTES_PER_HOUR + this._minute;\n var 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 var newHour = MathUtil.intDiv(newMofd, LocalTime.MINUTES_PER_HOUR);\n var 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 var sofd = this._hour * LocalTime.SECONDS_PER_HOUR +\n this._minute * LocalTime.SECONDS_PER_MINUTE + this._second;\n var 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 var newHour = MathUtil.intDiv(newSofd, LocalTime.SECONDS_PER_HOUR);\n var newMinute = MathUtil.intMod(MathUtil.intDiv(newSofd, LocalTime.SECONDS_PER_MINUTE), LocalTime.MINUTES_PER_HOUR);\n var 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 var nofd = this.toNanoOfDay();\n var 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 var newHour = MathUtil.intDiv(newNofd, LocalTime.NANOS_PER_HOUR);\n var newMinute = MathUtil.intMod(MathUtil.intDiv(newNofd, LocalTime.NANOS_PER_MINUTE), LocalTime.MINUTES_PER_HOUR);\n var newSecond = MathUtil.intMod(MathUtil.intDiv(newNofd, LocalTime.NANOS_PER_SECOND), LocalTime.SECONDS_PER_MINUTE);\n var newNano = MathUtil.intMod(newNofd, LocalTime.NANOS_PER_SECOND);\n return new LocalTime(newHour, newMinute, newSecond, newNano);\n }\n\n //-----------------------------------------------------------------------\n /**\n * function overloading for {@link LocalDate.minus}\n *\n * if called with 1 (or less) arguments {@link LocalTime.minus1} is called.\n * Otherwise {@link LocalTime.minus2} is called.\n *\n * @param {!(TemporalAmount|number)} amount\n * @param {ChronoUnit} unit - only required if called with 2 arguments\n * @return {LocalTime}\n */\n minus(amount, unit){\n if(arguments.length < 2){\n return this.minus1(amount);\n } else {\n return this.minus2(amount, unit);\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 * The amount is typically {@link Period} but may be any other type implementing\n * the {@link TemporalAmount} interface.\n * The calculation is delegated to the specified adjuster, which typically calls\n * back to {@link #minus(long, TemporalUnit)}.\n *
\n * This instance is immutable and unaffected by this method call.\n *\n * @param {TemporalAmount} amount - the amount to subtract, not null\n * @return {LocalTime} a {@link LocalTime} based on this time with the subtraction made, not null\n * @throws {DateTimeException} if the subtraction cannot be made\n * @throws {ArithmeticException} if numeric overflow occurs\n */\n\n minus1(amount) {\n requireNonNull(amount, 'amount');\n return amount.subtractFrom(this);\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 minus2(amountToSubtract, unit) {\n requireNonNull(unit, 'unit');\n return this.plus2(-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(TemporalAccessor)} 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 {@code startTime.until(endTime, HOURS)}.\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 {@code long} representing the amount of\n * the specified unit. By contrast, the result of {@code 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 var end = LocalTime.from(endExclusive);\n if (unit instanceof ChronoUnit) {\n var 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/*\n atOffset(offset) {\n return OffsetTime.of(this, offset);\n }\n*/\n\n //-----------------------------------------------------------------------\n /**\n * Extracts the time as seconds of day,\n * from {@code 0} to {@code 24 * 60 * 60 - 1}.\n *\n * @return {number} the second-of-day equivalent to this time\n */\n toSecondOfDay() {\n var 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,\n * from {@code 0} to {@code 24 * 60 * 60 * 1,000,000,000 - 1}.\n *\n * @return {number} the nano of day equivalent to this time\n */\n toNanoOfDay() {\n var 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 {@code other} is null\n */\n compareTo(other) {\n requireNonNull(other, 'other');\n requireInstance(other, LocalTime, 'other');\n var 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 {@code 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 {@code 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 var nod = this.toNanoOfDay();\n return (nod ^ (nod >>> 24));\n }\n\n //-----------------------------------------------------------------------\n /**\n * Outputs this time as a {@link String}, such as {@code 10:15}.\n *
\n * The output will be one of the following ISO-8601 formats:\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 var buf = '';\n var hourValue = this._hour;\n var minuteValue = this._minute;\n var secondValue = this._second;\n var 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 * Outputs this time as a {@link String} using the formatter.\n *
\n * This time will be passed to the formatter\n * {@link DateTimeFormatter#format(TemporalAccessor) print method}.\n *\n * @param {DateTineFormatter} 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 i = 0; i < 24; i++) {\n LocalTime.HOURS[i] = makeLocalTimeConst(i);\n }\n\n function makeLocalTimeConst(hour = 0, minute = 0, second = 0, nano = 0) {\n var localTime = Object.create(LocalTime.prototype);\n Temporal.call(localTime);\n localTime._hour = hour;\n localTime._minute = minute;\n localTime._second = second;\n localTime._nano = nano;\n return localTime;\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 = makeLocalTimeConst(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 * Hours per day.\n */\n LocalTime.HOURS_PER_DAY = 24;\n /**\n * Minutes per hour.\n */\n LocalTime.MINUTES_PER_HOUR = 60;\n /**\n * Minutes per day.\n */\n LocalTime.MINUTES_PER_DAY = LocalTime.MINUTES_PER_HOUR * LocalTime.HOURS_PER_DAY;\n /**\n * Seconds per minute.\n */\n LocalTime.SECONDS_PER_MINUTE = 60;\n /**\n * Seconds per hour.\n */\n LocalTime.SECONDS_PER_HOUR = LocalTime.SECONDS_PER_MINUTE * LocalTime.MINUTES_PER_HOUR;\n /**\n * Seconds per day.\n */\n LocalTime.SECONDS_PER_DAY = LocalTime.SECONDS_PER_HOUR * LocalTime.HOURS_PER_DAY;\n /**\n * Milliseconds per day.\n */\n LocalTime.MILLIS_PER_DAY = LocalTime.SECONDS_PER_DAY * 1000;\n /**\n * Microseconds per day.\n */\n LocalTime.MICROS_PER_DAY = LocalTime.SECONDS_PER_DAY * 1000000;\n /**\n * Nanos per second.\n */\n LocalTime.NANOS_PER_SECOND = 1000000000;\n /**\n * Nanos per minute.\n */\n LocalTime.NANOS_PER_MINUTE = LocalTime.NANOS_PER_SECOND * LocalTime.SECONDS_PER_MINUTE;\n /**\n * Nanos per hour.\n */\n LocalTime.NANOS_PER_HOUR = LocalTime.NANOS_PER_MINUTE * LocalTime.MINUTES_PER_HOUR;\n /**\n * Nanos per day.\n */\n LocalTime.NANOS_PER_DAY = LocalTime.NANOS_PER_HOUR * LocalTime.HOURS_PER_DAY;\n}\n\n\n/** WEBPACK FOOTER **\n ** ./src/LocalTime.js\n **/","/**\n * @copyright (c) 2016, Philipp Thuerwaechter & Pattrick Hueper\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 var 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 var 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 var 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 var 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 var 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 let 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 var 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 > MAX_SAFE_INTEGER || value < MIN_SAFE_INTEGER) {\n throw new ArithmeticException('Calculation overflows an int: ' + value);\n }\n }\n\n /**\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}\n\nMathUtil.MAX_SAFE_INTEGER = MAX_SAFE_INTEGER;\nMathUtil.MIN_SAFE_INTEGER = MIN_SAFE_INTEGER;\n\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/MathUtil.js\n **/","/*\n * @copyright (c) 2016, Philipp Thuerwaechter & Pattrick Hueper\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 {assert, requireNonNull, requireInstance} from './assert';\nimport {DateTimeException, UnsupportedTemporalTypeException, IllegalArgumentException} from './errors';\n\nimport {Clock} from './Clock';\nimport {Instant} from './Instant';\nimport {LocalDate} from './LocalDate';\nimport {LocalTime} from './LocalTime';\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 {@code 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 *
\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 {@link Clock dependency injection}.\n *
\n * If the argument is an instance of ZoneId this will query the {@link Clock#system(ZoneId) system clock} 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 {@link Clock 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 // var epochMilli = clock.millis();\n // var 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 var localSecond = MathUtil.floorDiv(epochMilli, 1000) + offset.totalSeconds(); \n var localEpochDay = MathUtil.floorDiv(localSecond, LocalTime.SECONDS_PER_DAY);\n var secsOfDay = MathUtil.floorMod(localSecond, LocalTime.SECONDS_PER_DAY);\n var nanoOfSecond = MathUtil.floorMod(epochMilli, 1000) * 1000000;\n var date = LocalDate.ofEpochDay(localEpochDay);\n var 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 && (arguments[0] instanceof LocalDate || arguments[1] instanceof LocalTime)){\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=0] - the year to represent, from MIN_YEAR to MAX_YEAR\n * @param {number} [month=0] - the month-of-year to represent, from 1 to 12 or from a Month\n * @param {number} [dayOfMonth=0] - 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=0, month=0, dayOfMonth=0, hour=0, minute=0, second=0, nanoOfSecond=0) {\n var date = LocalDate.of(year, month, dayOfMonth);\n var 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 var rules = zone.rules();\n var offset = 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 var localSecond = epochSecond + offset.totalSeconds(); // overflow caught later\n var localEpochDay = MathUtil.floorDiv(localSecond, LocalTime.SECONDS_PER_DAY);\n var secsOfDay = MathUtil.floorMod(localSecond, LocalTime.SECONDS_PER_DAY);\n var date = LocalDate.ofEpochDay(localEpochDay);\n var 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, {@code 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 var date = LocalDate.from(temporal);\n var 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 */\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 === newDate && this._time === 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 * If the field is not a {@link ChronoField}, then the result of this method\n * is obtained by invoking {@link TemporalField.isSupportedBy}\n * passing {@link 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 {@link #isSupported(TemporalField) 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 {@code TemporalField.rangeRefinedBy(TemporalAccessor)}\n * passing {@link 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 {@link 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 {@link #isSupported(TemporalField) supported fields} 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 {@link 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 {@code TemporalField.getFrom(TemporalAccessor)}\n * passing {@link 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 {@link 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 {@link #isSupported(TemporalField) supported fields} 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 {@code TemporalField.getFrom(TemporalAccessor)}\n * passing {@link 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 {@link int} value for the year.\n *
\n * The year returned by this method is proleptic as per {@code get(YEAR)}.\n * To obtain the year-of-era, use {@code 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 {@link 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 {@link int} values mean.\n * If you need access to the primitive {@link int} value then the enum\n * provides the {@link Month#getValue() int value}.\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 {@link 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 {@link 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 {@link int} values mean.\n * If you need access to the primitive {@link int} value then the enum\n * provides the {@link DayOfWeek#getValue() int value}.\n *
\n * Additional information can be obtained from the {@link DayOfWeek}.\n * This includes textual names of the values.\n *\n * @return {number} 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 * function overloading for {@link LocalDateTime.with}\n *\n * if called with 1 argument, {@link LocalDateTime.withTemporalAdjuster} is applied,\n * otherwise {@link LocalDateTime.with2}.\n *\n * @param {!(TemporalAdjuster|TemporalField)} adjusterOrField\n * @param {number} newValue - only require if first argument is a TemporalField\n * @returns {LocalDateTime}\n */\n with(adjusterOrField, newValue){\n if(arguments.length === 1){\n return this.withTemporalAdjuster(adjusterOrField);\n } else {\n return this.with2(adjusterOrField, newValue);\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 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(Temporal)} method on the\n * specified adjuster passing {@link 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 {@link 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 withTemporalAdjuster(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 assert(typeof adjuster.adjustInto === 'function', 'adjuster', IllegalArgumentException);\n return adjuster.adjustInto(this);\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 {@link #isSupported(TemporalField) supported fields} will behave as per\n * the matching method on {@link LocalDate#with(TemporalField, long) LocalDate}\n * or {@link LocalTime#with(TemporalField, long) LocalTime}.\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 {@code TemporalField.adjustInto(Temporal, long)}\n * passing {@link 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 {@link 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 with2(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 var 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 var 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 var 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 var 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 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 {@linkplain TemporalUnit#getDuration() duration}\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 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 * function overloading for {@link LocalDateTime.plus}\n *\n * if called with 1 argument {@link LocalDateTime.plusTemporalAmount} is applied,\n * otherwise {@link LocalDateTime.plus2}\n *\n * @param {!(TemporalAmount|number)} amount\n * @param {TemporalUnit} unit\n * @returns {LocalDateTime}\n */\n plus(amount, unit){\n if(arguments.length === 1){\n return this.plusTemporalAmount(amount);\n } else {\n return this.plus2(amount, unit);\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 time with the specified period added.\n * The amount is typically {@link Period} but may be any other type implementing\n * the {@link TemporalAmount} interface.\n * The calculation is delegated to the specified adjuster, which typically calls\n * back to {@link #plus(long, TemporalUnit)}.\n *
\n * This instance is immutable and unaffected by this method call.\n *\n * @param {TemporalAmount} amount - the amount to add, not null\n * @return {LocalDateTime} based on this date-time with the addition made, not null\n * @throws {DateTimeException} if the addition cannot be made\n * @throws {ArithmeticException} if numeric overflow occurs\n */\n plusTemporalAmount(amount) {\n requireNonNull(amount, 'amount');\n return amount.addTo(this);\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 plus2(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 * 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 var 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 * 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 var 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 var 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 var 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 * function overloading for {@link LocalDateTime.minus}\n *\n * if called with 1 argument {@link LocalDateTime.minusTemporalAmount} is applied,\n * otherwise {@link LocalDateTime.minus2}\n *\n * @param {!(TemporalAmount|number)} amount\n * @param {TemporalUnit} unit\n * @returns {LocalDateTime}\n */\n minus(amount, unit){\n if(arguments.length === 1){\n return this.minusTemporalAmount(amount);\n } else {\n return this.minus2(amount, unit);\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 time with the specified period subtracted.\n * The amount is typically {@link Period} but may be any other type implementing\n * the {@link TemporalAmount} interface.\n * The calculation is delegated to the specified adjuster, which typically calls\n * back to {@link #minus(long, TemporalUnit)}.\n *
\n * This instance is immutable and unaffected by this method call.\n *\n * @param {TemporalAmount} amount - the amount to subtract, not null\n * @return {LocalDateTime} based on this date-time with the subtraction made, not null\n * @throws {DateTimeException} if the subtraction cannot be made\n * @throws {ArithmeticException} if numeric overflow occurs\n */\n minusTemporalAmount(amount) {\n requireNonNull(amount, 'amount');\n return amount.subtractFrom(this);\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 minus2(amountToSubtract, unit) {\n requireNonNull(unit, 'unit');\n return this.plus2(-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 * 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 * 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 | minutes | seconds | nanos) === 0) {\n return this._withDateTime(newDate, this._time);\n }\n var 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 var 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 var curNoD = this._time.toNanoOfDay(); // max 86400000000000\n totNanos = totNanos * sign + curNoD; // total 432000000000000\n totDays += MathUtil.floorDiv(totNanos, LocalTime.NANOS_PER_DAY);\n var newNoD = MathUtil.floorMod(totNanos, LocalTime.NANOS_PER_DAY);\n var 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(TemporalAccessor)} method on the\n * specified query passing {@link 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(TemporalField, long)}\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(TemporalAdjuster)}:\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 {@link 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 {@code 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 {@link 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 {@code TemporalUnit.between(Temporal, Temporal)}\n * passing {@link 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 var end = LocalDateTime.from(endExclusive);\n if (unit instanceof ChronoUnit) {\n if (unit.isTimeBased()) {\n var daysUntil = this._date.daysUntil(end._date);\n var 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 var 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 var endDate = end._date;\n var 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/*\n atOffset(offset) {\n return OffsetDateTime.of(this, offset);\n }\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 rules} 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(LocalDateTime, ZoneOffset, ZoneId)}.\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/*\n if (other instanceof LocalDateTime) {\n return this._compareTo0(other);\n }\n return super.compareTo(other);\n*/\n }\n\n /**\n *\n * @param {!LocalDateTime} other\n * @returns {number}\n * @private\n */\n _compareTo0(other) {\n var 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(ChronoLocalDateTime)},\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 requireNonNull(other, 'other');\n requireInstance(other, LocalDateTime, 'other');\n return this._compareTo0(other) > 0;\n/*\n if (other instanceof LocalDateTime) {\n return this._compareTo0(other) > 0;\n }\n return super.isAfter(other);\n*/\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(ChronoLocalDateTime)},\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 requireNonNull(other, 'other');\n requireInstance(other, LocalDateTime, 'other');\n return this._compareTo0(other) < 0;\n/*\n if (other instanceof LocalDateTime) {\n return this._compareTo0(other) < 0;\n }\n return super.isBefore(other);\n*/\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(ChronoLocalDateTime)},\n * but is the same approach as {@link #DATE_TIME_COMPARATOR}.\n *\n * @param {*} 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 if (other instanceof LocalDateTime) {\n return this._compareTo0(other) === 0;\n }\n return super.isEqual(other);\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 {@link String}, such as {@code 2007-12-03T10:15:30}.\n *
\n * The output will be one of the following ISO-8601 formats:\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 * Outputs this date-time as a {@link String} using the formatter.\n *
\n * This date-time will be passed to the formatter\n * {@link DateTimeFormatter#format(TemporalAccessor) print method}.\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\n/** WEBPACK FOOTER **\n ** ./src/LocalDateTime.js\n **/","/**\n * @copyright (c) 2016, Philipp Thuerwaechter & Pattrick Hueper\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 {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 {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 *
\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 var 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 var moy = Month.of(Math.floor((dayOfYear - 1) / 31 + 1));\n var monthEnd = moy.firstDayOfYear(leap) + moy.length(leap) - 1;\n if (dayOfYear > monthEnd) {\n moy = moy.plus(1);\n }\n var 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 var adjust, adjustCycles, dom, doyEst, marchDoy0, marchMonth0, month, year, 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 marchDoy0 = doyEst;\n marchMonth0 = MathUtil.intDiv(marchDoy0 * 5 + 2, 153);\n month = (marchMonth0 + 2) % 12 + 1;\n dom = marchDoy0 - MathUtil.intDiv(marchMonth0 * 306 + 5, 10) + 1;\n yearEst += MathUtil.intDiv(marchMonth0, 10);\n 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 var 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 if (month instanceof Month) {\n month = month.value();\n }\n LocalDate._validate(year, month, dayOfMonth);\n this._year = MathUtil.safeZero(year);\n this._month = MathUtil.safeZero(month);\n this._day = MathUtil.safeZero(dayOfMonth);\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 var dom;\n ChronoField.YEAR.checkValidValue(year);\n ChronoField.MONTH_OF_YEAR.checkValidValue(month);\n ChronoField.DAY_OF_MONTH.checkValidValue(dayOfMonth);\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 * 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 {@code 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 {@code 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 todays'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 {@link int} values mean.\n * If you need access to the primitive {@link 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 var 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 * function overloading for the {@link LocalDate.with} method.\n *\n * calling \"with\" with one (or less) argument, assumes that the argument is an TemporalAdjuster \n * and {@link LocalDate.withTemporalAdjuster} is called.\n * \n * Otherwise a TemporalField and {@link Number} newValue argument is expected and \n * {@link LocalDate.withFieldAndValue} is called.\n *\n * @param {!(TemporalAdjuster|TemporalField)} fieldOrAdjuster\n * @param {number} newValue - required if first argument is a TemporalField\n * @return {LocalDate} the new LocalDate with the newValue set.\n */\n with(fieldOrAdjuster, newValue){\n if(arguments.length < 2){\n return this.withTemporalAdjuster(fieldOrAdjuster);\n } else {\n return this.withFieldAndValue(fieldOrAdjuster, newValue);\n }\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 {@link this} as the argument.\n *\n * @param {!TemporalAdjuster} adjuster - the adjuster to use, not null\n * @return {LocalDate} a {@link LocalDate} based on {@link 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 withTemporalAdjuster(adjuster) {\n requireNonNull(adjuster, 'adjuster');\n // optimizations\n if (adjuster instanceof LocalDate) {\n return adjuster;\n }\n assert(typeof adjuster.adjustInto === 'function', 'adjuster', IllegalArgumentException);\n return adjuster.adjustInto(this);\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 * 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(Temporal, long)}\n * passing {@link 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 {@link 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 withFieldAndValue(field, newValue) {\n assert(field != null, 'field', NullPointerException);\n if (field instanceof ChronoField) {\n var 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 var 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 * function overloading for plus\n *\n * called with 1 (or less) arguments, p1 is expected to be a TemporalAmount and {@link LocalDate.plus1} \n * is called.\n * \n * Otherwise {@link LocalDate.plus2} is called.\n * \n * @param {!(TemporalAmount|number)} p1\n * @param {TemporalUnit} p2 - required if called with 2 arguments\n * @return {LocalDate}\n */\n plus(p1, p2){\n if(arguments.length < 2){\n return this.plus1(p1);\n } else {\n return this.plus2(p1, p2);\n }\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 * The amount is typically {@link Period} but may be any other type implementing\n * the {@link TemporalAmount} interface.\n * The calculation is delegated to the specified adjuster, which typically calls\n * back to {@link LocalDate.plus2}.\n *\n * @param {!TemporalAmount} amount - the amount to add, not null\n * @return {LocalDate} a {@link LocalDate} based on this date with the addition made, not null\n * @throws {DateTimeException} if the addition cannot be made\n * @throws {ArithmeticException} if numeric overflow occurs\n */\n plus1(amount) {\n requireNonNull(amount, 'amount');\n return amount.addTo(this);\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 plus2(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 * 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 var 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 * 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 var monthCount = this._year * 12 + (this._month - 1);\n var calcMonths = monthCount + monthsToAdd; // safe overflow\n var newYear = ChronoField.YEAR.checkValidIntValue(MathUtil.floorDiv(calcMonths, 12));\n var 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 var mjDay = MathUtil.safeAdd(this.toEpochDay(), daysToAdd);\n return LocalDate.ofEpochDay(mjDay);\n }\n\n /**\n * function overloading for minus\n *\n * called with 1 (or less) arguments, p1 is expected to be a TemporalAmount and {@link LocalDate.minus1} \n * is called.\n * \n * Otherwise {@link LocalDate.minus2} is called.\n * \n * @param {!(TemporalAmount|number)} p1\n * @param {TemporalUnit} p2 - required if called with 2 arguments\n * @return {LocalDate}\n */\n minus(p1, p2){\n if(arguments.length < 2){\n return this.minus1(p1);\n } else {\n return this.minus2(p1, p2);\n }\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 * The amount is typically {@link Period} but may be any other type implementing\n * the {@link TemporalAmount} interface.\n * The calculation is delegated to the specified adjuster, which typically calls\n * back to {@link #minus(long, TemporalUnit)}.\n *\n * @param {!TemporalAmount} amount - the amount to subtract, not null\n * @return {LocalDate} a {@link LocalDate} based on this date with the subtraction made, not null\n * @throws {DateTimeException} if the subtraction cannot be made\n * @throws {ArithmeticException} if numeric overflow occurs\n */\n minus1(amount) {\n requireNonNull(amount, 'amount');\n return amount.subtractFrom(this);\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 minus2(amountToSubtract, unit) {\n requireNonNull(amountToSubtract, 'amountToSubtract');\n requireNonNull(unit, 'unit');\n return this.plus2(-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 * 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 * 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(TemporalAccessor)} method on the\n * specified query passing {@link 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(TemporalField, long)}\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(TemporalAdjuster)}:\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 {@link 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(endDate, DAYS)}.\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 {@link 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(Temporal, Temporal)}\n * passing {@link 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 var 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 var packed1 = this._prolepticMonth() * 32 + this.dayOfMonth(); // no overflow\n var 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 {@link 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 {@link 2010-01-15} to {@link 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(LocalDate, LocalDate)}:\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 var end = LocalDate.from(endDate);\n var totalMonths = end._prolepticMonth() - this._prolepticMonth(); // safe\n var days = end._day - this._day;\n if (totalMonths > 0 && days < 0) {\n totalMonths--;\n var 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 var years = MathUtil.intDiv(totalMonths, 12); // safe\n var months = MathUtil.intMod(totalMonths, 12); // safe\n return Period.of(MathUtil.safeToInt(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} 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} the local date-time formed from this date and the specified time, not null\n */\n atTime1(time) {\n return LocalDateTime.of(this, time);\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/*\n _atTimeOffsetTime(time) { // atTime(offsetTime)\n return OffsetDateTime.of(LocalDateTime.of(this, time.toLocalTime()), time.getOffset());\n }\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 * @param {ZoneId} zone - if zone is not null @see {@link LocalDate.atStartOfDayWithZone}\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(LocalTime)}\n * followed by {@link LocalDateTime#atZone(ZoneId)}.\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 var ldt = this.atTime(LocalTime.MIDNIGHT);\n/* TODO iana tzdb\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 var rules = zone.getRules();\n var trans = rules.getTransition(ldt);\n if (trans != null && trans.isGap()) {\n ldt = trans.getDateTimeAfter();\n }\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 var y = this.year();\n var m = this.monthValue();\n var 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 if (other instanceof LocalDate) {\n return this._compareTo0(other);\n }\n // super.compareTo(other);\n }\n\n /**\n *\n * @param {!LocalDate} otherDate\n * @returns {number}\n * @private\n */\n _compareTo0(otherDate) {\n var 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(ChronoLocalDate)},\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(ChronoLocalDate)},\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(ChronoLocalDate)}\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 {*} otherDate - the object to check, null returns false\n * @return {boolean} true if this is equal to the other date\n */\n equals(otherDate) {\n if (this === otherDate) {\n return true;\n }\n if (otherDate instanceof LocalDate) {\n return this._compareTo0(otherDate) === 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 var yearValue = this._year;\n var monthValue = this._month;\n var dayValue = this._day;\n return (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 var dayString, monthString, yearString;\n\n var yearValue = this.year();\n var monthValue = this.monthValue();\n var dayValue = this.dayOfMonth();\n\n var 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 * Outputs this date as a {@code String} using the formatter.\n *
\n * This date will be passed to the formatter\n * {@link DateTimeFormatter#format(TemporalAccessor) print method}.\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\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\n\n/** WEBPACK FOOTER **\n ** ./src/LocalDate.js\n **/","/**\n * @copyright (c) 2016, Philipp Thuerwaechter & Pattrick Hueper\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 {LocalDate} from '../LocalDate';\nimport {Month} from '../Month';\nimport {Year} from '../Year';\n\nimport {ChronoField} from '../temporal/ChronoField';\nimport {ResolverStyle} from '../format/ResolverStyle';\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 let 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/*\n var prolepticMonth = fieldValues.remove(PROLEPTIC_MONTH);\n if (prolepticMonth != null) {\n if (resolverStyle != ResolverStyle.LENIENT) {\n PROLEPTIC_MONTH.checkValidValue(prolepticMonth);\n }\n updateResolveMap(fieldValues, ChronoField.MONTH_OF_YEAR, Jdk8Methods.floorMod(prolepticMonth, 12) + 1);\n updateResolveMap(fieldValues, ChronoField.YEAR, Jdk8Methods.floorDiv(prolepticMonth, 12));\n }\n*/\n\n // eras\n let 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 let era = fieldValues.remove(ChronoField.ERA);\n if (era == null) {\n let 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 var y = ChronoField.YEAR.checkValidIntValue(fieldValues.remove(ChronoField.YEAR));\n var moy = fieldValues.remove(ChronoField.MONTH_OF_YEAR);\n var dom = fieldValues.remove(ChronoField.DAY_OF_MONTH);\n if (resolverStyle === ResolverStyle.LENIENT) {\n var months = moy - 1;\n var 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/*\n if (fieldValues.containsKey(DAY_OF_YEAR)) {\n int y = ChronoField.YEAR.checkValidIntValue(fieldValues.remove(ChronoField.YEAR));\n if (resolverStyle == ResolverStyle.LENIENT) {\n long days = Jdk8Methods.safeSubtract(fieldValues.remove(DAY_OF_YEAR), 1);\n return LocalDate.ofYearDay(y, 1).plusDays(days);\n }\n int doy = DAY_OF_YEAR.checkValidIntValue(fieldValues.remove(DAY_OF_YEAR));\n return LocalDate.ofYearDay(y, doy);\n }\n*/\n/*\n if (fieldValues.containsKey(ALIGNED_WEEK_OF_YEAR)) {\n if (fieldValues.containsKey(ALIGNED_DAY_OF_WEEK_IN_YEAR)) {\n int y = ChronoField.YEAR.checkValidIntValue(fieldValues.remove(ChronoField.YEAR));\n if (resolverStyle == ResolverStyle.LENIENT) {\n long weeks = Jdk8Methods.safeSubtract(fieldValues.remove(ALIGNED_WEEK_OF_YEAR), 1);\n long days = Jdk8Methods.safeSubtract(fieldValues.remove(ALIGNED_DAY_OF_WEEK_IN_YEAR), 1);\n return LocalDate.of(y, 1, 1).plusWeeks(weeks).plusDays(days);\n }\n int aw = ALIGNED_WEEK_OF_YEAR.checkValidIntValue(fieldValues.remove(ALIGNED_WEEK_OF_YEAR));\n int ad = ALIGNED_DAY_OF_WEEK_IN_YEAR.checkValidIntValue(fieldValues.remove(ALIGNED_DAY_OF_WEEK_IN_YEAR));\n LocalDate 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(DAY_OF_WEEK)) {\n int y = ChronoField.YEAR.checkValidIntValue(fieldValues.remove(ChronoField.YEAR));\n if (resolverStyle == ResolverStyle.LENIENT) {\n long weeks = Jdk8Methods.safeSubtract(fieldValues.remove(ALIGNED_WEEK_OF_YEAR), 1);\n long days = Jdk8Methods.safeSubtract(fieldValues.remove(DAY_OF_WEEK), 1);\n return LocalDate.of(y, 1, 1).plusWeeks(weeks).plusDays(days);\n }\n int aw = ALIGNED_WEEK_OF_YEAR.checkValidIntValue(fieldValues.remove(ALIGNED_WEEK_OF_YEAR));\n int dow = DAY_OF_WEEK.checkValidIntValue(fieldValues.remove(DAY_OF_WEEK));\n LocalDate date = LocalDate.of(y, 1, 1).plusWeeks(aw - 1).with(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 }\n return null;\n }\n\n}\n\nexport function _init() {\n IsoChronology.INSTANCE = new IsoChronology('IsoChronology');\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/chrono/IsoChronology.js\n **/","/**\n * @copyright (c) 2016, Philipp Thuerwaechter & Pattrick Hueper\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\n/** WEBPACK FOOTER **\n ** ./src/Enum.js\n **/","/**\n * @copyright (c) 2016, Philipp Thuerwaechter & Pattrick Hueper\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 {MathUtil} from './MathUtil';\n\nimport {ChronoField} from './temporal/ChronoField';\nimport {ChronoUnit} from './temporal/ChronoUnit';\nimport {DateTimeException, UnsupportedTemporalTypeException} from './errors';\nimport {DateTimeFormatterBuilder} from './format/DateTimeFormatterBuilder';\nimport {IsoChronology} from './chrono/IsoChronology';\nimport {Temporal} from './temporal/Temporal';\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 {@code int} value.\n * The {@code 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 {@code 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 *
\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 {@link #getValue() numeric value} 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 getDisplayName(style, locale) {\n // TODO:\n throw new IllegalArgumentException('Pattern using (localized) text not implemented yet!');\n return new DateTimeFormatterBuilder().appendText(ChronoField.MONTH_OF_YEAR, style).toFormatter(locale).format(this);\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 {@link #range(TemporalField) range} and\n * {@link #get(TemporalField) get} methods will throw an exception.\n *
\n * If the field is {@link ChronoField#MONTH_OF_YEAR MONTH_OF_YEAR} then\n * this method returns true.\n * All other {@code ChronoField} instances will return false.\n *
\n * If the field is not a {@code ChronoField}, then the result of this method\n * is obtained by invoking {@code TemporalField.isSupportedBy(TemporalAccessor)}\n * passing {@code 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 {@code 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 {@link ChronoField#MONTH_OF_YEAR MONTH_OF_YEAR} then the\n * value of the month-of-year, from 1 to 12, will be returned.\n * All other {@code ChronoField} instances will throw an {@code UnsupportedTemporalTypeException}.\n *
\n * If the field is not a {@code ChronoField}, then the result of this method\n * is obtained by invoking {@code TemporalField.getFrom(TemporalAccessor)}\n * passing {@code 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 {@code 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 {@code 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 {@link ChronoField#MONTH_OF_YEAR MONTH_OF_YEAR} then the\n * value of the month-of-year, from 1 to 12, will be returned.\n * All other {@code ChronoField} instances will throw an {@code UnsupportedTemporalTypeException}.\n *
\n * If the field is not a {@code ChronoField}, then the result of this method\n * is obtained by invoking {@code TemporalField.getFrom(TemporalAccessor)}\n * passing {@code 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 var amount = MathUtil.intMod(months, 12) + 12; // + 12 to make sure negative arguments are positive, the total is \"corrected\" by the next % 12\n var 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 var 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 {@code 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(TemporalAccessor)} method on the\n * specified query passing {@code 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 * 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(TemporalField, long)}\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 {@code DateTimeException} is thrown.\n *
\n * In most cases, it is clearer to reverse the calling pattern by using\n * {@link Temporal#with(TemporalAdjuster)}:\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 * 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 {@code Month} from a temporal object.\n *
\n * This obtains a month based on the specified temporal.\n * A {@code TemporalAccessor} represents an arbitrary set of date and time information,\n * which this factory converts to an instance of {@code Month}.\n *
\n * The conversion extracts the {@link ChronoField#MONTH_OF_YEAR 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 {@code 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, {@code 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 {@code 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\nvar MONTHS;\n\nexport function _init() {\n Month.JANUARY = new Month(1);\n Month.FEBRUARY = new Month(2);\n Month.MARCH = new Month(3);\n Month.APRIL = new Month(4);\n Month.MAY = new Month(5);\n Month.JUNE = new Month(6);\n Month.JULY = new Month(7);\n Month.AUGUST = new Month(8);\n Month.SEPTEMBER = new Month(9);\n Month.OCTOBER = new Month(10);\n Month.NOVEMBER = new Month(11);\n Month.DECEMBER = new Month(12);\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\n\n/** WEBPACK FOOTER **\n ** ./src/Month.js\n **/","/**\n * @copyright (c) 2016, Philipp Thuerwaechter & Pattrick Hueper\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 *
\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 {@code DAY_OF_MONTH} the\n * {@code 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(TemporalField)}:\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, {@code range(TemporalField)},\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 {@code DateTimeException} must be thrown.\n *\n * @param {!TemporalAccessor} temporal - the temporal object used to refine the result, not null\n * @return {ValueRange} the range of valid values for this field, not null\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 * Checks that the specified value is valid and fits in an {@code 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 {@code int}.\n *
\n * This method checks against the range of the field in the ISO-8601 calendar system.\n * This range may be incorrect for other calendar systems.\n * Use {@link Chronology#range(ChronoField)} to access the correct range\n * for a different 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 *\n * @param {TemporalAccessor} temporal\n * @returns {number}\n */\n getFrom(temporal) {\n return temporal.getLong(this);\n }\n\n /**\n *\n * @returns {string}\n */\n toString(){\n return this.name();\n }\n\n /**\n *\n * @param {*} other\n * @returns {boolean}\n */\n equals(other){\n return this === other;\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(Math.floor(YearConstants.MIN_VALUE * 365.25), Math.floor(YearConstants.MAX_VALUE * 365.25)));\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\n\n\n/** WEBPACK FOOTER **\n ** ./src/temporal/ChronoField.js\n **/","/**\n * @copyright (c) 2016, Philipp Thuerwaechter & Pattrick Hueper\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 *
\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.WEEKS\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.MONTHS\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 {@code 365.2425 Days}.\n *
\n * When used with other calendar systems it must correspond to an integral number of days.\n *\n * ChronoUnit.YEARS\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 {@code 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.DECADES\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.CENTURIES\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.MILLENNIA\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.ERAS\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.FOREVER\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 {@code Duration}.\n *\n */\nexport class ChronoUnit extends TemporalUnit {\n\n /**\n * \n * @param {String} name\n * @param {Duration} estimatedDuration\n */\n constructor (name, estimatedDuration) {\n super();\n this._name = name;\n this._duration = estimatedDuration;\n }\n\n //-----------------------------------------------------------------------\n /**\n * Gets the estimated duration of this unit in the ISO calendar system.\n *
\n * All of the units in this class have an estimated duration.\n * Days vary due to daylight saving time, while months have different lengths.\n *\n * @return {Duration} the estimated duration of this unit, not null\n */\n duration() {\n return this._duration;\n }\n\n /**\n * Checks if the duration of the unit is an estimate.\n *
\n * All time units in this class are considered to be accurate, while all date\n * units in this class are considered to be estimated.\n *
\n * This definition ignores leap seconds, but considers that Days vary due to\n * daylight saving time and months have different lengths.\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 * Checks if this unit is a date unit.\n *\n * @return true if a 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 true if a time unit, false if a date unit\n */\n isTimeBased() {\n return this.compareTo(ChronoUnit.DAYS) < 0;\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 * This default implementation derives the value using\n * {@link Temporal#plus(long, TemporalUnit)}.\n *\n * @param {Temporal} temporal the temporal object to check, not null\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 * 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(long, TemporalUnit)}:\n *
\n * // these two lines are equivalent, but the second approach is recommended\n * temporal = thisUnit.addTo(temporal);\n * temporal = temporal.plus(thisUnit);\n *\n * It is recommended to use the second approach, {@code plus(TemporalUnit)},\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 unit is not supported an {@code UnsupportedTemporalTypeException} 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, not null\n * @param {Number} amount the amount of this unit to add, positive or negative\n * @return {Temporal} the adjusted temporal object, not null\n * @throws DateTimeException if the amount cannot be added\n * @throws UnsupportedTemporalTypeException if the unit is not supported by the temporal\n */\n addTo(temporal, amount) {\n return temporal.plus(amount, this);\n }\n\n //-----------------------------------------------------------------------\n /**\n * Calculates the amount of time between two temporal objects.\n *
\n * This calculates the amount in terms of this unit. The start and end\n * points are supplied as temporal objects and must be of compatible types.\n * The implementation will convert the second type to be an instance of the\n * first type before the calculating the amount.\n * The result will be negative if the end is before the start.\n * For example, the amount in hours between two temporal objects can be\n * calculated using {@code HOURS.between(startTime, endTime)}.\n *
\n * The calculation returns a whole number, representing the number of\n * complete units between the two temporals.\n * For example, the amount in hours between the times 11:30 and 13:29\n * 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.\n * The first is to invoke this method directly.\n * The second is to use {@link Temporal#until(Temporal, TemporalUnit)}:\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\n * be calculated:\n *
\n * daysBetween = DAYS.between(start, end);\n * // or alternatively\n * daysBetween = start.until(end, DAYS);\n *\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 unit is not supported an {@code UnsupportedTemporalTypeException} must be thrown.\n * Implementations must not alter the specified temporal objects.\n *\n * @implSpec\n * Implementations must begin by checking to if the two temporals have the\n * same type using {@code .constructor.name}. If they do not, then the result must be\n * obtained by calling {@code temporal1.until(temporal2, this)}.\n *\n * @param {Temporal} temporal1 the base temporal object, not null\n * @param {Temporal} temporal2 the other temporal object, exclusive, not null\n * @return {Number} the amount of time between temporal1 and temporal2\n * in terms of this unit; positive if temporal2 is later than\n * temporal1, negative if earlier\n * @throws DateTimeException if the amount cannot be calculated, or the end\n * temporal cannot be converted to the same type as the start temporal\n * @throws UnsupportedTemporalTypeException if the unit is not supported by the temporal\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 {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, not null\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 {@code 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 {@code 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 {@code 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 {@code Duration}.\n */\n ChronoUnit.FOREVER = new ChronoUnit('Forever', Duration.ofSeconds(MathUtil.MAX_SAFE_INTEGER, 999999999));\n}\n\n\n/** WEBPACK FOOTER **\n ** ./src/temporal/ChronoUnit.js\n **/","/**\n * @copyright (c) 2016, Philipp Thuerwaechter & Pattrick Hueper\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';\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 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 {@code 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 {@code long}.\n * To achieve this, the class stores a {@code long} representing seconds and an {@code 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 *
\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 var secs = MathUtil.safeAdd(seconds, MathUtil.floorDiv(nanoAdjustment, LocalTime.NANOS_PER_SECOND));\n var 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 var secs = MathUtil.intDiv(millis, 1000);\n var 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 var secs = MathUtil.intDiv(nanos, LocalTime.NANOS_PER_SECOND);\n var 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 {@link TemporalUnit#isDurationEstimated() exact duration} 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 {Number} 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 var 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(Temporal, TemporalUnit)}.\n * The difference in nanoseconds is calculated using by querying the\n * {@link ChronoField#NANO_OF_SECOND 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 var secs = startInclusive.until(endExclusive, ChronoUnit.SECONDS);\n var nanos = 0;\n if (startInclusive.isSupported(ChronoField.NANO_OF_SECOND) && endExclusive.isSupported(ChronoField.NANO_OF_SECOND)) {\n try {\n let 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 let 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 {@code PnDTnHnMn.nS}.\n *
\n * This will parse a textual representation of a duration, including the\n * string produced by {@code toString()}. The formats accepted are based\n * on the ISO-8601 duration format {@code 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 {@code long}.\n * The number of seconds must parse to a {@code 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 var matches = PATTERN.exec(text);\n if (matches !== null) {\n // check for letter T but no time sections\n if ('T' === matches[3] === false) {\n var negate = '-' === matches[1];\n var dayMatch = matches[2];\n var hourMatch = matches[4];\n var minuteMatch = matches[5];\n var secondMatch = matches[6];\n var fractionMatch = matches[7];\n if (dayMatch != null || hourMatch != null || minuteMatch != null || secondMatch != null) {\n var daysAsSecs = Duration._parseNumber(text, dayMatch, LocalTime.SECONDS_PER_DAY, 'days');\n var hoursAsSecs = Duration._parseNumber(text, hourMatch, LocalTime.SECONDS_PER_HOUR, 'hours');\n var minsAsSecs = Duration._parseNumber(text, minuteMatch, LocalTime.SECONDS_PER_MINUTE, 'minutes');\n var seconds = Duration._parseNumber(text, secondMatch, 1, 'seconds');\n var negativeSecs = secondMatch != null && secondMatch.charAt(0) === '-';\n var 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 var val = parseFloat(parsed);\n return MathUtil.safeMultiply(val, 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 try {\n parsed = (parsed + '000000000').substring(0, 9);\n return parseFloat(parsed) * negate;\n } catch (ex) {\n throw new DateTimeParseException('Text cannot be parsed to a Duration: fraction', text, 0, ex);\n }\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 var 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 | 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 SECONDS} and {@link ChronoUnit#NANOS NANOS}.\n * All other units throw an exception.\n *\n * @param {TemporalUnit} unit the {@code TemporalUnit} for which to return the value\n * @return {number} the var 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 | 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.of}\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 ChronoUnit, then {@link Duration.plusAmountUnit} is executed.\n *\n * Otherwise {@link Duration.plusSecondsNanos} is executed.\n *\n * @param {!(Duration|number)} arg1\n * @param {ChronoUnit|number} arg2\n * @returns {Duration}\n */\n plus() {\n if (arguments.length === 1) {\n return this.plusDuration.apply(this, arguments);\n }\n else if (arguments.length === 2 && arguments[1] instanceof ChronoUnit) {\n return this.plusAmountUnit.apply(this, arguments);\n } else {\n return this.plusSecondsNanos.apply(this, arguments);\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 {@link TemporalUnit#isDurationEstimated() exact duration} 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 var 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 | nanosToAdd) === 0) {\n return this;\n }\n var 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 var 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)} arg1\n * @param {ChronoUnit} arg2\n * @return {Duration}\n */\n minus() {\n if (arguments.length === 1) {\n return this.minusDuration.apply(this, arguments);\n } else {\n return this.minusAmountUnit.apply(this, arguments);\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 var secsToSubtract = duration.seconds();\n var nanosToSubtract = duration.nano();\n if (secsToSubtract === MIN_SAFE_INTEGER) {\n return this.plus(MAX_SAFE_INTEGER, -nanosToSubtract).plus(1, 0);\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 {@link TemporalUnit#isDurationEstimated() exact duration} 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).plus(1, 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).plusDays(1) : 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).plusHours(1) : 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).plusMinutes(1) : 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).plusSeconds(1) : 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).plusMillis(1) : 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).plusNanos(1) : 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 var secs = MathUtil.intDiv(this._seconds, divisor);\n var secsMod = MathUtil.roundDown(((this._seconds/ divisor) - secs) * LocalTime.NANOS_PER_SECOND);\n var 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, {@code PT1.3S} will be returned as {@code 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, {@code PT-1.3S} will be returned as {@code 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(TemporalAmount)}.\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(TemporalAmount)}.\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 {@code 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 var 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 {@code long}.\n *
\n * If this duration is too large to fit in a {@code 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 var 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 var 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 {@code PT8H6M12.345S}.\n *
\n * The format of the returned string will be {@code PTnHnMnS}, where n is\n * the relevant hours, minutes or seconds part of the duration.\n * Any fractional seconds are placed after a decimal povar i 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 {@code 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 var hours = MathUtil.intDiv(this._seconds, LocalTime.SECONDS_PER_HOUR);\n var minutes = MathUtil.intDiv(MathUtil.intMod(this._seconds, LocalTime.SECONDS_PER_HOUR), LocalTime.SECONDS_PER_MINUTE);\n var secs = MathUtil.intMod(this._seconds, LocalTime.SECONDS_PER_MINUTE);\n var 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\nexport function _init() {\n /**\n * Constant for a duration of zero.\n */\n Duration.ZERO = new Duration(0, 0);\n}\n\n\n/** WEBPACK FOOTER **\n ** ./src/Duration.js\n **/","/*\n * @copyright (c) 2016, Philipp Thuerwaechter & Pattrick Hueper\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 {@code Map} of {@link TemporalUnit} to\n * {@code long}, exposed via {@link #getUnits()} and {@link #get(TemporalUnit)}.\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 {@code Period} and {@code 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 {@code TemporalAmount}. A value must be returned\n * for each unit listed in {@code 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 {@code 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 {@code unit} is not supported\n */\n get(unit){\n abstractMethodFail('adjustInto');\n }\n\n /**\n * Returns the list of units uniquely defining the value of this TemporalAmount.\n * The list of {@code TemporalUnits} is defined by the implementation class.\n * The list is a snapshot of the units at the time {@code 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 {@code TemporalUnits}; not null\n */\n getUnits(){\n abstractMethodFail('adjustInto');\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(TemporalAmount)}:\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, {@code plus(TemporalAmount)},\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 {@code 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 {@link TemporalQueries#chronology() querying the 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 addTo(temporal){\n abstractMethodFail('adjustInto');\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(TemporalAmount)}:\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, {@code minus(TemporalAmount)},\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 {@code 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 {@link TemporalQueries#chronology() querying the 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 subtractFrom(temporal){\n abstractMethodFail('adjustInto');\n }\n\n}\n\n\n/** WEBPACK FOOTER **\n ** ./src/temporal/TemporalAmount.js\n **/","/*\n * @copyright (c) 2016, Philipp Thuerwaechter & Pattrick Hueper\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\n/** WEBPACK FOOTER **\n ** ./src/YearConstants.js\n **/","/*\n * @copyright (c) 2016, Philipp Thuerwaechter & Pattrick Hueper\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 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 * {@code LocalDateTime} which check if the unit is a {@code 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\n/** WEBPACK FOOTER **\n ** ./src/temporal/TemporalUnit.js\n **/","/**\n * @copyright (c) 2016, Philipp Thuerwaechter & Pattrick Hueper\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 * {@code LocalDateTime} which check if the field is a {@code 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\n/** WEBPACK FOOTER **\n ** ./src/temporal/TemporalField.js\n **/","/**\n * @copyright (c) 2016, Philipp Thuerwaechter & Pattrick Hueper\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 */\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 var 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 }\n\n /**\n * Checks that the specified value is valid and fits in an {@code 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 {@code 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 {@code int}.\n *
\n * This method combines {@link #isIntValue()} and {@link #isValidValue(long)}.\n *\n * @param {number} value - the value to check\n * @return true if the value is valid and fits in an {@code 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 {@code int}.\n *
\n * This checks that all valid values are within the bounds of an {@code int}.\n *
\n * For example, the ISO month-of-year has values from 1 to 12, which fits in an {@code int}.\n * By comparison, ISO nano-of-day runs from 1 to 86,400,000,000,000 which does not fit in an {@code int}.\n *
\n * This implementation uses {@link #getMinimum()} and {@link #getMaximum()}.\n *\n * @return boolean if a valid value always fits in an {@code 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 {@code 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 var hash = this._minSmallest + this._minLargest << 16 + this._minLargest >> 48 + this._maxSmallest << 32 +\n this._maxSmallest >> 32 + this._maxLargest << 48 + this._maxLargest >> 16;\n return (hash ^ (hash >>> 32));\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 var 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\n/** WEBPACK FOOTER **\n ** ./src/temporal/ValueRange.js\n **/","/**\n * @copyright (c) 2016, Philipp Thuerwaechter & Pattrick Hueper\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 {ArithmeticException, DateTimeException, IllegalArgumentException, IllegalStateException} from '../errors';\nimport {MathUtil} from '../MathUtil';\n\nimport {Enum} from '../Enum';\nimport {ZoneIdFactory} from '../ZoneIdFactory';\nimport {LocalDate} from '../LocalDate';\nimport {LocalDateTime} from '../LocalDateTime';\nimport {ZoneOffset} from '../ZoneOffset';\nimport {ZoneId} from '../ZoneId';\nimport {ChronoLocalDate} from '../chrono/ChronoLocalDate';\nimport {IsoChronology} from '../chrono/IsoChronology';\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\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 * @param {DateTimeFormatterBuilder} parent the parent builder, not null\n * @param {boolean} optional whether the formatter is optional, not null\n */\n constructor(parent=null, optional=false){\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 = parent;\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 = optional;\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 * 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 {@code #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 {@code 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 {@code 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 * 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(TemporalField, int)} 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 assert(field != null);\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 {@code 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 {@code 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 {@code appendValue} to another {@code 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 assert(field != null);\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 var 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(TemporalField, int)} for full details.\n * \n * In strict parsing mode, the minimum number of parsed digits is {@code 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 * {@code NOT_NEGATIVE} then it delegates to {@code 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 assert(field != null);\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 var 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(TemporalField, int, int, ChronoLocalDate)} 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 {@code width} and {@code 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 {@code baseValue} using\n * {@code width} characters then the reduced value is formatted otherwise the value is\n * truncated to fit {@code 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 {@code width} to {@code 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 {@code 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 {@code 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 {@code 1980} and a width of {@code 2} will have\n * valid values from {@code 1980} to {@code 2079}.\n * During parsing, the text {@code \"12\"} will result in the value {@code 2012} as that\n * is the value within the range where the last two characters are \"12\".\n * By contrast, parsing the text {@code \"1915\"} will result in the value {@code 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 let 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 * {@code baseValue} used below.\n *
\n * For formatting, the {@code width} and {@code 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 {@code baseValue} using\n * {@code width} characters then the reduced value is formatted otherwise the value is\n * truncated to fit {@code 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 {@code width} to {@code 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 {@code 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 {@code 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 {@code 1980} and a width of {@code 2} will have\n * valid values from {@code 1980} to {@code 2079}.\n * During parsing, the text {@code \"12\"} will result in the value {@code 2012} as that\n * is the value within the range where the last two characters are \"12\".\n * By contrast, parsing the text {@code \"1915\"} will result in the value {@code 1915}.\n *\n * @param {TemporaField} 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 let 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 var activeValueParser = this._active._valueParserIndex;\n\n // adjacent parsing mode, update setting in previous parsers\n var 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 {@code .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 {@code 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 INSTANT_SECONDS}\n * and optionally (@code NANO_OF_SECOND). The value of {@code INSTANT_SECONDS}\n * may be outside the maximum range of {@code LocalDateTime}.\n *
\n * The {@linkplain ResolverStyle resolver style} 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 {@code 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 {@code 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 * 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 {@code ZonedDateTime}.\n * By contrast, {@code 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 * y year 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 {@link TextStyle#SHORT short form}.\n * Exactly 4 pattern letters will use the {@link TextStyle#FULL full form}.\n * Exactly 5 pattern letters will use the {@link TextStyle#NARROW narrow form}.\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(TemporalField)}. Otherwise, the\n * count of digits is used as the width of the output field as per {@link #appendValue(TemporalField, int)}.\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 #appendValueReduced reduced} 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 {@code 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 {@code 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 {@code 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 {@code 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(int)}.\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 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 _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 let field = FIELD_MAP[cur];\n if (field != null) {\n this._parseField(cur, count, field);\n } else if (cur === 'z') {\n //TODO:\n throw new IllegalArgumentException('Pattern using (localized) text not implemented yet!');\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 //TODO:\n throw new IllegalArgumentException('Pattern using (localized) text not implemented yet!');\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 //TODO:\n throw new IllegalArgumentException('Pattern using (localized) text not implemented yet!');\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 let 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._appendInternal(new OffsetIdPrinterParser('W', count));\n } else if (cur === 'w') {\n if (count > 2) {\n throw new IllegalArgumentException('Too many pattern letters: ' + cur);\n }\n this._appendInternal(new OffsetIdPrinterParser('w', count));\n } else if (cur === 'Y') {\n this._appendInternal(new OffsetIdPrinterParser('Y', count));\n } else {\n throw new IllegalArgumentException('Unknown pattern letter: ' + cur);\n }\n pos--;\n\n } else if (cur === '\\'') {\n // parse literals\n let 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 let 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 //TODO:\n throw new IllegalArgumentException('Pattern using (localized) text not implemented yet!');\n this.appendText(field, TextStyle.SHORT);\n break;\n case 4:\n //TODO:\n throw new IllegalArgumentException('Pattern using (localized) text not implemented yet!');\n this.appendText(field, TextStyle.FULL);\n break;\n case 5:\n //TODO:\n throw new IllegalArgumentException('Pattern using (localized) text not implemented yet!');\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 //TODO:\n throw new IllegalArgumentException('Pattern using (localized) text not implemented yet!');\n this.appendText(field, TextStyle.SHORT_STANDALONE);\n break;\n case 4:\n //TODO:\n throw new IllegalArgumentException('Pattern using (localized) text not implemented yet!');\n this.appendText(field, TextStyle.FULL_STANDALONE);\n break;\n case 5:\n //TODO:\n throw new IllegalArgumentException('Pattern using (localized) text not implemented yet!');\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 // TODO: WeekFieldsPrinterParser\n throw new IllegalArgumentException('Pattern using WeekFields not implemented yet!');\n // this.appendInternal(new WeekFieldsPrinterParser('e', count));\n break;\n case 3:\n //TODO:\n throw new IllegalArgumentException('Pattern using (localized) text not implemented yet!');\n this.appendText(field, TextStyle.SHORT);\n break;\n case 4:\n //TODO:\n throw new IllegalArgumentException('Pattern using (localized) text not implemented yet!');\n this.appendText(field, TextStyle.FULL);\n break;\n case 5:\n //TODO:\n throw new IllegalArgumentException('Pattern using (localized) text not implemented yet!');\n this.appendText(field, TextStyle.NARROW);\n break;\n default:\n throw new IllegalArgumentException('Too many pattern letters: ' + cur);\n }\n break;\n case 'c':\n switch (count) {\n case 1:\n // TODO: WeekFieldsPrinterParser\n throw new IllegalArgumentException('Pattern using WeekFields not implemented yet!');\n // this.appendInternal(new WeekFieldsPrinterParser('c', count));\n break;\n case 2:\n throw new IllegalArgumentException('Invalid number of pattern letters: ' + cur);\n case 3:\n //TODO:\n throw new IllegalArgumentException('Pattern using (localized) text not implemented yet!');\n this.appendText(field, TextStyle.SHORT_STANDALONE);\n break;\n case 4:\n //TODO:\n throw new IllegalArgumentException('Pattern using (localized) text not implemented yet!');\n this.appendText(field, TextStyle.FULL_STANDALONE);\n break;\n case 5:\n //TODO:\n throw new IllegalArgumentException('Pattern using (localized) text not implemented yet!');\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 'a':\n if (count === 1) {\n //TODO:\n throw new IllegalArgumentException('Pattern using (localized) text not implemented yet!');\n this.appendText(field, TextStyle.SHORT);\n } else {\n throw new IllegalArgumentException('Too many pattern letters: ' + cur);\n }\n break;\n case 'E':\n case 'G':\n switch (count) {\n case 1:\n case 2:\n case 3:\n //TODO:\n throw new IllegalArgumentException('Pattern using (localized) text not implemented yet!');\n this.appendText(field, TextStyle.SHORT);\n break;\n case 4:\n //TODO:\n throw new IllegalArgumentException('Pattern using (localized) text not implemented yet!');\n this.appendText(field, TextStyle.FULL);\n break;\n case 5:\n //TODO:\n throw new IllegalArgumentException('Pattern using (localized) text not implemented yet!');\n this.appendText(field, TextStyle.NARROW);\n break;\n default:\n throw new IllegalArgumentException('Too many pattern letters: ' + cur);\n }\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 * {@code 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 * {@code 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 = new DateTimeFormatterBuilder(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 {@code optionalStart}\n * will throw an exception.\n * Calling this method immediately after calling {@code 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 * {@code 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 * {@code 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 {@code 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 var 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 {@code 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 var pp = new CompositePrinterParser(this._printerParsers, false);\n return new DateTimeFormatter(pp, null, DecimalStyle.STANDARD, resolverStyle, null, null, null);\n }\n\n}\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\nclass 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 var length = buf.length();\n if (this._optional) {\n context.startOptional();\n }\n try {\n for (let i=0; i \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 var 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 var nextChar = text.charAt(position);\n if (nextChar === '+' || nextChar === '-') {\n var newContext = context.copy();\n var endPos = OffsetIdPrinterParser.INSTANCE_ID.parse(newContext, text, position);\n if (endPos < 0) {\n return endPos;\n }\n var offset = newContext.getParsed(ChronoField.OFFSET_SECONDS);\n var zone = ZoneOffset.ofTotalSeconds(offset);\n context.setParsedZone(zone);\n return endPos;\n } else if (length >= position + 2) {\n var 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 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 var prefix = text.substring(prefixPos, position).toUpperCase();\n var newContext = context.copy();\n if (position < text.length && context.charEquals(text.charAt(position), 'Z')) {\n context.setParsedZone(ZoneIdFactory.ofOffset(prefix, ZoneOffset.UTC));\n return position;\n }\n var endPos = OffsetIdPrinterParser.INSTANCE_ID.parse(newContext, text, position);\n if (endPos < 0) {\n context.setParsedZone(ZoneIdFactory.ofOffset(prefix, ZoneOffset.UTC));\n return position;\n }\n var offsetSecs = newContext.getParsed(ChronoField.OFFSET_SECONDS);\n var offset = ZoneOffset.ofTotalSeconds(offsetSecs);\n context.setParsedZone(ZoneIdFactory.ofOffset(prefix, offset));\n return endPos;\n }\n\n /**\n *\n * @returns {string}\n */\n toString() {\n return this.description;\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\n/** WEBPACK FOOTER **\n ** ./src/format/DateTimeFormatterBuilder.js\n **/","/*\n * @copyright (c) 2016, Philipp Thuerwaechter & Pattrick Hueper\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';\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 */\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 * Obtains an instance of {@code ZoneId} from an ID ensuring that the\n * ID is valid and available for use.\n * \n * This method parses the ID producing a {@code ZoneId} or {@code ZoneOffset}.\n * A {@code 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 prefix is 'GMT', 'UTC', or 'UT' a {@code ZoneId}\n * with the prefix and the non-zero offset is returned.\n * If the prefix is empty {@code ''} the {@code 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 {@code ZoneId} from a temporal object.\n * \n * A {@code TemporalAccessor} represents some form of date and time information.\n * This factory converts the arbitrary temporal object to an instance of {@code 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, {@code 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 {@code ZoneId}\n */\n static from(temporal) {\n requireNonNull(temporal, 'temporal');\n var 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\nvar 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.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\n\n\n/** WEBPACK FOOTER **\n ** ./src/ZoneIdFactory.js\n **/","/*\n * @copyright (c) 2016, Philipp Thuerwaechter & Pattrick Hueper\n * @license BSD-3-Clause (see LICENSE in the root directory of this source tree)\n */\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 var hash = 0, i, chr, len;\n if (text.length === 0) return hash;\n for (i = 0, len = text.length; i < len; i++) {\n chr = text.charCodeAt(i);\n hash = ((hash << 5) - hash) + chr;\n hash |= 0; // Convert to 32bit integer\n }\n return hash;\n }\n}\n\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/StringUtil.js\n **/","/**\n * @copyright (c) 2016, Philipp Thuerwaechter & Pattrick Hueper\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\nvar SECONDS_CACHE = {};\nvar ID_CACHE = {};\n\n/**\n *\n * \n * This method parses the string ID of a {@code ZoneOffset} to\n * return an instance. The parsing accepts all the formats generated by\n * {@link #getId()}, plus some additional formats:\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 var 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 var hours, minutes, seconds;\n switch (offsetId.length) {\n case 2:\n offsetId = offsetId[0] + '0' + offsetId[1]; // fallthru\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 var 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 var ch1 = offsetId[pos];\n var 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 var 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 var 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 var totalSecs = totalSeconds;\n var 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 {@code 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 {@code OFFSET_SECONDS} field returns the value of the offset.\n * All other {@code ChronoField} instances will throw a {@code DateTimeException}.\n * \n * If the field is not a {@code ChronoField}, then the result of this method\n * is obtained by invoking {@code TemporalField.getFrom(TemporalAccessor)}\n * passing {@code 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 {@code 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 {@code OFFSET_SECONDS} field returns the value of the offset.\n * All other {@code ChronoField} instances will throw a {@code DateTimeException}.\n * \n * If the field is not a {@code ChronoField}, then the result of this method\n * is obtained by invoking {@code TemporalField.getFrom(TemporalAccessor)}\n * passing {@code 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 {@code 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(TemporalAccessor)} method on the\n * specified query passing {@code 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(TemporalField, long)}\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(TemporalAdjuster)}:\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 {@code +10:00} comes before an\n * offset of {@code +09:00} and so on down to {@code -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, postive if greater\n * @throws NullPointerException if {@code 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 id() {\n return this._id;\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\n/** WEBPACK FOOTER **\n ** ./src/ZoneOffset.js\n **/","/*\n * @copyright (c) 2016, Philipp Thuerwaechter & Pattrick Hueper\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 {StringUtil} from './StringUtil';\n\nimport {Instant} from './Instant';\n\nexport class ZoneId {\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 {@code 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 {@code ZoneOffset} where possible.\n * \n * The returns a normalized {@code ZoneId} that can be used in place of this ID.\n * The result will have {@code ZoneRules} equivalent to those returned by this object,\n * however the ID returned by {@code getId()} may be different.\n * \n * The normalization checks if the rules of this {@code ZoneId} have a fixed offset.\n * If they do, then the {@code ZoneOffset} equal to that offset is returned.\n * Otherwise {@code this} is returned.\n *\n * @return {ZoneId} the time-zone unique ID, not null\n */\n normalized() {\n var 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 {@code 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\n\n\n/** WEBPACK FOOTER **\n ** ./src/ZoneId.js\n **/","/**\n * @copyright (c) 2016, Philipp Thuerwaechter & Pattrick Hueper\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 {@code 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 {@code from(TemporalAccessor)} method on most temporal\n * objects as a method reference matching the query interface, such as\n * {@code LocalDate::from} and {@code ZoneId::from}.\n * \n * There are two equivalent ways of using a {@code TemporalQuery}.\n * The first is to invoke the method on the interface directly.\n * The second is to use {@link TemporalAccessor#query(TemporalQuery)}:\n * \n * This queries a {@code TemporalAccessor} for the zone.\n * The zone is only returned if the date-time conceptually contains a {@code ZoneId}.\n * It will not be returned if the date-time only conceptually has an {@code ZoneOffset}.\n * Thus a {@link ZonedDateTime} will return the result of\n * {@code 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 {@code TemporalAccessor} is as follows: \n * This queries a {@code TemporalAccessor} for the chronology.\n * If the target {@code 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 * {@code LocalTime}, will return null.\n * \n * The result from js-joda classes implementing {@code TemporalAccessor} is as follows: \n * The method {@link Chronology#from(TemporalAccessor)} can be used as a\n * {@code 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 {@code TemporalAccessor} for the time precision.\n * If the target {@code 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 {@code NANO_OF_DAY} and {@code 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 {@code GregorianCalendar} to implement {@code TemporalAccessor}\n * it would return a precision of {@code MILLIS}.\n * \n * The result from js-joda classes implementing {@code TemporalAccessor} is as follows: \n * This queries a {@code 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 {@code #zoneId()}.\n * \n * This query examines the {@link ChronoField#OFFSET_SECONDS offset-seconds}\n * field and uses it to create a {@code ZoneOffset}.\n * \n * The method {@link ZoneId#from(TemporalAccessor)} can be used as a\n * {@code TemporalQuery} via a method reference, {@code 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 {@code ZoneOffset} returning null if not found.\n * \n * This returns a {@code 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 OFFSET_SECONDS}\n * field and uses it to create a {@code ZoneOffset}.\n * \n * The method {@link java.time.ZoneOffset#from(TemporalAccessor)} can be used as a\n * {@code TemporalQuery} via a method reference, {@code ZoneOffset::from}.\n * This query and {@code 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 {@code LocalDate} returning null if not found.\n * \n * This returns a {@code 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 EPOCH_DAY}\n * field and uses it to create a {@code 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 {@code LocalTime} returning null if not found.\n * \n * This returns a {@code 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 NANO_OF_DAY}\n * field and uses it to create a {@code 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\n\n/** WEBPACK FOOTER **\n ** ./src/temporal/TemporalQueries.js\n **/","/*\n * @copyright (c) 2016, Philipp Thuerwaechter & Pattrick Hueper\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 {Instant} from '../Instant';\n\nexport class ZoneRules {\n\n /**\n * Obtains an instance of {@code 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 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 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 * 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(LocalDateTime)} and {@link #getTransition(LocalDateTime)}.\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 offsetOfLocalDateTime(localDateTime){\n abstractMethodFail('ZoneRules.offsetLocalDateTime');\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 isValidOffset(localDateTime, offset){\n abstractMethodFail('ZoneRules.isValidOffset');\n }\n\n}\n\n\nclass Fixed extends ZoneRules{\n /**\n *\n * @param {ZoneOffset} offset\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 /**\n *\n * @param {LocalDateTime} LocalDateTime\n * @param {ZoneOffset} offset\n * @return {boolean}\n */\n isValidOffset(dateTime, offset) {\n return this._offset.equals(offset);\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\n/** WEBPACK FOOTER **\n ** ./src/zone/ZoneRules.js\n **/","/*\n * @copyright (c) 2016, Philipp Thuerwaechter & Pattrick Hueper\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 {ZoneId} from './ZoneId';\nimport {ZoneOffset} from './ZoneOffset';\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 * \n * Most applications should declare method signatures, fields and variables\n * as {@link LocalDate}, not this interface.\n * \n * A {@code ChronoLocalDate} is the abstract representation of a date where the\n * {@code Chronology 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 * \n * The primary use case where this interface should be used is where the generic\n * type parameter {@code \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 {@code LocalDate}.\n *\n * \n * 1) Applications using this interface, as opposed to using just {@code 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 {@code 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 * {@code LocalDate} shields users from the concept of eras, by ensuring that {@code getYear()}\n * returns the proleptic year. That decision ensures that developers can think of\n * {@code 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 {@code ChronoLocalDate} throughout an application\n * is unnecessary, as discussed in the last section below.\n *\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 {@code date1} is greater than the year of {@code date2}\n * then {@code date1} is after {@code 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 * \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 * 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 * \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 * This returns a singleton {@linkplain TemporalQuery query} 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 * In both cases, if a complete {@code ChronoLocalDateTime} or {@code 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 {@code SMART} behaviour handles the common \"end of day\" 24:00 value.\n * Processing in {@code LENIENT} mode also produces the same result:\n * \n * This returns a singleton {@linkplain TemporalQuery query} 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 * 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 * 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 */\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 {@code 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 {@code ChronoLocalDate},{@code ChronoLocalDateTime} or {@code ChronoZonedDateTime}.\n *\n * When parsing, the override chronology will be used to interpret the\n * {@linkplain ChronoField fields} 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 /**\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 var 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 {@code 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 {@code StringBuffer}, {@code StringBuilder},\n * {@code PrintStream} and {@code Writer}.\n * \n * Although {@code Appendable} methods throw an {@code IOException}, this method does not.\n * Instead, any {@code 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 var 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(CharSequence, TemporalQuery)}.\n * The result of this method is {@code 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(CharSequence, TemporalQuery)}.\n * The result of this method is {@code 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 var 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 var 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 {@code DateTimeBuilder} ensuring that the text is fully parsed.\n * This method throws {@link DateTimeParseException} if unable to parse, or\n * some other {@code 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 var pos = (position != null ? position : new ParsePosition(0));\n var result = this._parseUnresolved0(text, pos);\n if (result == null || pos.getErrorIndex() >= 0 || (position == null && pos.getIndex() < text.length)) {\n var 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 {@code Map} of field to value, a {@code ZoneId} and a {@code 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 {@code 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 {@code ParsePosition}.\n * The entire length of the text does not have to be parsed, the {@code 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 {@code ParsePosition}\n * instead of {@code 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(CharSequence, TemporalQuery)} 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 var context = new DateTimeParseContext(this);\n var 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 toString() {\n var 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.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\n/** WEBPACK FOOTER **\n ** ./src/format/DateTimeFormatter.js\n **/","/*\n * @copyright (c) 2016, Philipp Thuerwaechter & Pattrick Hueper\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 {@code 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 {@code ZonedDateTime} at 18:00 the following day.\n * By contrast, the {@code Duration} will add exactly 24 hours, resulting in a\n * {@code 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 YEARS},\n * {@link ChronoUnit#MONTHS MONTHS} and {@link ChronoUnit#DAYS 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 {@linkplain #normalized() normalized}.\n * The normalization assumes a 12 month year, so is not appropriate for all calendar systems.\n *\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 {@code 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 YEARS}, {@link ChronoUnit#MONTHS MONTHS}\n * and {@link ChronoUnit#DAYS 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 {@code 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 var years = 0;\n var months = 0;\n var days = 0;\n var units = amount.units();\n for (let i=0; i \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 * see {@link ChronoLocalDate.until}\n *\n * @param {LocalDate} startDate - the start date, inclusive, not null\n * @param {LocalDate} endDate - the end date, exclusive, not null\n * @return {Period} the period between this date and the end date, not null\n */\n static between(startDate, endDate) {\n requireNonNull(startDate, 'startDate');\n requireNonNull(endDate, 'endDate');\n requireInstance(startDate, LocalDate, 'startDate');\n requireInstance(endDate, LocalDate, 'endDate');\n return startDate.until(endDate);\n }\n\n //-----------------------------------------------------------------------\n /**\n * Obtains a {@link Period} from a text string such as {@code PnYnMnD}.\n * \n * This will parse the string produced by {@code toString()} which is\n * based on the ISO-8601 period formats {@code PnYnMnD} and {@code PnW}.\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 * At least one of the four sections must be present.\n * The sections have suffixes in ASCII of 'Y', 'M', 'W' and 'D' for\n * years, months, weeks and days, accepted in upper or lower case.\n * The suffixes must occur in order.\n * The number part of each section must consist of ASCII digits.\n * The number may be prefixed by the ASCII negative or positive symbol.\n * The number must parse to an {@code int}.\n * \n * The leading plus/minus sign, and negative values for other units are\n * not part of the ISO-8601 standard. In addition, ISO-8601 does not\n * permit mixing between the {@code PnYnMnD} and {@code PnW} formats.\n * Any week-based input is multiplied by 7 and treated as a number of days.\n * \n * For example, the following are valid inputs:\n * \n * The period is defined by the chronology.\n * It controls the supported units and restricts addition/subtraction\n * to {@code 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 YEARS},\n * {@link ChronoUnit#MONTHS MONTHS} and {@link ChronoUnit#DAYS DAYS}.\n * Requesting an unsupported unit will throw an exception.\n *\n * @param {TemporalUnit} unit the {@code 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 {@code from(TemporalAmount)}.\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 var 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 {@code from(TemporalAmount)}.\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 var 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 var totalMonths = this.toTotalMonths();\n var splitYears = MathUtil.intDiv(totalMonths, 12);\n var 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(TemporalAmount)}.\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(TemporalAmount)}.\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 var 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 this._years + (this._months << 8) + (this._days << 16);\n }\n\n //-----------------------------------------------------------------------\n /**\n * Outputs this period as a {@code String}, such as {@code 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 var 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\nexport function _init() {\n /**\n * A constant for a period of zero.\n */\n Period.ZERO = makeZeroPeriod();\n\n function makeZeroPeriod() {\n var zero = Object.create(Period.prototype);\n TemporalAmount.call(zero);\n zero._years = 0;\n zero._months = 0;\n zero._days = 0;\n return zero;\n }\n}\n\n\n/** WEBPACK FOOTER **\n ** ./src/Period.js\n **/","/*\n * @copyright (c) 2016, Philipp Thuerwaechter & Pattrick Hueper\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 */\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\n/** WEBPACK FOOTER **\n ** ./src/format/ParsePosition.js\n **/","/*\n * @copyright (c) 2016, Philipp Thuerwaechter & Pattrick Hueper\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 {Temporal} from '../temporal/Temporal';\nimport {TemporalQueries} from '../temporal/TemporalQueries';\n\nimport {LocalTime} from '../LocalTime';\nimport {LocalDate} from '../LocalDate';\nimport {Period} from '../Period';\n\n//import {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 *\n */\nexport class DateTimeBuilder extends Temporal {\n\n /**\n * Creates a new instance of the builder with a single field-value.\n * \n * This is equivalent to using {@link #addFieldValue(TemporalField, long)} 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 var 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 var old = this.getFieldValue0(field); // check first for better error message\n if (old != null && old.longValue() !== 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 builder 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 {Set \n * This is the base interface type for date, time and offset objects that\n * are complete enough to be manipulated using plus and minus.\n * It is implemented by those classes that can provide and manipulate information\n * as {@link TemporalField fields} or {@link TemporalQuery queries}.\n * See {@link TemporalAccessor} for the read-only version of this interface.\n * \n * Most date and time information can be represented as a number.\n * These are modeled using {@code TemporalField} with the number held using\n * a {@code long} to handle large values. Year, month and day-of-month are\n * simple examples of fields, but they also include instant and offsets.\n * See {@link ChronoField} for the standard set of fields.\n * \n * Two pieces of date/time information cannot be represented by numbers,\n * the {@link Chronology chronology} and the {@link ZoneId time-zone}.\n * These can be accessed via {@link #query(TemporalQuery) queries} using\n * the static methods defined on {@link TemporalQueries}.\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 {@code LocalDate}.\n * There are many reasons for this, part of which is that implementations\n * of this interface may be in calendar systems other than ISO.\n * See {@link ChronoLocalDate} for a fuller discussion of the issues.\n *\n * \n * A class should implement this interface if it meets three criteria:\n * \n * \n * Four examples make this clear:\n * \n *\n * @interface\n */\nexport class Temporal extends TemporalAccessor {}\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/temporal/Temporal.js\n **/","/**\n * @copyright (c) 2016, Philipp Thuerwaechter & Pattrick Hueper\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';\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 * {@code LocalDate::from} and {@code 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 * 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 * \n * If the field is not a {@code ChronoField}, then the result of this method\n * is obtained by invoking {@code TemporalField.getFrom(TemporalAccessor)}\n * passing {@code 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 {@code 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 /**\n * Gets the range of valid values for the specified field.\n * \n * All fields can be expressed as a {@code 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 * \n * If the field is not a {@code ChronoField}, then the result of this method\n * is obtained by invoking {@code TemporalField.rangeRefinedBy(TemporalAccessorl)}\n * passing {@code 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}\n\n\n/** WEBPACK FOOTER **\n ** ./src/temporal/TemporalAccessor.js\n **/","/*\n * @copyright (c) 2016, Philipp Thuerwaechter & Pattrick Hueper\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\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 //-----------------------------------------------------------------------\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 {@code 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 let ch1 = cs1[offset1 + i];\n let ch2 = cs2[offset2 + i];\n if (ch1 !== ch2) {\n return false;\n }\n }\n return true;\n }\n\n /**\n * Helper to compare two {@code 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 var currentParsedFieldValues = this.currentParsed().fieldValues;\n var 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 var 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 var 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 var 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 var 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\n\n/** WEBPACK FOOTER **\n ** ./src/format/DateTimeParseContext.js\n **/","/*\n * @copyright (c) 2016, Philipp Thuerwaechter & Pattrick Hueper\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\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 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 var 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 // 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\n}\n\n\n/** WEBPACK FOOTER **\n ** ./src/format/DateTimePrintContext.js\n **/","/**\n * @copyright (c) 2016, Philipp Thuerwaechter & Pattrick Hueper\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\n\n/** WEBPACK FOOTER **\n ** ./src/format/SignStyle.js\n **/","/*\n * @copyright (c) 2016, Philipp Thuerwaechter & Pattrick Hueper\n * @license BSD-3-Clause (see LICENSE in the root directory of this source tree)\n */\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\n\n/** WEBPACK FOOTER **\n ** ./src/format/StringBuilder.js\n **/","/*\n * @copyright (c) 2016, Philipp Thuerwaechter & Pattrick Hueper\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 {@code long}.\n * By contrast, queries can return any type.\n * \n * There are two equivalent ways of using a {@code TemporalQuery}.\n * The first is to invoke the method on this interface directly.\n * The second is to use {@link TemporalAccessor#query(TemporalQuery)}:\n * \n * The most common implementations are method references, such as\n * {@code LocalDate::from} and {@code ZoneId::from}.\n * Further implementations are on {@link TemporalQueries}.\n * Queries may also be defined by applications.\n *\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(TemporalQuery)}:\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 {@link TemporalQueries#chronology() querying the 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 queryFrom(temporal){\n abstractMethodFail('queryFrom');\n }\n\n}\n\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\n\n\n/** WEBPACK FOOTER **\n ** ./src/temporal/TemporalQuery.js\n **/","/*\n * @copyright (c) 2016, Philipp Thuerwaechter & Pattrick Hueper\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 * \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 *\n * \n * The date is expressed using three fields:\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 * There are 52 weeks in most week-based years, however on occasion there are 53 weeks.\n * \n * For example:\n * \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 * IsoFields.QUARTER_OF_YEAR\n *\n * 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 * IsoFields.WEEK_OF_WEEK_BASED_YEAR\n *\n * The field that represents the 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 * IsoFields.WEEK_BASED_YEAR\n *\n * 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 * IsoFields.WEEK_BASED_YEARS\n *\n * The unit that represents week-based-years for 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 {@code 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 * IsoFields.QUARTER_YEARS\n *\n * 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 {@code 365.2425 Days}.\n */\nexport class IsoFields {\n}\n\n//-----------------------------------------------------------------------\n\nconst QUARTER_DAYS = [0, 90, 181, 273, 0, 91, 182, 274];\n\n/**\n * Implementation of the field.\n */\nclass Field extends TemporalField{\n\n /**\n *\n * @returns {TemporalAccessor}\n */\n resolve() {\n return null;\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 * @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 var 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 var 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 var dow0 = date.dayOfWeek().ordinal();\n var doy0 = date.dayOfYear() - 1;\n var doyThu0 = doy0 + (3 - dow0); // adjust to mid-week Thursday (which is 3 indexed from zero)\n var alignedWeek = MathUtil.intDiv(doyThu0, 7);\n var firstThuDoy0 = doyThu0 - (alignedWeek * 7);\n var 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 var 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 var year = date.year();\n var doy = date.dayOfYear();\n if (doy <= 3) {\n let dow = date.dayOfWeek().ordinal();\n if (doy - dow < -2) {\n year--;\n }\n } else if (doy >= 363) {\n let 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 getDisplayName(/*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\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 var qoy = temporal.getLong(QUARTER_OF_YEAR);\n if (qoy === 1) {\n var 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 var doy = temporal.get(ChronoField.DAY_OF_YEAR);\n var moy = temporal.get(ChronoField.MONTH_OF_YEAR);\n var 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 var 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 \n * {@code DayOfWeek} is an enum representing the 7 days of the week.\n * This factory allows the enum to be obtained from the {@code int} value.\n * The {@code 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 {@code DayOfWeek} from a temporal object.\n * \n * A {@code TemporalAccessor} represents some form of date and time information.\n * This factory converts the arbitrary temporal object to an instance of {@code DayOfWeek}.\n * \n * The conversion extracts the {@link ChronoField#DAY_OF_WEEK 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, {@code 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 {@code 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 {@code 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 {@link #getValue() numeric value} 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 getDisplayName(style, locale) {\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(TemporalField) range} and\n * {@link #get(TemporalField) get} methods will throw an exception.\n * \n * If the field is {@link ChronoField#DAY_OF_WEEK DAY_OF_WEEK} then\n * this method returns true.\n * All other {@code ChronoField} instances will return false.\n * \n * If the field is not a {@code ChronoField}, then the result of this method\n * is obtained by invoking {@code TemporalField.isSupportedBy(TemporalAccessor)}\n * passing {@code 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 DAY_OF_WEEK} then the\n * range of the day-of-week, from 1 to 7, will be returned.\n * All other {@code ChronoField} instances will throw a {@code DateTimeException}.\n * \n * If the field is not a {@code ChronoField}, then the result of this method\n * is obtained by invoking {@code TemporalField.rangeRefinedBy(TemporalAccessor)}\n * passing {@code 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 {@code 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 DAY_OF_WEEK} then the\n * value of the day-of-week, from 1 to 7, will be returned.\n * All other {@code ChronoField} instances will throw a {@code DateTimeException}.\n * \n * If the field is not a {@code ChronoField}, then the result of this method\n * is obtained by invoking {@code TemporalField.getFrom(TemporalAccessor)}\n * passing {@code 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 {@code 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 {@code 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 DAY_OF_WEEK} then the\n * value of the day-of-week, from 1 to 7, will be returned.\n * All other {@code ChronoField} instances will throw a {@code DateTimeException}.\n * \n * If the field is not a {@code ChronoField}, then the result of this method\n * is obtained by invoking {@code TemporalField.getFrom(TemporalAccessor)}\n * passing {@code 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 var 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 {@code 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(TemporalAccessor)} method on the\n * specified query passing {@code 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(TemporalField, long)}\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 {@code next(MONDAY)}.\n * \n * In most cases, it is clearer to reverse the calling pattern by using\n * {@link Temporal#with(TemporalAdjuster)}:\n * \n * For example, given a date that is a Wednesday, the following are output:\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\nvar 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\n\n/** WEBPACK FOOTER **\n ** ./src/DayOfWeek.js\n **/","/**\n * @copyright (c) 2016, Philipp Thuerwaechter & Pattrick Hueper\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 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 var 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 var diff = this._zeroDigitCharCode - '0'.charCodeAt(0);\n var 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\n/** WEBPACK FOOTER **\n ** ./src/format/DecimalStyle.js\n **/","/*\n * @copyright (c) 2016, Philipp Thuerwaechter & Pattrick Hueper\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 * \n * {@code 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 {@code 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 * \n * This will query the {@link Clock#systemDefaultZone() system clock} 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 {@link Clock#system(ZoneId) system clock} 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 {@link Clock 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 let now = LocalDate.now(clock); // called once\n return Year.of(now.year());\n }\n /**\n * Obtains an instance of {@code 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 * A {@code TemporalAccessor} represents some form of date and time information.\n * This factory converts the arbitrary temporal object to an instance of {@code Year}.\n * \n * The conversion extracts the {@link ChronoField#YEAR year} field.\n * The extraction is only permitted if the temporal object has an ISO\n * chronology, or can be converted to a {@code 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, {@code 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 {@code 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() {\n if (arguments.length <= 1) {\n return Year.parseText(arguments[0]);\n } else {\n return Year.parseTextFormatter(arguments[0], arguments[1]);\n }\n }\n \n /**\n * Obtains an instance of {@code Year} from a text string such as {@code 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 {@code 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) {\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 * 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 {@link #isSupported(TemporalField) supported fields} will return\n * appropriate range instances.\n * All other {@code ChronoField} instances will throw a {@code DateTimeException}.\n * \n * If the field is not a {@code ChronoField}, then the result of this method\n * is obtained by invoking {@code TemporalField.rangeRefinedBy(TemporalAccessor)}\n * passing {@code 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 as an {@code 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 {@link #isSupported(TemporalField) supported fields} will return valid\n * values based on this year.\n * All other {@code ChronoField} instances will throw a {@code DateTimeException}.\n * \n * If the field is not a {@code ChronoField}, then the result of this method\n * is obtained by invoking {@code TemporalField.getFrom(TemporalAccessor)}\n * passing {@code 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 {@code 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 {@link #isSupported(TemporalField) supported fields} will return valid\n * values based on this year.\n * All other {@code ChronoField} instances will throw a {@code DateTimeException}.\n * \n * If the field is not a {@code ChronoField}, then the result of this method\n * is obtained by invoking {@code TemporalField.getFrom(TemporalAccessor)}\n * passing {@code 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 * function overloading for {@link Year.plus}\n *\n * if called with 1 arguments, then {@link Year.plusAmount} is executed.\n *\n * Otherwise {@link Year.plusAmountToAddUnit} is executed.\n *\n * @param {!(TemporalAmount|number)} amount\n * @param {TemporalUnit} unit\n * @returns {Year}\n */\n plus() {\n if (arguments.length === 1) {\n return this.plusAmount.apply(this, arguments);\n } else {\n return this.plusAmountToAddUnit.apply(this, arguments);\n }\n }\n\n /**\n * Returns a copy of this year with the specified period added.\n * \n * This method returns a new year based on this year with the specified period added.\n * The adder is typically {@link Period} but may be any other type implementing\n * the {@link TemporalAmount} interface.\n * The calculation is delegated to the specified adjuster, which typically calls\n * back to {@link #plus(long, TemporalUnit)}.\n * \n * This instance is immutable and unaffected by this method call.\n *\n * @param {TemporalAmount} amount the amount to add, not null\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 plusAmount(amount) {\n requireNonNull(amount, 'amount');\n requireInstance(amount, TemporalAmount, 'amount');\n return amount.addTo(this);\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 plusAmountToAddUnit(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 * function overloading for {@link Year.minus}\n *\n * if called with 1 argument, then {@link Year.minusAmount} is executed.\n *\n * Otherwise {@link Year.minusAmountToSubtractUnit} is executed.\n *\n * @param {!(TemporalAmount|number)} amount\n * @param {TemporalUnit} unit\n * @returns {Year}\n */\n minus() {\n if (arguments.length === 1) {\n return this.minusAmount.apply(this, arguments);\n } else {\n return this.minusAmountToSubtractUnit.apply(this, arguments);\n }\n }\n\n /**\n * Returns a copy of this year with the specified period subtracted.\n * \n * This method returns a new year based on this year with the specified period subtracted.\n * The subtractor is typically {@link Period} but may be any other type implementing\n * the {@link TemporalAmount} interface.\n * The calculation is delegated to the specified adjuster, which typically calls\n * back to {@link #minus(long, TemporalUnit)}.\n * \n * This instance is immutable and unaffected by this method call.\n *\n * @param {TemporalAmount} amount the amount to subtract, not null\n * @return {Year} based on this year with the subtraction made, not null\n * @throws DateTimeException if the subtraction cannot be made\n * @throws ArithmeticException if numeric overflow occurs\n */\n minusAmount(amount) {\n return amount.subtractFrom(this);\n }\n\n /**\n * @param {number} amountToSubtract the amount to subtract, not null\n * @param {TemporalUnit} unit\n * @return {Year} based on this year with the subtraction made, not null\n * @throws DateTimeException {@inheritDoc}\n * @throws ArithmeticException {@inheritDoc}\n */\n minusAmountToSubtractUnit(amountToSubtract, unit) {\n return (amountToSubtract === MathUtil.MIN_SAFE_INTEGER ? this.plus(MathUtil.MAX_SAFE_INTEGER, unit).plus(1, unit) : this.plus(-amountToSubtract, unit));\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(TemporalField, long)}\n * passing {@link ChronoField#YEAR} as the field.\n * If the specified temporal object does not use the ISO calendar system then\n * a {@code DateTimeException} is thrown.\n * \n * In most cases, it is clearer to reverse the calling pattern by using\n * {@link Temporal#with(TemporalAdjuster)}:\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 {@code LocalDate}.\n * \n * This returns a {@code 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 {TemporalUnit} unit\n * @returns {YearMonth}\n */\n atMonth() {\n if (arguments.length === 1 && arguments[0] instanceof Month) {\n return this.atMonthMonth.apply(this, arguments);\n } else {\n return this.atMonthNumber.apply(this, arguments);\n }\n }\n \n /**\n * Combines this year with a month to create a {@code YearMonth}.\n * \n * This returns a {@code 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 * This returns a {@code 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 * This returns a {@code 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 {@code 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(TemporalAccessor)} method on the\n * specified query passing {@code 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 {@code String} using the formatter.\n * \n * This year will be passed to the formatter\n * {@link DateTimeFormatter#format(TemporalAccessor) print method}.\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 {*} otherYear - the other year, null returns false\n * @return {boolean} true if the other duration is equal to this one\n */\n equals(otherYear) {\n if (this === otherYear) {\n return true;\n }\n if (otherYear instanceof Year) {\n return this.value() === otherYear.value();\n }\n return false;\n }\n /**\n * Outputs this year as a {@code String}.\n *\n * @return {String} a string representation of this year, not null\n */\n toString() {\n return '' + this._year;\n }\n}\n\nvar 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\n/** WEBPACK FOOTER **\n ** ./src/Year.js\n **/","/*\n * @copyright (c) 2016, Philipp Thuerwaechter & Pattrick Hueper\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';\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 {Temporal} from './temporal/Temporal';\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 {@code --12-03}.\n * \n * {@code 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 {@code MonthDay}.\n * \n * Since a {@code 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, {@code MonthDay} only provides access to query and set the fields\n * {@code MONTH_OF_YEAR} and {@code 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 * \n * This will query the {@link Clock#systemDefaultZone() system clock} 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 {@link Clock#system(ZoneId) system clock} 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 {@link Clock dependency injection}.\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 let 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 applied,\n *\n * otherwise {@link MonthDay.ofNumberNumber} is applied\n *\n * @param {!(Month|number)} arg1\n * @param {!(number|null)} arg2\n * @returns {MonthDay}\n */\n static of() {\n if (arguments.length === 2 && arguments[0] instanceof Month) {\n return MonthDay.ofMonthNumber.apply(this, arguments);\n } else {\n return MonthDay.ofNumberNumber.apply(this, arguments);\n }\n }\n /**\n * Obtains an instance of {@code 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 {@code 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 {@code MonthDay} from a temporal object.\n * \n * A {@code TemporalAccessor} represents some form of date and time information.\n * This factory converts the arbitrary temporal object to an instance of {@code MonthDay}.\n * \n * The conversion extracts the {@link ChronoField#MONTH_OF_YEAR MONTH_OF_YEAR} and\n * {@link ChronoField#DAY_OF_MONTH 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, {@code 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 {@code 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 applied,\n *\n * otherwise {@link MonthDay.parseStringFormatter} is applied\n *\n * @param {!(ZoneId|Clock|null)} arg1\n * @returns {MonthDay}\n */\n static parse() {\n if (arguments.length === 1) {\n return MonthDay.parseString.apply(this, arguments);\n } else {\n return MonthDay.parseStringFormatter.apply(this, arguments);\n }\n }\n\n /**\n * Obtains an instance of {@code MonthDay} from a text string such as {@code --12-03}.\n * \n * The string must represent a valid month-day.\n * The format is {@code --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 {@code 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 */\n constructor(month, dayOfMonth) {\n super();\n this._month = month;\n this._day = 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 {@code 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 {@code Month} enum.\n * \n * This method returns the enum {@link Month} for the month.\n * This avoids confusion as to what {@code int} values mean.\n * If you need access to the primitive {@code int} value then the enum\n * provides the {@link Month#getValue() int value}.\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 {@code 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 {@link #range(TemporalField) range} and\n * {@link #get(TemporalField) get} methods will throw an exception.\n * \n * If the field is a {@link ChronoField} then the query is implemented here.\n * The {@link #isSupported(TemporalField) supported fields} will return valid\n * values based on this date-time.\n * The supported fields are:\n * \n * If the field is not a {@code ChronoField}, then the result of this method\n * is obtained by invoking {@code TemporalField.isSupportedBy(TemporalAccessor)}\n * passing {@code 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 {@link #isSupported(TemporalField) supported fields} will return\n * appropriate range instances.\n * All other {@code ChronoField} instances will throw a {@code DateTimeException}.\n * \n * If the field is not a {@code ChronoField}, then the result of this method\n * is obtained by invoking {@code TemporalField.rangeRefinedBy(TemporalAccessor)}\n * passing {@code 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 {@code 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 {@link #isSupported(TemporalField) supported fields} will return valid\n * values based on this month-day.\n * All other {@code ChronoField} instances will throw a {@code DateTimeException}.\n * \n * If the field is not a {@code ChronoField}, then the result of this method\n * is obtained by invoking {@code TemporalField.getFrom(TemporalAccessor)}\n * passing {@code 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 {@code 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 {@link #isSupported(TemporalField) supported fields} will return valid\n * values based on this month-day.\n * All other {@code ChronoField} instances will throw a {@code DateTimeException}.\n * \n * If the field is not a {@code ChronoField}, then the result of this method\n * is obtained by invoking {@code TemporalField.getFrom(TemporalAccessor)}\n * passing {@code 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 {@code 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 {@code 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 let day = Math.min(this._day, month.maxLength());\n return new MonthDay(month.value(), day);\n }\n\n /**\n * Returns a copy of this {@code 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 {@code 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(TemporalAccessor)} method on the\n * specified query passing {@code 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(TemporalField, long)}\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 {@code DateTimeException} is thrown.\n * \n * In most cases, it is clearer to reverse the calling pattern by using\n * {@link Temporal#with(TemporalAdjuster)}:\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 {@code LocalDate}.\n * \n * This returns a {@code 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 let 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 {@code String}, such as {@code --12-03}.\n * \n * The output will be in the format {@code --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 * Outputs this month-day as a {@code String} using the formatter.\n * \n * This month-day will be passed to the formatter\n * {@link DateTimeFormatter#format(TemporalAccessor) print method}.\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\nvar 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\n\n/** WEBPACK FOOTER **\n ** ./src/MonthDay.js\n **/","/*\n * @copyright (c) 2016, Philipp Thuerwaechter & Pattrick Hueper\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 {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 {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 {@code 2007-12}.\n * \n * {@code 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 {@code 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 * \n * This will query the {@link Clock#systemDefaultZone() system clock} 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 {@link Clock#system(ZoneId) system clock} 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 {@link Clock 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 let 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 applied,\n *\n * otherwise {@link YearMonth.ofNumberNumber} is applied\n *\n * @param {!(Month|number)} arg1\n * @param {!(number|null)} arg2\n * @returns {YearMonth}\n */\n static of() {\n if (arguments.length === 2 && arguments[1] instanceof Month) {\n return YearMonth.ofNumberMonth.apply(this, arguments);\n } else {\n return YearMonth.ofNumberNumber.apply(this, arguments);\n }\n }\n\n /**\n * Obtains an instance of {@code 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 {@code 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 {@code YearMonth} from a temporal object.\n * \n * A {@code TemporalAccessor} represents some form of date and time information.\n * This factory converts the arbitrary temporal object to an instance of {@code YearMonth}.\n * \n * The conversion extracts the {@link ChronoField#YEAR YEAR} and\n * {@link ChronoField#MONTH_OF_YEAR 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 {@code 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, {@code 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 {@code 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 applied,\n *\n * otherwise {@link YearMonth.parseStringFormatter} is applied\n *\n * @param {!(String)} arg1\n * @param {!(DateTimeFormatter|null)} arg2\n * @returns {MonthDay}\n */\n static parse() {\n if (arguments.length === 1) {\n return YearMonth.parseString.apply(this, arguments);\n } else {\n return YearMonth.parseStringFormatter.apply(this, arguments);\n }\n }\n\n /**\n * Obtains an instance of {@code YearMonth} from a text string such as {@code 2007-12}.\n * \n * The string must represent a valid year-month.\n * The format must be {@code 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 {@code 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 */\n constructor(year, month) {\n super();\n this._year = year;\n this._month = 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 applied,\n *\n * otherwise {@link YearMonth.isSupportedUnit} is applied\n *\n * @param {!(TemporalField|ChronoUnit)} arg1\n * @returns {boolean}\n */\n isSupported() {\n if (arguments.length === 1 && arguments[0] instanceof TemporalField) {\n return this.isSupportedField.apply(this, arguments);\n } else {\n return this.isSupportedUnit.apply(this, arguments);\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 the {@link #range(TemporalField) range} and\n * {@link #get(TemporalField) get} methods will throw an exception.\n * \n * If the field is a {@link ChronoField} then the query is implemented here.\n * The {@link #isSupported(TemporalField) supported fields} will return valid\n * values based on this date-time.\n * The supported fields are:\n * \n * If the field is not a {@code ChronoField}, then the result of this method\n * is obtained by invoking {@code TemporalField.isSupportedBy(TemporalAccessor)}\n * passing {@code 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 {@link #isSupported(TemporalField) supported fields} will return\n * appropriate range instances.\n * All other {@code ChronoField} instances will throw a {@code DateTimeException}.\n * \n * If the field is not a {@code ChronoField}, then the result of this method\n * is obtained by invoking {@code TemporalField.rangeRefinedBy(TemporalAccessor)}\n * passing {@code 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 {@code 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 {@link #isSupported(TemporalField) supported fields} will return valid\n * values based on this year-month, except {@code EPOCH_MONTH} which is too\n * large to fit in an {@code int} and throw a {@code DateTimeException}.\n * All other {@code ChronoField} instances will throw a {@code DateTimeException}.\n * \n * If the field is not a {@code ChronoField}, then the result of this method\n * is obtained by invoking {@code TemporalField.getFrom(TemporalAccessor)}\n * passing {@code 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 {@code 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 {@link #isSupported(TemporalField) supported fields} will return valid\n * values based on this year-month.\n * All other {@code ChronoField} instances will throw a {@code DateTimeException}.\n * \n * If the field is not a {@code ChronoField}, then the result of this method\n * is obtained by invoking {@code TemporalField.getFrom(TemporalAccessor)}\n * passing {@code 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 {@code int} value for the year.\n * \n * The year returned by this method is proleptic as per {@code get(YEAR)}.\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 {@code 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 {@code Month} enum.\n * \n * This method returns the enum {@link Month} for the month.\n * This avoids confusion as to what {@code int} values mean.\n * If you need access to the primitive {@code int} value then the enum\n * provides the {@link Month#getValue() int value}.\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.of}\n *\n * if called with 1 argument, then {@link YearMonth.withAdjuster} is applied,\n *\n * if called with 2 arguments and first argument is an instance of TemporalField, then {@link YearMonth.withFieldValue} is applied,\n *\n * otherwise {@link YearMonth.withYearMonth} is applied\n *\n * @param {!(TemporalField|TemporalAdjuster)} arg1\n * @param {!(number|null)} arg2\n * @returns {YearMonth}\n */\n with() {\n if (arguments.length === 1) {\n return this.withAdjuster.apply(this, arguments);\n } else if (arguments.length === 2 && arguments[0] instanceof TemporalField){\n return this.withFieldValue.apply(this, arguments);\n } else {\n return this.withYearMonth.apply(this, arguments);\n }\n }\n \n /**\n * Returns a copy of this year-month with the new year and month, checking\n * to see if a new object is in fact required.\n *\n * @param {number} newYear the year to represent, validated from MIN_YEAR to MAX_YEAR\n * @param {number} newMonth the month-of-year to represent, validated not null\n * @return the year-month, not null\n */\n withYearMonth(newYear, newMonth) {\n if (this._year === newYear && this._month === newMonth) {\n return this;\n }\n return new YearMonth(newYear, newMonth);\n }\n\n /**\n * Returns an adjusted copy of this year-month.\n * \n * This returns a new {@code YearMonth}, based on this one, with the year-month 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 year-month to the next month that\n * Halley's comet will pass the Earth.\n * \n * The result of this method is obtained by invoking the\n * {@link TemporalAdjuster#adjustInto(Temporal)} method on the\n * specified adjuster passing {@code 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 {YearMonth} based on {@code 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 return adjuster.adjustInto(this);\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 {@code 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 * In all cases, if the new value is outside the valid range of values for the field\n * then a {@code DateTimeException} will be thrown.\n * \n * All other {@code ChronoField} instances will throw a {@code DateTimeException}.\n * \n * If the field is not a {@code ChronoField}, then the result of this method\n * is obtained by invoking {@code TemporalField.adjustInto(Temporal, long)}\n * passing {@code 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 {@code YearMonth} based on {@code 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 withFieldValue(field, newValue) {\n requireNonNull(field, 'field');\n requireInstance(field, TemporalField, 'field');\n if (field instanceof ChronoField) {\n let 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 {@code 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 this.withYearMonth(year, this._month);\n }\n\n /**\n * Returns a copy of this {@code 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 this.withYearMonth(this._year, month);\n }\n \n //-----------------------------------------------------------------------\n /**\n * function overloading for {@link YearMonth.plus}\n *\n * if called with 1 arguments, then {@link YearMonth.plusAmount} is executed.\n *\n * Otherwise {@link YearMonth.plusAmountUnit} is executed.\n *\n * @param {!(TemporalAmount|number)} amount\n * @param {TemporalUnit} unit\n * @returns {YearMonth}\n */\n plus() {\n if (arguments.length === 1) {\n return this.plusAmount.apply(this, arguments);\n } else {\n return this.plusAmountUnit.apply(this, arguments);\n }\n }\n\n /**\n * Returns a copy of this year-month with the specified period added.\n * \n * This method returns a new year-month based on this year-month with the specified period added.\n * The adder is typically {@link org.threeten.bp.Period Period} but may be any other type implementing\n * the {@link TemporalAmount} interface.\n * The calculation is delegated to the specified adjuster, which typically calls\n * back to {@link #plus(long, TemporalUnit)}.\n * \n * This instance is immutable and unaffected by this method call.\n *\n * @param {TemporalAmount} amount the amount to add, not null\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 plusAmount(amount) {\n requireNonNull(amount, 'amount');\n requireInstance(amount, TemporalAmount, 'amount');\n return amount.addTo(this);\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 {@inheritDoc}\n * @throws ArithmeticException {@inheritDoc}\n */\n plusAmountUnit(amountToAdd, unit) {\n requireNonNull(unit, 'unit');\n requireInstance(unit, TemporalUnit, 'unit');\n if (unit instanceof ChronoField) {\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 let newYear = ChronoField.YEAR.checkValidIntValue(this._year + yearsToAdd); // safe overflow\n return this.withYearMonth(newYear, this._month);\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 let monthCount = (this._year * 12) + (this._month - 1);\n let calcMonths = monthCount + monthsToAdd;\n let newYear = ChronoField.YEAR.checkValidIntValue(MathUtil.floorDiv(calcMonths, 12));\n let newMonth = MathUtil.floorMod(calcMonths, 12) + 1;\n return this.withYearMonth(newYear, newMonth);\n }\n\n //-----------------------------------------------------------------------\n /**\n * function overloading for {@link YearMonth.minus}\n *\n * if called with 1 arguments, then {@link YearMonth.minusAmount} is executed.\n *\n * Otherwise {@link YearMonth.minusAmountUnit} is executed.\n *\n * @param {!(TemporalAmount|number)} amount\n * @param {TemporalUnit} unit\n * @returns {YearMonth}\n */\n minus() {\n if (arguments.length === 1) {\n return this.minusAmount.apply(this, arguments);\n } else {\n return this.minusAmountUnit.apply(this, arguments);\n }\n }\n \n /**\n * Returns a copy of this year-month with the specified period subtracted.\n * \n * This method returns a new year-month based on this year-month with the specified period subtracted.\n * The subtractor is typically {@link org.threeten.bp.Period Period} but may be any other type implementing\n * the {@link TemporalAmount} interface.\n * The calculation is delegated to the specified adjuster, which typically calls\n * back to {@link #minus(long, TemporalUnit)}.\n * \n * This instance is immutable and unaffected by this method call.\n *\n * @param {TemporalAmount} amount the amount to subtract, not null\n * @return {YearMonth} based on this year-month with the subtraction made, not null\n * @throws DateTimeException if the subtraction cannot be made\n * @throws ArithmeticException if numeric overflow occurs\n */\n minusAmount(amount) {\n return amount.subtractFrom(this);\n }\n\n /**\n * @param {number} amountToSubtract the amount to subtract, not null\n * @param {TemporalUnit} unit\n * @return {YearMonth} based on this year-month with the subtraction made, not null\n * @throws DateTimeException {@inheritDoc}\n * @throws ArithmeticException {@inheritDoc}\n */\n minusAmountUnit(amountToSubtract, unit) {\n return (amountToSubtract === MathUtil.MIN_SAFE_INTEGER ? this.plusAmountUnit(MathUtil.MAX_SAFE_INTEGER, unit).plusAmountUnit(1, unit) : this.plusAmountUnit(-amountToSubtract, unit));\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 {@code 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(TemporalAccessor)} method on the\n * specified query passing {@code 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(TemporalField, long)}\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 {@code DateTimeException} is thrown.\n * \n * In most cases, it is clearer to reverse the calling pattern by using\n * {@link Temporal#with(TemporalAdjuster)}:\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 {@code this} and the specified year-month.\n * The result will be negative if the end is before the start.\n * The {@code Temporal} passed to this method must be a {@code YearMonth}.\n * For example, the period in years between two year-months can be calculated\n * using {@code startYearMonth.until(endYearMonth, YEARS)}.\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 {@code long} representing the amount of\n * the specified unit. By contrast, the result of {@code between} is an\n * object that can be used directly in addition/subtraction:\n * \n * The calculation is implemented in this method for {@link ChronoUnit}.\n * The units {@code MONTHS}, {@code YEARS}, {@code DECADES},\n * {@code CENTURIES}, {@code MILLENNIA} and {@code ERAS} are supported.\n * Other {@code ChronoUnit} values will throw an exception.\n * \n * If the unit is not a {@code ChronoUnit}, then the result of this method\n * is obtained by invoking {@code TemporalUnit.between(Temporal, Temporal)}\n * passing {@code 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 {@code 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 let end = YearMonth.from(endExclusive);\n if (unit instanceof ChronoUnit) {\n let monthsUntil = end._getProlepticMonth() - this._getProlepticMonth(); // no overflow\n switch (unit) {\n case ChronoUnit.MONTHS: return monthsUntil;\n case ChronoUnit.YEARS: return monthsUntil / 12;\n case ChronoUnit.DECADES: return monthsUntil / 120;\n case ChronoUnit.CENTURIES: return monthsUntil / 1200;\n case ChronoUnit.MILLENNIA: return 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 {@code LocalDate}.\n * \n * This returns a {@code 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 * This returns a {@code 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 * 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 let 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 {@code String}, such as {@code 2007-12}.\n * \n * The output will be in the format {@code 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 * Outputs this year-month as a {@code String} using the formatter.\n * \n * This year-month will be passed to the formatter\n * {@link DateTimeFormatter#format(TemporalAccessor) print method}.\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\nvar 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\n/** WEBPACK FOOTER **\n ** ./src/YearMonth.js\n **/","/*\n * @copyright (c) 2016, Philipp Thuerwaechter & Pattrick Hueper\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';\n\nimport {Clock} from './Clock';\nimport {Instant} from './Instant';\nimport {LocalDate} from './LocalDate';\nimport {LocalDateTime} from './LocalDateTime';\nimport {LocalTime} from './LocalTime';\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 {@code 2007-12-03T10:15:30+01:00 Europe/Paris}.\n * \n * {@code 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 {@code ZonedDateTime}.\n * \n * This class handles conversion from the local time-line of {@code LocalDateTime}\n * to the instant time-line of {@code Instant}.\n * The difference between the two time-lines is the offset from UTC/Greenwich,\n * represented by a {@code ZoneOffset}.\n * \n * Converting between the two time-lines involves calculating the offset using the\n * {@link ZoneRules rules} accessed from the {@code 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 * \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 * \n * This will query the {@link Clock#systemDefaultZone() system clock} 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 var 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 {@code 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 rules} 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 {@code 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 rules} 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 {@code 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 rules} 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 * {@code 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 var 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 {@code 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 rules} 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 var rules = zone.rules();\n var offset = rules.offsetOfLocalDateTime(localDateTime);\n\n/* TODO implement for iana tzdb\n var validOffsets = rules.validOffsets(localDateTime);\n if (validOffsets.size() == 1) {\n offset = validOffsets.get(0);\n } else if (validOffsets.size() == 0) {\n var trans = rules.transition(localDateTime);\n localDateTime = localDateTime.plusSeconds(trans.duration().seconds());\n offset = trans.offsetAfter();\n } else {\n if (preferredOffset != null && validOffsets.contains(preferredOffset)) {\n offset = preferredOffset;\n } else {\n offset = requireNonNull(validOffsets.get(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 {@code ZonedDateTime} from an {@code 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 {@code ZonedDateTime} from the instant formed by combining\n * the local date-time and offset.\n * \n * This creates a zoned date-time by {@link LocalDateTime#toInstant(ZoneOffset) combining}\n * the {@code LocalDateTime} and {@code 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 {@code ZoneId} to be used is a {@code ZoneOffset}, this method is equivalent\n * to {@link #of(LocalDateTime, ZoneId)}.\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 {@code 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 var rules = zone.rules();\n var instant = Instant.ofEpochSecond(epochSecond, nanoOfSecond); // TODO: rules should be queryable by epochSeconds\n var offset = rules.offset(instant);\n var ldt = LocalDateTime.ofEpochSecond(epochSecond, nanoOfSecond, offset);\n return new ZonedDateTime(ldt, offset, zone);\n }\n\n //-----------------------------------------------------------------------\n /**\n * Obtains an instance of {@code 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 var rules = zone.rules();\n if (rules.isValidOffset(localDateTime, offset) === false) {\n /* TODO implement for iana tzdb\n var 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 */\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 {@code 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 {@code ZonedDateTime} from a temporal object.\n * \n * A {@code TemporalAccessor} represents some form of date and time information.\n * This factory converts the arbitrary temporal object to an instance of {@code ZonedDateTime}.\n * \n * The conversion will first obtain a {@code 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 {@code ZoneId} and instant,\n * or {@code 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, {@code 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 {@code ZonedDateTime}\n */\n static from(temporal) {\n requireNonNull(temporal, 'temporal');\n if (temporal instanceof ZonedDateTime) {\n return temporal;\n }\n var zone = ZoneId.from(temporal);\n if (temporal.isSupported(ChronoField.INSTANT_SECONDS)) {\n var zdt = ZonedDateTime._from(temporal, zone);\n if(zdt != null) return zdt;\n }\n var 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 var epochSecond = temporal.getLong(ChronoField.INSTANT_SECONDS);\n var nanoOfSecond = temporal.get(ChronoField.NANO_OF_SECOND);\n return ZonedDateTime._create(epochSecond, nanoOfSecond, zone);\n }\n\n //-----------------------------------------------------------------------\n /**\n * Obtains an instance of {@code ZonedDateTime} from a text string such as\n * {@code 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, 'fromatter');\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 */\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, this._offset)) {\n return new ZonedDateTime(this._dateTime, this._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 the {@link #range(TemporalField) range} and\n * {@link #get(TemporalField) 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 * If the field is not a {@code ChronoField}, then the result of this method\n * is obtained by invoking {@code TemporalField.isSupportedBy(TemporalAccessor)}\n * passing {@code 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 {@link #isSupported(TemporalField) supported fields} will return\n * appropriate range instances.\n * All other {@code ChronoField} instances will throw a {@code DateTimeException}.\n * \n * If the field is not a {@code ChronoField}, then the result of this method\n * is obtained by invoking {@code TemporalField.rangeRefinedBy(TemporalAccessor)}\n * passing {@code 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 {@code 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 {@link #isSupported(TemporalField) supported fields} will return valid\n * values based on this date-time, except {@code NANO_OF_DAY}, {@code MICRO_OF_DAY},\n * {@code EPOCH_DAY}, {@code EPOCH_MONTH} and {@code INSTANT_SECONDS} which are too\n * large to fit in an {@code int} and throw a {@code DateTimeException}.\n * All other {@code ChronoField} instances will throw a {@code DateTimeException}.\n * \n * If the field is not a {@code ChronoField}, then the result of this method\n * is obtained by invoking {@code TemporalField.getFrom(TemporalAccessor)}\n * passing {@code 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 {@code 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 {@link #isSupported(TemporalField) supported fields} will return valid\n * values based on this date-time.\n * All other {@code ChronoField} instances will throw a {@code DateTimeException}.\n * \n * If the field is not a {@code ChronoField}, then the result of this method\n * is obtained by invoking {@code TemporalField.getFrom(TemporalAccessor)}\n * passing {@code 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, {@code this}\n * is returned.\n * \n * This instance is immutable and unaffected by this method call.\n *\n * @return {ZonedDateTime} a {@code ZonedDateTime} based on this date-time with the earlier offset, not null\n */\n/* TODO implement for iana tzdb\n withEarlierOffsetAtOverlap() {\n var trans = this._zone.rules().transition(this._dateTime);\n if (trans != null && trans.isOverlap()) {\n var earlierOffset = trans.offsetBefore();\n if (earlierOffset.equals(offset) === false) {\n return new ZonedDateTime(this._dateTime, earlierOffset, this._zone);\n }\n }\n return this;\n }\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, {@code this}\n * is returned.\n * \n * This instance is immutable and unaffected by this method call.\n *\n * @return {ZonedDateTime} a {@code ZonedDateTime} based on this date-time with the later offset, not null\n */\n/* TODO implement for iana tzdb\n withLaterOffsetAtOverlap() {\n var trans = zone().rules().transition(this.toLocalDateTime());\n if (trans != null) {\n var laterOffset = trans.offsetAfter();\n if (laterOffset.equals(offset) === false) {\n return new ZonedDateTime(this._dateTime, laterOffset, this._zone);\n }\n }\n return this;\n }\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 rules}\n * that determine when and how the offset from UTC/Greenwich changes.\n * \n * The zone ID may be same as the {@link #getOffset() offset}.\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(LocalDateTime, ZoneId, ZoneOffset)}.\n * \n * To change the zone and adjust the local date-time,\n * use {@link #withZoneSameInstant(ZoneId)}.\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 {@code 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(ZoneId)}.\n *\n * @param {ZoneId} zone - the time-zone to change to, not null\n * @return {ZonedDateTime} a {@code 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 {@code ZonedDateTime.of(zdt.getDateTime(), zdt.getOffset())}.\n *\n * @return {ZonedDateTime} a {@code 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 {@code int} value for the year.\n * \n * The year returned by this method is proleptic as per {@code get(YEAR)}.\n * To obtain the year-of-era, use {@code 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 {@code 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 {@code Month} enum.\n * \n * This method returns the enum {@link Month} for the month.\n * This avoids confusion as to what {@code int} values mean.\n * If you need access to the primitive {@code int} value then the enum\n * provides the {@link Month#getValue() int value}.\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 {@code 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 {@code 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 {@code DayOfWeek}.\n * \n * This method returns the enum {@link DayOfWeek} for the day-of-week.\n * This avoids confusion as to what {@code int} values mean.\n * If you need access to the primitive {@code int} value then the enum\n * provides the {@link DayOfWeek#getValue() int value}.\n * \n * Additional information can be obtained from the {@code 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 * function overloading for {@link ZonedDateTime.with}\n *\n * if called with 1 argument {@link ZonedDateTime.withTemporalAdjuster} is applied\n * otherwise {@link ZonedDateTime.with2}\n */\n with(){\n if(arguments.length === 1){\n return this.withTemporalAdjuster.apply(this, arguments);\n } else {\n return this.with2.apply(this, arguments);\n }\n }\n\n /**\n * Returns an adjusted copy of this date-time.\n * \n * This returns a new {@code 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 {@code 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 * The classes {@link LocalDate} and {@link LocalTime} implement {@code TemporalAdjuster},\n * thus this method can be used to change the date, time or offset:\n * \n * {@link ZoneOffset} also implements {@code 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 {@code 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(Temporal)} method on the\n * specified adjuster passing {@code 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 {@code ZonedDateTime} based on {@code 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 withTemporalAdjuster(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 var 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 requireNonNull(adjuster, 'adjuster');\n return adjuster.adjustInto(this);\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 {@code 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 {@code 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 {@code DateTimeException} will be thrown.\n * \n * The {@code OFFSET_SECONDS} field will typically be ignored.\n * The offset of a {@code 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 {@code DateTimeException} will be thrown.\n * \n * The other {@link #isSupported(TemporalField) supported fields} will behave as per\n * the matching method on {@link LocalDateTime#with(TemporalField, long) LocalDateTime}.\n * The zone is not part of the calculation and will be unchanged.\n * When converting back to {@code 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 {@code ChronoField} instances will throw an {@code UnsupportedTemporalTypeException}.\n * \n * If the field is not a {@code ChronoField}, then the result of this method\n * is obtained by invoking {@code TemporalField.adjustInto(Temporal, long)}\n * passing {@code 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 {@code ZonedDateTime} based on {@code 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 with2(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 var 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 {@code ZonedDateTime} with the year value altered.\n * \n * This operates on the local time-line,\n * {@link LocalDateTime#withYear(int) changing the year} of the local date-time.\n * This is then converted back to a {@code ZonedDateTime}, using the zone ID\n * to obtain the offset.\n * \n * When converting back to {@code 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 {@code 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 {@code ZonedDateTime} with the month-of-year value altered.\n * \n * This operates on the local time-line,\n * {@link LocalDateTime#withMonth(int) changing the month} of the local date-time.\n * This is then converted back to a {@code ZonedDateTime}, using the zone ID\n * to obtain the offset.\n * \n * When converting back to {@code 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 {@code 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 {@code ZonedDateTime} with the day-of-month value altered.\n * \n * This operates on the local time-line,\n * {@link LocalDateTime#withDayOfMonth(int) changing the day-of-month} of the local date-time.\n * This is then converted back to a {@code ZonedDateTime}, using the zone ID\n * to obtain the offset.\n * \n * When converting back to {@code 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 {@code 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 {@code ZonedDateTime} with the day-of-year altered.\n * \n * This operates on the local time-line,\n * {@link LocalDateTime#withDayOfYear(int) changing the day-of-year} of the local date-time.\n * This is then converted back to a {@code ZonedDateTime}, using the zone ID\n * to obtain the offset.\n * \n * When converting back to {@code 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 {@code 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 {@code ZonedDateTime} with the hour-of-day value altered.\n * \n * This operates on the local time-line,\n * {@link LocalDateTime#withHour(int) changing the time} of the local date-time.\n * This is then converted back to a {@code ZonedDateTime}, using the zone ID\n * to obtain the offset.\n * \n * When converting back to {@code 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 {@code 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 {@code ZonedDateTime} with the minute-of-hour value altered.\n * \n * This operates on the local time-line,\n * {@link LocalDateTime#withMinute(int) changing the time} of the local date-time.\n * This is then converted back to a {@code ZonedDateTime}, using the zone ID\n * to obtain the offset.\n * \n * When converting back to {@code 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 {@code 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 {@code ZonedDateTime} with the second-of-minute value altered.\n * \n * This operates on the local time-line,\n * {@link LocalDateTime#withSecond(int) changing the time} of the local date-time.\n * This is then converted back to a {@code ZonedDateTime}, using the zone ID\n * to obtain the offset.\n * \n * When converting back to {@code 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 {@code 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 {@code ZonedDateTime} with the nano-of-second value altered.\n * \n * This operates on the local time-line,\n * {@link LocalDateTime#withNano(int) changing the time} of the local date-time.\n * This is then converted back to a {@code ZonedDateTime}, using the zone ID\n * to obtain the offset.\n * \n * When converting back to {@code 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 {@code 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 {@code 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 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 {@linkplain TemporalUnit#getDuration() duration}\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 DAYS}. Other units throw an exception.\n * \n * This operates on the local time-line,\n * {@link LocalDateTime#truncatedTo(TemporalUnit) truncating}\n * the underlying local date-time. This is then converted back to a\n * {@code ZonedDateTime}, using the zone ID to obtain the offset.\n * \n * When converting back to {@code 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 {@code 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 * function overloading for {@link ZonedDateTime.plus}\n *\n * if called with 1 argument {@link ZonedDateTime.plusTemporalAmount} is applied,\n * otherwise {@link ZonedDateTime.plus2}\n */\n plus(){\n if(arguments.length === 1){\n return this.plusTemporalAmount.apply(this, arguments);\n } else {\n return this.plus2.apply(this, arguments);\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 time with the specified period added.\n * The amount is typically {@link Period} but may be any other type implementing\n * the {@link TemporalAmount} interface.\n * The calculation is delegated to the specified adjuster, which typically calls\n * back to {@link #plus(long, TemporalUnit)}.\n * \n * This instance is immutable and unaffected by this method call.\n *\n * @param {!TemporalAmount} amount - the amount to add, not null\n * @return {ZonedDateTime} a {@code ZonedDateTime} based on this date-time with the addition made, not null\n * @throws DateTimeException if the addition cannot be made\n * @throws ArithmeticException if numeric overflow occurs\n */\n plusTemporalAmount(amount) {\n requireNonNull(amount);\n return amount.addTo(this);\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(LocalDateTime, ZoneId, ZoneOffset)}\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(LocalDateTime, ZoneOffset, ZoneId)}\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 {@code 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 plus2(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 {@code ZonedDateTime} with the specified period in years added.\n * \n * This operates on the local time-line,\n * {@link LocalDateTime#plusYears(long) adding years} to the local date-time.\n * This is then converted back to a {@code ZonedDateTime}, using the zone ID\n * to obtain the offset.\n * \n * When converting back to {@code 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 {@code 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 {@code ZonedDateTime} with the specified period in months added.\n * \n * This operates on the local time-line,\n * {@link LocalDateTime#plusMonths(long) adding months} to the local date-time.\n * This is then converted back to a {@code ZonedDateTime}, using the zone ID\n * to obtain the offset.\n * \n * When converting back to {@code 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 {@code 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 {@code ZonedDateTime} with the specified period in weeks added.\n * \n * This operates on the local time-line,\n * {@link LocalDateTime#plusWeeks(long) adding weeks} to the local date-time.\n * This is then converted back to a {@code ZonedDateTime}, using the zone ID\n * to obtain the offset.\n * \n * When converting back to {@code 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 {@code 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 {@code ZonedDateTime} with the specified period in days added.\n * \n * This operates on the local time-line,\n * {@link LocalDateTime#plusDays(long) adding days} to the local date-time.\n * This is then converted back to a {@code ZonedDateTime}, using the zone ID\n * to obtain the offset.\n * \n * When converting back to {@code 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 {@code 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 {@code 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 * \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 {@code 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 {@code 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 {@code 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 {@code 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 {@code 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 {@code 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 {@code 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 * function overloading for {@link ZonedDateTime.minus}\n *\n * if called with 1 argument {@link ZonedDateTime.minusTemporalAmount} is applied,\n * otherwise {@link ZonedDateTime.minus2}\n */\n minus(){\n if(arguments.length === 1){\n return this.minusTemporalAmount.apply(this, arguments);\n } else {\n return this.minus2.apply(this, arguments);\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 time with the specified period subtracted.\n * The amount is typically {@link Period} but may be any other type implementing\n * the {@link TemporalAmount} interface.\n * The calculation is delegated to the specified adjuster, which typically calls\n * back to {@link #minus(long, TemporalUnit)}.\n * \n * This instance is immutable and unaffected by this method call.\n *\n * @param {TemporalAmount} amount - the amount to subtract, not null\n * @return {ZonedDateTime} a {@code ZonedDateTime} based on this date-time with the subtraction made, not null\n * @throws DateTimeException if the subtraction cannot be made\n * @throws ArithmeticException if numeric overflow occurs\n */\n minusTemporalAmount(amount) {\n requireNonNull(amount, 'amount');\n return amount.subtractFrom(this);\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(LocalDateTime, ZoneId, ZoneOffset)}\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(LocalDateTime, ZoneOffset, ZoneId)}\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 {@code 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 minus2(amountToSubtract, unit) {\n return this.plus2(-1 * amountToSubtract, unit);\n }\n\n //-----------------------------------------------------------------------\n /**\n * Returns a copy of this {@code ZonedDateTime} with the specified period in years subtracted.\n * \n * This operates on the local time-line,\n * {@link LocalDateTime#minusYears(long) subtracting years} to the local date-time.\n * This is then converted back to a {@code ZonedDateTime}, using the zone ID\n * to obtain the offset.\n * \n * When converting back to {@code 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 {@code 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 {@code ZonedDateTime} with the specified period in months subtracted.\n * \n * This operates on the local time-line,\n * {@link LocalDateTime#minusMonths(long) subtracting months} to the local date-time.\n * This is then converted back to a {@code ZonedDateTime}, using the zone ID\n * to obtain the offset.\n * \n * When converting back to {@code 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 {@code 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 {@code ZonedDateTime} with the specified period in weeks subtracted.\n * \n * This operates on the local time-line,\n * {@link LocalDateTime#minusWeeks(long) subtracting weeks} to the local date-time.\n * This is then converted back to a {@code ZonedDateTime}, using the zone ID\n * to obtain the offset.\n * \n * When converting back to {@code 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 {@code 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 {@code ZonedDateTime} with the specified period in days subtracted.\n * \n * This operates on the local time-line,\n * {@link LocalDateTime#minusDays(long) subtracting days} to the local date-time.\n * This is then converted back to a {@code ZonedDateTime}, using the zone ID\n * to obtain the offset.\n * \n * When converting back to {@code 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 {@code 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 {@code 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 * \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 {@code 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 {@code 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 {@code 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 {@code 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 {@code 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 {@code 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 {@code 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 {@code 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(TemporalAccessor)} method on the\n * specified query passing {@code 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 {@code 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 {@code startDateTime.until(endDateTime, DAYS)}.\n * \n * The {@code Temporal} passed to this method must be a {@code 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 {@code long} representing the amount of\n * the specified unit. By contrast, the result of {@code between} is an\n * object that can be used directly in addition/subtraction:\n * \n * The calculation is implemented in this method for {@link ChronoUnit}.\n * The units {@code NANOS}, {@code MICROS}, {@code MILLIS}, {@code SECONDS},\n * {@code MINUTES}, {@code HOURS} and {@code HALF_DAYS}, {@code DAYS},\n * {@code WEEKS}, {@code MONTHS}, {@code YEARS}, {@code DECADES},\n * {@code CENTURIES}, {@code MILLENNIA} and {@code ERAS} are supported.\n * Other {@code 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 {@code ChronoUnit}, then the result of this method\n * is obtained by invoking {@code TemporalUnit.between(Temporal, Temporal)}\n * passing {@code 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 {@code 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 var 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 // TODO check with iana tzdb, this might be wrong \n return this._dateTime.until(end._dateTime, unit);\n // threeten says\n // return toOffsetDateTime().until(end.toOffsetDateTime(), unit)\n // OffsetDateTime.until ...\n // end = end.withOffsetSameInstant(offset);\n // return dateTime.until(end.dateTime, unit);\n }\n }\n return unit.between(this, end);\n }\n\n //-----------------------------------------------------------------------\n /**\n * Gets the {@code LocalDateTime} part of this date-time.\n * \n * This returns a {@code 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 {@code LocalDate} part of this date-time.\n * \n * This returns a {@code 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 {@code LocalTime} part of this date-time.\n * \n * This returns a {@code 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 {@code 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 // TODO we do not support OffsetDateTime, clean up\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 {@code ZonedDateTime} are compared, other types return false.\n *\n * @param {*} other the object to check, null returns false\n * @return 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 var r = 17;\n r = 31 * r + this._dateTime.hashCode();\n r = 31 * r + this._offset.hashCode();\n r = 31 * r + this._zone.hashCode();\n return r;\n }\n\n //-----------------------------------------------------------------------\n /**\n * Outputs this date-time as a {@code String}, such as\n * {@code 2007-12-03T10:15:30+01:00[Europe/Paris]}.\n * \n * The format consists of the {@code LocalDateTime} followed by the {@code ZoneOffset}.\n * If the {@code 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 var 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 * Outputs this date-time as a {@code String} using the formatter.\n * \n * This date will be passed to the formatter\n * {@link DateTimeFormatter#format(TemporalAccessor) print method}.\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\n\n/** WEBPACK FOOTER **\n ** ./src/ZonedDateTime.js\n **/","/*\n * @copyright (c) 2016, Philipp Thuerwaechter & Pattrick Hueper\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 {@code 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 {@code Instant}.\n * \n * This returns an {@code Instant} representing the same point on the\n * time-line as this date-time. The calculation combines the\n * {@linkplain #toLocalDateTime() local date-time} and\n * {@linkplain #getOffset() offset}.\n *\n * @return {Instant} an {@code 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 {@linkplain #toLocalDateTime() local date-time} and\n * {@linkplain #getOffset() offset} 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 var epochDay = this.toLocalDate().toEpochDay();\n var 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 var 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 * {@code 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 var thisEpochSec = this.toEpochSecond();\n var 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 * {@code 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 var thisEpochSec = this.toEpochSecond();\n var 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 * {@code 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 {@code 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\n\n/** WEBPACK FOOTER **\n ** ./src/chrono/ChronoZonedDateTime.js\n **/","/*\n * @copyright (c) 2016, Philipp Thuerwaechter & Pattrick Hueper\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 {MathUtil} from '../MathUtil';\n\nimport {LocalDate} from '../LocalDate';\nimport {Instant} from '../Instant';\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 {@code ChronoLocalDateTime} is the abstract representation of a local date-time\n * where the {@code Chronology 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 * \n * Ensure that the discussion in {@code ChronoLocalDate} has been read and understood\n * before using this interface.\n *\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 \n * The {@code 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 {@code Instant}.\n * \n * This combines this local date-time and the specified offset to form\n * an {@code Instant}.\n *\n * @param {ZoneOffset} offset the offset to use for the conversion, not null\n * @return {Instant} an {@code Instant} representing the same instant, not null\n */\n toInstant(offset) {\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 var epochDay = this.toLocalDate().toEpochDay();\n var secs = epochDay * 86400 + this.toLocalTime().toSecondOfDay();\n secs -= offset.totalSeconds();\n return MathUtil.safeToInt(secs);\n }\n\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/chrono/ChronoLocalDateTime.js\n **/","/*\n * @copyright (c) 2016, Philipp Thuerwaechter & Pattrick Hueper\n * @license BSD-3-Clause (see LICENSE in the root directory of this source tree)\n */\n\nimport {assert, requireNonNull} from '../assert';\nimport {UnsupportedTemporalTypeException} from '../errors';\n\nimport {Instant} from '../Instant';\nimport {LocalDate} from '../LocalDate';\nimport {LocalTime} from '../LocalTime';\nimport {MathUtil} from '../MathUtil';\nimport {ZoneId} from '../ZoneId';\n\nimport {ChronoField} from './ChronoField';\nimport {TemporalQueries} from './TemporalQueries';\nimport {TemporalAccessor} from './TemporalAccessor';\n\n/**\n * A wrapper around a native javascript Date instance that\n * implements TemporalAccessor functionality\n */\nclass NativeJsTemporal extends TemporalAccessor {\n\n /**\n *\n * @param {!(Date|moment)} date - a javascript Date or a moment instance\n * @param {ZoneId} [zone=ZoneId.systemDefault()] - the zone of the temporal, defaults to ZoneId.systemDefault()\n */\n constructor(date, zone=ZoneId.systemDefault()){\n super();\n this._zone = zone;\n if(date instanceof Date) {\n this._epochMilli = date.getTime();\n return;\n } else if(typeof date.toDate === 'function' && date.toDate() instanceof Date) {\n // it's a moment\n this._epochMilli = date.toDate().getTime();\n return;\n }\n assert(false, 'date must be either a javascript date or a moment');\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\n */\n query(query) {\n requireNonNull(query, 'query');\n if (query === TemporalQueries.localDate()) {\n return LocalDate.ofInstant(Instant.ofEpochMilli(this._epochMilli), this._zone);\n } else if(query === TemporalQueries.localTime()){\n return LocalTime.ofInstant(Instant.ofEpochMilli(this._epochMilli), this._zone);\n } else if(query === TemporalQueries.zone()){\n return this._zone;\n }\n return super.query(query);\n }\n\n /**\n *\n * @param {TemporalField} field\n * @returns {number}\n */\n get(field) {\n return this.getLong(field);\n }\n\n /**\n *\n * @param {!TemporalField} field\n * @returns {number}\n */\n getLong(field) {\n requireNonNull(field, 'field');\n if (field instanceof ChronoField) {\n switch (field) {\n case ChronoField.NANO_OF_SECOND: return MathUtil.floorMod(this._epochMilli, 1000) * 1000000;\n case ChronoField.INSTANT_SECONDS: return MathUtil.floorDiv(this._epochMilli, 1000);\n }\n throw new UnsupportedTemporalTypeException('Unsupported field: ' + field);\n }\n return field.getFrom(this);\n }\n\n /**\n *\n * @param {TemporalField} field\n * @returns {boolean}\n */\n isSupported(field){\n return field === ChronoField.INSTANT_SECONDS || field === ChronoField.NANO_OF_SECOND;\n }\n}\n\n/**\n *\n * @param {!(Date|moment)} date - a javascript Date or a moment instance\n * @param {ZoneId} [zone=ZoneId.systemDefault()] - the zone of the temporal, defaults to ZoneId.systemDefault()\n * @returns {NativeJsTemporal}\n */\nexport function nativeJs(date, zone){\n return new NativeJsTemporal(date, zone);\n}\n\n\n/** WEBPACK FOOTER **\n ** ./src/temporal/NativeJsTemporal.js\n **/","/*\n * @copyright (c) 2016, Philipp Thuerwaechter & Pattrick Hueper\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 {@code 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 * 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 * The behavior is suitable for use with most calendar systems.\n * It is equivalent to:\n * \n * The ISO calendar system behaves as follows: \n * The behavior is suitable for use with most calendar systems.\n * It is equivalent to:\n * \n * The ISO calendar system behaves as follows: \n * The behavior is suitable for use with most calendar systems.\n * It is equivalent to:\n * \n * The ISO calendar system behaves as follows: \n * The behavior is suitable for use with most calendar systems.\n * It is equivalent to:\n * \n * The ISO calendar system behaves as follows: \n * The behavior is suitable for use with most calendar systems.\n * It is equivalent to:\n * \n * The ISO calendar system behaves as follows: \n * The behavior is suitable for use with most calendar systems.\n * It is equivalent to:\n * \n * The ISO calendar system behaves as follows: \n * The behavior is suitable for use with most calendar systems.\n * It uses the {@code DAY_OF_WEEK} and {@code DAY_OF_MONTH} fields\n * and the {@code 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 * The behavior is suitable for use with most calendar systems.\n * It uses the {@code DAY_OF_WEEK} and {@code DAY_OF_MONTH} fields\n * and the {@code 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 * 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 {@code DAY_OF_WEEK} and {@code DAY_OF_MONTH} fields\n * and the {@code 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 * The behavior is suitable for use with most calendar systems.\n * It uses the {@code DAY_OF_WEEK} field and the {@code 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 * The behavior is suitable for use with most calendar systems.\n * It uses the {@code DAY_OF_WEEK} field and the {@code 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 * The behavior is suitable for use with most calendar systems.\n * It uses the {@code DAY_OF_WEEK} field and the {@code 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 * The behavior is suitable for use with most calendar systems.\n * It uses the {@code DAY_OF_WEEK} field and the {@code 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 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 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 let temp = temporal.with(ChronoField.DAY_OF_MONTH, 1);\n let 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 let temp = temporal.with(ChronoField.DAY_OF_MONTH, temporal.range(ChronoField.DAY_OF_MONTH).maximum());\n let 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 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 var 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 let daysDiff = calDow - this._dowValue;\n return temporal.plus(daysDiff >= 0 ? 7 - daysDiff : -daysDiff, ChronoUnit.DAYS);\n } else {\n let daysDiff = this._dowValue - calDow;\n return temporal.minus(daysDiff >= 0 ? 7 - daysDiff : -daysDiff, ChronoUnit.DAYS);\n }\n }\n}\n\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/temporal/TemporalAdjusters.js\n **/","/*\n * @copyright (c) 2016, Philipp Thuerwaechter & Pattrick Hueper\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 {@code TemporalAdjuster}.\n * The first is to invoke the method on this interface directly.\n * The second is to use {@link Temporal#with(TemporalAdjuster)}:\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 * \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(TemporalAdjuster)}:\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 {@link TemporalQueries#chronology() querying the 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 adjustInto(temporal){\n abstractMethodFail('adjustInto');\n }\n\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/temporal/TemporalAdjuster.js\n **/","/*\n * @copyright (c) 2016, Philipp Thuerwaechter & Pattrick Hueper\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 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\nvar isInit = false;\n\nfunction init() {\n\n if (isInit) {\n return;\n }\n\n isInit = true;\n\n YearConstantsInit();\n DurationInit();\n LocalTimeInit();\n ChronoUnitInit();\n ChronoFieldInit();\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}\n\ninit();\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/_init.js\n **/","/*\n * @copyright (c) 2016, Philipp Thuerwaechter & Pattrick Hueper\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 {@code 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 {@code 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 {@code 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 {@code ZoneId}, falling back to the {@code ZoneOffset}.\n */\n TemporalQueries.ZONE = createTemporalQuery('ZONE', (temporal) => {\n var zone = temporal.query(TemporalQueries.ZONE_ID);\n return (zone != null ? zone : temporal.query(TemporalQueries.OFFSET));\n });\n\n /**\n * A query for {@code 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 {@code 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\n/** WEBPACK FOOTER **\n ** ./src/temporal/TemporalQueriesFactory.js\n **/"],"sourceRoot":""}\n *
\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 === '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 let 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 let 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, true);\n }\n\n /**\n * Obtains an instance of {@code ZoneId} wrapping an offset.\n * [A-Za-z][A-Za-z0-9~/._+-]+
\n * otherwise a {@code DateTimeException} is thrown. If the zone ID is not\n * in the configured set of IDs, {@code 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 * 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 */\n constructor(totalSeconds){\n super();\n ZoneOffset._validateTotalSeconds(totalSeconds);\n this._totalSeconds = 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 var absTotalSeconds = Math.abs(totalSeconds);\n var absHours = MathUtil.intDiv(absTotalSeconds, LocalTime.SECONDS_PER_HOUR);\n var absMinutes = MathUtil.intMod(MathUtil.intDiv(absTotalSeconds, LocalTime.SECONDS_PER_MINUTE), LocalTime.MINUTES_PER_HOUR);\n var buf = '' + (totalSeconds < 0 ? '-' : '+')\n + (absHours < 10 ? '0' : '') + (absHours)\n + (absMinutes < 10 ? ':0' : ':') + (absMinutes);\n var 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 {@code ZoneOffset} using the ID.\n * \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 * // 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, {@code query(TemporalQuery)},\n * as it is a lot clearer to read in code.\n *\n */\nexport class TemporalQueries {\n\n /**\n * A strict query for the {@code ZoneId}.\n *
\n * {@code LocalDate} returns null
\n * {@code LocalTime} returns null
\n * {@code LocalDateTime} returns null
\n * {@code ZonedDateTime} returns the associated zone
\n * {@code OffsetTime} returns null
\n * {@code OffsetDateTime} returns null
\n * {@code ChronoLocalDate} returns null
\n * {@code ChronoLocalDateTime} returns null
\n * {@code ChronoZonedDateTime} returns the associated zone
\n * {@code Era} returns null
\n * {@code DayOfWeek} returns null
\n * {@code Month} returns null
\n * {@code Year} returns null
\n * {@code YearMonth} returns null
\n * {@code MonthDay} returns null
\n * {@code ZoneOffset} returns null
\n * {@code 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 {@code Chronology}.\n *
\n * {@code LocalDate} returns {@code IsoChronology.INSTANCE}
\n * {@code LocalTime} returns null (does not represent a date)
\n * {@code LocalDateTime} returns {@code IsoChronology.INSTANCE}
\n * {@code ZonedDateTime} returns {@code IsoChronology.INSTANCE}
\n * {@code OffsetTime} returns null (does not represent a date)
\n * {@code OffsetDateTime} returns {@code IsoChronology.INSTANCE}
\n * {@code ChronoLocalDate} returns the associated chronology
\n * {@code ChronoLocalDateTime} returns the associated chronology
\n * {@code ChronoZonedDateTime} returns the associated chronology
\n * {@code Era} returns the associated chronology
\n * {@code DayOfWeek} returns null (shared across chronologies)
\n * {@code Month} returns {@code IsoChronology.INSTANCE}
\n * {@code Year} returns {@code IsoChronology.INSTANCE}
\n * {@code YearMonth} returns {@code IsoChronology.INSTANCE}
\n * {@code MonthDay} returns null {@code IsoChronology.INSTANCE}
\n * {@code ZoneOffset} returns null (does not represent a date)
\n * {@code Instant} returns null (does not represent a date)
\n *
\n * {@code LocalDate} returns {@code DAYS}
\n * {@code LocalTime} returns {@code NANOS}
\n * {@code LocalDateTime} returns {@code NANOS}
\n * {@code ZonedDateTime} returns {@code NANOS}
\n * {@code OffsetTime} returns {@code NANOS}
\n * {@code OffsetDateTime} returns {@code NANOS}
\n * {@code ChronoLocalDate} returns {@code DAYS}
\n * {@code ChronoLocalDateTime} returns {@code NANOS}
\n * {@code ChronoZonedDateTime} returns {@code NANOS}
\n * {@code Era} returns {@code ERAS}
\n * {@code DayOfWeek} returns {@code DAYS}
\n * {@code Month} returns {@code MONTHS}
\n * {@code Year} returns {@code YEARS}
\n * {@code YearMonth} returns {@code MONTHS}
\n * {@code MonthDay} returns null (does not represent a complete date or time)
\n * {@code ZoneOffset} returns null (does not represent a date or time)
\n * {@code Instant} returns {@code 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 {@code ZoneId}, falling back to the {@code ZoneOffset}.\n * \n *
Specification for implementors
\n * This class is immutable and thread-safe.\n */\nexport class ZoneRegion extends ZoneId {\n /**\n * not yet implemented\n * @params {string} zoneId\n * @return {ZoneId}\n */\n static ofId(zoneId){\n // special case as removed from data file\n if (zoneId === 'GMT0') {\n var rules = ZoneOffset.UTC.rules();\n return new ZoneRegion(zoneId, rules);\n }\n throw new DateTimeException('ZoneRegion.ofId() is not yet implemented');\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 */\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\n\n/** WEBPACK FOOTER **\n ** ./src/ZoneRegion.js\n **/","/*\n * @copyright (c) 2016, Philipp Thuerwaechter & Pattrick Hueper\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\n\n/** WEBPACK FOOTER **\n ** ./src/zone/SystemDefaultZoneId.js\n **/","/*\n * @copyright (c) 2016, Philipp Thuerwaechter & Pattrick Hueper\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';\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 var 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 var 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 var epochMilli = localDateTime.toEpochSecond(ZoneOffset.UTC) * 1000;\n var offsetInMinutesBeforePossibleTransition = new Date(epochMilli).getTimezoneOffset();\n var epochMilliSystemZone = epochMilli + offsetInMinutesBeforePossibleTransition * 60000;\n var offsetInMinutesAfterPossibleTransition = new Date(epochMilliSystemZone).getTimezoneOffset();\n return ZoneOffset.ofTotalMinutes(offsetInMinutesAfterPossibleTransition * -1);\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 /**\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\n\n/** WEBPACK FOOTER **\n ** ./src/zone/SystemDefaultZoneRules.js\n **/","/*\n * @copyright (c) 2016, Philipp Thuerwaechter & Pattrick Hueper\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 * When to use this interface
\n * The design of the API encourages the use of {@code 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 * Architectural issues to consider
\n * These are some of the points that must be considered before using this interface\n * throughout an application.\n * False assumptions causing bugs in multi-calendar system code
\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 * Using LocalDate instead
\n * The primary alternative to using this interface throughout your application is as follows.\n * \n *
\n *
Specification for implementors
\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 * 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\n\n/** WEBPACK FOOTER **\n ** ./src/chrono/ChronoLocalDate.js\n **/","/**\n * @copyright (c) 2016, Philipp Thuerwaechter & Pattrick Hueper\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 *
\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 * 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 * |Symbol |Meaning |Presentation |Examples\n * |--------|----------------------------|------------------|----------------------------------------------------\n * | G | era | number/text | 1; 01; AD; Anno Domini\n * | y | year | 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 * 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 if((years | months | days) === 0){\n return Period.ZERO;\n }\n Period._validate(years, months, days);\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 static _validate(years, month, days){\n requireNonNull(years, 'years');\n requireNonNull(month, 'month');\n requireNonNull(days, 'days');\n MathUtil.safeToInt(years);\n MathUtil.safeToInt(month);\n MathUtil.safeToInt(days);\n }\n\n //-----------------------------------------------------------------------\n /**\n * Obtains a {@link Period} representing a number of years.\n * \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 var matches = PATTERN.exec(text);\n if (matches != null) {\n var negate = '-' === matches[1] ? -1 : 1;\n var yearMatch = matches[2];\n var monthMatch = matches[3];\n var weekMatch = matches[4];\n var dayMatch = matches[5];\n if (yearMatch != null || monthMatch != null || weekMatch != null || dayMatch != null) {\n var years = Period._parseNumber(text, yearMatch, negate);\n var months = Period._parseNumber(text, monthMatch, negate);\n var weeks = Period._parseNumber(text, weekMatch, negate);\n var 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 var 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 * // these two lines are equivalent, but the second approach is recommended\n * dateTime = thisPeriod.addTo(dateTime);\n * dateTime = dateTime.plus(thisPeriod);\n *
\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 *
When to implement
\n * \n *
\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 {@code int}.\n * Specification for implementors
\n * Implementations must check and handle all fields defined in {@link ChronoField}.\n * If the field is supported and has an {@code int} range, then the value of\n * the field must be returned.\n * If unsupported, then a {@code DateTimeException} must be thrown.\n * Specification for implementors
\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 {@code DateTimeException} must be thrown.\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, {@code query(TemporalQuery)},\n * as it is a lot clearer to read in code.\n * Specification for implementors
\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 * // 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, {@code query(TemporalQuery)},\n * as it is a lot clearer to read in code.\n *\n * Specification for implementors
\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 {@code TemporalAccessor} to determine the result.\n * The input object must not be altered.\n * Quarter of year
\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 *
Week based years
\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 *
\n *
\n *
\n *\n * \n * Date Day-of-week Field values \n * 2008-12-28 Sunday Week 52 of week-based-year 2008 \n * 2008-12-29 Monday Week 1 of week-based-year 2009 \n * 2008-12-31 Wednesday Week 1 of week-based-year 2009 \n * 2009-01-01 Thursday Week 1 of week-based-year 2009 \n * 2009-01-04 Sunday Week 1 of week-based-year 2009 \n * 2009-01-05 Monday Week 2 of week-based-year 2009 Static properties of Class {@link IsoFields}
\n *\n * IsoFields.DAY_OF_QUARTER\n *\n * The field that represents the day-of-quarter.\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 Temporal {\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 for(var ordinal=0; 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 {@code DayOfWeek} from an {@code int} value.\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 * 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 * Specification for implementors
\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\n\n/** WEBPACK FOOTER **\n ** ./src/format/TextStyle.js\n **/","/**\n * @copyright (c) 2016, Philipp Thuerwaechter & Pattrick Hueper\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 {TemporalAmount} from './temporal/TemporalAmount';\nimport {TemporalQueries} from './temporal/TemporalQueries';\nimport {TemporalQuery, createTemporalQuery} from './temporal/TemporalQuery';\nimport {TemporalUnit} from './temporal/TemporalUnit';\nimport {ValueRange} from './temporal/ValueRange';\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 {@code 2007}.\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 */\n constructor(value) {\n super();\n this._year = 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|null)} arg1 \n * @returns {Year}\n */\n static now(arg = undefined) {\n if (arg === undefined) {\n return Year.now0();\n } else if (arg instanceof ZoneId) {\n return Year.nowZoneId(arg);\n } else {\n return Year.nowClock(arg);\n }\n }\n \n /**\n * Obtains the current year from the system clock in the default time-zone.\n *
\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 {@code MIN_VALUE} to {@code 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 {@code Year} from a temporal object.\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 * 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 {@code YearMonth}.\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 {@code LocalDate}.\n * Specification for implementors
\n * This class is immutable and thread-safe.\n */\nexport class MonthDay extends Temporal {\n /**\n * function overloading for {@link MonthDay.now}\n *\n * if called with 0 argument {@link MonthDay.now0} is applied,\n *\n * if called with 1 argument and first argument is an instance of ZoneId, then {@link MonthDay.nowZoneId} is applied,\n *\n * otherwise {@link MonthDay.nowClock} is applied\n *\n * @param {!(ZoneId|Clock|null)} arg1\n * @returns {MonthDay}\n */\n static now() {\n if (arguments.length === 0) {\n return MonthDay.now0.apply(this, arguments);\n } else if (arguments.length === 1 && arguments[0] instanceof ZoneId) {\n return MonthDay.nowZoneId.apply(this, arguments);\n } else {\n return MonthDay.nowClock.apply(this, arguments);\n }\n }\n /**\n * Obtains the current month-day from the system clock in the default time-zone.\n * \n *
\n * All other {@code ChronoField} instances will return false.\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 * Specification for implementors
\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 applied,\n *\n * if called with 1 argument and first argument is an instance of ZoneId, then {@link YearMonth.nowZoneId} is applied,\n *\n * otherwise {@link YearMonth.nowClock} is applied\n *\n * @param {!(ZoneId|Clock|null)} arg1\n * @returns {YearMonth}\n */\n static now() {\n if (arguments.length === 0) {\n return YearMonth.now0.apply(this, arguments);\n } else if (arguments.length === 1 && arguments[0] instanceof ZoneId) {\n return YearMonth.nowZoneId.apply(this, arguments);\n } else {\n return YearMonth.nowClock.apply(this, arguments);\n }\n }\n\n /**\n * Obtains the current year-month from the system clock in the default time-zone.\n * \n *
\n * All other {@code ChronoField} instances will return false.\n * \n *
\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 * long period = start.until(end, YEARS); // this method\n * dateTime.plus(YEARS.between(start, end)); // use in plus/minus\n *
\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 return LocalDate.of(this._year, this._month, dayOfMonth);\n }\n\n /**\n * Returns a {@code LocalDate} at the end of the month.\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 *
Specification for implementors
\n * A {@code ZonedDateTime} holds state equivalent to three separate objects,\n * a {@code LocalDateTime}, a {@code ZoneId} and the resolved {@code 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 *
\n * All other {@code ChronoField} instances will return false.\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 * result = zonedDateTime.with(date);\n * result = zonedDateTime.with(time);\n *
\n * \n *
\n *
\n * long period = start.until(end, MONTHS); // this method\n * dateTime.plus(MONTHS.between(start, end)); // use in plus/minus\n *
\n * When to use this interface
\n * The design of the API encourages the use of {@code 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 * Specification for implementors
\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 * // 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 {@code TemporalAdjuster}.\n * The first is to invoke the method on the interface directly.\n * The second is to use {@link Temporal#with(TemporalAdjuster)}:\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, {@code with(TemporalAdjuster)},\n * as it is a lot clearer to read in code.\n *\n * Specification for implementors
\n * This is a thread-safe utility class.\n * All returned adjusters are immutable and thread-safe.\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 * 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 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 * 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 input 2011-01-15 will return 2011-02-01.
\n * The input 2011-02-15 will return 2011-03-01.\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 input 2011-01-15 will return 2011-01-01.
\n * The input 2011-02-15 will return 2011-01-01.
\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 input 2011-01-15 will return 2011-12-31.
\n * The input 2011-02-15 will return 2011-12-31.
\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 input 2011-01-15 will return 2012-01-01.\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 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 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 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 * 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 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 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 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 * // 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, {@code with(TemporalAdjuster)},\n * as it is a lot clearer to read in code.\n * Specification for implementors
\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 * // 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, {@code with(TemporalAdjuster)},\n * as it is a lot clearer to read in code.\n *\n * Specification for implementors
\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 {@code 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 *