{"version":3,"sources":["webpack:///webpack/universalModuleDefinition","webpack:///webpack/bootstrap ec14dbe0da9611b1e05b","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/DayOfWeek.js","webpack:///./src/temporal/ChronoField.js","webpack:///./src/temporal/ChronoUnit.js","webpack:///./src/Duration.js","webpack:///./src/temporal/TemporalAmount.js","webpack:///./src/temporal/TemporalUnit.js","webpack:///./src/YearConstants.js","webpack:///./src/temporal/TemporalField.js","webpack:///./src/temporal/ValueRange.js","webpack:///./src/temporal/Temporal.js","webpack:///./src/temporal/TemporalAccessor.js","webpack:///./src/temporal/TemporalQueries.js","webpack:///./src/temporal/TemporalQuery.js","webpack:///./src/Month.js","webpack:///./src/format/DateTimeFormatterBuilder.js","webpack:///./src/ZoneOffset.js","webpack:///./src/ZoneId.js","webpack:///./src/StringUtil.js","webpack:///./src/zone/ZoneRules.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/format/DateTimeParseContext.js","webpack:///./src/format/DateTimePrintContext.js","webpack:///./src/format/SignStyle.js","webpack:///./src/format/StringBuilder.js","webpack:///./src/temporal/IsoFields.js","webpack:///./src/format/DecimalStyle.js","webpack:///./src/format/TextStyle.js","webpack:///./src/format/parser/CharLiteralPrinterParser.js","webpack:///./src/format/parser/CompositePrinterParser.js","webpack:///./src/format/parser/FractionPrinterParser.js","webpack:///./src/format/parser/NumberPrinterParser.js","webpack:///./src/format/parser/OffsetIdPrinterParser.js","webpack:///./src/format/parser/PadPrinterParserDecorator.js","webpack:///./src/format/parser/SettingsParser.js","webpack:///./src/format/parser/StringLiteralPrinterParser.js","webpack:///./src/format/parser/ZoneIdPrinterParser.js","webpack:///./src/ZoneRegion.js","webpack:///./src/zone/ZoneRulesProvider.js","webpack:///./src/Year.js","webpack:///./src/MonthDay.js","webpack:///./src/YearMonth.js","webpack:///./src/temporal/TemporalAdjusters.js","webpack:///./src/temporal/TemporalAdjuster.js","webpack:///./src/ZonedDateTime.js","webpack:///./src/chrono/ChronoZonedDateTime.js","webpack:///./src/chrono/ChronoLocalDateTime.js","webpack:///./src/convert.js","webpack:///./src/temporal/NativeJsTemporal.js","webpack:///./src/_init.js","webpack:///./src/temporal/TemporalQueriesFactory.js","webpack:///./src/ZoneIdFactory.js","webpack:///./src/zone/SystemDefaultZoneId.js","webpack:///./src/zone/SystemDefaultZoneRules.js"],"names":["Clock","DateTimeException","DateTimeParseException","IllegalArgumentException","IllegalStateException","NullPointerException","DayOfWeek","Duration","Instant","LocalDate","LocalTime","LocalDateTime","Month","MonthDay","Period","Year","YearMonth","ZonedDateTime","ZoneOffset","ZoneId","ZoneRegion","ZoneRules","ZoneRulesProvider","convert","nativeJs","ChronoField","ChronoUnit","IsoFields","TemporalAdjusters","TemporalQueries","DateTimeFormatter","DateTimeFormatterBuilder","ResolverStyle","use","used","fn","indexOf","exports","push","systemUTC","SystemClock","UTC","systemDefaultZone","systemDefault","system","zone","fixed","fixedInstant","zoneOffset","FixedClock","millis","instant","_zone","Date","getTime","ofEpochMilli","toString","zoneId","_instant","_zoneId","toEpochMilli","assert","requireNonNull","requireInstance","abstractMethodFail","assertion","msg","error","Error","value","parameterName","_class","name","constructor","methodName","TypeError","createErrorType","init","superErrorClass","E","message","captureStackTrace","stack","apply","arguments","prototype","messageWithCause","messageForDateTimeParseException","UnsupportedTemporalTypeException","ArithmeticException","cause","text","index","parsedString","errorIndex","_init","NANOS_PER_MILLI","now","clock","ofEpochSecond","epochSecond","nanoAdjustment","secs","floorDiv","NANOS_PER_SECOND","nos","floorMod","_create","epochMilli","mos","from","temporal","instantSecs","getLong","INSTANT_SECONDS","nanoOfSecond","get","NANO_OF_SECOND","ex","parse","ISO_INSTANT","FROM","seconds","EPOCH","_validate","MIN_SECONDS","MAX_SECONDS","_seconds","_nanos","isSupported","fieldOrUnit","MICRO_OF_SECOND","MILLI_OF_SECOND","isTimeBased","DAYS","isSupportedBy","range","field","intDiv","getFrom","nano","with","adjusterOrField","newValue","length","withTemporalAdjuster","with2","adjuster","adjustInto","checkValidValue","nval","truncatedTo","unit","NANOS","unitDur","duration","SECONDS_PER_DAY","dur","toNanos","intMod","NANOS_PER_DAY","nod","result","plusNanos","plus","amount","plus1","plus2","addTo","amountToAdd","MICROS","_plus","MILLIS","plusMillis","SECONDS","plusSeconds","MINUTES","safeMultiply","SECONDS_PER_MINUTE","HOURS","SECONDS_PER_HOUR","HALF_DAYS","secondsToAdd","millisToAdd","nanosToAdd","epochSec","minus","minus1","minus2","subtractFrom","amountToSubtract","minusSeconds","secondsToSubtract","minusMillis","millisToSubtract","minusNanos","nanosToSubtract","query","precision","localDate","localTime","chronology","offset","queryFrom","until","endExclusive","end","_nanosUntil","safeSubtract","_secondsUntil","between","secsDiff","totalNanos","safeAdd","nanosDiff","compareTo","otherInstant","cmp","compareNumbers","isAfter","isBefore","equals","hashCode","format","MIN","MAX","clockOrZone","_now","ofInstant","rules","secsOfDay","totalSeconds","ofSecondOfDay","of","hour","minute","second","secondOfDay","SECOND_OF_DAY","hours","minutes","ofNanoOfDay","nanoOfDay","NANO_OF_DAY","NANOS_PER_HOUR","NANOS_PER_MINUTE","time","formatter","ISO_LOCAL_TIME","_hour","safeZero","_minute","_second","_nanoOfSecond","_nano","HOUR_OF_DAY","MINUTE_OF_HOUR","SECOND_OF_MINUTE","_get0","toNanoOfDay","MICRO_OF_DAY","MILLI_OF_DAY","toSecondOfDay","MINUTE_OF_DAY","HOUR_OF_AMPM","CLOCK_HOUR_OF_AMPM","ham","CLOCK_HOUR_OF_DAY","AMPM_OF_DAY","withNano","withSecond","withMinute","plusMinutes","plusHours","withHour","MICROS_PER_DAY","MILLIS_PER_DAY","hoursToAdd","newHour","HOURS_PER_DAY","minutesToAdd","mofd","MINUTES_PER_HOUR","newMofd","MINUTES_PER_DAY","newMinute","secondstoAdd","sofd","newSofd","newSecond","nofd","newNofd","newNano","minusHours","hoursToSubtract","minusMinutes","minutesToSubtract","nanosUntil","atDate","date","total","other","buf","hourValue","minuteValue","secondValue","nanoValue","substring","toJSON","i","makeLocalTimeConst","Object","create","call","MIDNIGHT","NOON","MAX_SAFE_INTEGER","MIN_SAFE_INTEGER","MathUtil","x","y","r","roundDown","Math","ceil","floor","verifyInt","safeToInt","parseInt","isNaN","a","b","_ofEpochMillis","localSecond","localEpochDay","ofEpochDay","ofDateAndTime","ofNumbers","year","month","dayOfMonth","toLocalDateTime","ISO_LOCAL_DATE_TIME","_date","_time","_withDateTime","newDate","newTime","isDateBased","rangeRefinedBy","monthValue","dayOfYear","dayOfWeek","withYear","withMonth","withDayOfMonth","withDayOfYear","plusTemporalAmount","plusDays","plusYears","years","plusMonths","months","plusWeeks","weeks","days","_plusWithOverflow","nanos","minusTemporalAmount","minusYears","minusMonths","minusWeeks","minusDays","sign","totDays","totNanos","curNoD","newNoD","toLocalDate","daysUntil","timeUntil","endDate","endTime","atZone","toLocalTime","_compareTo0","isEqual","DAYS_PER_CYCLE","DAYS_0000_TO_1970","epochDay","ofYearDay","YEAR","leap","isLeapYear","moy","monthEnd","firstDayOfYear","dom","adjust","adjustCycles","doyEst","marchDoy0","marchMonth0","yearEst","zeroDay","ISO_LOCAL_DATE","_resolvePreviousValid","day","min","_year","_month","_day","MONTH_OF_YEAR","DAY_OF_MONTH","lengthOfMonth","DAY_OF_YEAR","lengthOfYear","ALIGNED_WEEK_OF_MONTH","FEBRUARY","YEAR_OF_ERA","MAX_VALUE","DAY_OF_WEEK","ALIGNED_DAY_OF_WEEK_IN_MONTH","ALIGNED_DAY_OF_WEEK_IN_YEAR","EPOCH_DAY","toEpochDay","ALIGNED_WEEK_OF_YEAR","PROLEPTIC_MONTH","_prolepticMonth","ERA","INSTANCE","dow0","fieldOrAdjuster","withFieldAndValue","f","m","p1","p2","WEEKS","MONTHS","YEARS","DECADES","CENTURIES","MILLENNIA","ERAS","yearsToAdd","newYear","checkValidIntValue","monthsToAdd","monthCount","calcMonths","newMonth","weeksToAdd","daysToAdd","mjDay","yearsToSubtract","monthsToSubtract","weeksToSubtract","daysToSubtract","until1","until2","_monthsUntil","packed1","packed2","totalMonths","calcDate","atTime","atTime1","atTime4","atStartOfDay","atStartOfDayWithZone","ldt","trans","transition","isGap","dateTimeAfter","otherDate","yearValue","dayValue","dayString","monthString","yearString","absYear","abs","slice","MIN_VALUE","EPOCH_0","IsoChronology","prolepticYear","_updateResolveMap","fieldValues","current","put","resolveDate","resolverStyle","containsKey","remove","prolepticMonth","LENIENT","yoeLong","era","STRICT","SMART","isLeap","doy","aw","ad","dow","nextOrSame","Enum","_name","ordinal","_ordinal","values","ENUMS","valueOf","getDisplayName","style","locale","MONDAY","TUESDAY","WEDNESDAY","THURSDAY","FRIDAY","SATURDAY","SUNDAY","byName","fieldName","prop","hasOwnProperty","baseUnit","rangeUnit","_baseUnit","_rangeUnit","_range","displayName","dateBased","timeBased","FOREVER","OFFSET_SECONDS","estimatedDuration","_duration","isDurationEstimated","e","e2","temporal1","temporal2","ofNanos","ofSeconds","ofDays","ofHours","ofMinutes","ofMillis","ZERO","units","forEach","startInclusive","startNos","adjustedEnd","PATTERN","RegExp","matches","exec","negate","dayMatch","hourMatch","minuteMatch","secondMatch","fractionMatch","daysAsSecs","_parseNumber","hoursAsSecs","minsAsSecs","negativeSecs","charAt","_parseFraction","parsed","multiplier","errorText","parseFloat","_createSecondsNanos","_createNegateDaysHoursMinutesSecondsNanos","negated","isZero","isNegative","withSeconds","withNanos","plusDuration","durationOrNumber","unitOrNumber","plusAmountUnit","plusSecondsNanos","multipliedBy","minusDuration","minusAmountUnit","secsToSubtract","multiplicand","dividedBy","divisor","secsMod","toDays","toHours","toMinutes","toMillis","round","otherDuration","rval","nanoString","TemporalAmount","TemporalUnit","dateTime","periodToAdd","YearConstants","TemporalField","ValueRange","minSmallest","minLargest","maxSmallest","maxLargest","_minSmallest","_minLargest","_maxLargest","_maxSmallest","isFixed","minimum","largestMinimum","maximum","smallestMaximum","isValidValue","isValidIntValue","isIntValue","hash","str","Temporal","TemporalAccessor","ZONE_ID","CHRONO","PRECISION","ZONE","OFFSET","LOCAL_DATE","LOCAL_TIME","createTemporalQuery","TemporalQuery","queryFromFunction","ExtendedTemporalQuery","_value","appendText","toFormatter","newMonthVal","leapYear","APRIL","JUNE","SEPTEMBER","NOVEMBER","minLength","maxLength","JANUARY","MARCH","MAY","JULY","AUGUST","OCTOBER","DECEMBER","firstMonthOfQuarter","MAX_WIDTH","parent","optional","_active","_parent","_printerParsers","_optional","_padNextWidth","_padNextChar","_valueParserIndex","parseCaseSensitive","_appendInternalPrinterParser","SENSITIVE","parseCaseInsensitive","INSENSITIVE","parseStrict","parseLenient","appendValue","_appendValue1","_appendValue2","_appendValue4","_appendValuePrinterParser","NORMAL","width","pp","NOT_NEGATIVE","minWidth","maxWidth","signStyle","appendValueReduced","_appendValueReducedFieldWidthMaxWidthBaseDate","_appendValueReducedFieldWidthMaxWidthBaseValue","baseValue","baseDate","activeValueParser","basePP","withSubsequentWidth","_appendInternal","withFixedWidth","appendFraction","decimalPoint","appendInstant","fractionalDigits","InstantPrinterParser","appendOffsetId","INSTANCE_ID","appendOffset","pattern","noOffsetText","appendZoneId","appendPattern","_parsePattern","FIELD_MAP","QUARTER_OF_YEAR","pos","cur","start","count","pad","padNext","_parseField","appendZoneText","FULL","SHORT","appendLocalizedOffset","PATTERNS","zero","appendLiteral","replace","optionalStart","optionalEnd","BASE_DATE","EXCEEDS_PAD","NARROW","SHORT_STANDALONE","FULL_STANDALONE","NARROW_STANDALONE","appendInternal","WeekFieldsPrinterParser","_padNext1","_padNext2","padWidth","padChar","cpp","literal","append","toPrinterParser","STANDARD","SECONDS_PER_10000_YEARS","SECONDS_0000_TO_1970","print","context","inSecs","getValue","inNanos","inSec","inNano","zeroSecs","hi","lo","insert","div","digit","position","newContext","copy","minDigits","maxDigits","parser","yearParsed","getParsed","secVal","nanoVal","sec","setParsedLeapSecond","toEpochSecond","successPos","setParsedField","CompositePrinterParser","PadPrinterParserDecorator","SettingsParser","CharLiteralPrinterParser","StringLiteralPrinterParser","NumberPrinterParser","ReducedPrinterParser","FractionPrinterParser","OffsetIdPrinterParser","ZoneIdPrinterParser","SECONDS_CACHE","ID_CACHE","_validateTotalSeconds","_totalSeconds","_rules","_id","_buildId","id","absTotalSeconds","absHours","absMinutes","absSeconds","offsetId","first","ofHoursMinutesSeconds","precededByColon","ch1","ch2","charCodeAt","ofHoursMinutes","ofTotalSeconds","ofTotalMinutes","totalMinutes","totalSecs","obj","normalized","isFixedOffset","StringUtil","startsWith","chr","len","Fixed","instantOrLocalDateTime","offsetOfInstant","offsetOfLocalDateTime","offsetOfEpochMilli","localDateTime","validOffsets","standardOffset","daylightSavings","isDaylightSavings","isValidOffset","nextTransition","previousTransition","transitions","transitionRules","_offset","ChronoLocalDate","parsedExcessDays","PARSED_EXCESS_DAYS","parsedLeapSecond","PARSED_LEAP_SECOND","ofPattern","printerParser","decimalStyle","resolverFields","chrono","_printerParser","_locale","_decimalStyle","_resolverStyle","_resolverFields","_chrono","withChronology","withLocale","_formatTo","appendable","type","parse1","parse2","_parseToBuilder","resolve","_createError","builder","build","abbr","subString","_parseUnresolved0","getErrorIndex","getIndex","substr","toBuilder","parseUnresolved","setErrorIndex","setIndex","toParsed","withOptional","ISO_OFFSET_DATE_TIME","ISO_ZONED_DATE_TIME","excessDays","leapSecond","_years","_months","_days","ofYears","ofMonths","ofWeeks","unitAmount","startDate","_parse","yearMatch","monthMatch","weekMatch","val","withYears","withMonths","withDays","scalar","toTotalMonths","splitYears","splitMonths","makeZeroPeriod","ParsePosition","_index","_errorIndex","DateTimeBuilder","dtb","_addFieldValue","getFieldValue0","old","_putFieldValue0","retainAll","_mergeDate","_mergeTime","_resolveTimeInferZeroes","_checkDate","_addObject","keySet","undefined","val1","val2","ch","ap","hap","cod","lod","sod","mod","los","cos","hod","moh","som","hodVal","mohVal","somVal","nosVal","dateOrTime","EnumMap","_map","putAll","otherMap","key","set","keyList","map","keyName","clear","DateTimeParseContext","_constructorSelf","_constructorFormatter","_constructorParam","_caseSensitive","_strict","_parsed","Parsed","symbols","_symbols","_overrideChronology","_overrideZone","isStrict","setStrict","strict","startOptional","currentParsed","endOptional","successful","splice","isCaseSensitive","setCaseSensitive","caseSensitive","subSequenceEquals","cs1","offset1","cs2","offset2","toLowerCase","charEquals","charEqualsIgnoreCase","c1","c2","errorPos","currentParsedFieldValues","setParsedZone","getEffectiveChronology","dateTimeParseContext","cloned","overrideZone","DateTimePrintContext","localeOrFormatter","_temporal","getValueQuery","setDateTime","SignStyle","positive","fixedWidth","ALWAYS","NEVER","StringBuilder","_str","appendChar","setLength","QUARTER_DAYS","Field","_isIso","_getWeekRangeByLocalDate","wby","_getWeekBasedYear","_getWeekRangeByYear","_getWeek","doy0","doyThu0","alignedWeek","firstThuDoy0","firstMonDoy0","week","DAY_OF_QUARTER_FIELD","QUARTER_YEARS","qoy","curValue","partialTemporal","yearLong","qoyLong","doq","DAY_OF_QUARTER","max","QUARTER_OF_YEAR_FIELD","WEEK_OF_WEEK_BASED_YEAR_FIELD","WEEK_BASED_YEARS","wbyLong","WEEK_BASED_YEAR","dowLong","wowby","WEEK_OF_WEEK_BASED_YEAR","temp","WEEK_BASED_YEAR_FIELD","newWby","resolved","Unit","added","isoWeekOfWeekyear","isoWeekyear","DecimalStyle","zeroChar","positiveSignChar","negativeSignChar","decimalPointChar","_zeroDigit","_zeroDigitCharCode","_positiveSign","_negativeSign","_decimalSeparator","positiveSign","withPositiveSign","negativeSign","withNegativeSign","zeroDigit","withZeroDigit","decimalSeparator","withDecimalSeparator","convertToDigit","char","convertNumberToI18N","numericText","diff","convertedText","String","fromCharCode","availableLocales","TextStyle","isStandalone","asStandalone","asNormal","_literal","printerParsers","fraction","convertToFraction","outputScale","effectiveMin","effectiveMax","minEndPos","maxEndPos","moveLeft","scale","pow","convertFromFraction","_min","_scaled","decimal","EXCEED_POINTS","subsequentWidth","_field","_minWidth","_maxWidth","_signStyle","_subsequentWidth","_isFixedWidth","negative","effMinWidth","effMaxWidth","pass","parseLen","_setValue","_baseValue","_baseDate","absValue","addChronologyChangedParser","lastPart","basePart","isFixedWidth","_checkPattern","offsetSecs","bufPos","output","noOffsetLen","array","arrayIndex","parseText","required","converted","_padWidth","_padChar","preLen","endPos","resultPos","description","nextChar","nextNextChar","_parsePrefixedOffset","availableZoneIds","getAvailableZoneIds","zoneIdTree","size","ZoneIdTree","createTreeMap","maxParseLength","treeMap","parsedZoneId","parseLength","parsedSubZoneId","isLeaf","ofId","prefixPos","prefix","toUpperCase","ofOffset","sortedZoneIds","sort","ZoneIdTreeMap","add","_treeMap","idLength","subZoneId","subTreeMap","getRules","zoneIdOrClock","now0","nowZoneId","nowClock","isoYear","parseTextFormatter","PARSER","isSupportedField","isSupportedUnit","adjusterOrFieldOrNumber","withFieldValue","withAdjuster","amountOrNumber","plusAmount","plusAmountToAddUnit","minusAmount","minusAmountToSubtractUnit","isValidMonthDay","monthDay","isValidYear","atDay","atMonth","monthOrNumber","atMonthMonth","atMonthNumber","atMonthDay","atYear","otherYear","number","ofMonthNumber","ofNumberNumber","parseString","parseStringFormatter","ofNumberMonth","_getProlepticMonth","isValidDay","withYearMonth","monthsUntil","atEndOfMonth","firstDayOfMonth","Impl","FIRST_DAY_OF_MONTH","lastDayOfMonth","LAST_DAY_OF_MONTH","firstDayOfNextMonth","FIRST_DAY_OF_NEXT_MONTH","FIRST_DAY_OF_YEAR","lastDayOfYear","LAST_DAY_OF_YEAR","firstDayOfNextYear","FIRST_DAY_OF_NEXT_YEAR","firstInMonth","DayOfWeekInMonth","lastInMonth","dayOfWeekInMonth","next","RelativeDayOfWeek","previous","previousOrSame","_dowValue","curDow","dowDiff","daysDiff","relative","_relative","calDow","TemporalAdjuster","of2","of3","of8","ofLocal","dt","preferredOffset","offsetAfter","some","validOffset","ofInstant2","ofInstant3","ofStrict","ofLenient","zdt","_from","__from","_dateTime","_resolveLocal","newDateTime","_resolveInstant","_resolveOffset","withEarlierOffsetAtOverlap","isOverlap","earlierOffset","offsetBefore","withLaterOffsetAtOverlap","laterOffset","withZoneSameLocal","withZoneSameInstant","withFixedOffsetZone","difference","ChronoZonedDateTime","toInstant","strcmp","thisEpochSec","otherEpochSec","ChronoLocalDateTime","ToNativeJsConverter","zonedDateTime","toDate","NativeJsTemporal","_epochMilli","isInit","ZoneIdFactory","SYSTEM_DEFAULT_ZONE_ID_INSTANCE","SYSTEM","SystemDefaultZoneId","SystemDefaultZoneRules","offsetInMinutes","getTimezoneOffset","offsetInMinutesBeforePossibleTransition","epochMilliSystemZone","offsetInMinutesAfterPossibleTransition","_throwNotSupported"],"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;;;;;;;;;;;;;;;;;uBCjCSA,K;;;;;;;;;wBAELC,iB;;;;;;wBAAmBC,sB;;;;;;wBAAwBC,wB;;;;;;wBAA0BC,qB;;;;;;wBAAuBC,oB;;;;;;;;;2BAEvFC,S;;;;;;;;;0BACAC,Q;;;;;;;;;yBACAC,O;;;;;;;;;2BACAC,S;;;;;;;;;2BACAC,S;;;;;;;;;+BACAC,a;;;;;;;;;uBACAC,K;;;;;;;;;0BACAC,Q;;;;;;;;;wBACAC,M;;;;;;;;;sBACAC,I;;;;;;;;;2BACAC,S;;;;;;;;;+BAC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AT,EAAqB8oC,iBAArB,EAAhD;AACA,aAAME,uBAAuBhpC,aAAa+oC,0CAA0C,KAApF;AACA,aAAME,yCAAyC,IAAIxsC,IAAJ,CAASusC,oBAAT,EAA+BF,iBAA/B,EAA/C;AACA,gBAAO,uBAAW5c,cAAX,CAA0B+c,yCAAyC,CAAC,CAApE,CAAP;AACH,M;;sCAOD/b,Y,yBAAaD,a,EAAc;AACvB,gBAAO,CAAC,KAAKF,qBAAL,CAA2BE,aAA3B,CAAD,CAAP;AACH,M;;sCAKDpW,U,yBAAY;AACR,gBAAO,IAAP;AACH,M;;sCAODsW,c,2BAAe5wB,O,EAAQ;AACnB,gBAAO,KAAKuwB,eAAL,CAAqBvwB,OAArB,CAAP;AACH,M;;sCAKD6wB,e,8BAAiB;AACb,cAAK8b,kBAAL;AACH,M;;sCAKD7b,iB,gCAAmB;AACf,cAAK6b,kBAAL;AACH,M;;sCAQD5b,a,0BAAchO,Q,EAAUxZ,M,EAAQ;AAC5B,gBAAO,KAAKinB,qBAAL,CAA2BzN,QAA3B,EAAqCrY,MAArC,CAA4CnB,MAA5C,CAAP;AACH,M;;sCAKDynB,c,6BAAgB;AACZ,cAAK2b,kBAAL;AACH,M;;sCAKD1b,kB,iCAAoB;AAChB,cAAK0b,kBAAL;AACH,M;;sCAKDzb,W,0BAAa;AACT,cAAKyb,kBAAL;AACH,M;;sCAKDxb,e,8BAAiB;AACb,cAAKwb,kBAAL;AACH,M;;sCAKDA,kB,iCAAoB;AAChB,eAAM,8BAAsB,yBAAtB,CAAN;AACH,M;;sCAODjiC,M,mBAAOgF,K,EAAO;AACV,aAAI,SAASA,KAAT,IAAkBA,iBAAiB28B,sBAAvC,EAA+D;AAC3D,oBAAO,IAAP;AACH,UAFD,MAEO;AACH,oBAAO,KAAP;AACH;AACJ,M;;sCAMDhsC,Q,uBAAW;AACP,gBAAO,QAAP;AACH,M","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"," \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 ec14dbe0da9611b1e05b","/**\n * @copyright (c) 2016, Philipp Thürwächter & Pattrick Hüper\n * @license BSD-3-Clause (see LICENSE in the root directory of this source tree)\n */\n\nexport { Clock } from './Clock';\nexport {\n DateTimeException, DateTimeParseException, IllegalArgumentException, IllegalStateException, NullPointerException\n} 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';\nexport { ZoneRegion } from './ZoneRegion';\nexport { ZoneRules } from './zone/ZoneRules';\nexport { ZoneRulesProvider } from './zone/ZoneRulesProvider';\n\nexport {convert} from './convert';\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\nconst used = [];\n/**\n * use\n *\n * Provides a way to extend the internals of js-joda\n *\n * @param {function} fn - function to extend js-joda public api\n * @returns {this} for chaining\n */\nexport function use(fn) {\n if (!~used.indexOf(fn)) {\n fn(exports);\n used.push(fn);\n }\n return exports;\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/js-joda.js","/**\n * @copyright (c) 2016, Philipp Thürwächter & Pattrick Hüper\n * @copyright (c) 2007-present, Stephen Colebourne & Michael Nascimento Santos\n * @license BSD-3-Clause (see LICENSE in the root directory of this source tree)\n */\n\nimport {abstractMethodFail, requireNonNull} from './assert';\nimport {Instant} from './Instant';\nimport {ZoneId} from './ZoneId';\nimport {ZoneOffset} from './ZoneOffset';\n\n/**\n * A clock providing access to the current instant, date and time using a time-zone.\n *\n * Instances of this class are used to find the current instant, which can be\n * interpreted using the stored time-zone to find the current date and time.\n * As such, a clock can be used instead of {@link System#currentTimeMillis}\n * and {@link TimeZone#getDefault}.\n *\n * Use of a {@link Clock} is optional. All key date-time classes also have a\n * `now()` factory method that uses the system clock in the default time zone.\n * The primary purpose of this abstraction is to allow alternate clocks to be\n * plugged in as and when required. Applications use an object to obtain the\n * current time rather than a static method. This can simplify testing.\n *\n * Best practice for applications is to pass a {@link Clock} into any method\n * that requires the current instant.\n *\n * This approach allows an alternate clock, such as {@link fixed}\n * or {@link offset} to be used during testing.\n *\n * The {@link system} factory methods provide clocks based on the best available\n * system clock This may use {@link System#currentTimeMillis}, or a higher\n * resolution clock if one is available.\n *\n * The javascript Clock implementation differs from the openjdk.\n *\n * Javascript only provides the UTC millis of epoch and the ZoneOffset in minutes of the system default time.\n * Javascript do not provide the system default ZoneId.\n *\n * the system default ZoneId is only guessable by the ZoneOffset, like moment-timezone does by returning one ZoneId\n * with the same ZoneOffset.\n *\n * Therefore we are doing a shortcut here, by defining a SystemUTCClock and a SystemDefaultClock, the Clock itself\n * is returning the ZoneOffset and not the ZoneRules as in the jdk. We should change it, when introducing the iana\n * timezone database and implementing the timezone domains.\n *\n */\n\nexport class Clock {\n /**\n * Obtains a clock that returns the current instant using the\n * system clock, converting to date and time using the Date.getTime() UTC millis.\n *\n * This clock, rather than {@link systemDefaultZone}, should be used when\n * you need the current instant without the date or time.\n *\n * @return {Clock} a clock that uses the system clock in the UTC zone, not null\n */\n static systemUTC() {\n return new SystemClock(ZoneOffset.UTC);\n }\n\n /**\n * Obtains a clock that returns the current instant using the best available\n * system clock, converting to date and time using the default time-zone.\n *\n * This clock is based on the available system clock using the Date.getTime() UTC millis\n *\n * Using this method hard codes a dependency to the default time-zone into your application.\n *\n * The UTC clock (see {@link systemUTC}) should be used when you need the current instant\n * without the date or time.\n *\n *\n * @return {Clock} a clock that uses the system clock in the default zone, not null\n * @see ZoneId#systemDefault()\n */\n static systemDefaultZone() {\n return new SystemClock(ZoneId.systemDefault());\n }\n\n /**\n *\n * @param {ZoneId} zone\n * @return {Clock} a clock that uses the specified time zone\n */\n static system(zone){\n return new SystemClock(zone);\n }\n\n /**\n * Obtains a clock that always returns the same instant.\n *\n * This clock simply returns the specified instant.\n * As such, it is not a clock in the conventional sense.\n * The main use case for this is in testing, where the fixed clock ensures\n * tests are not dependent on the current clock.\n *\n * @param {Instant} fixedInstant the instant to use as the clock, not null\n * @param {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// WEBPACK FOOTER //\n// ./src/Clock.js","/**\n * @copyright (c) 2016, Philipp Thürwächter & Pattrick Hüper\n * @license BSD-3-Clause (see LICENSE in the root directory of this source tree)\n */\nimport {NullPointerException, IllegalArgumentException} from './errors';\n\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 method \"' + methodName + '\" is not implemented');\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/assert.js","/**\n * @copyright (c) 2016, Philipp Thürwächter & Pattrick Hüper\n * @license BSD-3-Clause (see LICENSE in the root directory of this source tree)\n */\n\nfunction createErrorType(name, init, superErrorClass = Error) {\n function 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 const DateTimeException = createErrorType('DateTimeException', messageWithCause);\nexport const DateTimeParseException = createErrorType('DateTimeParseException', messageForDateTimeParseException);\nexport const UnsupportedTemporalTypeException = createErrorType('UnsupportedTemporalTypeException', null, DateTimeException);\nexport const ArithmeticException = createErrorType('ArithmeticException');\nexport const IllegalArgumentException = createErrorType('IllegalArgumentException');\nexport const IllegalStateException = createErrorType('IllegalStateException');\nexport const NullPointerException = createErrorType('NullPointerException');\n\nfunction messageWithCause(message, cause = null) {\n let msg = message || this.name;\n if (cause !== null && cause instanceof Error) {\n msg += '\\n-------\\nCaused by: ' + cause.stack + '\\n-------\\n';\n }\n this.message = msg;\n}\n\nfunction messageForDateTimeParseException(message, text = '', index = 0, cause = null) {\n let msg = message || this.name;\n msg += ': ' + text + ', at index: ' + index;\n if (cause !== null && cause instanceof Error) {\n msg += '\\n-------\\nCaused by: ' + cause.stack + '\\n-------\\n';\n }\n this.message = msg;\n this.parsedString = () => {\n return text;\n };\n this.errorIndex = () => {\n return index;\n };\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/errors.js","/**\n * @copyright (c) 2016, Philipp Thürwächter & Pattrick Hüper\n * @copyright (c) 2007-present, Stephen Colebourne & Michael Nascimento Santos\n * @license BSD-3-Clause (see LICENSE in the root directory of this source tree)\n */\n\nimport {requireNonNull, requireInstance} from './assert';\nimport {DateTimeException, UnsupportedTemporalTypeException} from './errors';\n\nimport {Clock} from './Clock';\nimport {LocalTime} from './LocalTime';\nimport {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 {TemporalUnit} from './temporal/TemporalUnit';\nimport {createTemporalQuery} from './temporal/TemporalQuery';\nimport {DateTimeFormatter} from './format/DateTimeFormatter';\n\nconst NANOS_PER_MILLI = 1000000;\n\n/**\n * An instantaneous point on the time-line.\n *\n * This class models a single instantaneous point on the time-line.\n * This might be used to record event time-stamps in the application.\n *\n * Time-scale\n *\n * The length of the solar day is the standard way that humans measure time.\n * This has traditionally been subdivided into 24 hours of 60 minutes of 60 seconds,\n * forming a 86400 second day.\n *\n * Modern timekeeping is based on atomic clocks which precisely define an SI second\n * relative to the transitions of a Caesium atom. The length of an SI second was defined\n * to be very close to the 86400th fraction of a day.\n *\n * Unfortunately, as the Earth rotates the length of the day varies.\n * In addition, over time the average length of the day is getting longer as the Earth slows.\n * As a result, the length of a solar day in 2012 is slightly longer than 86400 SI seconds.\n * The actual length of any given day and the amount by which the Earth is slowing\n * are not predictable and can only be determined by measurement.\n * The UT1 time-scale captures the accurate length of day, but is only available some\n * time after the day has completed.\n *\n * The UTC time-scale is a standard approach to bundle up all the additional fractions\n * of a second from UT1 into whole seconds, known as *leap-seconds*.\n * A leap-second may be added or removed depending on the Earth's rotational changes.\n * As such, UTC permits a day to have 86399 SI seconds or 86401 SI seconds where\n * necessary in order to keep the day aligned with the Sun.\n *\n * The modern UTC time-scale was introduced in 1972, introducing the concept of whole leap-seconds.\n * Between 1958 and 1972, the definition of UTC was complex, with minor sub-second leaps and\n * alterations to the length of the notional second. As of 2012, discussions are underway\n * to change the definition of UTC again, with the potential to remove leap seconds or\n * introduce other changes.\n *\n * Given the complexity of accurate timekeeping described above, this Java API defines\n * its own time-scale, the *Java Time-Scale*.\n *\n * The Java Time-Scale divides each calendar day into exactly 86400\n * subdivisions, known as seconds. These seconds may differ from the\n * SI second. It closely matches the de facto international civil time\n * scale, the definition of which changes from time to time.\n *\n * The Java Time-Scale has slightly different definitions for different\n * segments of the time-line, each based on the consensus international\n * time scale that is used as the basis for civil time. Whenever the\n * internationally-agreed time scale is modified or replaced, a new\n * segment of the Java Time-Scale must be defined for it. Each segment\n * must meet these requirements:\n *\n * * the Java Time-Scale shall closely match the underlying international\n * civil time scale;\n * * the Java Time-Scale shall exactly match the international civil\n * time scale at noon each day;\n * * the Java Time-Scale shall have a precisely-defined relationship to\n * the international civil time scale.\n *\n * There are currently, as of 2013, two segments in the Java time-scale.\n *\n * For the segment from 1972-11-03 (exact boundary discussed below) until\n * further notice, the consensus international time scale is UTC (with\n * leap seconds). In this segment, the Java Time-Scale is identical to\n * [UTC-SLS](http://www.cl.cam.ac.uk/~mgk25/time/utc-sls/).\n * This is identical to UTC on days that do not have a leap second.\n * On days that do have a leap second, the leap second is spread equally\n * over the last 1000 seconds of the day, maintaining the appearance of\n * exactly 86400 seconds per day.\n *\n * For the segment prior to 1972-11-03, extending back arbitrarily far,\n * the consensus international time scale is defined to be UT1, applied\n * proleptically, which is equivalent to the (mean) solar time on the\n * prime meridian (Greenwich). In this segment, the Java Time-Scale is\n * identical to the consensus international time scale. The exact\n * boundary between the two segments is the instant where UT1 = UTC\n * between 1972-11-03T00:00 and 1972-11-04T12:00.\n *\n * Implementations of the Java time-scale using the JSR-310 API are not\n * required to provide any clock that is sub-second accurate, or that\n * progresses monotonically or smoothly. Implementations are therefore\n * not required to actually perform the UTC-SLS slew or to otherwise be\n * aware of leap seconds. JSR-310 does, however, require that\n * implementations must document the approach they use when defining a\n * clock representing the current instant.\n * See {@link Clock} for details on the available clocks.\n *\n * The Java time-scale is used for all date-time classes.\n * This includes {@link Instant}, {@link LocalDate}, {@link LocalTime}, {@link OffsetDateTime},\n * {@link ZonedDateTime} and {@link Duration}.\n *\n * ### Static properties of Class {@link Instant}\n *\n * Instant.EPOCH\n *\n * Instant.MIN\n *\n * Instant.MAX\n *\n * Instant.MIN_SECONDS\n *\n * Instant.MAX_SECONDS\n *\n */\nexport class Instant extends Temporal {\n\n /**\n * Obtains the current instant from the system clock, or if specified\n * the current instant from the specified clock.\n *\n * This will query the specified clock to obtain the current time.\n *\n * @param {Clock} [clock=Clock.systemUTC()] - the clock to use, defaults to the system clock\n * @return {Instant} the current instant, not null\n */\n static now(clock = Clock.systemUTC()){\n return clock.instant();\n }\n\n /**\n * Obtains an instance of {@link Instant} using seconds from the\n * epoch of 1970-01-01T00:00:00Z.\n *\n * @param {number} epochSecond - the number of seconds from 1970-01-01T00:00:00Z\n * @param {number} nanoAdjustment nanoseconds start from the start of epochSecond, if null the nanosecond field is set to zero.\n * @return {Instant} an instant, not null\n * @throws DateTimeException if the instant exceeds the maximum or minimum instant\n */\n static ofEpochSecond(epochSecond, nanoAdjustment=0){\n const secs = epochSecond + MathUtil.floorDiv(nanoAdjustment, LocalTime.NANOS_PER_SECOND);\n const nos = MathUtil.floorMod(nanoAdjustment, LocalTime.NANOS_PER_SECOND);\n return Instant._create(secs, nos);\n }\n\n /**\n * Obtains an instance of {@link Instant} using milliseconds from the\n * epoch of 1970-01-01T00:00:00Z.\n *\n * The seconds and nanoseconds are extracted from the specified milliseconds.\n *\n * @param {number} epochMilli - the number of milliseconds from 1970-01-01T00:00:00Z\n * @return {Instant} an instant, not null\n * @throws DateTimeException if the instant exceeds the maximum or minimum instant\n */\n static ofEpochMilli(epochMilli) {\n const secs = MathUtil.floorDiv(epochMilli, 1000);\n const mos = MathUtil.floorMod(epochMilli, 1000);\n return Instant._create(secs, mos * 1000000);\n }\n\n /**\n * Obtains an instance of {@link Instant} from a temporal object.\n *\n * A {@link TemporalAccessor} represents some form of date and time information.\n * This factory converts the arbitrary temporal object to an instance of {@link Instant}.\n *\n * The conversion extracts the {@link ChronoField#INSTANT_SECONDS}\n * and {@link ChronoField#NANO_OF_SECOND} fields.\n *\n * This method matches the signature of the functional interface {@link TemporalQuery}\n * allowing it to be used as a query via method reference, {@link Instant::from}.\n *\n * @param {TemporalAccessor} temporal - the temporal object to convert, not null\n * @return {Instant} the instant, not null\n * @throws DateTimeException if unable to convert to an {@link Instant}\n */\n static from(temporal) {\n try {\n 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 {@link Instant} from a text string such as\n * `2007-12-03T10:15:30.000Z`.\n *\n * The string must represent a valid instant in UTC and is parsed using\n * {@link DateTimeFormatter#ISO_INSTANT}.\n *\n * @param {string} text - the text to parse, not null\n * @return {Instant} the parsed instant, not null\n * @throws DateTimeParseException if the text cannot be parsed\n */\n static parse(text) {\n return DateTimeFormatter.ISO_INSTANT.parse(text, Instant.FROM);\n }\n\n /**\n *\n * @param {number} seconds\n * @param {number} nanoOfSecond\n * @returns {Instant}\n * @private\n */\n static _create(seconds, nanoOfSecond){\n if(seconds === 0 && nanoOfSecond === 0){\n return Instant.EPOCH;\n }\n return new Instant(seconds, nanoOfSecond);\n }\n\n /**\n *\n * @param {number} seconds\n * @param {number} nanoOfSecond\n * @private\n */\n static _validate(seconds, nanoOfSecond){\n if (seconds < Instant.MIN_SECONDS || seconds > Instant.MAX_SECONDS) {\n throw new DateTimeException('Instant exceeds minimum or maximum instant');\n }\n if (nanoOfSecond < 0 || nanoOfSecond > LocalTime.NANOS_PER_SECOND) {\n throw new DateTimeException('Instant exceeds minimum or maximum instant');\n }\n }\n\n /**\n *\n * @param {number} seconds\n * @param {number} nanoOfSecond\n * @private\n */\n constructor(seconds, nanoOfSecond){\n super();\n Instant._validate(seconds, nanoOfSecond);\n this._seconds = 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 {@link range} and {@link get} will throw an exception.\n *\n * If the field is a {@link ChronoField} then the query is implemented here.\n * The supported fields are:\n *\n * * {@link NANO_OF_SECOND}\n * * {@link MICRO_OF_SECOND}\n * * {@link MILLI_OF_SECOND}\n * * {@link INSTANT_SECONDS}\n *\n * All other {@link ChronoField} instances will return false.\n *\n * If the field is not a {@link ChronoField}, then the result of this method\n * is obtained by invoking {@link TemporalField.isSupportedBy}\n * passing `this` as the argument.\n * Whether the field is supported is determined by the field.\n *\n * @param {TemporalField|TemporalUnit} fieldOrUnit - the field to check, null returns false\n * @return {boolean} true if the field is supported on this instant, false if not\n */\n isSupported(fieldOrUnit) {\n if (fieldOrUnit instanceof ChronoField) {\n return fieldOrUnit === ChronoField.INSTANT_SECONDS || fieldOrUnit === ChronoField.NANO_OF_SECOND || fieldOrUnit === ChronoField.MICRO_OF_SECOND || fieldOrUnit === ChronoField.MILLI_OF_SECOND;\n }\n if (fieldOrUnit instanceof ChronoUnit) {\n return fieldOrUnit.isTimeBased() || fieldOrUnit === ChronoUnit.DAYS;\n }\n return fieldOrUnit != null && fieldOrUnit.isSupportedBy(this);\n }\n\n /**\n * Gets the range of valid values for the specified field.\n *\n * The range object expresses the minimum and maximum valid values for a field.\n * This instant is used to enhance the accuracy of the returned range.\n * If it is not possible to return the range, because the field is not supported\n * or for some other reason, an exception is thrown.\n *\n * If the field is a {@link ChronoField} then the query is implemented here.\n * The supported fields (see {@link isSupported}) will return\n * appropriate range instances.\n * All other {@link ChronoField} instances will throw a {@link DateTimeException}.\n *\n * If the field is not a {@link ChronoField}, then the result of this method\n * is obtained by invoking {@link TemporalField.rangeRefinedBy}\n * passing `this` as the argument.\n * Whether the range can be obtained is determined by the field.\n *\n * @param {TemporalField} field - the field to query the range for, not null\n * @return {ValueRange} the range of valid values for the field, not null\n * @throws DateTimeException if the range for the field cannot be obtained\n */\n range(field) {\n return super.range(field);\n }\n\n /**\n * Gets the value of the specified field from this instant as an `int`.\n *\n * This queries this instant for the value for the specified field.\n * The returned value will always be within the valid range of values for the field.\n * If it is not possible to return the value, because the field is not supported\n * or for some other reason, an exception is thrown.\n *\n * If the field is a {@link ChronoField} then the query is implemented here.\n * The supported fields (see {@link isSupported}) will return valid\n * values based on this date-time, except {@link INSTANT_SECONDS} which is too\n * large to fit in an `int` and throws a {@link DateTimeException}.\n * All other {@link ChronoField} instances will throw a {@link DateTimeException}.\n *\n * If the field is not a {@link ChronoField}, then the result of this method\n * is obtained by invoking {@link TemporalField.getFrom}\n * passing `this` as the argument. Whether the value can be obtained,\n * and what the value represents, is determined by the field.\n *\n * @param {TemporalField} field - the field to get, not null\n * @return {number} the value for the field\n * @throws DateTimeException if a value for the field cannot be obtained\n * @throws ArithmeticException if numeric overflow occurs\n */\n get(field) {\n return this.getLong(field);\n }\n\n /**\n * Gets the value of the specified field from this instant as a `long`.\n *\n * This queries this instant for the value for the specified field.\n * If it is not possible to return the value, because the field is not supported\n * or for some other reason, an exception is thrown.\n *\n * If the field is a {@link ChronoField} then the query is implemented here.\n * The supported fields (see {@link isSupported}) will return valid\n * values based on this date-time.\n * All other {@link ChronoField} instances will throw a {@link DateTimeException}.\n *\n * If the field is not a {@link ChronoField}, then the result of this method\n * is obtained by invoking {@link TemporalField.getFrom}\n * passing `this` as the argument. Whether the value can be obtained,\n * and what the value represents, is determined by the field.\n *\n * @param {TemporalField} field - the field to get, not null\n * @return {number} the value for the field\n * @throws DateTimeException if a value for the field cannot be obtained\n * @throws ArithmeticException if numeric overflow occurs\n */\n getLong(field) {\n if (field instanceof ChronoField) {\n switch (field) {\n case ChronoField.NANO_OF_SECOND: return this._nanos;\n case ChronoField.MICRO_OF_SECOND: return MathUtil.intDiv(this._nanos, 1000);\n case ChronoField.MILLI_OF_SECOND: return MathUtil.intDiv(this._nanos, NANOS_PER_MILLI);\n case ChronoField.INSTANT_SECONDS: return this._seconds;\n }\n throw new UnsupportedTemporalTypeException('Unsupported field: ' + field);\n }\n return field.getFrom(this);\n }\n\n /**\n * Gets the number of seconds from the Java epoch of 1970-01-01T00:00:00Z.\n *\n * The epoch second count is a simple incrementing count of seconds where\n * second 0 is 1970-01-01T00:00:00Z.\n * The nanosecond part of the day is returned by {@link getNanosOfSecond}.\n *\n * @return {number} the seconds from the epoch of 1970-01-01T00:00:00Z\n */\n epochSecond(){\n return this._seconds;\n }\n\n /**\n * Gets the number of nanoseconds, later along the time-line, from the start\n * of the second.\n *\n * The nanosecond-of-second value measures the total number of nanoseconds from\n * the second returned by {@link getEpochSecond}.\n *\n * @return {number} the nanoseconds within the second, always positive, never exceeds 999,999,999\n */\n nano(){\n return this._nanos;\n }\n\n //-------------------------------------------------------------------------\n /**\n * 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 {@link 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} 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 {Instant} an {@link Instant} 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 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 {@link Instant}, based on this one, with the value\n * for the specified field changed.\n * If it is not possible to set the value, because the field is not supported or for\n * some other reason, an exception is thrown.\n *\n * If the field is a {@link ChronoField} then the adjustment is implemented here.\n * The supported fields behave as follows:\n *\n * * {@link NANO_OF_SECOND} -\n * Returns an {@link Instant} with the specified nano-of-second.\n * The epoch-second will be unchanged.\n * * {@link MICRO_OF_SECOND} -\n * Returns an {@link Instant} with the nano-of-second replaced by the specified\n * micro-of-second multiplied by 1,000. The epoch-second will be unchanged.\n * * {@link MILLI_OF_SECOND} -\n * Returns an {@link Instant} with the nano-of-second replaced by the specified\n * milli-of-second multiplied by 1,000,000. The epoch-second will be unchanged.\n * * {@link INSTANT_SECONDS} -\n * Returns an {@link Instant} with the specified epoch-second.\n * The nano-of-second will be unchanged.\n *\n *\n * In all cases, if the new value is outside the valid range of values for the field\n * then a {@link DateTimeException} will be thrown.\n *\n * All other {@link ChronoField} instances will throw a {@link DateTimeException}.\n *\n * If the field is not a {@link ChronoField}, then the result of this method\n * is obtained by invoking {@link TemporalField.adjustInto}\n * passing `this` as the argument. In this case, the field determines\n * whether and how to adjust the instant.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {TemporalField} field - the field to set in the result, not null\n * @param {number} newValue - the new value of the field in the result\n * @return {Instant} an {@link Instant} based on `this` with the specified field set, not null\n * @throws DateTimeException if the field cannot be set\n * @throws ArithmeticException if numeric overflow occurs\n */\n 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 {@link Instant} truncated to the specified unit.\n *\n * Truncating the instant returns a copy of the original with fields\n * smaller than the specified unit set to zero.\n * The fields are calculated on the basis of using a UTC offset as seen\n * in {@link toString}.\n * For example, truncating with {@link ChronoUnit#MINUTES} will\n * round down to the nearest minute, setting the seconds and nanoseconds to zero.\n *\n * The unit must have a duration (see {@link TemporalUnit#getDuration})\n * that divides into the length of a standard day without remainder.\n * This includes all supplied time units on {@link ChronoUnit} and\n * {@link ChronoUnit#DAYS}. Other units throw an exception.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {!TemporalUnit} unit - the unit to truncate to, not null\n * @return {Instant} an {@link Instant} based on this instant with the time truncated, not null\n * @throws DateTimeException if the unit is invalid for truncation\n */\n truncatedTo(unit) {\n requireNonNull(unit, 'unit');\n if (unit === ChronoUnit.NANOS) {\n return this;\n }\n let 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 let 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 let nod = MathUtil.intMod(this._seconds, LocalTime.SECONDS_PER_DAY) * LocalTime.NANOS_PER_SECOND + this._nanos;\n let 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 requireNonNull(amountToAdd, 'amountToAdd');\n requireNonNull(unit, 'unit');\n requireInstance(unit, TemporalUnit);\n if (unit instanceof ChronoUnit) {\n switch (unit) {\n case ChronoUnit.NANOS: return this.plusNanos(amountToAdd);\n case ChronoUnit.MICROS: return this._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 {@link Instant} based on this instant with the specified seconds added, not null\n * @throws DateTimeException if the result exceeds the maximum or minimum instant\n */\n plusSeconds(secondsToAdd) {\n return this._plus(secondsToAdd, 0);\n }\n\n /**\n * Returns a copy of this instant with the specified duration in milliseconds added.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {number} millisToAdd - the milliseconds to add, positive or negative\n * @return {Instant} an {@link Instant} based on this instant with the specified milliseconds added, not null\n * @throws DateTimeException if the result exceeds the maximum or minimum instant\n * @throws ArithmeticException if numeric overflow occurs\n */\n plusMillis(millisToAdd) {\n return this._plus(MathUtil.intDiv(millisToAdd, 1000), MathUtil.intMod(millisToAdd, 1000) * NANOS_PER_MILLI);\n }\n\n /**\n * Returns a copy of this instant with the specified duration in nanoseconds added.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {number} nanosToAdd - the nanoseconds to add, positive or negative\n * @return {Instant} an {@link Instant} based on this instant with the specified nanoseconds added, not null\n * @throws DateTimeException if the result exceeds the maximum or minimum instant\n */\n plusNanos(nanosToAdd) {\n return this._plus(0, nanosToAdd);\n }\n\n /**\n * Returns a copy of this instant with the specified duration added.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {number} secondsToAdd - the seconds to add, positive or negative\n * @param {number} nanosToAdd - the nanos to add, positive or negative\n * @return {Instant} an {@link Instant} based on this instant with the specified seconds added, not null\n * @throws DateTimeException if the result exceeds the maximum or minimum instant\n */\n _plus(secondsToAdd, nanosToAdd) {\n if ((secondsToAdd | nanosToAdd) === 0) {\n return this;\n }\n let epochSec = this._seconds + secondsToAdd;\n epochSec = epochSec + MathUtil.intDiv(nanosToAdd, LocalTime.NANOS_PER_SECOND);\n const nanoAdjustment = this._nanos + nanosToAdd % LocalTime.NANOS_PER_SECOND;\n return Instant.ofEpochSecond(epochSec, nanoAdjustment);\n }\n\n //-----------------------------------------------------------------------\n /**\n *\n * @param {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 {@link Instant} based on this instant with the specified seconds subtracted, not null\n * @throws DateTimeException if the result exceeds the maximum or minimum instant\n */\n minusSeconds(secondsToSubtract) {\n return this.plusSeconds(secondsToSubtract * -1);\n }\n\n /**\n * Returns a copy of this instant with the specified duration in milliseconds subtracted.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {number} millisToSubtract - the milliseconds to subtract, positive or negative\n * @return {Instant} an {@link Instant} based on this instant with the specified milliseconds subtracted, not null\n * @throws DateTimeException if the result exceeds the maximum or minimum instant\n * @throws ArithmeticException if numeric overflow occurs\n */\n minusMillis(millisToSubtract) {\n return this.plusMillis(-1 * millisToSubtract);\n }\n\n /**\n * Returns a copy of this instant with the specified duration in nanoseconds subtracted.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {number} nanosToSubtract the nanoseconds to subtract, positive or negative\n * @return {Instant} an {@link Instant} based on this instant with the specified nanoseconds subtracted, not null\n * @throws DateTimeException if the result exceeds the maximum or minimum instant\n * @throws ArithmeticException if numeric overflow occurs\n */\n minusNanos(nanosToSubtract) {\n return this.plusNanos(-1 * nanosToSubtract);\n }\n\n //-------------------------------------------------------------------------\n /**\n * Queries this instant using the specified query.\n *\n * This queries this instant using the specified query strategy object.\n * The {@link TemporalQuery} object defines the logic to be used to\n * obtain the result. Read the documentation of the query to understand\n * what the result of this method will be.\n *\n * The result of this method is obtained by invoking the\n * {@link TemporalQuery#queryFrom} method on the\n * specified query passing `this` as the argument.\n *\n * @param {!TemporalQuery} query - the query to invoke, not null\n * @return {*} the query result, null may be returned (defined by the query)\n * @throws DateTimeException if unable to query (defined by the query)\n * @throws ArithmeticException if numeric overflow occurs (defined by the query)\n */\n query(query) {\n requireNonNull(query, 'query');\n if (query === TemporalQueries.precision()) {\n return ChronoUnit.NANOS;\n }\n // inline TemporalAccessor.super.query(query) as an optimization\n if (query === TemporalQueries.localDate() || query === TemporalQueries.localTime() ||\n query === TemporalQueries.chronology() || query === TemporalQueries.zoneId() ||\n query === TemporalQueries.zone() || query === TemporalQueries.offset()) {\n return null;\n }\n return query.queryFrom(this);\n }\n\n /**\n * Adjusts the specified temporal object to have this instant.\n *\n * This returns a temporal object of the same observable type as the input\n * with the instant changed to be the same as this.\n *\n * The adjustment is equivalent to using {@link Temporal#with}\n * twice, passing {@link ChronoField#INSTANT_SECONDS} and\n * {@link ChronoField#NANO_OF_SECOND} as the fields.\n *\n * In most cases, it is clearer to reverse the calling pattern by using\n * {@link Temporal#with}:\n *
\n * // these two lines are equivalent, but the second approach is recommended\n * temporal = thisInstant.adjustInto(temporal);\n * temporal = temporal.with(thisInstant);\n *\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {!Temporal} temporal - the target object to be adjusted, not null\n * @return {Temporal} the adjusted object, not null\n * @throws DateTimeException if unable to make the adjustment\n * @throws ArithmeticException if numeric overflow occurs\n */\n adjustInto(temporal) {\n requireNonNull(temporal, 'temporal');\n return temporal.with(ChronoField.INSTANT_SECONDS, this._seconds).with(ChronoField.NANO_OF_SECOND, this._nanos);\n }\n\n /**\n * Calculates the period between this instant and another instant in\n * terms of the specified unit.\n *\n * This calculates the period between two instants in terms of a single unit.\n * The start and end points are `this` and the specified instant.\n * The result will be negative if the end is before the start.\n * The calculation returns a whole number, representing the number of\n * complete units between the two instants.\n * The {@link Temporal} passed to this method is converted to a\n * {@link Instant} using {@link from}.\n * For example, the period in days between two dates can be calculated\n * using `startInstant.until(endInstant, SECONDS)`.\n *\n * This method operates in association with {@link TemporalUnit#between}.\n * The result of this method is a `long` representing the amount of\n * the specified unit. By contrast, the result of {@link between} is an\n * object that can be used directly in addition/subtraction:\n *
\n * long period = start.until(end, SECONDS); // this method\n * dateTime.plus(SECONDS.between(start, end)); // use in plus/minus\n *\n *\n * The calculation is implemented in this method for {@link ChronoUnit}.\n * The units {@link NANOS}, {@link MICROS}, {@link MILLIS}, {@link SECONDS},\n * {@link MINUTES}, {@link HOURS}, {@link HALF_DAYS} and {@link DAYS}\n * are supported. Other {@link ChronoUnit} values will throw an exception.\n *\n * If the unit is not a {@link ChronoUnit}, then the result of this method\n * is obtained by invoking {@link TemporalUnit.between}\n * passing `this` as the first argument and the input temporal as\n * the second argument.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {Temporal} endExclusive - the end date, which is converted to an {@link Instant}, not null\n * @param {TemporalUnit} unit - the unit to measure the period in, not null\n * @return {number} the amount of the period between this date and the end date\n * @throws DateTimeException if the period cannot be calculated\n * @throws ArithmeticException if numeric overflow occurs\n */\n until(endExclusive, unit) {\n requireNonNull(endExclusive, 'endExclusive');\n requireNonNull(unit, 'unit');\n 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 {@link OffsetDateTime}.\n *\n * This returns an {@link OffsetDateTime} formed from this instant at the\n * specified offset from UTC/Greenwich. An exception will be thrown if the\n * instant is too large to fit into an offset date-time.\n *\n * This method is equivalent to {@link OffsetDateTime#ofInstant}.\n *\n * @param {ZoneOffset} offset - the offset to combine with, not null\n * @return {OffsetDateTime} the offset date-time formed from this instant and the specified offset, not null\n * @throws DateTimeException if the result exceeds the supported range\n */\n //atOffset(offset) {\n // return OffsetDateTime.ofInstant(this, offset);\n //}\n\n /**\n * Combines this instant with a time-zone to create a {@link ZonedDateTime}.\n *\n * This returns an {@link ZonedDateTime} formed from this instant at the\n * specified time-zone. An exception will be thrown if the instant is too\n * large to fit into a zoned date-time.\n *\n * This method is equivalent to {@link ZonedDateTime#ofInstant}.\n *\n * @param {ZoneId} zone - the zone to combine with, not null\n * @return {ZonedDateTime} the zoned date-time formed from this instant and the specified zone, not null\n * @throws DateTimeException if the result exceeds the supported range\n */\n //atZone(zone) {\n // return ZonedDateTime.ofInstant(this, zone);\n //}\n\n //-----------------------------------------------------------------------\n /**\n * Converts this instant to the number of milliseconds from the epoch\n * of 1970-01-01T00:00:00Z.\n *\n * If this instant represents a point on the time-line too far in the future\n * or past to fit in a `long` milliseconds, then an exception is thrown.\n *\n * If this instant has greater than millisecond precision, then the conversion\n * will drop any excess precision information as though the amount in nanoseconds\n * was subject to integer division by one million.\n *\n * @return {number} the number of milliseconds since the epoch of 1970-01-01T00:00:00Z\n * @throws ArithmeticException if numeric overflow occurs\n */\n toEpochMilli() {\n const millis = MathUtil.safeMultiply(this._seconds, 1000);\n return millis + MathUtil.intDiv(this._nanos, NANOS_PER_MILLI);\n }\n\n //-----------------------------------------------------------------------\n /**\n * Compares this instant to the specified instant.\n *\n * The comparison is based on the time-line position of the instants.\n * It is \"consistent with equals\", as defined by {@link Comparable}.\n *\n * @param {Instant} otherInstant the other instant to compare to, not null\n * @return {number} the comparator value, negative if less, positive if greater\n * @throws NullPointerException if otherInstant is null\n */\n compareTo(otherInstant) {\n requireNonNull(otherInstant, 'otherInstant');\n requireInstance(otherInstant, Instant, 'otherInstant');\n const cmp = MathUtil.compareNumbers(this._seconds, otherInstant._seconds);\n if (cmp !== 0) {\n return cmp;\n }\n return this._nanos - otherInstant._nanos;\n }\n\n /**\n * Checks if this instant is after the specified instant.\n *\n * The comparison is based on the time-line position of the instants.\n *\n * @param {Instant} otherInstant the other instant to compare to, not null\n * @return {boolean} true if this instant is after the specified instant\n * @throws NullPointerException if otherInstant is null\n */\n isAfter(otherInstant) {\n return this.compareTo(otherInstant) > 0;\n }\n\n /**\n * Checks if this instant is before the specified instant.\n *\n * The comparison is based on the time-line position of the instants.\n *\n * @param {Instant} otherInstant the other instant to compare to, not null\n * @return {boolean} true if this instant is before the specified instant\n * @throws NullPointerException if otherInstant is null\n */\n isBefore(otherInstant) {\n return this.compareTo(otherInstant) < 0;\n }\n\n /**\n * Checks if this instant is equal to the specified instant.\n *\n * The comparison is based on the time-line position of the instants.\n *\n * @param {*} 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\n// WEBPACK FOOTER //\n// ./src/Instant.js","/**\n * @copyright (c) 2016, Philipp Thürwächter & Pattrick Hüper\n * @copyright (c) 2007-present, Stephen Colebourne & Michael Nascimento Santos\n * @license BSD-3-Clause (see LICENSE in the root directory of this source tree)\n */\n\n\nimport {MathUtil} from './MathUtil';\nimport {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 {TemporalField} from './temporal/TemporalField';\nimport {TemporalQueries} from './temporal/TemporalQueries';\nimport {createTemporalQuery} from './temporal/TemporalQuery';\n\n/**\n * A time without time-zone in the ISO-8601 calendar system,\n * such as `10:15:30`.\n *\n * {@link LocalTime} is an immutable date-time object that represents a time,\n * often viewed as hour-minute-second.\n * Time is represented to nanosecond precision.\n * For example, the value '13:45.30.123456789' can be stored in a {@link LocalTime}.\n *\n * It does not store or represent a date or time-zone.\n * Instead, it is a description of the local time as seen on a wall clock.\n * It cannot represent an instant on the time-line without additional information\n * such as an offset or time-zone.\n *\n * The ISO-8601 calendar system is the modern civil calendar system used today\n * in most of the world. This API assumes that all calendar systems use the same\n * representation, this class, for time-of-day.\n *\n * ### Static properties of Class {@link LocalTime}\n *\n * LocalTime.MIN\n *\n * The minimum supported {@link LocalTime}, '00:00'.\n * This is the time of midnight at the start of the day.\n *\n * LocalTime.MAX\n *\n * The maximum supported {@link LocalTime}, '23:59:59.999999999'.\n * This is the time just before midnight at the end of the day.\n *\n * LocalTime.MIDNIGHT\n *\n * The time of midnight at the start of the day, '00:00'.\n *\n * LocalTime.NOON\n *\n * The time of noon in the middle of the day, '12:00'.\n *\n * LocalTime.HOURS_PER_DAY\n *\n * Hours per day.\n *\n * LocalTime.MINUTES_PER_HOUR\n *\n * Minutes per hour.\n *\n * LocalTime.MINUTES_PER_DAY\n *\n * Minutes per day.\n *\n * LocalTime.SECONDS_PER_MINUTE\n *\n * Seconds per minute.\n *\n * LocalTime.SECONDS_PER_HOUR\n *\n * Seconds per hour.\n *\n * LocalTime.SECONDS_PER_DAY\n *\n * Seconds per day.\n *\n * LocalTime.MILLIS_PER_DAY\n *\n * Milliseconds per day.\n *\n * LocalTime.MICROS_PER_DAY\n *\n * Microseconds per day.\n *\n * LocalTime.NANOS_PER_SECOND\n *\n * Nanos per second.\n *\n * LocalTime.NANOS_PER_MINUTE\n *\n * Nanos per minute.\n *\n * LocalTime.NANOS_PER_HOUR\n *\n * Nanos per hour.\n *\n * LocalTime.NANOS_PER_DAY\n *\n * Nanos per day.\n *\n */\nexport class LocalTime extends Temporal /** implements Temporal, TemporalAdjuster */ {\n /**\n * Obtains the current time from the specified clock.\n * If no argument is specified the system default clock is queried,\n * if a zone-id is passed a system clock with the specified zone is queried.\n *\n * This will query the specified clock to obtain the current time.\n * Using this method allows the use of an alternate clock for testing.\n * The alternate clock may be introduced using dependency injection.\n *\n * @param {Clock|ZoneId} clockOrZone - the zone ID or clock to use, if null Clock.systemDefaultZone() is used.\n * @return {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 dependency injection (see {@link Clock}).\n *\n * @param {Clock} [clock=Clock.systemDefaultZone()] - the clock to use, not null\n * @return {LocalTime} the current time, not null\n */\n static _now(clock = Clock.systemDefaultZone()) {\n requireNonNull(clock, 'clock');// inline OffsetTime factory to avoid creating object and InstantProvider checks\n return LocalTime.ofInstant(clock.instant(), clock.zone());\n }\n\n /**\n * obtain a LocalTime from an Instant in the specified time-zone or, if null\n * in the system default time-zone\n *\n * @param {!Instant} instant\n * @param {ZoneId} [zone=ZoneId.systemDefault()], defaults to ZoneId.systemDefault()\n * @returns {LocalTime} the current date, not null\n */\n static ofInstant(instant, zone=ZoneId.systemDefault()){\n const offset = zone.rules().offset(instant);\n let secsOfDay = MathUtil.intMod(instant.epochSecond(), LocalTime.SECONDS_PER_DAY);\n secsOfDay = MathUtil.intMod((secsOfDay + offset.totalSeconds()), LocalTime.SECONDS_PER_DAY);\n if (secsOfDay < 0) {\n secsOfDay += LocalTime.SECONDS_PER_DAY;\n }\n return LocalTime.ofSecondOfDay(secsOfDay, instant.nano());\n }\n\n /**\n * Obtains an instance of {@link LocalTime} from an hour, minute, second and nanosecond.\n *\n * This factory may return a cached value, but applications must not rely on this.\n *\n * @param {number} [hour=0] - the hour-of-day to represent, from 0 to 23\n * @param {number} [minute=0] - the minute-of-hour to represent, from 0 to 59\n * @param {number} [second=0] - the second-of-minute to represent, from 0 to 59\n * @param {number} [nanoOfSecond=0] - the nano-of-second to represent, from 0 to 999,999,999\n * @return {LocalTime} the local time, not null\n * @throws {DateTimeException} if the value of any field is out of range\n */\n static of(hour, minute, second, nanoOfSecond) {\n return new LocalTime(hour, minute, second, nanoOfSecond);\n }\n\n /**\n * Obtains an instance of {@link LocalTime} from a second-of-day value, with\n * associated nanos of second.\n *\n * This factory may return a cached value, but applications must not rely on this.\n *\n * @param {number} [secondOfDay=0] - the second-of-day, from `0` to `24 * 60 * 60 - 1`\n * @param {number} [nanoOfSecond=0] - the nano-of-second, from `0` to `999,999,999`\n * @return {LocalTime} the local time, not null\n * @throws {DateTimeException} if the either input value is invalid\n */\n static ofSecondOfDay(secondOfDay=0, nanoOfSecond=0) {\n ChronoField.SECOND_OF_DAY.checkValidValue(secondOfDay);\n ChronoField.NANO_OF_SECOND.checkValidValue(nanoOfSecond);\n const hours = MathUtil.intDiv(secondOfDay, LocalTime.SECONDS_PER_HOUR);\n secondOfDay -= hours * LocalTime.SECONDS_PER_HOUR;\n const minutes = MathUtil.intDiv(secondOfDay, LocalTime.SECONDS_PER_MINUTE);\n secondOfDay -= minutes * LocalTime.SECONDS_PER_MINUTE;\n return new LocalTime(hours, minutes, secondOfDay, nanoOfSecond);\n }\n\n /**\n * Obtains an instance of {@link LocalTime} from a nanos-of-day value.\n *\n * This factory may return a cached value, but applications must not rely on this.\n *\n * @param {number} [nanoOfDay=0] - the nano of day, from `0` to `24 * 60 * 60 * 1,000,000,000 - 1`\n * @return {LocalTime} the local time, not null\n * @throws {DateTimeException} if the nanos of day value is invalid\n */\n static ofNanoOfDay(nanoOfDay=0) {\n ChronoField.NANO_OF_DAY.checkValidValue(nanoOfDay);\n const hours = MathUtil.intDiv(nanoOfDay, LocalTime.NANOS_PER_HOUR);\n nanoOfDay -= hours * LocalTime.NANOS_PER_HOUR;\n const minutes = MathUtil.intDiv(nanoOfDay, LocalTime.NANOS_PER_MINUTE);\n nanoOfDay -= minutes * LocalTime.NANOS_PER_MINUTE;\n const seconds = MathUtil.intDiv(nanoOfDay, LocalTime.NANOS_PER_SECOND);\n nanoOfDay -= seconds * LocalTime.NANOS_PER_SECOND;\n return new LocalTime(hours, minutes, seconds, nanoOfDay);\n }\n\n //-----------------------------------------------------------------------\n /**\n * Obtains an instance of {@link LocalTime} from a temporal object.\n *\n * A {@link TemporalAccessor} represents some form of date and time information.\n * This factory converts the arbitrary temporal object to an instance of {@link LocalTime}.\n *\n * The conversion uses the {@link TemporalQueries#localTime} query, which relies\n * on extracting {@link ChronoField#NANO_OF_DAY}.\n *\n * This method matches the signature of the functional interface {@link TemporalQuery}\n * allowing it to be used in queries via method reference, {@link LocalTime::from}.\n *\n * @param {!TemporalAccessor} temporal - the temporal object to convert, not null\n * @return {LocalTime} the local time, not null\n * @throws {DateTimeException} if unable to convert to a {@link LocalTime}\n */\n static from(temporal) {\n requireNonNull(temporal, 'temporal');\n const time = temporal.query(TemporalQueries.localTime());\n if (time == null) {\n throw new DateTimeException(`Unable to obtain LocalTime TemporalAccessor: ${temporal}, type ${temporal.constructor != null ? temporal.constructor.name : ''}`);\n }\n return time;\n }\n\n /**\n * Obtains an instance of {@link LocalTime} from a text string using a specific formatter.\n *\n * The text is parsed using the formatter, returning a time.\n *\n * @param {!String} text - the text to parse, not null\n * @param {DateTimeFormatter} [formatter=DateTimeFormatter.ISO_LOCAL_TIME] - the formatter to use, default is\n * {@link DateTimeFormatter.ISO_LOCAL_TIME}\n * @return {LocalTime} the parsed local time, not null\n * @throws {DateTimeParseException} if the text cannot be parsed\n */\n static parse(text, formatter=DateTimeFormatter.ISO_LOCAL_TIME) {\n requireNonNull(formatter, 'formatter');\n return formatter.parse(text, LocalTime.FROM);\n }\n\n /**\n * Constructor, previously validated.\n *\n * @param {number} [hour=0] - the hour-of-day to represent, validated from 0 to 23\n * @param {number} [minute=0] - the minute-of-hour to represent, validated from 0 to 59\n * @param {number} [second=0] - the second-of-minute to represent, validated from 0 to 59\n * @param {number} [nanoOfSecond=0] - the nano-of-second to represent, validated from 0 to 999,999,999\n */\n constructor(hour=0, minute=0, second=0, nanoOfSecond=0) {\n super();\n const _hour = MathUtil.safeZero(hour);\n const _minute = MathUtil.safeZero(minute);\n const _second = MathUtil.safeZero(second);\n const _nanoOfSecond = MathUtil.safeZero(nanoOfSecond);\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 {@link range} and {@link get} will throw an exception.\n *\n * If the field is a {@link ChronoField} then the query is implemented here.\n * The supported fields are:\n *\n * * {@link ChronoField.NANO_OF_SECOND}\n * * {@link ChronoField.NANO_OF_DAY}\n * * {@link ChronoField.MICRO_OF_SECOND}\n * * {@link ChronoField.MICRO_OF_DAY}\n * * {@link ChronoField.MILLI_OF_SECOND}\n * * {@link ChronoField.MILLI_OF_DAY}\n * * {@link ChronoField.SECOND_OF_MINUTE}\n * * {@link ChronoField.SECOND_OF_DAY}\n * * {@link ChronoField.MINUTE_OF_HOUR}\n * * {@link ChronoField.MINUTE_OF_DAY}\n * * {@link ChronoField.HOUR_OF_AMPM}\n * * {@link ChronoField.CLOCK_HOUR_OF_AMPM}\n * * {@link ChronoField.HOUR_OF_DAY}\n * * {@link ChronoField.CLOCK_HOUR_OF_DAY}\n * * {@link ChronoField.AMPM_OF_DAY}\n *\n * All other {@link ChronoField} instances will return false.\n *\n * If the field is not a {@link ChronoField}, then the result of this method\n * is obtained by invoking {@link TemporalField.isSupportedBy}\n * passing this as the argument.\n * Whether the field is supported is determined by the field.\n *\n * @param {ChronoField|ChronoUnit} fieldOrUnit - the field to check, null returns false\n * @return {boolean} true if the field is supported on this time, false if not\n */\n isSupported(fieldOrUnit) {\n if (fieldOrUnit instanceof ChronoField) {\n return fieldOrUnit.isTimeBased();\n } else if (fieldOrUnit instanceof ChronoUnit) {\n return fieldOrUnit.isTimeBased();\n }\n return fieldOrUnit != null && fieldOrUnit.isSupportedBy(this);\n }\n\n /**\n * Gets the range of valid values for the specified field.\n *\n * The range object expresses the minimum and maximum valid values for a field.\n * This time is used to enhance the accuracy of the returned range.\n * If it is not possible to return the range, because the field is not supported\n * or for some other reason, an exception is thrown.\n *\n * If the field is a {@link ChronoField} then the query is implemented here.\n * The supported fields (see {@link isSupported}) will return\n * appropriate range instances.\n * All other {@link ChronoField} instances will throw a {@link DateTimeException}.\n *\n * If the field is not a {@link ChronoField}, then the result of this method\n * is obtained by invoking {@link TemporalField.rangeRefinedBy}\n * passing this as the argument.\n * Whether the range can be obtained is determined by the field.\n *\n * @param {ChronoField} field - the field to query the range for, not null\n * @return {ValueRange} the range of valid values for the field, not null\n * @throws {DateTimeException} if the range for the field cannot be obtained\n */\n range(field) {\n requireNonNull(field);\n return super.range(field);\n }\n\n /**\n * Gets the value of the specified field from this time as an `int`.\n *\n * This queries this time for the value for the specified field.\n * The returned value will always be within the valid range of values for the field.\n * If it is not possible to return the value, because the field is not supported\n * or for some other reason, an exception is thrown.\n *\n * If the field is a {@link ChronoField} then the query is implemented here.\n * The supported fields (see {@link isSupported}) will return valid\n * values based on this time, except {@link ChronoField.NANO_OF_DAY} and {@link ChronoField.MICRO_OF_DAY}\n * which are too large to fit in an `int` and throw a {@link DateTimeException}.\n * All other {@link ChronoField} instances will throw a {@link DateTimeException}.\n *\n * If the field is not a {@link ChronoField}, then the result of this method\n * is obtained by invoking {@link TemporalField.getFrom}\n * passing this as the argument. Whether the value can be obtained,\n * and what the value represents, is determined by the field.\n *\n * @param {ChronoField} field - the field to get, not null\n * @return {number} the value for the field\n * @throws {DateTimeException} if a value for the field cannot be obtained\n * @throws {ArithmeticException} if numeric overflow occurs\n */\n get(field) {\n return this.getLong(field);\n }\n\n /**\n * Gets the value of the specified field from this time as a `long`.\n *\n * This queries this time for the value for the specified field.\n * If it is not possible to return the value, because the field is not supported\n * or for some other reason, an exception is thrown.\n *\n * If the field is a {@link ChronoField} then the query is implemented here.\n * The supported fields (see {@link isSupported}) will return valid\n * values based on this time.\n * All other {@link ChronoField} instances will throw a {@link DateTimeException}.\n *\n * If the field is not a {@link ChronoField}, then the result of this method\n * is obtained by invoking {@link TemporalField.from}\n * passing this as the argument. Whether the value can be obtained,\n * and what the value represents, is determined by the field.\n *\n * @param {ChronoField} field - the field to get, not null\n * @return {number} the value for the field\n * @throws {DateTimeException} if a value for the field cannot be obtained\n * @throws {ArithmeticException} if numeric overflow occurs\n */\n getLong(field) {\n requireNonNull(field, 'field');\n if (field instanceof ChronoField) {\n return this._get0(field);\n }\n return field.getFrom(this);\n }\n\n /**\n *\n * @param {ChronoField} field\n * @returns {number}\n * @private\n */\n _get0(field) {\n switch (field) {\n case ChronoField.NANO_OF_SECOND: return this._nano;\n case ChronoField.NANO_OF_DAY: return this.toNanoOfDay();\n case ChronoField.MICRO_OF_SECOND: return MathUtil.intDiv(this._nano, 1000);\n case ChronoField.MICRO_OF_DAY: return MathUtil.intDiv(this.toNanoOfDay(), 1000);\n case ChronoField.MILLI_OF_SECOND: return MathUtil.intDiv(this._nano, 1000000);\n case ChronoField.MILLI_OF_DAY: return MathUtil.intDiv(this.toNanoOfDay(), 1000000);\n case ChronoField.SECOND_OF_MINUTE: return this._second;\n case ChronoField.SECOND_OF_DAY: return this.toSecondOfDay();\n case ChronoField.MINUTE_OF_HOUR: return this._minute;\n case ChronoField.MINUTE_OF_DAY: return this._hour * 60 + this._minute;\n case ChronoField.HOUR_OF_AMPM: return MathUtil.intMod(this._hour, 12);\n case ChronoField.CLOCK_HOUR_OF_AMPM: {\n const ham = MathUtil.intMod(this._hour, 12); \n return (ham % 12 === 0 ? 12 : ham);\n }\n case ChronoField.HOUR_OF_DAY: return this._hour;\n case ChronoField.CLOCK_HOUR_OF_DAY: return (this._hour === 0 ? 24 : this._hour);\n case ChronoField.AMPM_OF_DAY: return MathUtil.intDiv(this._hour, 12);\n }\n throw new UnsupportedTemporalTypeException('Unsupported field: ' + field);\n }\n\n //-----------------------------------------------------------------------\n /**\n * Gets the hour-of-day field.\n *\n * @return {number} the hour-of-day, from 0 to 23\n */\n hour() {\n return this._hour;\n }\n\n /**\n * Gets the minute-of-hour field.\n *\n * @return {number} the minute-of-hour, from 0 to 59\n */\n minute() {\n return this._minute;\n }\n\n /**\n * Gets the second-of-minute field.\n *\n * @return {number} the second-of-minute, from 0 to 59\n */\n second() {\n return this._second;\n }\n\n /**\n * Gets the nano-of-second field.\n *\n * @return {number} the nano-of-second, from 0 to 999,999,999\n */\n nano() {\n return this._nano;\n }\n\n /**\n * 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 * * {@link ChronoField.NANO_OF_SECOND} -\n * Returns a {@link LocalTime} with the specified nano-of-second.\n * The hour, minute and second will be unchanged.\n * * {@link ChronoField.NANO_OF_DAY} -\n * Returns a {@link LocalTime} with the specified nano-of-day.\n * This completely replaces the time and is equivalent to {@link ofNanoOfDay}.\n * * {@link ChronoField.MICRO_OF_SECOND} -\n * Returns a {@link LocalTime} with the nano-of-second replaced by the specified\n * micro-of-second multiplied by 1,000.\n * The hour, minute and second will be unchanged.\n * * {@link ChronoField.MICRO_OF_DAY} -\n * Returns a {@link LocalTime} with the specified micro-of-day.\n * This completely replaces the time and is equivalent to using {@link ofNanoOfDay}\n * with the micro-of-day multiplied by 1,000.\n * * {@link ChronoField.MILLI_OF_SECOND} -\n * Returns a {@link LocalTime} with the nano-of-second replaced by the specified\n * milli-of-second multiplied by 1,000,000.\n * The hour, minute and second will be unchanged.\n * * {@link ChronoField.MILLI_OF_DAY} -\n * Returns a {@link LocalTime} with the specified milli-of-day.\n * This completely replaces the time and is equivalent to using {@link ofNanoOfDay}\n * with the milli-of-day multiplied by 1,000,000.\n * * {@link ChronoField.SECOND_OF_MINUTE} -\n * Returns a {@link LocalTime} with the specified second-of-minute.\n * The hour, minute and nano-of-second will be unchanged.\n * * {@link ChronoField.SECOND_OF_DAY} -\n * Returns a {@link LocalTime} with the specified second-of-day.\n * The nano-of-second will be unchanged.\n * * {@link ChronoField.MINUTE_OF_HOUR} -\n * Returns a {@link LocalTime} with the specified minute-of-hour.\n * The hour, second-of-minute and nano-of-second will be unchanged.\n * * {@link ChronoField.MINUTE_OF_DAY} -\n * Returns a {@link LocalTime} with the specified minute-of-day.\n * The second-of-minute and nano-of-second will be unchanged.\n * * {@link ChronoField.HOUR_OF_AMPM} -\n * Returns a {@link LocalTime} with the specified hour-of-am-pm.\n * The AM/PM, minute-of-hour, second-of-minute and nano-of-second will be unchanged.\n * * {@link ChronoField.CLOCK_HOUR_OF_AMPM} -\n * Returns a {@link LocalTime} with the specified clock-hour-of-am-pm.\n * The AM/PM, minute-of-hour, second-of-minute and nano-of-second will be unchanged.\n * * {@link ChronoField.HOUR_OF_DAY} -\n * Returns a {@link LocalTime} with the specified hour-of-day.\n * The minute-of-hour, second-of-minute and nano-of-second will be unchanged.\n * * {@link ChronoField.CLOCK_HOUR_OF_DAY} -\n * Returns a {@link LocalTime} with the specified clock-hour-of-day.\n * The minute-of-hour, second-of-minute and nano-of-second will be unchanged.\n * * {@link ChronoField.AMPM_OF_DAY} -\n * Returns a {@link LocalTime} with the specified AM/PM.\n * The hour-of-am-pm, minute-of-hour, second-of-minute and nano-of-second will be unchanged.\n *\n * In all cases, if the new value is outside the valid range of values for the field\n * then a {@link DateTimeException} will be thrown.\n *\n * All other {@link ChronoField} instances will throw a {@link DateTimeException}.\n *\n * If the field is not a {@link ChronoField}, then the result of this method\n * is obtained by invoking {@link TemporalField.adjustInto}\n * passing this as the argument. In this case, the field determines\n * whether and how to adjust the instant.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {!TemporalField} field - the field to set in the result, not null\n * @param {number} newValue - the new value of the field in the result\n * @return {LocalTime} a {@link LocalTime} based on this with the specified field set, not null\n * @throws {DateTimeException} if the field cannot be set\n * @throws {ArithmeticException} if numeric overflow occurs\n */\n with2(field, newValue) {\n requireNonNull(field, 'field');\n requireInstance(field, TemporalField, 'field');\n if (field instanceof ChronoField) {\n field.checkValidValue(newValue);\n switch (field) {\n case ChronoField.NANO_OF_SECOND: return this.withNano(newValue);\n case ChronoField.NANO_OF_DAY: return LocalTime.ofNanoOfDay(newValue);\n case ChronoField.MICRO_OF_SECOND: return this.withNano(newValue * 1000);\n case ChronoField.MICRO_OF_DAY: return LocalTime.ofNanoOfDay(newValue * 1000);\n case ChronoField.MILLI_OF_SECOND: return this.withNano( newValue * 1000000);\n case ChronoField.MILLI_OF_DAY: return LocalTime.ofNanoOfDay(newValue * 1000000);\n case ChronoField.SECOND_OF_MINUTE: return this.withSecond(newValue);\n case ChronoField.SECOND_OF_DAY: return this.plusSeconds(newValue - this.toSecondOfDay());\n case ChronoField.MINUTE_OF_HOUR: return this.withMinute(newValue);\n case ChronoField.MINUTE_OF_DAY: return this.plusMinutes(newValue - (this._hour * 60 + this._minute));\n case ChronoField.HOUR_OF_AMPM: return this.plusHours(newValue - MathUtil.intMod(this._hour, 12));\n case ChronoField.CLOCK_HOUR_OF_AMPM: return this.plusHours((newValue === 12 ? 0 : newValue) - MathUtil.intMod(this._hour, 12));\n case ChronoField.HOUR_OF_DAY: return this.withHour(newValue);\n case ChronoField.CLOCK_HOUR_OF_DAY: return this.withHour((newValue === 24 ? 0 : newValue));\n case ChronoField.AMPM_OF_DAY: return this.plusHours((newValue - MathUtil.intDiv(this._hour, 12)) * 12);\n }\n throw new UnsupportedTemporalTypeException('Unsupported field: ' + field);\n }\n return field.adjustInto(this, newValue);\n }\n\n //-----------------------------------------------------------------------\n /**\n * Returns a copy of this {@link LocalTime} with the hour-of-day value altered.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {number} [hour=0] - the hour-of-day to set in the result, from 0 to 23\n * @return {LocalTime} a {@link LocalTime} based on this time with the requested hour, not null\n * @throws {DateTimeException} if the hour value is invalid\n */\n withHour(hour=0) {\n if (this._hour === hour) {\n return this;\n }\n return new LocalTime(hour, this._minute, this._second, this._nano);\n }\n\n /**\n * Returns a copy of this {@link LocalTime} with the minute-of-hour value altered.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {number} [minute=0] - the minute-of-hour to set in the result, from 0 to 59\n * @return {LocalTime} a {@link LocalTime} based on this time with the requested minute, not null\n * @throws {DateTimeException} if the minute value is invalid\n */\n withMinute(minute=0) {\n if (this._minute === minute) {\n return this;\n }\n return new LocalTime(this._hour, minute, this._second, this._nano);\n }\n\n /**\n * Returns a copy of this {@link LocalTime} with the second-of-minute value altered.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {number} [second=0] - the second-of-minute to set in the result, from 0 to 59\n * @return {LocalTime} a {@link LocalTime} based on this time with the requested second, not null\n * @throws {DateTimeException} if the second value is invalid\n */\n withSecond(second=0) {\n if (this._second === second) {\n return this;\n }\n return new LocalTime(this._hour, this._minute, second, this._nano);\n }\n\n /**\n * Returns a copy of this {@link LocalTime} with the nano-of-second value altered.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {number} [nanoOfSecond=0] - the nano-of-second to set in the result, from 0 to 999,999,999\n * @return {LocalTime} a {@link LocalTime} based on this time with the requested nanosecond, not null\n * @throws {DateTimeException} if the nanos value is invalid\n */\n withNano(nanoOfSecond=0) {\n if (this._nano === nanoOfSecond) {\n return this;\n }\n return new LocalTime(this._hour, this._minute, this._second, nanoOfSecond);\n }\n\n //-----------------------------------------------------------------------\n /**\n * Returns a copy of this {@link LocalTime} with the time truncated.\n *\n * Truncating the time returns a copy of the original time with fields\n * smaller than the specified unit set to zero.\n * For example, truncating with the {@link ChronoUnit.MINUTES} minutes unit\n * will set the second-of-minute and nano-of-second field to zero.\n *\n * The unit must have a duration (see {@link TemporalUnit#getDuration})\n * that divides into the length of a standard day without remainder.\n * This includes all supplied time units on {@link ChronoUnit} and\n * {@link ChronoUnit.DAYS}. Other units throw an exception.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {!ChronoUnit} unit - the unit to truncate to, not null\n * @return {LocalTime} a {@link LocalTime} based on this time with the time truncated, not null\n * @throws {DateTimeException} if unable to truncate\n */\n truncatedTo(unit) {\n requireNonNull(unit, 'unit');\n if (unit === ChronoUnit.NANOS) {\n return this;\n }\n const unitDur = unit.duration();\n if (unitDur.seconds() > LocalTime.SECONDS_PER_DAY) {\n throw new DateTimeException('Unit is too large to be used for truncation');\n }\n const dur = unitDur.toNanos();\n if (MathUtil.intMod(LocalTime.NANOS_PER_DAY, dur) !== 0) {\n throw new DateTimeException('Unit must divide into a standard day without remainder');\n }\n const nod = this.toNanoOfDay();\n return LocalTime.ofNanoOfDay(MathUtil.intDiv(nod, dur) * dur);\n }\n\n //-----------------------------------------------------------------------\n\n /**\n * 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}.\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 {TemporalUnit} unit - the unit of the period to add, not null\n * @return {LocalTime} a {@link LocalTime} based on this time with the specified period added, not null\n * @throws {DateTimeException} if the unit cannot be added to this type\n */\n 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 const newHour = MathUtil.intMod(MathUtil.intMod(hoursToAdd, LocalTime.HOURS_PER_DAY) + this._hour + LocalTime.HOURS_PER_DAY, LocalTime.HOURS_PER_DAY);\n return new LocalTime(newHour, this._minute, this._second, this._nano);\n }\n\n /**\n * Returns a copy of this {@link LocalTime} with the specified period in minutes added.\n *\n * This adds the specified number of minutes to this time, returning a new time.\n * The calculation wraps around midnight.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {number} minutesToAdd - the minutes to add, may be negative\n * @return {LocalTime} a {@link LocalTime} based on this time with the minutes added, not null\n */\n plusMinutes(minutesToAdd) {\n if (minutesToAdd === 0) {\n return this;\n }\n const mofd = this._hour * LocalTime.MINUTES_PER_HOUR + this._minute;\n const newMofd = MathUtil.intMod(MathUtil.intMod(minutesToAdd, LocalTime.MINUTES_PER_DAY) + mofd + LocalTime.MINUTES_PER_DAY, LocalTime.MINUTES_PER_DAY);\n if (mofd === newMofd) {\n return this;\n }\n const newHour = MathUtil.intDiv(newMofd, LocalTime.MINUTES_PER_HOUR);\n const newMinute = MathUtil.intMod(newMofd, LocalTime.MINUTES_PER_HOUR);\n return new LocalTime(newHour, newMinute, this._second, this._nano);\n }\n\n /**\n * Returns a copy of this {@link LocalTime} with the specified period in seconds added.\n *\n * This adds the specified number of seconds to this time, returning a new time.\n * The calculation wraps around midnight.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {number} secondstoAdd - the seconds to add, may be negative\n * @return {LocalTime} a {@link LocalTime} based on this time with the seconds added, not null\n */\n plusSeconds(secondstoAdd) {\n if (secondstoAdd === 0) {\n return this;\n }\n const sofd = this._hour * LocalTime.SECONDS_PER_HOUR +\n this._minute * LocalTime.SECONDS_PER_MINUTE + this._second;\n const newSofd = MathUtil.intMod((MathUtil.intMod(secondstoAdd, LocalTime.SECONDS_PER_DAY) + sofd + LocalTime.SECONDS_PER_DAY), LocalTime.SECONDS_PER_DAY);\n if (sofd === newSofd) {\n return this;\n }\n const newHour = MathUtil.intDiv(newSofd, LocalTime.SECONDS_PER_HOUR);\n const newMinute = MathUtil.intMod(MathUtil.intDiv(newSofd, LocalTime.SECONDS_PER_MINUTE), LocalTime.MINUTES_PER_HOUR);\n const newSecond = MathUtil.intMod(newSofd, LocalTime.SECONDS_PER_MINUTE);\n return new LocalTime(newHour, newMinute, newSecond, this._nano);\n }\n\n /**\n * Returns a copy of this {@link LocalTime} with the specified period in nanoseconds added.\n *\n * This adds the specified number of nanoseconds to this time, returning a new time.\n * The calculation wraps around midnight.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {number} nanosToAdd - the nanos to add, may be negative\n * @return {LocalTime} a {@link LocalTime} based on this time with the nanoseconds added, not null\n */\n plusNanos(nanosToAdd) {\n if (nanosToAdd === 0) {\n return this;\n }\n const nofd = this.toNanoOfDay();\n const newNofd = MathUtil.intMod((MathUtil.intMod(nanosToAdd, LocalTime.NANOS_PER_DAY) + nofd + LocalTime.NANOS_PER_DAY), LocalTime.NANOS_PER_DAY);\n if (nofd === newNofd) {\n return this;\n }\n const newHour = MathUtil.intDiv(newNofd, LocalTime.NANOS_PER_HOUR);\n const newMinute = MathUtil.intMod(MathUtil.intDiv(newNofd, LocalTime.NANOS_PER_MINUTE), LocalTime.MINUTES_PER_HOUR);\n const newSecond = MathUtil.intMod(MathUtil.intDiv(newNofd, LocalTime.NANOS_PER_SECOND), LocalTime.SECONDS_PER_MINUTE);\n const newNano = MathUtil.intMod(newNofd, LocalTime.NANOS_PER_SECOND);\n return new LocalTime(newHour, newMinute, newSecond, newNano);\n }\n\n //-----------------------------------------------------------------------\n /**\n * 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}.\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} method on the\n * specified query passing this as the argument.\n *\n * @param {TemporalQuery} query - the query to invoke, not null\n * @return {*} the query result, null may be returned (defined by the query)\n * @throws {DateTimeException} if unable to query (defined by the query)\n * @throws {ArithmeticException} if numeric overflow occurs (defined by the query)\n */\n query(query) {\n requireNonNull(query, 'query');\n if (query === TemporalQueries.precision()) {\n return ChronoUnit.NANOS;\n } else if (query === TemporalQueries.localTime()) {\n return this;\n }\n // inline TemporalAccessor.super.query(query) as an optimization\n if (query === TemporalQueries.chronology() || query === TemporalQueries.zoneId() ||\n query === TemporalQueries.zone() || query === TemporalQueries.offset() ||\n query === TemporalQueries.localDate()) {\n return null;\n }\n return query.queryFrom(this);\n }\n\n /**\n * Adjusts the specified temporal object to have the same time as this object.\n *\n * This returns a temporal object of the same observable type as the input\n * with the time changed to be the same as this.\n *\n * The adjustment is equivalent to using {@link Temporal.with}\n * passing {@link ChronoField.NANO_OF_DAY} as the field.\n *\n * In most cases, it is clearer to reverse the calling pattern by using\n * {@link Temporal.with}:\n *
\n * // these two lines are equivalent, but the second approach is recommended\n * temporal = thisLocalTime.adjustInto(temporal);\n * temporal = temporal.with(thisLocalTime);\n *\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {TemporalAdjuster} temporal - the target object to be adjusted, not null\n * @return {Temporal} the adjusted object, not null\n * @throws {DateTimeException} if unable to make the adjustment\n * @throws {ArithmeticException} if numeric overflow occurs\n */\n adjustInto(temporal) {\n return temporal.with(LocalTime.NANO_OF_DAY, this.toNanoOfDay());\n }\n\n /**\n * Calculates the period between this time and another time in\n * terms of the specified unit.\n *\n * This calculates the period between two times in terms of a single unit.\n * The start and end points are this and the specified time.\n * The result will be negative if the end is before the start.\n * The {@link Temporal} passed to this method must be a {@link LocalTime}.\n * For example, the period in hours between two times can be calculated\n * using {@link startTime.until}.\n *\n * The calculation returns a whole number, representing the number of\n * complete units between the two times.\n * For example, the period in hours between 11:30 and 13:29 will only\n * be one hour as it is one minute short of two hours.\n *\n * This method operates in association with {@link TemporalUnit.between}.\n * The result of this method is a `long` representing the amount of\n * the specified unit. By contrast, the result of {@link between} is an\n * object that can be used directly in addition/subtraction:\n *
\n * long period = start.until(end, HOURS); // this method\n * dateTime.plus(HOURS.between(start, end)); // use in plus/minus\n *\n *\n * The calculation is implemented in this method for {@link ChronoUnit}.\n * The units {@link ChronoUnit.NANOS}, {@link ChronoUnit.MICROS}, {@link ChronoUnit.MILLIS}, {@link ChronoUnit.SECONDS},\n * {@link ChronoUnit.MINUTES}, {@link ChronoUnit.HOURS} and {@link ChronoUnit.HALF_DAYS} are supported.\n * Other {@link ChronoUnit} values will throw an exception.\n *\n * If the unit is not a {@link ChronoUnit}, then the result of this method\n * is obtained by invoking {@link TemporalUnit.between}\n * passing this as the first argument and the input temporal as\n * the second argument.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {TemporalAccessor} endExclusive - the end time, which is converted to a {@link LocalTime}, not null\n * @param {TemporalUnit} unit - the unit to measure the period in, not null\n * @return {number} the amount of the period between this time and the end time\n * @throws {DateTimeException} if the period cannot be calculated\n * @throws {ArithmeticException} if numeric overflow occurs\n */\n until(endExclusive, unit) {\n requireNonNull(endExclusive, 'endExclusive');\n requireNonNull(unit, 'unit');\n const end = LocalTime.from(endExclusive);\n if (unit instanceof ChronoUnit) {\n const nanosUntil = end.toNanoOfDay() - this.toNanoOfDay(); // no overflow\n switch (unit) {\n case ChronoUnit.NANOS: return nanosUntil;\n case ChronoUnit.MICROS: return MathUtil.intDiv(nanosUntil, 1000);\n case ChronoUnit.MILLIS: return MathUtil.intDiv(nanosUntil, 1000000);\n case ChronoUnit.SECONDS: return MathUtil.intDiv(nanosUntil, LocalTime.NANOS_PER_SECOND);\n case ChronoUnit.MINUTES: return MathUtil.intDiv(nanosUntil, LocalTime.NANOS_PER_MINUTE);\n case ChronoUnit.HOURS: return MathUtil.intDiv(nanosUntil, LocalTime.NANOS_PER_HOUR);\n case ChronoUnit.HALF_DAYS: return MathUtil.intDiv(nanosUntil, (12 * LocalTime.NANOS_PER_HOUR));\n }\n throw new UnsupportedTemporalTypeException('Unsupported unit: ' + unit);\n }\n return unit.between(this, end);\n }\n\n //-----------------------------------------------------------------------\n /**\n * Combines this time with a date to create a {@link LocalDateTime}.\n *\n * This returns a {@link LocalDateTime} formed from this time at the specified date.\n * All possible combinations of date and time are valid.\n *\n * @param {LocalDate} date - the date to combine with, not null\n * @return {LocalDateTime} the local date-time formed from this time and the specified date, not null\n */\n atDate(date) {\n return LocalDateTime.of(date, this);\n }\n\n /**\n * Combines this time with an offset to create an {@link OffsetTime}.\n *\n * This returns an {@link OffsetTime} formed from this time at the specified offset.\n * All possible combinations of time and offset are valid.\n *\n * @param {OffsetTime} offset - the offset to combine with, not null\n * @return {OffsetTime} the offset time formed from this time and the specified offset, not null\n */\n/*\n atOffset(offset) {\n return OffsetTime.of(this, offset);\n }\n*/\n\n //-----------------------------------------------------------------------\n /**\n * Extracts the time as seconds of day, from `0` to `24 * 60 * 60 - 1`.\n *\n * @return {number} the second-of-day equivalent to this time\n */\n toSecondOfDay() {\n let total = this._hour * LocalTime.SECONDS_PER_HOUR;\n total += this._minute * LocalTime.SECONDS_PER_MINUTE;\n total += this._second;\n return total;\n }\n\n /**\n * Extracts the time as nanos of day, from `0` to `24 * 60 * 60 * 1,000,000,000 - 1`.\n *\n * @return {number} the nano of day equivalent to this time\n */\n toNanoOfDay() {\n let total = this._hour * LocalTime.NANOS_PER_HOUR;\n total += this._minute * LocalTime.NANOS_PER_MINUTE;\n total += this._second * LocalTime.NANOS_PER_SECOND;\n total += this._nano;\n return total;\n }\n\n //-----------------------------------------------------------------------\n /**\n * Compares this {@link LocalTime} to another time.\n *\n * The comparison is based on the time-line position of the local times within a day.\n * It is 'consistent with equals', as defined by {@link Comparable}.\n *\n * @param {LocalTime} other - the other time to compare to, not null\n * @return {number} the comparator value, negative if less, positive if greater\n * @throws {NullPointerException} if `other` is null\n */\n compareTo(other) {\n requireNonNull(other, 'other');\n requireInstance(other, LocalTime, 'other');\n let cmp = MathUtil.compareNumbers(this._hour, other._hour);\n if (cmp === 0) {\n cmp = MathUtil.compareNumbers(this._minute, other._minute);\n if (cmp === 0) {\n cmp = MathUtil.compareNumbers(this._second, other._second);\n if (cmp === 0) {\n cmp = MathUtil.compareNumbers(this._nano, other._nano);\n }\n }\n }\n return cmp;\n }\n\n /**\n * Checks if this {@link LocalTime} is after the specified time.\n *\n * The comparison is based on the time-line position of the time within a day.\n *\n * @param {LocalTime} other - the other time to compare to, not null\n * @return {boolean}true if this is after the specified time\n * @throws {NullPointerException} if `other` is null\n */\n isAfter(other) {\n return this.compareTo(other) > 0;\n }\n\n /**\n * Checks if this {@link LocalTime} is before the specified time.\n *\n * The comparison is based on the time-line position of the time within a day.\n *\n * @param {LocalTime} other - the other time to compare to, not null\n * @return {boolean}true if this point is before the specified time\n * @throws {NullPointerException} if `other` is null\n */\n isBefore(other) {\n return this.compareTo(other) < 0;\n }\n\n //-----------------------------------------------------------------------\n /**\n * Checks if this time is equal to another time.\n *\n * The comparison is based on the time-line position of the time within a day.\n *\n * Only objects of type {@link LocalTime} are compared, other types return false.\n * To compare the date of two {@link TemporalAccessor} instances, use\n * {@link ChronoField#NANO_OF_DAY} as a comparator.\n *\n * @param {*} other - the object to check, null returns false\n * @return {boolean}true if this is equal to the other time\n */\n equals(other) {\n if (this === other) {\n return true;\n }\n if (other instanceof LocalTime) {\n return this._hour === other._hour && this._minute === other._minute &&\n this._second === other._second && this._nano === other._nano;\n }\n return false;\n }\n\n /**\n * A hash code for this time.\n *\n * @return {number} a suitable hash code\n */\n hashCode() {\n const nod = this.toNanoOfDay();\n return (nod ^ (nod >>> 24));\n }\n\n //-----------------------------------------------------------------------\n /**\n * Outputs this time as a string, such as `10:15`.\n *\n * The output will be one of the following ISO-8601 formats:\n *\n * * {@link HH:mm}\n * * {@link HH:mm:ss}\n * * {@link HH:mm:ss.SSS}\n * * {@link HH:mm:ss.SSSSSS}\n * * {@link HH:mm:ss.SSSSSSSSS}\n *\n * The format used will be the shortest that outputs the full value of\n * the time where the omitted parts are implied to be zero.\n *\n * @return {string} a string representation of this time, not null\n */\n toString() {\n let buf = '';\n const hourValue = this._hour;\n const minuteValue = this._minute;\n const secondValue = this._second;\n const nanoValue = this._nano;\n buf += hourValue < 10 ? '0' : '';\n buf += hourValue;\n buf += minuteValue < 10 ? ':0' : ':';\n buf += minuteValue;\n if (secondValue > 0 || nanoValue > 0) {\n buf += secondValue < 10 ? ':0' : ':';\n buf += secondValue;\n if (nanoValue > 0) {\n buf += '.';\n if(MathUtil.intMod(nanoValue, 1000000) === 0) {\n buf += ('' + (MathUtil.intDiv(nanoValue, 1000000) + 1000)).substring(1);\n } else if (MathUtil.intMod(nanoValue, 1000) === 0) {\n buf += ('' + (MathUtil.intDiv(nanoValue, 1000) + 1000000)).substring(1);\n } else {\n buf += ('' + (nanoValue + 1000000000)).substring(1);\n }\n }\n }\n return buf;\n }\n\n /**\n *\n * @return {string} same as {@link LocalTime.toString}\n */\n toJSON() {\n return this.toString();\n }\n\n /**\n * Outputs this time as a string using the formatter.\n *\n * @param {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 const 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\n// WEBPACK FOOTER //\n// ./src/LocalTime.js","/**\n * @copyright (c) 2016, Philipp Thürwächter & Pattrick Hüper\n * @copyright (c) 2007-present, Stephen Colebourne & Michael Nascimento Santos\n * @license BSD-3-Clause (see LICENSE in the root directory of this source tree)\n */\nimport {ArithmeticException} from './errors';\n\nexport const MAX_SAFE_INTEGER = 9007199254740991;\nexport const MIN_SAFE_INTEGER = -9007199254740991;\n\n/**\n * Math helper with static function for integer operations\n */\nexport class MathUtil {\n /**\n * \n * @param {number} x\n * @param {number} y\n * @returns {number}\n */\n static intDiv(x, y) {\n let r = x/y;\n r = MathUtil.roundDown(r);\n return MathUtil.safeZero(r);\n }\n\n /**\n * \n * @param {number} x\n * @param {number} y\n * @returns {number}\n */\n static intMod(x, y) {\n let r = x - MathUtil.intDiv(x, y) * y;\n r = MathUtil.roundDown(r);\n return MathUtil.safeZero(r);\n }\n\n /**\n * \n * @param {number} r\n * @returns {number}\n */\n static roundDown(r){\n if (r < 0) {\n return Math.ceil(r);\n } else {\n return Math.floor(r);\n }\n }\n \n /**\n * \n * @param {number} x\n * @param {number} y\n * @returns {number}\n */\n static floorDiv(x, y){\n const r = Math.floor(x / y);\n return MathUtil.safeZero(r);\n }\n\n /**\n * \n * @param {number} x\n * @param {number} y\n * @returns {number}\n */\n static floorMod(x, y){\n const r = x - MathUtil.floorDiv(x, y) * y;\n return MathUtil.safeZero(r);\n }\n\n /**\n * \n * @param {number} x\n * @param {number} y\n * @returns {number}\n */\n static safeAdd(x, y) {\n MathUtil.verifyInt(x);\n MathUtil.verifyInt(y);\n if (x === 0) {\n return MathUtil.safeZero(y);\n }\n if (y === 0) {\n return MathUtil.safeZero(x);\n }\n const r = MathUtil.safeToInt(x + y);\n if (r === x || r === y) {\n throw new ArithmeticException('Invalid addition beyond MAX_SAFE_INTEGER!');\n }\n return r;\n }\n\n /**\n * \n * @param {number} x\n * @param {number} y\n * @returns {number}\n */\n static safeSubtract(x, y) {\n MathUtil.verifyInt(x);\n MathUtil.verifyInt(y);\n if (x === 0 && y === 0) {\n return 0;\n } else if (x === 0) {\n return MathUtil.safeZero(-1 * y);\n } else if (y === 0) {\n return MathUtil.safeZero(x);\n }\n return MathUtil.safeToInt(x - y);\n }\n\n /**\n * \n * @param {number} x\n * @param {number} y\n * @returns {number}\n */\n static safeMultiply(x, y) {\n MathUtil.verifyInt(x);\n MathUtil.verifyInt(y);\n if (x === 1) {\n return MathUtil.safeZero(y);\n }\n if (y === 1) {\n return MathUtil.safeZero(x);\n }\n if (x === 0 || y === 0) {\n return 0;\n }\n 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 const r = parseInt(value);\n return MathUtil.safeToInt(r);\n }\n\n /**\n * \n * @param {number} value\n * @returns {number}\n */\n static safeToInt(value) {\n MathUtil.verifyInt(value);\n return MathUtil.safeZero(value);\n }\n\n /**\n * \n * @param {number} value\n */\n static verifyInt(value){\n if (value == null) {\n throw new ArithmeticException(`Invalid value: '${value}', using null or undefined as argument`);\n }\n if (isNaN(value)) {\n throw new ArithmeticException('Invalid int value, using NaN as argument');\n }\n if (value > MAX_SAFE_INTEGER || value < MIN_SAFE_INTEGER) {\n throw new ArithmeticException('Calculation overflows an int: ' + value);\n }\n }\n\n /**\n * convert -0 to 0 and int as string to a number ( '1' -> 1 )\n * \n * @param {number} value\n * @returns {number}\n */\n static safeZero(value){\n return value === 0 ? 0 : +value;\n }\n\n /**\n * Compares two Numbers.\n *\n * @param {number} a the first value\n * @param {number} b the second value\n * @return {number} the result\n */\n static compareNumbers(a, b) {\n if (a < b) {\n return -1;\n }\n if (a > b) {\n return 1;\n }\n return 0;\n }\n\n}\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 * @copyright (c) 2016, Philipp Thürwächter & Pattrick Hüper\n * @copyright (c) 2007-present, Stephen Colebourne & Michael Nascimento Santos\n * @license BSD-3-Clause (see LICENSE in the root directory of this source tree)\n */\n\nimport {MathUtil} from './MathUtil';\nimport {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 `2007-12-03T10:15:30`.\n *\n * {@link LocalDateTime} is an immutable date-time object that represents a date-time,\n * often viewed as year-month-day-hour-minute-second. Other date and time fields,\n * such as day-of-year, day-of-week and week-of-year, can also be accessed.\n * Time is represented to nanosecond precision.\n * For example, the value '2nd October 2007 at 13:45.30.123456789' can be\n * stored in a {@link LocalDateTime}.\n *\n * This class does not store or represent a time-zone.\n * Instead, it is a description of the date, as used for birthdays, combined with\n * the local time as seen on a wall clock.\n * It cannot represent an instant on the time-line without additional information\n * such as an offset or time-zone.\n *\n * The ISO-8601 calendar system is the modern civil calendar system used today\n * in most of the world. It is equivalent to the proleptic Gregorian calendar\n * system, in which today's rules for leap years are applied for all time.\n * For most applications written today, the ISO-8601 rules are entirely suitable.\n * However, any application that makes use of historical dates, and requires them\n * to be accurate will find the ISO-8601 approach unsuitable.\n *\n * ### Static properties of Class {@link LocalTime}\n *\n * LocalDateTime.MIN\n *\n * The minimum supported {@link LocalDateTime}, '-999999999-01-01T00:00:00'.\n * This is the local date-time of midnight at the start of the minimum date.\n * This combines {@link LocalDate#MIN} and {@link LocalTime#MIN}.\n * This could be used by an application as a 'far past' date-time.\n *\n * LocalDateTime.MAX\n *\n * The maximum supported {@link LocalDateTime}, '+999999999-12-31T23:59:59.999999999'.\n * This is the local date-time just before midnight at the end of the maximum date.\n * This combines {@link LocalDate#MAX} and {@link LocalTime#MAX}.\n * This could be used by an application as a 'far future' date-time.\n *\n */\nexport class LocalDateTime extends ChronoLocalDateTime\n/** extends ChronoLocalDateTime
\n * import static org.threeten.bp.Month.*;\n * import static org.threeten.bp.temporal.Adjusters.*;\n *\n * result = localDateTime.with(JULY).with(lastDayOfMonth());\n *\n *\n * The classes {@link LocalDate} and {@link LocalTime} implement {@link TemporalAdjuster},\n * thus this method can be used to change the date, time or offset:\n *
\n * result = localDateTime.with(date);\n * result = localDateTime.with(time);\n *\n *\n * The result of this method is obtained by invoking the\n * {@link TemporalAdjuster#adjustInto} method on the\n * specified adjuster passing `this` as the argument.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {TemporalAdjuster} adjuster the adjuster to use, not null\n * @return {LocalDateTime} a {@link LocalDateTime} based on `this` with the adjustment made, not null\n * @throws {DateTimeException} if the adjustment cannot be made\n * @throws {ArithmeticException} if numeric overflow occurs\n */\n 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 supported fields (see {@link isSupported}) will behave as in\n * {@link LocalDate#with} or {@link LocalTime#with}.\n * All other {@link ChronoField} instances will throw a {@link DateTimeException}.\n *\n * If the field is not a {@link ChronoField}, then the result of this method\n * is obtained by invoking {@link TemporalField.adjustInto}\n * passing `this` as the argument. In this case, the field determines\n * whether and how to adjust the instant.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {TemporalField} field - the field to set in the result, not null\n * @param {number} newValue - the new value of the field in the result\n * @return {LocalDateTime} a {@link LocalDateTime} based on `this` with the specified field set, not null\n * @throws {DateTimeException} if the field cannot be set\n * @throws {ArithmeticException} if numeric overflow occurs\n */\n 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 const newTime = this._time.withHour(hour);\n return this._withDateTime(this._date, newTime);\n }\n\n /**\n * Returns a copy of this {@link LocalDateTime} with the minute-of-hour value altered.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {number} minute - the minute-of-hour to set in the result, from 0 to 59\n * @return {LocalDateTime} a {@link LocalDateTime} based on this date-time with the requested minute, not null\n * @throws {DateTimeException} if the minute value is invalid\n */\n withMinute(minute) {\n const newTime = this._time.withMinute(minute);\n return this._withDateTime(this._date, newTime);\n }\n\n /**\n * Returns a copy of this {@link LocalDateTime} with the second-of-minute value altered.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {number} second - the second-of-minute to set in the result, from 0 to 59\n * @return {LocalDateTime} a {@link LocalDateTime} based on this date-time with the requested second, not null\n * @throws {DateTimeException} if the second value is invalid\n */\n withSecond(second) {\n const newTime = this._time.withSecond(second);\n return this._withDateTime(this._date, newTime);\n }\n\n /**\n * Returns a copy of this {@link LocalDateTime} with the nano-of-second value altered.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {number} nanoOfSecond - the nano-of-second to set in the result, from 0 to 999,999,999\n * @return {LocalDateTime} a {@link LocalDateTime} based on this date-time with the requested nanosecond, not null\n * @throws {DateTimeException} if the nano value is invalid\n */\n withNano(nanoOfSecond) {\n const newTime = this._time.withNano(nanoOfSecond);\n return this._withDateTime(this._date, newTime);\n }\n\n //-----------------------------------------------------------------------\n /**\n * Returns a copy of this {@link LocalDateTime} with the time truncated.\n *\n * Truncation returns a copy of the original date-time with fields\n * smaller than the specified unit set to zero.\n * For example, truncating with {@link ChronoUnit#MINUTES}\n * will set the second-of-minute and nano-of-second field to zero.\n *\n * The unit must have a duration (see {@link TemporalUnit#getDuration})\n * that divides into the length of a standard day without remainder.\n * This includes all supplied time units on {@link ChronoUnit} and\n * {@link ChronoUnit#DAYS}. Other units throw an exception.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {TemporalUnit} unit - the unit to truncate to, not null\n * @return {LocalDateTime} a {@link LocalDateTime} based on this date-time with the time truncated, not null\n * @throws {DateTimeException} if unable to truncate\n */\n truncatedTo(unit) {\n return this._withDateTime(this._date, this._time.truncatedTo(unit));\n }\n\n //-----------------------------------------------------------------------\n /**\n * 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}.\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 * 1. Add the input years to the year field\n * 2. Check if the resulting date would be invalid\n * 3. Adjust the day-of-month to the last valid day if necessary\n *\n * For example, 2008-02-29 (leap year) plus one year would result in the\n * invalid date 2009-02-29 (standard year). Instead of returning an invalid\n * result, the last valid day of the month, 2009-02-28, is selected instead.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {number} years - the years to add, may be negative\n * @return {LocalDateTime} a {@link LocalDateTime} based on this date-time with the years added, not null\n * @throws {DateTimeException} if the result exceeds the supported date range\n */\n plusYears(years) {\n const newDate = this._date.plusYears(years);\n return this._withDateTime(newDate, this._time);\n }\n\n /**\n * Returns a copy of this {@link LocalDateTime} with the specified period in months added.\n *\n * This method adds the specified amount to the months field in three steps:\n *\n * 1. Add the input months to the month-of-year field\n * 2. Check if the resulting date would be invalid\n * 3. Adjust the day-of-month to the last valid day if necessary\n *\n * For example, 2007-03-31 plus one month would result in the invalid date\n * 2007-04-31. Instead of returning an invalid result, the last valid day\n * of the month, 2007-04-30, is selected instead.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {number} months - the months to add, may be negative\n * @return {LocalDateTime} a {@link LocalDateTime} based on this date-time with the months added, not null\n * @throws {DateTimeException} if the result exceeds the supported date range\n */\n plusMonths(months) {\n const newDate = this._date.plusMonths(months);\n return this._withDateTime(newDate, this._time);\n }\n\n /**\n * Returns a copy of this {@link LocalDateTime} with the specified period in weeks added.\n *\n * This method adds the specified amount in weeks to the days field incrementing\n * the month and year fields as necessary to ensure the result remains valid.\n * The result is only invalid if the maximum/minimum year is exceeded.\n *\n * For example, 2008-12-31 plus one week would result in 2009-01-07.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {number} weeks - the weeks to add, may be negative\n * @return {LocalDateTime} a {@link LocalDateTime} based on this date-time with the weeks added, not null\n * @throws {DateTimeException} if the result exceeds the supported date range\n */\n plusWeeks(weeks) {\n const newDate = this._date.plusWeeks(weeks);\n return this._withDateTime(newDate, this._time);\n }\n\n /**\n * Returns a copy of this {@link LocalDateTime} with the specified period in days added.\n *\n * This method adds the specified amount to the days field incrementing the\n * month and year fields as necessary to ensure the result remains valid.\n * The result is only invalid if the maximum/minimum year is exceeded.\n *\n * For example, 2008-12-31 plus one day would result in 2009-01-01.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {number} days - the days to add, may be negative\n * @return {LocalDateTime} a {@link LocalDateTime} based on this date-time with the days added, not null\n * @throws {DateTimeException} if the result exceeds the supported date range\n */\n plusDays(days) {\n const newDate = this._date.plusDays(days);\n return this._withDateTime(newDate, this._time);\n }\n\n //-----------------------------------------------------------------------\n /**\n * Returns a copy of this {@link LocalDateTime} with the specified period in hours added.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {number} hours - the hours to add, may be negative\n * @return {LocalDateTime} a {@link LocalDateTime} based on this date-time with the hours added, not null\n * @throws {DateTimeException} if the result exceeds the supported date range\n */\n plusHours(hours) {\n return this._plusWithOverflow(this._date, hours, 0, 0, 0, 1);\n }\n\n /**\n * Returns a copy of this {@link LocalDateTime} with the specified period in minutes added.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {number} minutes - the minutes to add, may be negative\n * @return {LocalDateTime} a {@link LocalDateTime} based on this date-time with the minutes added, not null\n * @throws {DateTimeException} if the result exceeds the supported date range\n */\n plusMinutes(minutes) {\n return this._plusWithOverflow(this._date, 0, minutes, 0, 0, 1);\n }\n\n /**\n * Returns a copy of this {@link LocalDateTime} with the specified period in seconds added.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {number} seconds - the seconds to add, may be negative\n * @return {LocalDateTime} a {@link LocalDateTime} based on this date-time with the seconds added, not null\n * @throws {DateTimeException} if the result exceeds the supported date range\n */\n plusSeconds(seconds) {\n return this._plusWithOverflow(this._date, 0, 0, seconds, 0, 1);\n }\n\n /**\n * Returns a copy of this {@link LocalDateTime} with the specified period in nanoseconds added.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {number} nanos - the nanos to add, may be negative\n * @return {LocalDateTime} a {@link LocalDateTime} based on this date-time with the nanoseconds added, not null\n * @throws {DateTimeException} if the result exceeds the supported date range\n */\n plusNanos(nanos) {\n return this._plusWithOverflow(this._date, 0, 0, 0, nanos, 1);\n }\n\n //-----------------------------------------------------------------------\n /**\n * 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}.\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 * 1. Subtract the input years from the year field\n * 2. Check if the resulting date would be invalid\n * 3. Adjust the day-of-month to the last valid day if necessary\n *\n * For example, 2008-02-29 (leap year) minus one year would result in the\n * invalid date 2009-02-29 (standard year). Instead of returning an invalid\n * result, the last valid day of the month, 2009-02-28, is selected instead.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {number} years - the years to subtract, may be negative\n * @return {LocalDateTime} a {@link LocalDateTime} based on this date-time with the years subtracted, not null\n * @throws {DateTimeException} if the result exceeds the supported date range\n */\n minusYears(years) {\n return this.plusYears(-1 * years);\n }\n\n /**\n * Returns a copy of this {@link LocalDateTime} with the specified period in months subtracted.\n *\n * This method subtracts the specified amount from the months field in three steps:\n *\n * 1. Subtract the input months from the month-of-year field\n * 2. Check if the resulting date would be invalid\n * 3. Adjust the day-of-month to the last valid day if necessary\n *\n * For example, 2007-03-31 minus one month would result in the invalid date\n * 2007-04-31. Instead of returning an invalid result, the last valid day\n * of the month, 2007-04-30, is selected instead.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {number} months - the months to subtract, may be negative\n * @return {LocalDateTime} a {@link LocalDateTime} based on this date-time with the months subtracted, not null\n * @throws {DateTimeException} if the result exceeds the supported date range\n */\n minusMonths(months) {\n return this.plusMonths(-1 * months);\n }\n\n /**\n * Returns a copy of this {@link LocalDateTime} with the specified period in weeks subtracted.\n *\n * This method subtracts the specified amount in weeks from the days field decrementing\n * the month and year fields as necessary to ensure the result remains valid.\n * The result is only invalid if the maximum/minimum year is exceeded.\n *\n * For example, 2009-01-07 minus one week would result in 2008-12-31.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {number} weeks - the weeks to subtract, may be negative\n * @return {LocalDateTime} a {@link LocalDateTime} based on this date-time with the weeks subtracted, not null\n * @throws {DateTimeException} if the result exceeds the supported date range\n */\n minusWeeks(weeks) {\n return this.plusWeeks(-1 * weeks);\n }\n\n /**\n * Returns a copy of this {@link LocalDateTime} with the specified period in days subtracted.\n *\n * This method subtracts the specified amount from the days field incrementing the\n * month and year fields as necessary to ensure the result remains valid.\n * The result is only invalid if the maximum/minimum year is exceeded.\n *\n * For example, 2009-01-01 minus one day would result in 2008-12-31.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {number} days - the days to subtract, may be negative\n * @return {LocalDateTime} a {@link LocalDateTime} based on this date-time with the days subtracted, not null\n * @throws {DateTimeException} if the result exceeds the supported date range\n */\n minusDays(days) {\n return this.plusDays(-1 * days);\n }\n\n //-----------------------------------------------------------------------\n /**\n * Returns a copy of this {@link LocalDateTime} with the specified period in hours subtracted.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {number} hours - the hours to subtract, may be negative\n * @return {LocalDateTime} a {@link LocalDateTime} based on this date-time with the hours subtracted, not null\n * @throws {DateTimeException} if the result exceeds the supported date range\n */\n minusHours(hours) {\n return this._plusWithOverflow(this._date, hours, 0, 0, 0, -1);\n }\n\n /**\n * Returns a copy of this {@link LocalDateTime} with the specified period in minutes subtracted.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {number} minutes - the minutes to subtract, may be negative\n * @return {LocalDateTime} a {@link LocalDateTime} based on this date-time with the minutes subtracted, not null\n * @throws {DateTimeException} if the result exceeds the supported date range\n */\n minusMinutes(minutes) {\n return this._plusWithOverflow(this._date, 0, minutes, 0, 0, -1);\n }\n\n /**\n * Returns a copy of this {@link LocalDateTime} with the specified period in seconds subtracted.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {number} seconds - the seconds to subtract, may be negative\n * @return {LocalDateTime} a {@link LocalDateTime} based on this date-time with the seconds subtracted, not null\n * @throws {DateTimeException} if the result exceeds the supported date range\n */\n minusSeconds(seconds) {\n return this._plusWithOverflow(this._date, 0, 0, seconds, 0, -1);\n }\n\n /**\n * Returns a copy of this {@link LocalDateTime} with the specified period in nanoseconds subtracted.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {Number} nanos - the nanos to subtract, may be negative\n * @return {LocalDateTime} based on this date-time with the nanoseconds subtracted, not null\n * @throws {DateTimeException} if the result exceeds the supported date range\n */\n minusNanos(nanos) {\n return this._plusWithOverflow(this._date, 0, 0, 0, nanos, -1);\n }\n\n //-----------------------------------------------------------------------\n /**\n * Returns a copy of this {@link LocalDateTime} with the specified period added.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {LocalDate} newDate the new date to base the calculation on, not null\n * @param {Number} hours - the hours to add, may be negative\n * @param {Number} minutes - the minutes to add, may be negative\n * @param {Number} seconds - the seconds to add, may be negative\n * @param {Number} nanos - the nanos to add, may be negative\n * @param {Number} sign - the sign to determine add or subtract\n * @return {LocalDateTime} the combined result, not null\n */\n _plusWithOverflow(newDate, hours, minutes, seconds, nanos, sign) {\n // 9223372036854775808 long, 2147483648 int\n if ((hours | minutes | seconds | nanos) === 0) {\n return this._withDateTime(newDate, this._time);\n }\n let totDays = MathUtil.intDiv(nanos, LocalTime.NANOS_PER_DAY) + // max/24*60*60*1B\n MathUtil.intDiv(seconds, LocalTime.SECONDS_PER_DAY) + // max/24*60*60\n MathUtil.intDiv(minutes, LocalTime.MINUTES_PER_DAY) + // max/24*60\n MathUtil.intDiv(hours, LocalTime.HOURS_PER_DAY); // max/24\n totDays *= sign; // total max*0.4237...\n let totNanos = MathUtil.intMod(nanos, LocalTime.NANOS_PER_DAY) + // max 86400000000000\n (MathUtil.intMod(seconds, LocalTime.SECONDS_PER_DAY)) * LocalTime.NANOS_PER_SECOND + // max 86400000000000\n (MathUtil.intMod(minutes, LocalTime.MINUTES_PER_DAY)) * LocalTime.NANOS_PER_MINUTE + // max 86400000000000\n (MathUtil.intMod(hours, LocalTime.HOURS_PER_DAY)) * LocalTime.NANOS_PER_HOUR; // max 86400000000000\n const curNoD = this._time.toNanoOfDay(); // max 86400000000000\n totNanos = totNanos * sign + curNoD; // total 432000000000000\n totDays += MathUtil.floorDiv(totNanos, LocalTime.NANOS_PER_DAY);\n const newNoD = MathUtil.floorMod(totNanos, LocalTime.NANOS_PER_DAY);\n const newTime = (newNoD === curNoD ? this._time : LocalTime.ofNanoOfDay(newNoD));\n return this._withDateTime(newDate.plusDays(totDays), newTime);\n }\n\n //-----------------------------------------------------------------------\n /**\n * Queries this date-time using the specified query.\n *\n * This queries this date-time using the specified query strategy object.\n * The {@link TemporalQuery} object defines the logic to be used to\n * obtain the result. Read the documentation of the query to understand\n * what the result of this method will be.\n *\n * The result of this method is obtained by invoking the\n * {@link TemporalQuery#queryFrom} method on the\n * specified query passing `this` as the argument.\n *\n * @param {TemporalQuery} query the query to invoke, not null\n * @return {*} the query result, null may be returned (defined by the query)\n * @throws {DateTimeException} if unable to query (defined by the query)\n * @throws {ArithmeticException} if numeric overflow occurs (defined by the query)\n */\n query(query) {\n requireNonNull(query, 'query');\n if (query === TemporalQueries.localDate()) {\n return this.toLocalDate();\n }\n return super.query(query);\n }\n\n /**\n * Adjusts the specified temporal object to have the same date and time as this object.\n *\n * This returns a temporal object of the same observable type as the input\n * with the date and time changed to be the same as this.\n *\n * The adjustment is equivalent to using {@link Temporal#with}\n * twice, passing {@link ChronoField#EPOCH_DAY} and\n * {@link ChronoField#NANO_OF_DAY} as the fields.\n *\n * In most cases, it is clearer to reverse the calling pattern by using\n * {@link Temporal#with}:\n *
\n * // these two lines are equivalent, but the second approach is recommended\n * temporal = thisLocalDateTime.adjustInto(temporal);\n * temporal = temporal.with(thisLocalDateTime);\n *\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {TemporalAdjuster} temporal - the target object to be adjusted, not null\n * @return {LocalDateTime} the adjusted object, not null\n * @throws {DateTimeException} if unable to make the adjustment\n * @throws {ArithmeticException} if numeric overflow occurs\n */\n adjustInto(temporal) {\n return super.adjustInto(temporal);\n }\n\n /**\n * Calculates the period between this date-time and another date-time in\n * terms of the specified unit.\n *\n * This calculates the period between two date-times in terms of a single unit.\n * The start and end points are `this` and the specified date-time.\n * The result will be negative if the end is before the start.\n * The {@link Temporal} passed to this method must be a {@link LocalDateTime}.\n * For example, the period in days between two date-times can be calculated\n * using `startDateTime.until(endDateTime, DAYS)`.\n *\n * The calculation returns a whole number, representing the number of\n * complete units between the two date-times.\n * For example, the period in months between 2012-06-15T00:00 and 2012-08-14T23:59\n * will only be one month as it is one minute short of two months.\n *\n * This method operates in association with {@link TemporalUnit#between}.\n * The result of this method is a `long` representing the amount of\n * the specified unit. By contrast, the result of {@link between} is an\n * object that can be used directly in addition/subtraction:\n *
\n * long period = start.until(end, MONTHS); // this method\n * dateTime.plus(MONTHS.between(start, end)); // use in plus/minus\n *\n *\n * The calculation is implemented in this method for {@link ChronoUnit}.\n * The units {@link NANOS}, {@link MICROS}, {@link MILLIS}, {@link SECONDS},\n * {@link MINUTES}, {@link HOURS} and {@link HALF_DAYS}, {@link DAYS},\n * {@link WEEKS}, {@link MONTHS}, {@link YEARS}, {@link DECADES},\n * {@link CENTURIES}, {@link MILLENNIA} and {@link ERAS} are supported.\n * Other {@link ChronoUnit} values will throw an exception.\n *\n * If the unit is not a {@link ChronoUnit}, then the result of this method\n * is obtained by invoking {@link TemporalUnit.between}\n * passing `this` as the first argument and the input temporal as\n * the second argument.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {Temporal} endExclusive - the end date-time, which is converted to a {@link LocalDateTime}, not null\n * @param {TemporalUnit} unit - the unit to measure the period in, not null\n * @return {number} the amount of the period between this date-time and the end date-time\n * @throws {DateTimeException} if the period cannot be calculated\n * @throws {ArithmeticException} if numeric overflow occurs\n */\n until(endExclusive, unit) {\n requireNonNull(endExclusive, 'endExclusive');\n requireNonNull(unit, 'unit');\n const end = LocalDateTime.from(endExclusive);\n if (unit instanceof ChronoUnit) {\n if (unit.isTimeBased()) {\n let daysUntil = this._date.daysUntil(end._date);\n let timeUntil = end._time.toNanoOfDay() - this._time.toNanoOfDay();\n if (daysUntil > 0 && timeUntil < 0) {\n daysUntil--;\n timeUntil += LocalTime.NANOS_PER_DAY;\n } else if (daysUntil < 0 && timeUntil > 0) {\n daysUntil++;\n timeUntil -= LocalTime.NANOS_PER_DAY;\n }\n let amount = daysUntil;\n switch (unit) {\n case ChronoUnit.NANOS:\n amount = MathUtil.safeMultiply(amount, LocalTime.NANOS_PER_DAY);\n return MathUtil.safeAdd(amount, timeUntil);\n case ChronoUnit.MICROS:\n amount = MathUtil.safeMultiply(amount, LocalTime.MICROS_PER_DAY);\n return MathUtil.safeAdd(amount, MathUtil.intDiv(timeUntil, 1000));\n case ChronoUnit.MILLIS:\n amount = MathUtil.safeMultiply(amount, LocalTime.MILLIS_PER_DAY);\n return MathUtil.safeAdd(amount, MathUtil.intDiv(timeUntil, 1000000));\n case ChronoUnit.SECONDS:\n amount = MathUtil.safeMultiply(amount, LocalTime.SECONDS_PER_DAY);\n return MathUtil.safeAdd(amount, MathUtil.intDiv(timeUntil, LocalTime.NANOS_PER_SECOND));\n case ChronoUnit.MINUTES:\n amount = MathUtil.safeMultiply(amount, LocalTime.MINUTES_PER_DAY);\n return MathUtil.safeAdd(amount, MathUtil.intDiv(timeUntil, LocalTime.NANOS_PER_MINUTE));\n case ChronoUnit.HOURS:\n amount = MathUtil.safeMultiply(amount, LocalTime.HOURS_PER_DAY);\n return MathUtil.safeAdd(amount, MathUtil.intDiv(timeUntil, LocalTime.NANOS_PER_HOUR));\n case ChronoUnit.HALF_DAYS:\n amount = MathUtil.safeMultiply(amount, 2);\n return MathUtil.safeAdd(amount, MathUtil.intDiv(timeUntil, (LocalTime.NANOS_PER_HOUR * 12)));\n }\n throw new UnsupportedTemporalTypeException('Unsupported unit: ' + unit);\n }\n let endDate = end._date;\n const endTime = end._time;\n if (endDate.isAfter(this._date) && endTime.isBefore(this._time)) {\n endDate = endDate.minusDays(1);\n } else if (endDate.isBefore(this._date) && endTime.isAfter(this._time)) {\n endDate = endDate.plusDays(1);\n }\n return this._date.until(endDate, unit);\n }\n return unit.between(this, end);\n }\n\n //-----------------------------------------------------------------------\n /**\n * Combines this date-time with an offset to create an {@link OffsetDateTime}.\n *\n * This returns an {@link OffsetDateTime} formed from this date-time at the specified offset.\n * All possible combinations of date-time and offset are valid.\n *\n * @param {ZoneOffset} offset the offset to combine with, not null\n * @return {OffsetDateTime} the offset date-time formed from this date-time and the specified offset, not null\n */\n/*\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} of the zone ID.\n *\n * In most cases, there is only one valid offset for a local date-time.\n * In the case of an overlap, where clocks are set back, there are two valid offsets.\n * This method uses the earlier offset typically corresponding to 'summer'.\n *\n * In the case of a gap, where clocks jump forward, there is no valid offset.\n * Instead, the local date-time is adjusted to be later by the length of the gap.\n * For a typical one hour daylight savings change, the local date-time will be\n * moved one hour later into the offset typically corresponding to 'summer'.\n *\n * To obtain the later offset during an overlap, call\n * {@link ZonedDateTime#withLaterOffsetAtOverlap} on the result of this method.\n * To throw an exception when there is a gap or overlap, use\n * {@link ZonedDateTime#ofStrict}.\n *\n * @param {ZoneId} zone the time-zone to use, not null\n * @return {ZonedDateTime} the zoned date-time formed from this date-time, not null\n */\n atZone(zone) {\n return ZonedDateTime.of(this, zone);\n }\n\n //-----------------------------------------------------------------------\n /**\n * Gets the {@link LocalDate} part of this date-time.\n *\n * This returns a {@link LocalDate} with the same year, month and day\n * as this date-time.\n *\n * @return {LocalDate} the date part of this date-time, not null\n */\n toLocalDate() {\n return this._date;\n }\n\n /**\n * Gets the {@link LocalTime} part of this date-time.\n *\n * This returns a {@link LocalTime} with the same hour, minute, second and\n * nanosecond as this date-time.\n *\n * @return {LocalTime} the time part of this date-time, not null\n */\n toLocalTime() {\n return this._time;\n }\n\n //-----------------------------------------------------------------------\n /**\n * Compares this date-time to another date-time.\n *\n * The comparison is primarily based on the date-time, from earliest to latest.\n * It is 'consistent with equals', as defined by {@link Comparable}.\n *\n * If all the date-times being compared are instances of {@link LocalDateTime},\n * then the comparison will be entirely based on the date-time.\n * If some dates being compared are in different chronologies, then the\n * chronology is also considered, see {@link ChronoLocalDateTime#compareTo}.\n *\n * @param {!LocalDateTime} other - the other date-time to compare to, not null\n * @return {number} the comparator value, negative if less, positive if greater\n */\n compareTo(other) {\n requireNonNull(other, 'other');\n requireInstance(other, LocalDateTime, 'other');\n return this._compareTo0(other);\n // return super.compareTo(other); if not instance of LocalDateTime\n }\n\n /**\n *\n * @param {!LocalDateTime} other\n * @returns {number}\n * @private\n */\n _compareTo0(other) {\n let cmp = this._date.compareTo(other.toLocalDate());\n if (cmp === 0) {\n cmp = this._time.compareTo(other.toLocalTime());\n }\n return cmp;\n }\n\n /**\n * Checks if this date-time is after the specified date-time.\n *\n * This checks to see if this date-time represents a point on the\n * local time-line after the other date-time.\n *
\n * LocalDate a = LocalDateTime.of(2012, 6, 30, 12, 00);\n * LocalDate b = LocalDateTime.of(2012, 7, 1, 12, 00);\n * a.isAfter(b) == false\n * a.isAfter(a) == false\n * b.isAfter(a) == true\n *\n *\n * This method only considers the position of the two date-times on the local time-line.\n * It does not take into account the chronology, or calendar system.\n * This is different from the comparison in {@link compareTo},\n * but is the same approach as {@link DATE_TIME_COMPARATOR}.\n *\n * @param {LocalDateTime} other - the other date-time to compare to, not null\n * @return {boolean} true if this date-time is after the specified date-time\n */\n isAfter(other) {\n return this.compareTo(other) > 0;\n // return super.isAfter(other); if not instance of LocalDateTime\n }\n\n /**\n * Checks if this date-time is before the specified date-time.\n *\n * This checks to see if this date-time represents a point on the\n * local time-line before the other date-time.\n *
\n * LocalDate a = LocalDateTime.of(2012, 6, 30, 12, 00);\n * LocalDate b = LocalDateTime.of(2012, 7, 1, 12, 00);\n * a.isBefore(b) == true\n * a.isBefore(a) == false\n * b.isBefore(a) == false\n *\n *\n * This method only considers the position of the two date-times on the local time-line.\n * It does not take into account the chronology, or calendar system.\n * This is different from the comparison in {@link compareTo},\n * but is the same approach as {@link DATE_TIME_COMPARATOR}.\n *\n * @param {LocalDateTime} other - the other date-time to compare to, not null\n * @return {boolean} true if this date-time is before the specified date-time\n */\n isBefore(other) {\n return this.compareTo(other) < 0;\n // return super.isBefore(other); if not instance of LocalDateTime\n }\n\n /**\n * Checks if this date-time is equal to the specified date-time.\n *\n * This checks to see if this date-time represents the same point on the\n * local time-line as the other date-time.\n *
\n * LocalDate a = LocalDateTime.of(2012, 6, 30, 12, 00);\n * LocalDate b = LocalDateTime.of(2012, 7, 1, 12, 00);\n * a.isEqual(b) == false\n * a.isEqual(a) == true\n * b.isEqual(a) == false\n *\n *\n * This method only considers the position of the two date-times on the local time-line.\n * It does not take into account the chronology, or calendar system.\n * This is different from the comparison in {@link compareTo},\n * but is the same approach as {@link DATE_TIME_COMPARATOR}.\n *\n * @param {*} other - the other date-time to compare to, not null\n * @return {boolean} true if this date-time is equal to the specified date-time\n */\n isEqual(other) {\n return this.compareTo(other) === 0;\n // return super.isEqual(other); if not instance of LocalDateTime\n }\n\n //-----------------------------------------------------------------------\n /**\n * Checks if this date-time is equal to another date-time.\n *\n * Compares this {@link LocalDateTime} with another ensuring that the date-time is the same.\n * Only objects of type {@link LocalDateTime} are compared, other types return false.\n *\n * @param {*} other - the object to check, null returns false\n * @return {boolean} true if this is equal to the other date-time\n */\n equals(other) {\n if (this === other) {\n return true;\n }\n if (other instanceof LocalDateTime) {\n return this._date.equals(other._date) && this._time.equals(other._time);\n }\n return false;\n }\n\n /**\n * A hash code for this date-time.\n *\n * @return {number} a suitable hash code\n */\n hashCode() {\n return this._date.hashCode() ^ this._time.hashCode();\n }\n\n //-----------------------------------------------------------------------\n /**\n * Outputs this date-time as a string, such as `2007-12-03T10:15:30`.\n *\n * The output will be one of the following ISO-8601 formats:\n *\n * * `yyyy-MM-dd'T'HH:mm`\n * * `yyyy-MM-dd'T'HH:mm:ss`\n * * `yyyy-MM-dd'T'HH:mm:ss.SSS`\n * * `yyyy-MM-dd'T'HH:mm:ss.SSSSSS`\n * * `yyyy-MM-dd'T'HH:mm:ss.SSSSSSSSS`\n *\n * The format used will be the shortest that outputs the full value of\n * the time where the omitted parts are implied to be zero.\n *\n * @return {string} a string representation of this date-time, not null\n */\n toString() {\n return this._date.toString() + 'T' + this._time.toString();\n }\n\n /**\n *\n * @return {string} same as {@link LocalDateTime.toString}\n */\n toJSON() {\n return this.toString();\n }\n\n /**\n * Outputs this date-time as a string using the formatter.\n *\n * @param {!DateTimeFormatter} formatter the formatter to use, not null\n * @return {String} the formatted date-time string, not null\n * @throws {DateTimeException} if an error occurs during printing\n */\n format(formatter) {\n requireNonNull(formatter, 'formatter');\n return formatter.format(this);\n }\n\n}\n\nexport function _init(){\n /**\n * The minimum supported {@link LocalDateTime}, '-999999999-01-01T00:00:00'.\n * This is the local date-time of midnight at the start of the minimum date.\n * This combines {@link LocalDate#MIN} and {@link LocalTime#MIN}.\n * This could be used by an application as a 'far past' date-time.\n */\n LocalDateTime.MIN = LocalDateTime.of(LocalDate.MIN, LocalTime.MIN);\n\n /**\n * The maximum supported {@link LocalDateTime}, '+999999999-12-31T23:59:59.999999999'.\n * This is the local date-time just before midnight at the end of the maximum date.\n * This combines {@link LocalDate#MAX} and {@link LocalTime#MAX}.\n * This could be used by an application as a 'far future' date-time.\n */\n LocalDateTime.MAX = LocalDateTime.of(LocalDate.MAX, LocalTime.MAX);\n\n LocalDateTime.FROM = createTemporalQuery('LocalDateTime.FROM', (temporal) => {\n return LocalDateTime.from(temporal);\n });\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/LocalDateTime.js","/**\n * @copyright (c) 2016, Philipp Thürwächter & Pattrick Hüper\n * @copyright (c) 2007-present, Stephen Colebourne & Michael Nascimento Santos\n * @license BSD-3-Clause (see LICENSE in the root directory of this source tree)\n */\n\nimport {assert, requireNonNull, requireInstance} from './assert';\n\nimport {MathUtil} from './MathUtil';\nimport {DateTimeException, UnsupportedTemporalTypeException, NullPointerException, IllegalArgumentException} from './errors';\n\nimport {IsoChronology} from './chrono/IsoChronology';\nimport {ChronoField} from './temporal/ChronoField';\nimport {ChronoUnit} from './temporal/ChronoUnit';\nimport {ChronoLocalDate} from './chrono/ChronoLocalDate';\nimport {TemporalQueries} from './temporal/TemporalQueries';\nimport {createTemporalQuery} from './temporal/TemporalQuery';\nimport {ValueRange} from './temporal/ValueRange';\nimport {DateTimeFormatter} from './format/DateTimeFormatter';\n\nimport {Clock} from './Clock';\nimport {DayOfWeek} from './DayOfWeek';\nimport {Month} from './Month';\nimport {Period} from './Period';\nimport {YearConstants} from './YearConstants';\nimport {LocalTime} from './LocalTime';\nimport {LocalDateTime} from './LocalDateTime';\nimport {Year} from './Year';\nimport {ZoneId} from './ZoneId';\nimport {ZoneOffset} from './ZoneOffset';\nimport {ZonedDateTime} from './ZonedDateTime';\n\n/**\n * The number of days in a 400 year cycle.\n */\nconst DAYS_PER_CYCLE = 146097;\n\n/**\n* The number of days from year zero to year 1970.\n* There are five 400 year cycles from year zero to 2000.\n* There are 7 leap years from 1970 to 2000.\n*/\nconst DAYS_0000_TO_1970 = (DAYS_PER_CYCLE * 5) - (30 * 365 + 7);\n\n/**\n * A date without a time-zone in the ISO-8601 calendar system,\n * such as 2007-12-03.\n *\n * LocalDate is an immutable date-time object that represents a date,\n * often viewed as year-month-day. Other date fields, such as day-of-year,\n * day-of-week and week-of-year, can also be accessed.\n * For example, the value \"2nd October 2007\" can be stored in a LocalDate.\n *\n * This class does not store or represent a time or time-zone.\n * Instead, it is a description of the date, as used for birthdays.\n * It cannot represent an instant on the time-line without additional information\n * such as an offset or time-zone.\n *\n * The ISO-8601 calendar system is the modern civil calendar system used today\n * in most of the world. It is equivalent to the proleptic Gregorian calendar\n * system, in which today's rules for leap years are applied for all time.\n * For most applications written today, the ISO-8601 rules are entirely suitable.\n * However, any application that makes use of historical dates, and requires them\n * to be accurate will find the ISO-8601 approach unsuitable.\n *\n * ### Static properties of Class {@link LocalDate}\n *\n * LocalDate.MIN = LocalDate.of(Year.MIN_VALUE, 1, 1);\n *\n * The minimum supported {@link LocalDate}\n * This could be used by an application as a \"far past\" date.\n *\n * LocalDate.MAX = LocalDate.of(Year.MAX_VALUE, 12, 31);\n *\n * The maximum supported {@link LocalDate}\n * This could be used by an application as a \"far future\" date.\n *\n * LocalDate.EPOCH_0\n *\n * The date at epoch day 0, that is 1970-01-01.\n */\n\nexport class LocalDate extends ChronoLocalDate{\n\n /**\n * Obtains the current date from the system clock in the default time-zone or\n * if specified, the current date from the specified clock or\n * if argument is a ZoneId this will query a clock with the specified ZoneId.\n *\n * This will query the specified clock to obtain the current date - today.\n * Using this method allows the use of an alternate clock for testing.\n *\n * @param {Clock|ZoneId} [clockOrZone=Clock.systemDefaultZone()] - the clock or zone to use,\n * if null, the system clock and default time-zone is used.\n * @return {LocalDate} the current date, not null\n */\n static now(clockOrZone) {\n let clock;\n if(clockOrZone == null){\n clock = Clock.systemDefaultZone();\n } else if(clockOrZone instanceof ZoneId){\n clock = Clock.system(clockOrZone);\n } else {\n clock = clockOrZone;\n }\n return LocalDate.ofInstant(clock.instant(), clock.zone());\n }\n\n /**\n * obtain a LocalDate from an Instant in the specified time-zone or, if null\n * in the system default time-zone\n *\n * @param {!Instant} instant\n * @param {ZoneId} [zone=ZoneId.systemDefault()], defaults to ZoneId.systemDefault()\n * @returns {LocalDate} the current date, not null\n */\n static ofInstant(instant, zone=ZoneId.systemDefault()){\n requireNonNull(instant, 'instant');\n const offset = zone.rules().offset(instant);\n const epochSec = instant.epochSecond() + offset.totalSeconds();\n const epochDay = MathUtil.floorDiv(epochSec, LocalTime.SECONDS_PER_DAY);\n return LocalDate.ofEpochDay(epochDay);\n }\n\n /**\n * Obtains an instance of {@link LocalDate} from a year, month and day.\n *\n * This returns a {@link LocalDate} with the specified year, month and day-of-month.\n * The day must be valid for the year and month, otherwise an exception will be thrown.\n *\n * @param {!number} year - the year to represent, from {@link Year.MIN_VALUE} to {@link Year.MAX_VALUE}\n * @param {!(Month|Number)} month - the month-of-year to represent, from 1 (January) to 12 (December)\n * @param {!number} dayOfMonth - the day-of-month to represent, from 1 to 31\n * @return {LocalDate} the local date, not null\n * @throws {DateTimeException} if the value of any field is out of range,\n * or if the day-of-month is invalid for the month-year\n */\n static of(year, month, dayOfMonth) {\n return new LocalDate(year, month, dayOfMonth);\n }\n\n /**\n * Obtains an instance of {@link LocalDate} from a year and day-of-year.\n *\n * This returns a {@link LocalDate} with the specified year and day-of-year.\n * The day-of-year must be valid for the year, otherwise an exception will be thrown.\n *\n * @param {!number} year - the year to represent, from {@link Year.MIN_VALUE} to {@link Year.MAX_VALUE}\n * @param {!number} dayOfYear - the day-of-year to represent, from 1 to 366\n * @return {LocalDate} the local date, not null\n * @throws {DateTimeException} if the value of any field is out of range,\n * or if the day-of-year is invalid for the year\n */\n static ofYearDay(year, dayOfYear) {\n ChronoField.YEAR.checkValidValue(year);\n //TODO: ChronoField.DAY_OF_YEAR.checkValidValue(dayOfYear);\n const leap = IsoChronology.isLeapYear(year);\n if (dayOfYear === 366 && leap === false) {\n assert(false, 'Invalid date \\'DayOfYear 366\\' as \\'' + year + '\\' is not a leap year', DateTimeException);\n }\n let moy = Month.of(Math.floor((dayOfYear - 1) / 31 + 1));\n const monthEnd = moy.firstDayOfYear(leap) + moy.length(leap) - 1;\n if (dayOfYear > monthEnd) {\n moy = moy.plus(1);\n }\n const dom = dayOfYear - moy.firstDayOfYear(leap) + 1;\n return new LocalDate(year, moy.value(), dom);\n }\n\n /**\n * Obtains an instance of LocalDate from the epoch day count.\n *\n * This returns a LocalDate with the specified epoch-day.\n * The {@link ChronoField.EPOCH_DAY} is a simple incrementing count\n * of days where day 0 is 1970-01-01. Negative numbers represent earlier days.\n *\n * @param {number} [epochDay=0] - the Epoch Day to convert, based on the epoch 1970-01-01\n * @return {LocalDate} the local date, not null\n * @throws {AssertionError} if the epoch days exceeds the supported date range\n */\n static ofEpochDay(epochDay=0) {\n let adjust, adjustCycles, 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 const date = temporal.query(TemporalQueries.localDate());\n if (date == null) {\n throw new DateTimeException(\n `Unable to obtain LocalDate from TemporalAccessor: ${temporal}, type ${temporal.constructor != null ? temporal.constructor.name : ''}`);\n }\n return date;\n }\n\n /**\n * Obtains an instance of {@link LocalDate} from a text string using a specific formatter.\n *\n * The text is parsed using the formatter, returning a date.\n *\n * @param {!string} text - the text to parse, not null\n * @param {DateTimeFormatter} [formatter=DateTimeFormatter.ISO_LOCAL_DATE] - the formatter to use, default is\n * {@link DateTimeFormatter.ISO_LOCAL_DATE}\n * @return {LocalDate} the parsed local date, not null\n * @throws {DateTimeParseException} if the text cannot be parsed\n */\n static parse(text, formatter = DateTimeFormatter.ISO_LOCAL_DATE){\n assert(formatter != null, 'formatter', NullPointerException);\n return formatter.parse(text, LocalDate.FROM);\n }\n\n /**\n * Resolves the date, resolving days past the end of month.\n *\n * @param {!number} year - the year to represent, validated from {@link Year.MIN_VALUE} to {@link Year.MAX_VALUE}\n * @param {!number} month - the month-of-year to represent, validated from 1 to 12\n * @param {!number} day - the day-of-month to represent, validated from 1 to 31\n * @return {LocalDate} resolved date, not null\n */\n static _resolvePreviousValid(year, month, day) {\n switch (month) {\n case 2:\n day = Math.min(day, IsoChronology.isLeapYear(year) ? 29 : 28);\n break;\n case 4:\n case 6:\n case 9:\n case 11:\n day = Math.min(day, 30);\n break;\n }\n return LocalDate.of(year, month, day);\n }\n\n /**\n * Do not call the constructor directly, use the of*() factories instead like {@link LocalDate.of}\n *\n * @param {!number} year\n * @param {!(Month|number)} month\n * @param {!number} dayOfMonth\n * @private\n */\n constructor(year, month, dayOfMonth){\n super();\n if (month instanceof Month) {\n month = month.value();\n }\n this._year = MathUtil.safeZero(year);\n this._month = MathUtil.safeZero(month);\n this._day = MathUtil.safeZero(dayOfMonth);\n LocalDate._validate(this._year, this._month, this._day);\n }\n\n\n /**\n *\n * @param {!number} year\n * @param {!number} month\n * @param {!number} dayOfMonth\n * @throws {DateTimeException} if date values are invalid\n * @private\n */\n static _validate(year, month, dayOfMonth) {\n let dom;\n ChronoField.YEAR.checkValidValue(year);\n ChronoField.MONTH_OF_YEAR.checkValidValue(month);\n ChronoField.DAY_OF_MONTH.checkValidValue(dayOfMonth);\n \n if (dayOfMonth > 28) {\n dom = 31;\n switch (month) {\n case 2:\n dom = IsoChronology.isLeapYear(year) ? 29 : 28;\n break;\n case 4:\n case 6:\n case 9:\n case 11:\n dom = 30;\n }\n if (dayOfMonth > dom) {\n if (dayOfMonth === 29) {\n assert(false, 'Invalid date \\'February 29\\' as \\'' + year + '\\' is not a leap year', DateTimeException);\n } else {\n assert(false, 'Invalid date \\'' + year + '\\' \\'' + month + '\\' \\'' + dayOfMonth + '\\'', DateTimeException);\n }\n }\n }\n }\n\n /**\n * Checks if the specified field is supported.\n *\n * This checks if this date can be queried for the specified field.\n * If false, then calling the {@link LocalDate.range} range and\n * {@link LocalDate.get} get methods will throw an exception.\n *\n * If the field is a {@link ChronoField} then the query is implemented here.\n * The {@link LocalDate.isSupported} supported fields will return valid\n * values based on this date-time.\n * The supported fields are:\n *\n * * {@link ChronoField.DAY_OF_WEEK}\n * * {@link ChronoField.ALIGNED_DAY_OF_WEEK_IN_MONTH}\n * * {@link ChronoField.ALIGNED_DAY_OF_WEEK_IN_YEAR}\n * * {@link ChronoField.DAY_OF_MONTH}\n * * {@link ChronoField.DAY_OF_YEAR}\n * * {@link ChronoField.EPOCH_DAY}\n * * {@link ChronoField.ALIGNED_WEEK_OF_MONTH}\n * * {@link ChronoField.ALIGNED_WEEK_OF_YEAR}\n * * {@link ChronoField.MONTH_OF_YEAR}\n * * {@link ChronoField.EPOCH_MONTH}\n * * {@link ChronoField.YEAR_OF_ERA}\n * * {@link ChronoField.YEAR}\n * * {@link ChronoField.ERA}\n *\n * All other {@link ChronoField} instances will return false.\n *\n * If the field is not a {@link ChronoField}, then the result of this method\n * is obtained by invoking {@link TemporalField.isSupportedBy}\n * passing this as the argument.\n * Whether the field is supported is determined by the field.\n *\n * @param {TemporalField} field the field to check, null returns false\n * @return {boolean} true if the field is supported on this date, false if not\n */\n isSupported(field) {\n return super.isSupported(field);\n }\n\n /**\n * Gets the range of valid values for the specified field.\n *\n * The range object expresses the minimum and maximum valid values for a field.\n * This date is used to enhance the accuracy of the returned range.\n * If it is not possible to return the range, because the field is not supported\n * or for some other reason, an exception is thrown.\n *\n * If the field is a {@link ChronoField} then the query is implemented here.\n * The {@link LocalDate.isSupported} supported fields will return\n * appropriate range instances.\n * All other {@link ChronoField} instances will throw a {@link DateTimeException}.\n *\n * If the field is not a {@link ChronoField}, then the result of this method\n * is obtained by invoking {@link TemporalField.rangeRefinedBy}\n * passing this as the argument.\n * Whether the range can be obtained is determined by the field.\n *\n * @param {TemporalField} field the field to query the range for, not null\n * @return {ValueRange} the range of valid values for the field, not null\n * @throws {DateTimeException} if the range for the field cannot be obtained\n */\n range(field) {\n if (field instanceof ChronoField) {\n if (field.isDateBased()) {\n switch (field) {\n case ChronoField.DAY_OF_MONTH: return ValueRange.of(1, this.lengthOfMonth());\n case ChronoField.DAY_OF_YEAR: return ValueRange.of(1, this.lengthOfYear());\n case ChronoField.ALIGNED_WEEK_OF_MONTH: return ValueRange.of(1, this.month() === Month.FEBRUARY && this.isLeapYear() === false ? 4 : 5);\n case ChronoField.YEAR_OF_ERA:\n return (this._year <= 0 ? ValueRange.of(1, Year.MAX_VALUE + 1) : ValueRange.of(1, Year.MAX_VALUE));\n }\n return field.range();\n }\n throw new UnsupportedTemporalTypeException('Unsupported field: ' + field);\n }\n return field.rangeRefinedBy(this);\n }\n\n /**\n * Gets the value of the specified field from this date as an `int`.\n *\n * This queries this date for the value for the specified field.\n * The returned value will always be within the valid range of values for the field.\n * If it is not possible to return the value, because the field is not supported\n * or for some other reason, an exception is thrown.\n *\n * If the field is a {@link ChronoField} then the query is implemented here.\n * The {@link LocalDate.isSupported} supported fields will return valid\n * values based on this date, except {@link ChronoField.EPOCH_DAY} and {@link ChronoField.EPOCH_MONTH}\n * which are too large to fit in an `int` and throw a {@link DateTimeException}.\n * All other {@link ChronoField} instances will throw a {@link DateTimeException}.\n *\n * If the field is not a {@link ChronoField}, then the result of this method\n * is obtained by invoking {@link TemporalField.getFrom}\n * passing this as the argument. Whether the value can be obtained,\n * and what the value represents, is determined by the field.\n *\n * @param {!TemporalField} field the field to get, not null\n * @return the value for the field\n * @throws {DateTimeException} if a value for the field cannot be obtained\n * @throws {ArithmeticException} if numeric overflow occurs\n */\n get(field) {\n return this.getLong(field);\n }\n\n /**\n * see {LocalDate.get}, get and getLong are identical in javascript, because we are only limited by\n * {@link MathUtil.MIN_SAFE_INTEGER}/ {@link MathUtil.MAX_SAFE_INTEGER}\n *\n * @param {!TemporalField} field\n * @returns {*}\n */\n getLong(field) {\n assert(field != null, '', NullPointerException);\n if (field instanceof ChronoField) {\n return this._get0(field);\n }\n return field.getFrom(this);\n }\n\n /**\n * TODO tests are missing for the ALIGNED_* ChronoFields\n *\n * @param {!TemporalField} field\n * @returns {*}\n * @private\n */\n _get0(field) {\n switch (field) {\n case ChronoField.DAY_OF_WEEK: return this.dayOfWeek().value();\n case ChronoField.ALIGNED_DAY_OF_WEEK_IN_MONTH: return MathUtil.intMod((this._day - 1), 7) + 1;\n case ChronoField.ALIGNED_DAY_OF_WEEK_IN_YEAR: return MathUtil.intMod((this.dayOfYear() - 1), 7) + 1;\n case ChronoField.DAY_OF_MONTH: return this._day;\n case ChronoField.DAY_OF_YEAR: return this.dayOfYear();\n case ChronoField.EPOCH_DAY: return this.toEpochDay();\n case ChronoField.ALIGNED_WEEK_OF_MONTH: return MathUtil.intDiv((this._day - 1), 7) + 1;\n case ChronoField.ALIGNED_WEEK_OF_YEAR: return MathUtil.intDiv((this.dayOfYear() - 1), 7) + 1;\n case ChronoField.MONTH_OF_YEAR: return this._month;\n case ChronoField.PROLEPTIC_MONTH: return this._prolepticMonth();\n case ChronoField.YEAR_OF_ERA: return (this._year >= 1 ? this._year : 1 - this._year);\n case ChronoField.YEAR: return this._year;\n case ChronoField.ERA: return (this._year >= 1 ? 1 : 0);\n }\n throw new UnsupportedTemporalTypeException('Unsupported field: ' + field);\n }\n\n /**\n *\n * @return {number}\n * @private\n */\n _prolepticMonth() {\n return (this._year * 12) + (this._month - 1);\n }\n\n /**\n * Gets the chronology of this date, which is the ISO calendar system.\n *\n * The {@link Chronology} represents the calendar system in use.\n * The ISO-8601 calendar system is the modern civil calendar system used today\n * in most of the world. It is equivalent to the proleptic Gregorian calendar\n * system, in which 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 `int` values mean.\n * If you need access to the primitive `int` value then the enum\n * provides the {@link DayOfWeek.value} int value.\n *\n * Additional information can be obtained from the {@link DayOfWeek}.\n * This includes textual names of the values.\n *\n * @return {DayOfWeek} the day-of-week, not null\n */\n dayOfWeek() {\n const dow0 = MathUtil.floorMod(this.toEpochDay() + 3, 7);\n return DayOfWeek.of(dow0 + 1);\n }\n\n /**\n * Checks if the year is a leap year, according to the ISO proleptic\n * calendar system rules.\n *\n * This method applies the current rules for leap years across the whole time-line.\n * In general, a year is a leap year if it is divisible by four without\n * remainder. However, years divisible by 100, are not leap years, with\n * the exception of years divisible by 400 which are.\n *\n * For example, 1904 is a leap year it is divisible by 4.\n * 1900 was not a leap year as it is divisible by 100, however 2000 was a\n * leap year as it is divisible by 400.\n *\n * The calculation is proleptic - applying the same rules into the far future and far past.\n * This is historically inaccurate, but is correct for the ISO-8601 standard.\n *\n * @return {boolean} true if the year is leap, false otherwise\n */\n isLeapYear() {\n return IsoChronology.isLeapYear(this._year);\n }\n\n /**\n * Returns the length of the month represented by this date.\n *\n * This returns the length of the month in days.\n * For example, a date in January would return 31.\n *\n * @return {number} the length of the month in days\n */\n lengthOfMonth() {\n switch (this._month) {\n case 2:\n return (this.isLeapYear() ? 29 : 28);\n case 4:\n case 6:\n case 9:\n case 11:\n return 30;\n default:\n return 31;\n }\n }\n\n /**\n * Returns the length of the year represented by this date.\n *\n * This returns the length of the year in days, either 365 or 366.\n *\n * @return {number} 366 if the year is leap, 365 otherwise\n */\n lengthOfYear() {\n return (this.isLeapYear() ? 366 : 365);\n }\n\n /**\n * 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 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 `this` as the argument.\n *\n * @param {!TemporalAdjuster} adjuster - the adjuster to use, not null\n * @return {LocalDate} a {@link LocalDate} based on `this` with the adjustment made, not null\n * @throws {DateTimeException} if the adjustment cannot be made\n * @throws {ArithmeticException} if numeric overflow occurs\n */\n 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 * * {@link DAY_OF_WEEK} -\n * Returns a {@link LocalDate} with the specified day-of-week.\n * The date is adjusted up to 6 days forward or backward within the boundary\n * of a Monday to Sunday week.\n * * {@link ALIGNED_DAY_OF_WEEK_IN_MONTH} -\n * Returns a {@link LocalDate} with the specified aligned-day-of-week.\n * The date is adjusted to the specified month-based aligned-day-of-week.\n * Aligned weeks are counted such that the first week of a given month starts\n * on the first day of that month.\n * This may cause the date to be moved up to 6 days into the following month.\n * * {@link ALIGNED_DAY_OF_WEEK_IN_YEAR} -\n * Returns a {@link LocalDate} with the specified aligned-day-of-week.\n * The date is adjusted to the specified year-based aligned-day-of-week.\n * Aligned weeks are counted such that the first week of a given year starts\n * on the first day of that year.\n * This may cause the date to be moved up to 6 days into the following year.\n * * {@link DAY_OF_MONTH} -\n * Returns a {@link LocalDate} with the specified day-of-month.\n * The month and year will be unchanged. If the day-of-month is invalid for the\n * year and month, then a {@link DateTimeException} is thrown.\n * * {@link DAY_OF_YEAR} -\n * Returns a {@link LocalDate} with the specified day-of-year.\n * The year will be unchanged. If the day-of-year is invalid for the\n * year, then a {@link DateTimeException} is thrown.\n * * {@link EPOCH_DAY} -\n * Returns a {@link LocalDate} with the specified epoch-day.\n * This completely replaces the date and is equivalent to {@link ofEpochDay}.\n * * {@link ALIGNED_WEEK_OF_MONTH} -\n * Returns a {@link LocalDate} with the specified aligned-week-of-month.\n * Aligned weeks are counted such that the first week of a given month starts\n * on the first day of that month.\n * This adjustment moves the date in whole week chunks to match the specified week.\n * The result will have the same day-of-week as this date.\n * This may cause the date to be moved into the following month.\n * * {@link ALIGNED_WEEK_OF_YEAR} -\n * Returns a {@link LocalDate} with the specified aligned-week-of-year.\n * Aligned weeks are counted such that the first week of a given year starts\n * on the first day of that year.\n * This adjustment moves the date in whole week chunks to match the specified week.\n * The result will have the same day-of-week as this date.\n * This may cause the date to be moved into the following year.\n * * {@link MONTH_OF_YEAR} -\n * Returns a {@link LocalDate} with the specified month-of-year.\n * The year will be unchanged. The day-of-month will also be unchanged,\n * unless it would be invalid for the new month and year. In that case, the\n * day-of-month is adjusted to the maximum valid value for the new month and year.\n * * {@link PROLEPTIC_MONTH} -\n * Returns a {@link LocalDate} with the specified proleptic-month.\n * The day-of-month will be unchanged, unless it would be invalid for the new month\n * and year. In that case, the day-of-month is adjusted to the maximum valid value\n * for the new month and year.\n * * {@link YEAR_OF_ERA} -\n * Returns a {@link LocalDate} with the specified year-of-era.\n * The era and month will be unchanged. The day-of-month will also be unchanged,\n * unless it would be invalid for the new month and year. In that case, the\n * day-of-month is adjusted to the maximum valid value for the new month and year.\n * * {@link YEAR} -\n * Returns a {@link LocalDate} with the specified year.\n * The month will be unchanged. The day-of-month will also be unchanged,\n * unless it would be invalid for the new month and year. In that case, the\n * day-of-month is adjusted to the maximum valid value for the new month and year.\n * * {@link ERA} -\n * Returns a {@link LocalDate} with the specified era.\n * The year-of-era and month will be unchanged. The day-of-month will also be unchanged,\n * unless it would be invalid for the new month and year. In that case, the\n * day-of-month is adjusted to the maximum valid value for the new month and year.\n *\n * In all cases, if the new value is outside the valid range of values for the field\n * then a {@link DateTimeException} will be thrown.\n *\n * All other {@link ChronoField} instances will throw a {@link DateTimeException}.\n *\n * If the field is not a {@link ChronoField}, then the result of this method\n * is obtained by invoking {@link TemporalField.adjustInto}\n * passing `this` as the argument. In this case, the field determines\n * whether and how to adjust the instant.\n *\n * @param {TemporalField} field - the field to set in the result, not null\n * @param {number} newValue - the new value of the field in the result\n * @return {LocalDate} a {@link LocalDate} based on `this` with the specified field set, not null\n * @throws {DateTimeException} if the field cannot be set\n * @throws {ArithmeticException} if numeric overflow occurs\n */\n withFieldAndValue(field, newValue) {\n assert(field != null, 'field', NullPointerException);\n if (field instanceof ChronoField) {\n const f = field;\n f.checkValidValue(newValue);\n switch (f) {\n case ChronoField.DAY_OF_WEEK: return this.plusDays(newValue - this.dayOfWeek().value());\n case ChronoField.ALIGNED_DAY_OF_WEEK_IN_MONTH: return this.plusDays(newValue - this.getLong(ChronoField.ALIGNED_DAY_OF_WEEK_IN_MONTH));\n case ChronoField.ALIGNED_DAY_OF_WEEK_IN_YEAR: return this.plusDays(newValue - this.getLong(ChronoField.ALIGNED_DAY_OF_WEEK_IN_YEAR));\n case ChronoField.DAY_OF_MONTH: return this.withDayOfMonth(newValue);\n case ChronoField.DAY_OF_YEAR: return this.withDayOfYear(newValue);\n case ChronoField.EPOCH_DAY: return LocalDate.ofEpochDay(newValue);\n case ChronoField.ALIGNED_WEEK_OF_MONTH: return this.plusWeeks(newValue - this.getLong(ChronoField.ALIGNED_WEEK_OF_MONTH));\n case ChronoField.ALIGNED_WEEK_OF_YEAR: return this.plusWeeks(newValue - this.getLong(ChronoField.ALIGNED_WEEK_OF_YEAR));\n case ChronoField.MONTH_OF_YEAR: return this.withMonth(newValue);\n case ChronoField.PROLEPTIC_MONTH: return this.plusMonths(newValue - this.getLong(ChronoField.PROLEPTIC_MONTH));\n case ChronoField.YEAR_OF_ERA: return this.withYear((this._year >= 1 ? newValue : 1 - newValue));\n case ChronoField.YEAR: return this.withYear(newValue);\n case ChronoField.ERA: return (this.getLong(ChronoField.ERA) === newValue ? this : this.withYear(1 - this._year));\n }\n throw new UnsupportedTemporalTypeException('Unsupported field: ' + field);\n }\n return field.adjustInto(this, newValue);\n }\n\n /**\n * Returns a copy of this date with the year altered.\n * If the day-of-month is invalid for the year, it will be changed to the last valid day of the month.\n *\n * @param {!number} year the year to set in the result, from {@link Year.MIN_VALUE} to {@link Year.MAX_VALUE}\n * @return {LocalDate} a {@link LocalDate} based on this date with the requested year, not null\n * @throws {DateTimeException} if the year value is invalid\n */\n withYear(year) {\n if (this._year === year) {\n return this;\n }\n ChronoField.YEAR.checkValidValue(year);\n return LocalDate._resolvePreviousValid(year, this._month, this._day);\n }\n\n /**\n * Returns a copy of this date with the month-of-year altered.\n * If the day-of-month is invalid for the year, it will be changed to the last valid day of the month.\n *\n * @param {!(Month|number)} month - the month-of-year to set in the result, from 1 (January) to 12 (December)\n * @return {LocalDate} a {@link LocalDate} based on this date with the requested month, not null\n * @throws {DateTimeException} if the month-of-year value is invalid\n */\n withMonth(month) {\n const m = (month instanceof Month) ? month.value() : month;\n if (this._month === m) {\n return this;\n }\n ChronoField.MONTH_OF_YEAR.checkValidValue(m);\n return LocalDate._resolvePreviousValid(this._year, m, this._day);\n }\n\n /**\n * Returns a copy of this {@link LocalDate} with the day-of-month altered.\n *\n * If the resulting date is invalid, an exception is thrown.\n *\n * @param {!number} dayOfMonth - the day-of-month to set in the result, from 1 to 28-31\n * @return {LocalDate} based on this date with the requested day, not null\n * @throws {DateTimeException} if the day-of-month value is invalid,\n * or if the day-of-month is invalid for the month-year\n */\n withDayOfMonth(dayOfMonth) {\n if (this._day === dayOfMonth) {\n return this;\n }\n return LocalDate.of(this._year, this._month, dayOfMonth);\n }\n\n /**\n * Returns a copy of this date with the day-of-year altered.\n * If the resulting date is invalid, an exception is thrown.\n *\n * @param dayOfYear the day-of-year to set in the result, from 1 to 365-366\n * @return {LocalDate} a {@link LocalDate} based on this date with the requested day, not null\n * @throws {DateTimeException} if the day-of-year value is invalid\n * @throws {DateTimeException} if the day-of-year is invalid for the year\n */\n withDayOfYear(dayOfYear) {\n if (this.dayOfYear() === dayOfYear) {\n return this;\n }\n return LocalDate.ofYearDay(this._year, dayOfYear);\n }\n\n /**\n * 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 * 1. Add the input years to the year field\n * 2. Check if the resulting date would be invalid\n * 3. Adjust the day-of-month to the last valid day if necessary\n *\n * For example, 2008-02-29 (leap year) plus one year would result in the\n * invalid date 2009-02-29 (standard year). Instead of returning an invalid\n * result, the last valid day of the month, 2009-02-28, is selected instead.\n *\n * @param {!number} yearsToAdd - the years to add, may be negative\n * @return {LocalDate} a {@link LocalDate} based on this date with the years added, not null\n * @throws {DateTimeException} if the result exceeds the supported date range\n */\n plusYears(yearsToAdd) {\n if (yearsToAdd === 0) {\n return this;\n }\n const newYear = ChronoField.YEAR.checkValidIntValue(this._year + yearsToAdd); // safe overflow\n return LocalDate._resolvePreviousValid(newYear, this._month, this._day);\n }\n\n /**\n * Returns a copy of this {@link LocalDate} with the specified period in months added.\n *\n * This method adds the specified amount to the months field in three steps:\n *\n * 1. Add the input months to the month-of-year field\n * 2. Check if the resulting date would be invalid\n * 3. Adjust the day-of-month to the last valid day if necessary\n *\n * For example, 2007-03-31 plus one month would result in the invalid date\n * 2007-04-31. Instead of returning an invalid result, the last valid day\n * of the month, 2007-04-30, is selected instead.\n *\n * @param {number} monthsToAdd - the months to add, may be negative\n * @return {LocalDate} a {@link LocalDate} based on this date with the months added, not null\n * @throws {DateTimeException} if the result exceeds the supported date range\n */\n plusMonths(monthsToAdd) {\n if (monthsToAdd === 0) {\n return this;\n }\n const monthCount = this._year * 12 + (this._month - 1);\n const calcMonths = monthCount + monthsToAdd; // safe overflow\n const newYear = ChronoField.YEAR.checkValidIntValue(MathUtil.floorDiv(calcMonths, 12));\n const newMonth = MathUtil.floorMod(calcMonths, 12) + 1;\n return LocalDate._resolvePreviousValid(newYear, newMonth, this._day);\n }\n\n /**\n * Returns a copy of this {@link LocalDate} with the specified period in weeks added.\n *\n * This method adds the specified amount in weeks to the days field incrementing\n * the month and year fields as necessary to ensure the result remains valid.\n * The result is only invalid if the maximum/minimum year is exceeded.\n *\n * For example, 2008-12-31 plus one week would result in 2009-01-07.\n *\n * @param {!number} weeksToAdd - the weeks to add, may be negative\n * @return {LocalDate} a {@link LocalDate} based on this date with the weeks added, not null\n * @throws {DateTimeException} if the result exceeds the supported date range\n */\n plusWeeks(weeksToAdd) {\n return this.plusDays(MathUtil.safeMultiply(weeksToAdd, 7));\n }\n\n\n /**\n * Returns a copy of this LocalDate with the specified number of days added.\n *\n * This method adds the specified amount to the days field incrementing the\n * month and year fields as necessary to ensure the result remains valid.\n * The result is only invalid if the maximum/minimum year is exceeded.\n *\n * For example, 2008-12-31 plus one day would result in 2009-01-01.\n *\n * @param {number} daysToAdd - the days to add, may be negative\n * @return {LocalDate} a LocalDate based on this date with the days added, not null\n * @throws AssertionError if the result exceeds the supported date range\n */\n plusDays(daysToAdd) {\n if (daysToAdd === 0) {\n return this;\n }\n const mjDay = MathUtil.safeAdd(this.toEpochDay(), daysToAdd);\n return LocalDate.ofEpochDay(mjDay);\n }\n\n /**\n * 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}.\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 * 1. Subtract the input years to the year field\n * 2. Check if the resulting date would be invalid\n * 3. Adjust the day-of-month to the last valid day if necessary\n *\n * For example, 2008-02-29 (leap year) minus one year would result in the\n * invalid date 2007-02-29 (standard year). Instead of returning an invalid\n * result, the last valid day of the month, 2007-02-28, is selected instead.\n *\n * @param {!number} yearsToSubtract - the years to subtract, may be negative\n * @return {LocalDate} a {@link LocalDate} based on this date with the years subtracted, not null\n * @throws {DateTimeException} if the result exceeds the supported date range\n */\n minusYears(yearsToSubtract) {\n return this.plusYears(yearsToSubtract * -1);\n }\n\n /**\n * Returns a copy of this {@link LocalDate} with the specified period in months subtracted.\n *\n * This method subtracts the specified amount from the months field in three steps:\n *\n * 1. Subtract the input months to the month-of-year field\n * 2. Check if the resulting date would be invalid\n * 3. Adjust the day-of-month to the last valid day if necessary\n *\n * For example, 2007-03-31 minus one month would result in the invalid date\n * 2007-02-31. Instead of returning an invalid result, the last valid day\n * of the month, 2007-02-28, is selected instead.\n *\n * @param {!number} monthsToSubtract - the months to subtract, may be negative\n * @return {LocalDate} a {@link LocalDate} based on this date with the months subtracted, not null\n * @throws {DateTimeException} if the result exceeds the supported date range\n */\n minusMonths(monthsToSubtract) {\n return this.plusMonths(monthsToSubtract * -1);\n }\n\n /**\n * Returns a copy of this {@link LocalDate} with the specified period in weeks subtracted.\n *\n * This method subtracts the specified amount in weeks from the days field decrementing\n * the month and year fields as necessary to ensure the result remains valid.\n * The result is only invalid if the maximum/minimum year is exceeded.\n *\n * For example, 2009-01-07 minus one week would result in 2008-12-31.\n *\n * @param {!number} weeksToSubtract - the weeks to subtract, may be negative\n * @return {LocalDate} a {@link LocalDate} based on this date with the weeks subtracted, not null\n * @throws {DateTimeException} if the result exceeds the supported date range\n */\n minusWeeks(weeksToSubtract) {\n return this.plusWeeks(weeksToSubtract * -1);\n }\n\n /*\n * Returns a copy of this LocalDate with the specified number of days subtracted.\n *\n * This method subtracts the specified amount from the days field decrementing the\n * month and year fields as necessary to ensure the result remains valid.\n * The result is only invalid if the maximum/minimum year is exceeded.\n *\n * For example, 2009-01-01 minus one day would result in 2008-12-31.\n *\n * @param {number} daysToSubtract - the days to subtract, may be negative\n * @return {LocalDate} a LocalDate based on this date with the days subtracted, not null\n * @throws AssertionError if the result exceeds the supported date range\n */\n minusDays(daysToSubtract) {\n return this.plusDays(daysToSubtract * -1);\n }\n\n /**\n * Queries this date using the specified query.\n *\n * This queries this date using the specified query strategy object.\n * The {@link TemporalQuery} object defines the logic to be used to\n * obtain the result. Read the documentation of the query to understand\n * what the result of this method will be.\n *\n * The result of this method is obtained by invoking the\n * {@link TemporalQuery#queryFrom} method on the\n * specified query passing `this` as the argument.\n *\n * @param {TemporalQuery} query - the query to invoke, not null\n * @return the query result, null may be returned (defined by the query)\n * @throws {DateTimeException} if unable to query (defined by the query)\n * @throws {ArithmeticException} if numeric overflow occurs (defined by the query)\n */\n query(query) {\n requireNonNull(query, 'query');\n if (query === TemporalQueries.localDate()) {\n return this;\n }\n return super.query(query);\n }\n\n /**\n * Adjusts the specified temporal object to have the same date as this object.\n *\n * This returns a temporal object of the same observable type as the input\n * with the date changed to be the same as this.\n *\n * The adjustment is equivalent to using {@link Temporal#with}\n * passing {@link ChronoField.EPOCH_DAY} as the field.\n *\n * In most cases, it is clearer to reverse the calling pattern by using\n * {@link Temporal#with}:\n *
\n * // these two lines are equivalent, but the second approach is recommended\n * temporal = thisLocalDate.adjustInto(temporal);\n * temporal = temporal.with(thisLocalDate);\n *\n *\n * @param {!TemporalAdjuster} temporal - the target object to be adjusted, not null\n * @return the adjusted object, not null\n * @throws {DateTimeException} if unable to make the adjustment\n * @throws {ArithmeticException} if numeric overflow occurs\n */\n adjustInto(temporal) {\n return super.adjustInto(temporal);\n }\n\n /**\n * function overloading for {@link LocalDate.until}\n *\n * called with 1 (or less) arguments {{@link LocalDate.until1}} is called\n * otherwise {@link LocalDate.until2}\n *\n * @param {!TemporalAccessor} p1\n * @param {TemporalUnit} p2 - not null if called with 2 arguments\n * @return {number|Period}\n */\n until(p1, p2){\n if(arguments.length < 2){\n return this.until1(p1);\n } else {\n return this.until2(p1, p2);\n }\n }\n\n /**\n * Calculates the period between this date and another date in\n * terms of the specified unit.\n *\n * This calculates the period between two dates in terms of a single unit.\n * The start and end points are `this` and the specified date.\n * The result will be negative if the end is before the start.\n * The {@link Temporal} passed to this method must be a {@link LocalDate}.\n * For example, the period in days between two dates can be calculated\n * using {@link startDate.until}.\n *\n * The calculation returns a whole number, representing the number of\n * complete units between the two dates.\n * For example, the period in months between 2012-06-15 and 2012-08-14\n * will only be one month as it is one day short of two months.\n *\n * This method operates in association with {@link TemporalUnit#between}.\n * The result of this method is a `long` representing the amount of\n * the specified unit. By contrast, the result of {@link between} is an\n * object that can be used directly in addition/subtraction:\n *
\n * long period = start.until(end, MONTHS); // this method\n * dateTime.plus(MONTHS.between(start, end)); // use in plus/minus\n *\n *\n * The calculation is implemented in this method for {@link ChronoUnit}.\n * The units {@link DAYS}, {@link WEEKS}, {@link MONTHS}, {@link YEARS},\n * {@link DECADES}, {@link CENTURIES}, {@link MILLENNIA} and {@link ERAS}\n * are supported. Other {@link ChronoUnit} values will throw an exception.\n *\n * If the unit is not a {@link ChronoUnit}, then the result of this method\n * is obtained by invoking {@link TemporalUnit.between}\n * passing `this` as the first argument and the input temporal as\n * the second argument.\n *\n * @param {!TemporalAccessor} endExclusive - the end date, which is converted to a {@link LocalDate}, not null\n * @param {!TemporalUnit} unit - the unit to measure the period in, not null\n * @return {number} the amount of the period between this date and the end date\n * @throws {DateTimeException} if the period cannot be calculated\n * @throws {ArithmeticException} if numeric overflow occurs\n */\n until2(endExclusive, unit) {\n const end = LocalDate.from(endExclusive);\n if (unit instanceof ChronoUnit) {\n switch (unit) {\n case ChronoUnit.DAYS: return this.daysUntil(end);\n case ChronoUnit.WEEKS: return MathUtil.intDiv(this.daysUntil(end), 7);\n case ChronoUnit.MONTHS: return this._monthsUntil(end);\n case ChronoUnit.YEARS: return MathUtil.intDiv(this._monthsUntil(end), 12);\n case ChronoUnit.DECADES: return MathUtil.intDiv(this._monthsUntil(end), 120);\n case ChronoUnit.CENTURIES: return MathUtil.intDiv(this._monthsUntil(end), 1200);\n case ChronoUnit.MILLENNIA: return MathUtil.intDiv(this._monthsUntil(end), 12000);\n case ChronoUnit.ERAS: return end.getLong(ChronoField.ERA) - this.getLong(ChronoField.ERA);\n }\n throw new UnsupportedTemporalTypeException('Unsupported unit: ' + unit);\n }\n return unit.between(this, end);\n }\n\n /**\n *\n * @param {!LocalDate} end\n * @returns {number}\n * @protected\n */\n daysUntil(end) {\n return end.toEpochDay() - this.toEpochDay(); // no overflow\n }\n\n /**\n *\n * @param {!LocalDate} end\n * @returns {number}\n * @private\n */\n _monthsUntil(end) {\n const packed1 = this._prolepticMonth() * 32 + this.dayOfMonth(); // no overflow\n const packed2 = end._prolepticMonth() * 32 + end.dayOfMonth(); // no overflow\n return MathUtil.intDiv((packed2 - packed1), 32);\n }\n\n /**\n * Calculates the period between this date and another date as a {@link Period}.\n *\n * This calculates the period between two dates in terms of years, months and days.\n * The start and end points are `this` and the specified date.\n * The result will be negative if the end is before the start.\n *\n * The calculation is performed using the ISO calendar system.\n * If necessary, the input date will be converted to ISO.\n *\n * The start date is included, but the end date is not.\n * The period is calculated by removing complete months, then calculating\n * the remaining number of days, adjusting to ensure that both have the same sign.\n * The number of months is then normalized into years and months based on a 12 month year.\n * A month is considered to be complete if the end day-of-month is greater\n * than or equal to the start day-of-month.\n * For example, from `2010-01-15` to `2011-03-18` is \"1 year, 2 months and 3 days\".\n *\n * The result of this method can be a negative period if the end is before the start.\n * The negative sign will be the same in each of year, month and day.\n *\n * There are two equivalent ways of using this method.\n * The first is to invoke this method.\n * The second is to use {@link Period#between}:\n *
\n * // these two lines are equivalent\n * period = start.until(end);\n * period = Period.between(start, end);\n *\n * The choice should be made based on which makes the code more readable.\n *\n * @param {!TemporalAccessor} endDate - the end date, exclusive, which may be in any chronology, not null\n * @return {Period} the period between this date and the end date, not null\n */\n until1(endDate) {\n const end = LocalDate.from(endDate);\n let totalMonths = end._prolepticMonth() - this._prolepticMonth(); // safe\n let days = end._day - this._day;\n if (totalMonths > 0 && days < 0) {\n totalMonths--;\n const calcDate = this.plusMonths(totalMonths);\n days = (end.toEpochDay() - calcDate.toEpochDay()); // safe\n } else if (totalMonths < 0 && days > 0) {\n totalMonths++;\n days -= end.lengthOfMonth();\n }\n const years = MathUtil.intDiv(totalMonths, 12); // safe\n const months = MathUtil.intMod(totalMonths, 12); // safe\n return Period.of(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}\n * followed by {@link LocalDateTime#atZone}.\n *\n * @param {!ZoneId} zone - the zone ID to use, not null\n * @return {ZonedDateTime} the zoned date-time formed from this date and the earliest valid time for the zone, not null\n */\n atStartOfDayWithZone(zone) {\n requireNonNull(zone, 'zone');\n let ldt = this.atTime(LocalTime.MIDNIGHT);\n // need to handle case where there is a gap from 11:30 to 00:30\n // standard ZDT factory would result in 01:00 rather than 00:30\n if (zone instanceof ZoneOffset === false) {\n const trans = zone.rules().transition(ldt);\n if (trans != null && trans.isGap()) {\n ldt = trans.dateTimeAfter();\n }\n }\n return ZonedDateTime.of(ldt, zone);\n }\n\n\n /**\n * Converts this date to the Epoch Day.\n *\n * The Epoch Day count is a simple incrementing count of days where day 0 is 1970-01-01 (ISO).\n * This definition is the same for all chronologies, enabling conversion.\n *\n * @return {number} the Epoch Day equivalent to this date\n */\n toEpochDay() {\n const y = this._year;\n const m = this._month;\n let total = 0;\n total += 365 * y;\n if (y >= 0) {\n total += MathUtil.intDiv(y + 3, 4) - MathUtil.intDiv(y + 99, 100) + MathUtil.intDiv(y + 399, 400);\n } else {\n total -= MathUtil.intDiv(y, -4) - MathUtil.intDiv(y, -100) + MathUtil.intDiv(y, -400);\n }\n total += MathUtil.intDiv(367 * m - 362, 12);\n total += this.dayOfMonth() - 1;\n if (m > 2) {\n total--;\n if (!IsoChronology.isLeapYear(y)) {\n total--;\n }\n }\n return total - DAYS_0000_TO_1970;\n }\n\n /**\n * Compares this date to another date.\n *\n * The comparison is primarily based on the date, from earliest to latest.\n * It is \"consistent with equals\", as defined by {@link Comparable}.\n *\n * If all the dates being compared are instances of {@link LocalDate},\n * then the comparison will be entirely based on the date.\n * If some dates being compared are in different chronologies, then the\n * chronology is also considered, see {@link ChronoLocalDate.compareTo}.\n *\n * @param {!LocalDate} other - the other date to compare to, not null\n * @return {number} the comparator value, negative if less, positive if greater\n */\n compareTo(other) {\n requireNonNull(other, 'other');\n requireInstance(other, LocalDate, 'other');\n return this._compareTo0(other);\n // return super.compareTo(other); if not instanceof LocalDate\n }\n\n /**\n *\n * @param {!LocalDate} otherDate\n * @returns {number}\n * @private\n */\n _compareTo0(otherDate) {\n let cmp = (this._year - otherDate._year);\n if (cmp === 0) {\n cmp = (this._month - otherDate._month);\n if (cmp === 0) {\n cmp = (this._day - otherDate._day);\n }\n }\n return cmp;\n }\n\n /**\n * Checks if this date is after the specified date.\n *\n * This checks to see if this date represents a point on the\n * local time-line after the other date.\n *
\n * LocalDate a = LocalDate.of(2012, 6, 30);\n * LocalDate b = LocalDate.of(2012, 7, 1);\n * a.isAfter(b) == false\n * a.isAfter(a) == false\n * b.isAfter(a) == true\n *\n *\n * This method only considers the position of the two dates on the local time-line.\n * It does not take into account the chronology, or calendar system.\n * This is different from the comparison in {@link compareTo},\n * but is the same approach as {@link DATE_COMPARATOR}.\n *\n * @param {!LocalDate} other - the other date to compare to, not null\n * @return {boolean} true if this date is after the specified date\n */\n isAfter(other) {\n return this.compareTo(other) > 0;\n // return super.isAfter(other) if not instanceof LocalDate\n }\n\n /**\n * Checks if this date is before the specified date.\n *\n * This checks to see if this date represents a point on the\n * local time-line before the other date.\n *
\n * LocalDate a = LocalDate.of(2012, 6, 30);\n * LocalDate b = LocalDate.of(2012, 7, 1);\n * a.isBefore(b) == true\n * a.isBefore(a) == false\n * b.isBefore(a) == false\n *\n *\n * This method only considers the position of the two dates on the local time-line.\n * It does not take into account the chronology, or calendar system.\n * This is different from the comparison in {@link compareTo},\n * but is the same approach as {@link DATE_COMPARATOR}.\n *\n * @param {!LocalDate} other - the other date to compare to, not null\n * @return {boolean} true if this date is before the specified date\n */\n isBefore(other) {\n return this.compareTo(other) < 0;\n // return super.isBefore(other) if not instanceof LocalDate\n }\n\n /**\n * Checks if this date is equal to the specified date.\n *\n * This checks to see if this date represents the same point on the\n * local time-line as the other date.\n *
\n * LocalDate a = LocalDate.of(2012, 6, 30);\n * LocalDate b = LocalDate.of(2012, 7, 1);\n * a.isEqual(b) == false\n * a.isEqual(a) == true\n * b.isEqual(a) == false\n *\n *\n * This method only considers the position of the two dates on the local time-line.\n * It does not take into account the chronology, or calendar system.\n * This is different from the comparison in {@link compareTo}\n * but is the same approach as {@link DATE_COMPARATOR}.\n *\n * @param {!LocalDate} other - the other date to compare to, not null\n * @return {boolean} true if this date is equal to the specified date\n */\n isEqual(other) {\n return this.compareTo(other) === 0;\n // return super.isEqual(other) if not instanceof LocalDate\n }\n\n /**\n * Checks if this date is equal to another date.\n *\n * Compares this LocalDate with another ensuring that the date is the same.\n *\n * Only objects of type LocalDate are compared, other types return false.\n *\n * @param {*} 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 const yearValue = this._year;\n const monthValue = this._month;\n const 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 let dayString, monthString, yearString;\n\n const yearValue = this._year;\n const monthValue = this._month;\n const dayValue = this._day;\n\n const absYear = Math.abs(yearValue);\n\n if (absYear < 1000) {\n if (yearValue < 0) {\n yearString = '-' + ('' + (yearValue - 10000)).slice(-4);\n } else {\n yearString = ('' + (yearValue + 10000)).slice(-4);\n }\n } else {\n if (yearValue > 9999) {\n yearString = '+' + yearValue;\n } else {\n yearString = '' + yearValue;\n }\n }\n\n if (monthValue < 10) {\n monthString = '-0' + monthValue;\n } else {\n monthString = '-' + monthValue;\n }\n\n if (dayValue < 10) {\n dayString = '-0' + dayValue;\n } else {\n dayString = '-' + dayValue;\n }\n\n return yearString + monthString + dayString;\n }\n\n /**\n *\n * @return {string} same as {@link LocalDate.toString}\n */\n toJSON() {\n return this.toString();\n }\n\n /**\n * Outputs this date as a string using the formatter.\n *\n * @param {DateTimeFormatter} formatter the formatter to use, not null\n * @return {String} the formatted date string, not null\n * @throws DateTimeException if an error occurs during printing\n */\n format(formatter) {\n requireNonNull(formatter, 'formatter');\n requireInstance(formatter, DateTimeFormatter, 'formatter');\n return super.format(formatter);\n }\n}\n\nexport function _init() {\n /**\n * The minimum supported {@link LocalDate}\n * This could be used by an application as a \"far past\" date.\n */\n LocalDate.MIN = LocalDate.of(YearConstants.MIN_VALUE, 1, 1);\n /**\n * The maximum supported {@link LocalDate}\n * This could be used by an application as a \"far future\" date.\n */\n LocalDate.MAX = LocalDate.of(YearConstants.MAX_VALUE, 12, 31);\n /**\n * The date at epoch day 0, that is 1970-01-01.\n */\n LocalDate.EPOCH_0 = LocalDate.ofEpochDay(0);\n\n LocalDate.FROM = createTemporalQuery('LocalDate.FROM', (temporal) => {\n return LocalDate.from(temporal);\n });\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/LocalDate.js","/**\n * @copyright (c) 2016, Philipp Thürwächter & Pattrick Hüper\n * @copyright (c) 2007-present, Stephen Colebourne & Michael Nascimento Santos\n * @license BSD-3-Clause (see LICENSE in the root directory of this source tree)\n */\n\nimport {Enum} from '../Enum';\nimport {requireNonNull} from '../assert';\nimport {DateTimeException} from '../errors';\nimport {MathUtil} from '../MathUtil';\n\nimport {DayOfWeek} from '../DayOfWeek';\nimport {LocalDate} from '../LocalDate';\nimport {Month} from '../Month';\nimport {Year} from '../Year';\n\nimport {ChronoField} from '../temporal/ChronoField';\nimport {ResolverStyle} from '../format/ResolverStyle';\nimport {TemporalAdjusters} from '../temporal/TemporalAdjusters';\n\nexport class IsoChronology extends Enum{\n /**\n * Checks if the year is a leap year, according to the ISO proleptic\n * calendar system rules.\n *\n * This method applies the current rules for leap years across the whole time-line.\n * In general, a year is a leap year if it is divisible by four without\n * remainder. However, years divisible by 100, are not leap years, with\n * the exception of years divisible by 400 which are.\n *\n * For example, 1904 is a leap year it is divisible by 4.\n * 1900 was not a leap year as it is divisible by 100, however 2000 was a\n * leap year as it is divisible by 400.\n *\n * The calculation is proleptic - applying the same rules into the far future and far past.\n * This is historically inaccurate, but is correct for the ISO-8601 standard.\n *\n * @param {number} prolepticYear - the ISO proleptic year to check\n * @return {boolean} true if the year is leap, false otherwise\n */\n static isLeapYear(prolepticYear) {\n return ((prolepticYear & 3) === 0) && ((prolepticYear % 100) !== 0 || (prolepticYear % 400) === 0);\n }\n\n /**\n * Updates the map of field-values during resolution.\n *\n * @param {EnumMap} fieldValues the fieldValues map to update, not null\n * @param {ChronoField} field the field to update, not null\n * @param {number} value the value to update, not null\n * @throws DateTimeException if a conflict occurs\n */\n _updateResolveMap(fieldValues, field, value) {\n // TODO: this function is in Chronology in threetenbp, maybe needs to be moved?\n requireNonNull(fieldValues, 'fieldValues');\n requireNonNull(field, 'field');\n 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 let prolepticMonth = fieldValues.remove(ChronoField.PROLEPTIC_MONTH);\n if (prolepticMonth != null) {\n if (resolverStyle !== ResolverStyle.LENIENT) {\n ChronoField.PROLEPTIC_MONTH.checkValidValue(prolepticMonth);\n }\n this._updateResolveMap(fieldValues, ChronoField.MONTH_OF_YEAR, MathUtil.floorMod(prolepticMonth, 12) + 1);\n this._updateResolveMap(fieldValues, ChronoField.YEAR, MathUtil.floorDiv(prolepticMonth, 12));\n }\n\n // eras\n 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 const y = ChronoField.YEAR.checkValidIntValue(fieldValues.remove(ChronoField.YEAR));\n const moy = fieldValues.remove(ChronoField.MONTH_OF_YEAR);\n let dom = fieldValues.remove(ChronoField.DAY_OF_MONTH);\n if (resolverStyle === ResolverStyle.LENIENT) {\n const months = moy - 1;\n const days = dom - 1;\n return LocalDate.of(y, 1, 1).plusMonths(months).plusDays(days);\n } else if (resolverStyle === ResolverStyle.SMART){\n ChronoField.DAY_OF_MONTH.checkValidValue(dom);\n if (moy === 4 || moy === 6 || moy === 9 || moy === 11) {\n dom = Math.min(dom, 30);\n } else if (moy === 2) {\n dom = Math.min(dom, Month.FEBRUARY.length(Year.isLeap(y)));\n }\n return LocalDate.of(y, moy, dom);\n } else {\n return LocalDate.of(y, moy, dom);\n }\n }\n/*\n if (fieldValues.containsKey(ALIGNED_WEEK_OF_MONTH)) {\n if (fieldValues.containsKey(ALIGNED_DAY_OF_WEEK_IN_MONTH)) {\n int y = ChronoField.YEAR.checkValidIntValue(fieldValues.remove(ChronoField.YEAR));\n if (resolverStyle == ResolverStyle.LENIENT) {\n long months = Jdk8Methods.safeSubtract(fieldValues.remove(ChronoField.MONTH_OF_YEAR), 1);\n long weeks = Jdk8Methods.safeSubtract(fieldValues.remove(ALIGNED_WEEK_OF_MONTH), 1);\n long days = Jdk8Methods.safeSubtract(fieldValues.remove(ALIGNED_DAY_OF_WEEK_IN_MONTH), 1);\n return LocalDate.of(y, 1, 1).plusMonths(months).plusWeeks(weeks).plusDays(days);\n }\n int moy = ChronoField.MONTH_OF_YEAR.checkValidIntValue(fieldValues.remove(ChronoField.MONTH_OF_YEAR));\n int aw = ALIGNED_WEEK_OF_MONTH.checkValidIntValue(fieldValues.remove(ALIGNED_WEEK_OF_MONTH));\n int ad = ALIGNED_DAY_OF_WEEK_IN_MONTH.checkValidIntValue(fieldValues.remove(ALIGNED_DAY_OF_WEEK_IN_MONTH));\n LocalDate date = LocalDate.of(y, moy, 1).plusDays((aw - 1) * 7 + (ad - 1));\n if (resolverStyle == ResolverStyle.STRICT && date.get(ChronoField.MONTH_OF_YEAR) != moy) {\n throw new DateTimeException(\"Strict mode rejected date parsed to a different month\");\n }\n return date;\n }\n if (fieldValues.containsKey(DAY_OF_WEEK)) {\n int y = ChronoField.YEAR.checkValidIntValue(fieldValues.remove(ChronoField.YEAR));\n if (resolverStyle == ResolverStyle.LENIENT) {\n long months = Jdk8Methods.safeSubtract(fieldValues.remove(ChronoField.MONTH_OF_YEAR), 1);\n long weeks = Jdk8Methods.safeSubtract(fieldValues.remove(ALIGNED_WEEK_OF_MONTH), 1);\n long days = Jdk8Methods.safeSubtract(fieldValues.remove(DAY_OF_WEEK), 1);\n return LocalDate.of(y, 1, 1).plusMonths(months).plusWeeks(weeks).plusDays(days);\n }\n int moy = ChronoField.MONTH_OF_YEAR.checkValidIntValue(fieldValues.remove(ChronoField.MONTH_OF_YEAR));\n int aw = ALIGNED_WEEK_OF_MONTH.checkValidIntValue(fieldValues.remove(ALIGNED_WEEK_OF_MONTH));\n int dow = DAY_OF_WEEK.checkValidIntValue(fieldValues.remove(DAY_OF_WEEK));\n LocalDate date = LocalDate.of(y, moy, 1).plusWeeks(aw - 1).with(nextOrSame(DayOfWeek.of(dow)));\n if (resolverStyle == ResolverStyle.STRICT && date.get(ChronoField.MONTH_OF_YEAR) != moy) {\n throw new DateTimeException(\"Strict mode rejected date parsed to a different month\");\n }\n return date;\n }\n }\n*/\n }\n if (fieldValues.containsKey(ChronoField.DAY_OF_YEAR)) {\n const y = ChronoField.YEAR.checkValidIntValue(fieldValues.remove(ChronoField.YEAR));\n if (resolverStyle === ResolverStyle.LENIENT) {\n const days = MathUtil.safeSubtract(fieldValues.remove(ChronoField.DAY_OF_YEAR), 1);\n return LocalDate.ofYearDay(y, 1).plusDays(days);\n }\n const doy = ChronoField.DAY_OF_YEAR.checkValidIntValue(fieldValues.remove(ChronoField.DAY_OF_YEAR));\n return LocalDate.ofYearDay(y, doy);\n }\n if (fieldValues.containsKey(ChronoField.ALIGNED_WEEK_OF_YEAR)) {\n if (fieldValues.containsKey(ChronoField.ALIGNED_DAY_OF_WEEK_IN_YEAR)) {\n const y = ChronoField.YEAR.checkValidIntValue(fieldValues.remove(ChronoField.YEAR));\n if (resolverStyle === ResolverStyle.LENIENT) {\n const weeks = MathUtil.safeSubtract(fieldValues.remove(ChronoField.ALIGNED_WEEK_OF_YEAR), 1);\n const days = MathUtil.safeSubtract(fieldValues.remove(ChronoField.ALIGNED_DAY_OF_WEEK_IN_YEAR), 1);\n return LocalDate.of(y, 1, 1).plusWeeks(weeks).plusDays(days);\n }\n const aw = ChronoField.ALIGNED_WEEK_OF_YEAR.checkValidIntValue(fieldValues.remove(ChronoField.ALIGNED_WEEK_OF_YEAR));\n const ad = ChronoField.ALIGNED_DAY_OF_WEEK_IN_YEAR.checkValidIntValue(fieldValues.remove(ChronoField.ALIGNED_DAY_OF_WEEK_IN_YEAR));\n const date = LocalDate.of(y, 1, 1).plusDays((aw - 1) * 7 + (ad - 1));\n if (resolverStyle === ResolverStyle.STRICT && date.get(ChronoField.YEAR) !== y) {\n throw new DateTimeException('Strict mode rejected date parsed to a different year');\n }\n return date;\n }\n if (fieldValues.containsKey(ChronoField.DAY_OF_WEEK)) {\n const y = ChronoField.YEAR.checkValidIntValue(fieldValues.remove(ChronoField.YEAR));\n if (resolverStyle === ResolverStyle.LENIENT) {\n const weeks = MathUtil.safeSubtract(fieldValues.remove(ChronoField.ALIGNED_WEEK_OF_YEAR), 1);\n const days = MathUtil.safeSubtract(fieldValues.remove(ChronoField.DAY_OF_WEEK), 1);\n return LocalDate.of(y, 1, 1).plusWeeks(weeks).plusDays(days);\n }\n const aw = ChronoField.ALIGNED_WEEK_OF_YEAR.checkValidIntValue(fieldValues.remove(ChronoField.ALIGNED_WEEK_OF_YEAR));\n const dow = ChronoField.DAY_OF_WEEK.checkValidIntValue(fieldValues.remove(ChronoField.DAY_OF_WEEK));\n const date = LocalDate.of(y, 1, 1).plusWeeks(aw - 1).with(TemporalAdjusters.nextOrSame(DayOfWeek.of(dow)));\n if (resolverStyle === ResolverStyle.STRICT && date.get(ChronoField.YEAR) !== y) {\n throw new DateTimeException('Strict mode rejected date parsed to a different month');\n }\n return date;\n }\n }\n }\n return null;\n }\n\n}\n\nexport function _init() {\n IsoChronology.INSTANCE = new IsoChronology('IsoChronology');\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/chrono/IsoChronology.js","/**\n * @copyright (c) 2016, Philipp Thürwächter & Pattrick Hüper\n * @license BSD-3-Clause (see LICENSE in the root directory of this source tree)\n */\n/***\n * Base class for a pseudo enum\n */\nexport class Enum {\n constructor(name){\n this._name = name;\n }\n\n equals(other){\n return this === other;\n }\n\n toString() {\n return this._name;\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/Enum.js","/*\n * @copyright (c) 2016, Philipp Thürwächter & Pattrick Hüper\n * @copyright (c) 2007-present, Stephen Colebourne & Michael Nascimento Santos\n * @license BSD-3-Clause (see LICENSE in the root directory of this source tree)\n */\n\nimport {DateTimeException, UnsupportedTemporalTypeException, NullPointerException} from './errors';\nimport {MathUtil} from './MathUtil';\nimport {assert, requireNonNull} from './assert';\n\nimport {ChronoField} from './temporal/ChronoField';\nimport {ChronoUnit} from './temporal/ChronoUnit';\nimport {IllegalArgumentException} from './errors';\nimport {Temporal} from './temporal/Temporal';\nimport {TemporalQueries} from './temporal/TemporalQueries';\nimport {createTemporalQuery} from './temporal/TemporalQuery';\n\n/**\n * ### Static properties of Class {@link DayOfWeek}\n *\n * DayOfWeek.MONDAY,\n * DayOfWeek.TUESDAY,\n * DayOfWeek.WEDNESDAY,\n * DayOfWeek.THURSDAY,\n * DayOfWeek.FRIDAY,\n * DayOfWeek.SATURDAY,\n * DayOfWeek.SUNDAY\n *\n */\nexport class DayOfWeek extends 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 let ordinal = 0;\n for(ordinal; ordinal < ENUMS.length; ordinal++){\n if(ENUMS[ordinal].name() === name){\n break;\n }\n }\n return DayOfWeek.of(ordinal+1);\n }\n\n /**\n * Obtains an instance of {@link DayOfWeek} from an `int` value.\n *\n * {@link DayOfWeek} is an enum representing the 7 days of the week.\n * This factory allows the enum to be obtained from the `int` value.\n * The `int` value follows the ISO-8601 standard, from 1 (Monday) to 7 (Sunday).\n *\n * @param {!number} dayOfWeek the day-of-week to represent, from 1 (Monday) to 7 (Sunday)\n * @return {DayOfWeek} the day-of-week singleton, not null\n * @throws DateTimeException if the day-of-week is invalid\n */\n static of(dayOfWeek) {\n if (dayOfWeek < 1 || dayOfWeek > 7) {\n throw new DateTimeException('Invalid value for DayOfWeek: ' + dayOfWeek);\n }\n return ENUMS[dayOfWeek - 1];\n }\n\n /**\n * Obtains an instance of {@link DayOfWeek} from a temporal object.\n *\n * A {@link TemporalAccessor} represents some form of date and time information.\n * This factory converts the arbitrary temporal object to an instance of {@link DayOfWeek}.\n *\n * The conversion extracts the {@link ChronoField#DAY_OF_WEEK} field.\n *\n * This method matches the signature of the functional interface {@link TemporalQuery}\n * allowing it to be used as a query via method reference, {@link DayOfWeek::from}.\n *\n * @param {TemporalAccessor} temporal - the temporal object to convert, not null\n * @return {DayOfWeek} the day-of-week, not null\n * @throws DateTimeException if unable to convert to a {@link DayOfWeek}\n */\n static from(temporal) {\n assert(temporal != null, 'temporal', NullPointerException);\n if (temporal instanceof DayOfWeek) {\n return temporal;\n }\n try {\n return DayOfWeek.of(temporal.get(ChronoField.DAY_OF_WEEK));\n } catch (ex) {\n if(ex instanceof DateTimeException) {\n throw new DateTimeException('Unable to obtain DayOfWeek from TemporalAccessor: ' +\n temporal + ', type ' + (temporal.constructor != null ? temporal.constructor.name : ''), ex);\n } else {\n throw ex;\n }\n }\n }\n\n /**\n * Gets the day-of-week `int` value.\n *\n * The values are numbered following the ISO-8601 standard, from 1 (Monday) to 7 (Sunday).\n * See {@link WeekFields#dayOfWeek} for localized week-numbering.\n *\n * @return {number} the day-of-week, from 1 (Monday) to 7 (Sunday)\n */\n value() {\n return this._ordinal + 1;\n }\n\n /**\n * Gets the textual representation, such as 'Mon' or 'Friday'.\n *\n * This returns the textual name used to identify the day-of-week.\n * The parameters control the length of the returned text and the locale.\n *\n * If no textual mapping is found then the numeric value (see {@link getValue}) is returned.\n *\n * @param {TextStyle} style - the length of the text required, not null\n * @param {Locale} locale - the locale to use, not null\n * @return {string} the text value of the day-of-week, not null\n */\n // eslint-disable-next-line no-unused-vars\n getDisplayName(style, locale) {\n throw new IllegalArgumentException('Pattern using (localized) text not implemented yet!');\n // return new DateTimeFormatterBuilder().appendText(ChronoField.DAY_OF_WEEK, style).toFormatter(locale).format(this);\n }\n\n /**\n * Checks if the specified field is supported.\n *\n * This checks if this day-of-week can be queried for the specified field.\n * If false, then calling the {@link range} and\n * {@link get} methods will throw an exception.\n *\n * If the field is {@link ChronoField#DAY_OF_WEEK} then\n * this method returns true.\n * All other {@link ChronoField} instances will return false.\n *\n * If the field is not a {@link ChronoField}, then the result of this method\n * is obtained by invoking `TemporalField.isSupportedBy(TemporalAccessor)`\n * passing `this` as the argument.\n * Whether the field is supported is determined by the field.\n *\n * @param {TemporalField} field - the field to check, null returns false\n * @return {boolean} true if the field is supported on this day-of-week, false if not\n */\n isSupported(field) {\n if (field instanceof ChronoField) {\n return field === ChronoField.DAY_OF_WEEK;\n }\n return field != null && field.isSupportedBy(this);\n }\n\n /**\n * Gets the range of valid values for the specified field.\n *\n * The range object expresses the minimum and maximum valid values for a field.\n * This day-of-week is used to enhance the accuracy of the returned range.\n * If it is not possible to return the range, because the field is not supported\n * or for some other reason, an exception is thrown.\n *\n * If the field is {@link ChronoField#DAY_OF_WEEK} then the\n * range of the day-of-week, from 1 to 7, will be returned.\n * All other {@link ChronoField} instances will throw a {@link DateTimeException}.\n *\n * If the field is not a {@link ChronoField}, then the result of this method\n * is obtained by invoking `TemporalField.rangeRefinedBy(TemporalAccessor)`\n * passing `this` as the argument.\n * Whether the range can be obtained is determined by the field.\n *\n * @param {TemporalField} field - the field to query the range for, not null\n * @return {ValueRange} the range of valid values for the field, not null\n * @throws DateTimeException if the range for the field cannot be obtained\n */\n range(field) {\n if (field === ChronoField.DAY_OF_WEEK) {\n return field.range();\n } else if (field instanceof ChronoField) {\n throw new UnsupportedTemporalTypeException('Unsupported field: ' + field);\n }\n return field.rangeRefinedBy(this);\n }\n\n /**\n * Gets the value of the specified field from this day-of-week as an `int`.\n *\n * This queries this day-of-week for the value for the specified field.\n * The returned value will always be within the valid range of values for the field.\n * If it is not possible to return the value, because the field is not supported\n * or for some other reason, an exception is thrown.\n *\n * If the field is {@link ChronoField#DAY_OF_WEEK} then the\n * value of the day-of-week, from 1 to 7, will be returned.\n * All other {@link ChronoField} instances will throw a {@link DateTimeException}.\n *\n * If the field is not a {@link ChronoField}, then the result of this method\n * is obtained by invoking {@link TemporalField.getFrom}\n * passing `this` as the argument. Whether the value can be obtained,\n * and what the value represents, is determined by the field.\n *\n * @param {TemporalField} field - the field to get, not null\n * @return {number} the value for the field, within the valid range of values\n * @throws DateTimeException if a value for the field cannot be obtained\n * @throws DateTimeException if the range of valid values for the field exceeds an `int`\n * @throws DateTimeException if the value is outside the range of valid values for the field\n * @throws ArithmeticException if numeric overflow occurs\n */\n get(field) {\n if (field === ChronoField.DAY_OF_WEEK) {\n return this.value();\n }\n return this.range(field).checkValidIntValue(this.getLong(field), field);\n }\n\n /**\n * Gets the value of the specified field from this day-of-week as a `long`.\n *\n * This queries this day-of-week for the value for the specified field.\n * If it is not possible to return the value, because the field is not supported\n * or for some other reason, an exception is thrown.\n *\n * If the field is {@link ChronoField#DAY_OF_WEEK} then the\n * value of the day-of-week, from 1 to 7, will be returned.\n * All other {@link ChronoField} instances will throw a {@link DateTimeException}.\n *\n * If the field is not a {@link ChronoField}, then the result of this method\n * is obtained by invoking {@link TemporalField.getFrom}\n * passing `this` as the argument. Whether the value can be obtained,\n * and what the value represents, is determined by the field.\n *\n * @param {TemporalField} field - the field to get, not null\n * @return {number} the value for the field\n * @throws DateTimeException if a value for the field cannot be obtained\n * @throws ArithmeticException if numeric overflow occurs\n */\n getLong(field) {\n if (field === ChronoField.DAY_OF_WEEK) {\n return this.value();\n } else if (field instanceof ChronoField) {\n throw new UnsupportedTemporalTypeException('Unsupported field: ' + field);\n }\n return field.getFrom(this);\n }\n\n //-----------------------------------------------------------------------\n /**\n * Returns the day-of-week that is the specified number of days after this one.\n *\n * The calculation rolls around the end of the week from Sunday to Monday.\n * The specified period may be negative.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {number} days - the days to add, positive or negative\n * @return {DayOfWeek} the resulting day-of-week, not null\n */\n plus(days) {\n const amount = MathUtil.floorMod(days, 7);\n return ENUMS[MathUtil.floorMod(this._ordinal + (amount + 7), 7)];\n }\n\n /**\n * Returns the day-of-week that is the specified number of days before this one.\n *\n * The calculation rolls around the start of the year from Monday to Sunday.\n * The specified period may be negative.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {number} days - the days to subtract, positive or negative\n * @return {DayOfWeek} the resulting day-of-week, not null\n */\n minus(days) {\n return this.plus(-1 * MathUtil.floorMod(days, 7));\n }\n\n //-----------------------------------------------------------------------\n /**\n * Queries this day-of-week using the specified query.\n *\n * This queries this day-of-week using the specified query strategy object.\n * The {@link TemporalQuery} object defines the logic to be used to\n * obtain the result. Read the documentation of the query to understand\n * what the result of this method will be.\n *\n * The result of this method is obtained by invoking the\n * {@link TemporalQuery#queryFrom} method on the\n * specified query passing `this` as the argument.\n *\n * @param {TemporalQuery} query the query to invoke, not null\n * @return {*} the query result, null may be returned (defined by the query)\n * @throws DateTimeException if unable to query (defined by the query)\n * @throws ArithmeticException if numeric overflow occurs (defined by the query)\n */\n query(query) {\n if (query === TemporalQueries.precision()) {\n return ChronoUnit.DAYS;\n } else if (query === TemporalQueries.localDate() || query === TemporalQueries.localTime() || query === TemporalQueries.chronology() ||\n query === TemporalQueries.zone() || query === TemporalQueries.zoneId() || query === TemporalQueries.offset()) {\n return null;\n }\n assert(query != null, 'query', NullPointerException);\n return query.queryFrom(this);\n }\n\n /**\n * Adjusts the specified temporal object to have this day-of-week.\n *\n * This returns a temporal object of the same observable type as the input\n * with the day-of-week changed to be the same as this.\n *\n * The adjustment is equivalent to using {@link Temporal#with}\n * passing {@link ChronoField#DAY_OF_WEEK} as the field.\n * Note that this adjusts forwards or backwards within a Monday to Sunday week.\n * See {@link WeekFields#dayOfWeek} for localized week start days.\n * See {@link TemporalAdjusters} for other adjusters\n * with more control, such as `next(MONDAY)`.\n *\n * In most cases, it is clearer to reverse the calling pattern by using\n * {@link Temporal#with}:\n *
\n * // these two lines are equivalent, but the second approach is recommended\n * temporal = thisDayOfWeek.adjustInto(temporal);\n * temporal = temporal.with(thisDayOfWeek);\n *\n *\n * For example, given a date that is a Wednesday, the following are output:\n *
\n * dateOnWed.with(MONDAY); // two days earlier\n * dateOnWed.with(TUESDAY); // one day earlier\n * dateOnWed.with(WEDNESDAY); // same date\n * dateOnWed.with(THURSDAY); // one day later\n * dateOnWed.with(FRIDAY); // two days later\n * dateOnWed.with(SATURDAY); // three days later\n * dateOnWed.with(SUNDAY); // four days later\n *\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {TemporalAdjusters} temporal the target object to be adjusted, not null\n * @return {Temporal} the adjusted object, not null\n * @throws DateTimeException if unable to make the adjustment\n * @throws ArithmeticException if numeric overflow occurs\n */\n adjustInto(temporal) {\n requireNonNull(temporal, 'temporal');\n return temporal.with(ChronoField.DAY_OF_WEEK, this.value());\n }\n\n /**\n *\n * @returns {boolean}\n */\n equals(other){\n return this === other;\n }\n\n /**\n *\n * @returns {string}\n */\n toString(){\n return this._name;\n }\n}\n\nlet ENUMS;\n\nexport function _init() {\n DayOfWeek.MONDAY = new DayOfWeek(0, 'MONDAY');\n DayOfWeek.TUESDAY = new DayOfWeek(1, 'TUESDAY');\n DayOfWeek.WEDNESDAY = new DayOfWeek(2, 'WEDNESDAY');\n DayOfWeek.THURSDAY = new DayOfWeek(3, 'THURSDAY');\n DayOfWeek.FRIDAY = new DayOfWeek(4, 'FRIDAY');\n DayOfWeek.SATURDAY = new DayOfWeek(5, 'SATURDAY');\n DayOfWeek.SUNDAY = new DayOfWeek(6, 'SUNDAY');\n\n DayOfWeek.FROM = createTemporalQuery('DayOfWeek.FROM', (temporal) => {\n return DayOfWeek.from(temporal);\n });\n\n ENUMS = [\n DayOfWeek.MONDAY,\n DayOfWeek.TUESDAY,\n DayOfWeek.WEDNESDAY,\n DayOfWeek.THURSDAY,\n DayOfWeek.FRIDAY,\n DayOfWeek.SATURDAY,\n DayOfWeek.SUNDAY\n ];\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/DayOfWeek.js","/**\n * @copyright (c) 2016, Philipp Thürwächter & Pattrick Hüper\n * @copyright (c) 2007-present, Stephen Colebourne & Michael Nascimento Santos\n * @license BSD-3-Clause (see LICENSE in the root directory of this source tree)\n */\n\nimport {MAX_SAFE_INTEGER, MIN_SAFE_INTEGER} from '../MathUtil';\n\nimport {ChronoUnit} from './ChronoUnit';\nimport {TemporalField} from './TemporalField';\nimport {ValueRange} from './ValueRange';\nimport {YearConstants} from '../YearConstants';\n\n/**\n * A standard set of fields.\n *\n * This set of fields provide field-based access to manipulate a date, time or date-time.\n * The standard set of fields can be extended by implementing {@link TemporalField}.\n *\n * These fields are intended to be applicable in multiple calendar systems.\n * For example, most non-ISO calendar systems define dates as a year, month and day,\n * just with slightly different rules.\n * The documentation of each field explains how it operates.\n * \n * ### Static properties of Class {@link ChronoField}\n * \n * ChronoField.NANO_OF_SECOND\n *\n * ChronoField.NANO_OF_DAY\n *\n * ChronoField.MICRO_OF_SECOND\n *\n * ChronoField.MICRO_OF_DAY\n *\n * ChronoField.MILLI_OF_SECOND\n *\n * ChronoField.MILLI_OF_DAY\n *\n * ChronoField.SECOND_OF_MINUTE\n *\n * ChronoField.SECOND_OF_DAY\n *\n * ChronoField.MINUTE_OF_HOUR\n *\n * ChronoField.MINUTE_OF_DAY\n *\n * ChronoField.HOUR_OF_AMPM\n *\n * ChronoField.CLOCK_HOUR_OF_AMPM\n *\n * ChronoField.HOUR_OF_DAY\n *\n * ChronoField.CLOCK_HOUR_OF_DAY\n *\n * ChronoField.AMPM_OF_DAY\n *\n * ChronoField.DAY_OF_WEEK\n *\n * ChronoField.ALIGNED_DAY_OF_WEEK_IN_MONTH\n *\n * ChronoField.ALIGNED_DAY_OF_WEEK_IN_YEAR\n *\n * ChronoField.DAY_OF_MONTH\n *\n * ChronoField.DAY_OF_YEAR\n *\n * ChronoField.EPOCH_DAY\n *\n * ChronoField.ALIGNED_WEEK_OF_MONTH\n *\n * ChronoField.ALIGNED_WEEK_OF_YEAR\n *\n * ChronoField.MONTH_OF_YEAR\n *\n * ChronoField.PROLEPTIC_MONTH\n *\n * ChronoField.YEAR_OF_ERA\n *\n * ChronoField.YEAR\n *\n * ChronoField.ERA\n *\n * ChronoField.INSTANT_SECONDS\n *\n * ChronoField.OFFSET_SECONDS\n *\n */\nexport class ChronoField extends TemporalField {\n \n /**\n * helper function to get one of the static ChronoField defines by name, needed to resolve ChronoField from EnumMap\n *\n * @param {String} fieldName\n * @return {ChronoField | null}\n */\n static byName(fieldName) {\n for (let prop in ChronoField) {\n if (ChronoField.hasOwnProperty(prop)) {\n if ((ChronoField[prop] instanceof ChronoField) && ChronoField[prop].name() === fieldName) {\n return ChronoField[prop];\n }\n }\n }\n }\n\n /**\n *\n * @param {!string} name\n * @param {!number} baseUnit\n * @param {!number} rangeUnit\n * @param {!ValueRange} range\n */\n constructor(name, baseUnit, rangeUnit, range) {\n super();\n this._name = name;\n this._baseUnit = baseUnit;\n this._rangeUnit = rangeUnit;\n this._range = range;\n }\n\n /**\n *\n * @returns {string}\n */\n name(){\n return this._name; \n }\n\n /**\n *\n * @returns {!number}\n */\n baseUnit(){\n return this._baseUnit; \n }\n\n /**\n *\n * @returns {!number}\n */\n rangeUnit(){\n return this._rangeUnit; \n }\n\n /**\n *\n * @returns {!ValueRange}\n */\n range(){\n return this._range; \n }\n\n /**\n *\n * @returns {string}\n */\n displayName(){\n return this.toString(); \n }\n\n /**\n *\n * @param {number} value\n * @returns {*}\n */\n checkValidValue(value) {\n return this.range().checkValidValue(value, this.name());\n }\n\n /**\n * Checks if this field represents a component of a date.\n *\n * @return {boolean} true if it is a component of a date\n */\n isDateBased() {\n const dateBased =\n this === ChronoField.DAY_OF_WEEK ||\n this === ChronoField.ALIGNED_DAY_OF_WEEK_IN_MONTH ||\n this === ChronoField.ALIGNED_DAY_OF_WEEK_IN_YEAR ||\n this === ChronoField.DAY_OF_MONTH ||\n this === ChronoField.DAY_OF_YEAR ||\n this === ChronoField.EPOCH_DAY ||\n this === ChronoField.ALIGNED_WEEK_OF_MONTH ||\n this === ChronoField.ALIGNED_WEEK_OF_YEAR ||\n this === ChronoField.MONTH_OF_YEAR ||\n //this === ChronoField.EPOCH_MONTH ||\n this === ChronoField.YEAR_OF_ERA ||\n this === ChronoField.YEAR ||\n this === ChronoField.ERA;\n return dateBased;\n }\n\n /**\n * Checks if this field represents a component of a time.\n *\n * @return {boolean} true if it is a component of a time\n */\n isTimeBased() {\n const timeBased =\n this === ChronoField.NANO_OF_SECOND ||\n this === ChronoField.NANO_OF_DAY ||\n this === ChronoField.MICRO_OF_SECOND ||\n this === ChronoField.MICRO_OF_DAY ||\n this === ChronoField.MILLI_OF_SECOND ||\n this === ChronoField.MILLI_OF_DAY ||\n this === ChronoField.SECOND_OF_MINUTE ||\n this === ChronoField.SECOND_OF_DAY ||\n this === ChronoField.MINUTE_OF_HOUR ||\n this === ChronoField.MINUTE_OF_DAY ||\n this === ChronoField.HOUR_OF_AMPM ||\n this === ChronoField.CLOCK_HOUR_OF_AMPM ||\n this === ChronoField.HOUR_OF_DAY ||\n this === ChronoField.CLOCK_HOUR_OF_DAY ||\n this === ChronoField.AMPM_OF_DAY;\n return timeBased;\n }\n\n /**\n * Get the range of valid values for this field using the temporal object to\n * refine the result.\n *\n * This uses the temporal object to find the range of valid values for the field.\n * This is similar to {@link range}, however this method refines the result\n * using the temporal. For example, if the field is {@link DAY_OF_MONTH} the\n * {@link range} method is not accurate as there are four possible month lengths,\n * 28, 29, 30 and 31 days. Using this method with a date allows the range to be\n * accurate, returning just one of those four options.\n *\n * There are two equivalent ways of using this method.\n * The first is to invoke this method directly.\n * The second is to use {@link TemporalAccessor#range}:\n *
\n * // these two lines are equivalent, but the second approach is recommended\n * temporal = thisField.rangeRefinedBy(temporal);\n * temporal = temporal.range(thisField);\n *\n * It is recommended to use the second approach, {@link range},\n * as it is a lot clearer to read in code.\n *\n * Implementations should perform any queries or calculations using the fields\n * available in {@link ChronoField}.\n * If the field is not supported a {@link DateTimeException} must be thrown.\n *\n * @param {!TemporalAccessor} temporal - the temporal object used to refine the result, 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 `int`.\n *\n * This validates that the value is within the outer range of valid values\n * returned by {@link range}.\n * It also checks that all valid values are within the bounds of an `int`.\n *\n * This method checks against the range of the field in the ISO-8601 calendar system.\n * This range may be incorrect for other calendar systems.\n * Use {@link Chronology#range} 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 * @copyright (c) 2016, Philipp Thürwächter & Pattrick Hüper\n * @copyright (c) 2007-present, Stephen Colebourne & Michael Nascimento Santos\n * @license BSD-3-Clause (see LICENSE in the root directory of this source tree)\n */\n\nimport {MathUtil} from '../MathUtil';\n\nimport {Duration} from '../Duration';\nimport {YearConstants} from '../YearConstants';\nimport {TemporalUnit} from './TemporalUnit';\n\n/**\n * A standard set of date periods units.\n *\n * This set of units provide unit-based access to manipulate a date, time or date-time.\n * The standard set of units can be extended by implementing {@link TemporalUnit}.\n *\n * These units are intended to be applicable in multiple calendar systems.\n * For example, most non-ISO calendar systems define units of years, months and days,\n * just with slightly different rules.\n * The documentation of each unit explains how it operates.\n *\n * ### Static properties of Class {@link ChronoUnit}\n *\n * ChronoUnit.NANOS\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.MICROS\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.MILLIS\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.SECONDS\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.MINUTES\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.HOURS\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.HALF_DAYS\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.DAYS\n *\n * Unit that represents the concept of a day.\n * For the ISO calendar system, it is the standard day from midnight to midnight.\n * The estimated duration of a day is 24 hours.\n *\n * When used with other calendar systems it must correspond to the day defined by\n * the rising and setting of the Sun on Earth. It is not required that days begin\n * at midnight - when converting between calendar systems, the date should be\n * equivalent at midday.\n *\n * ChronoUnit.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 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 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 {@link 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}.\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}:\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, {@link plus},\n * as it is a lot clearer to read in code.\n *\n * Implementations should perform any queries or calculations using the units\n * available in {@link ChronoUnit} or the fields available in {@link ChronoField}.\n * If the unit is not supported an {@link 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 {@link HOURS.between}.\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}:\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 {@link 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 `.constructor.name`. If they do not, then the result must be\n * obtained by calling `temporal1.until`.\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 24 hours.\n *\n * When used with other calendar systems it must correspond to the day defined by\n * the rising and setting of the Sun on Earth. It is not required that days begin\n * at midnight - when converting between calendar systems, the date should be\n * equivalent at midday.\n */\n ChronoUnit.DAYS = new ChronoUnit('Days', Duration.ofSeconds(86400));\n /**\n * Unit that represents the concept of a week.\n * For the ISO calendar system, it is equal to 7 days.\n *\n * When used with other calendar systems it must correspond to an integral number of days.\n */\n ChronoUnit.WEEKS = new ChronoUnit('Weeks', Duration.ofSeconds(7 * 86400));\n /**\n * Unit that represents the concept of a month.\n * For the ISO calendar system, the length of the month varies by month-of-year.\n * The estimated duration of a month is one twelfth of 365.2425 days.\n *\n * When used with other calendar systems it must correspond to an integral number of days.\n */\n ChronoUnit.MONTHS = new ChronoUnit('Months', Duration.ofSeconds(31556952 / 12));\n /**\n * Unit that represents the concept of a year.\n * For the ISO calendar system, it is equal to 12 months.\n * The estimated duration of a year is 365.2425 days.\n *\n * When used with other calendar systems it must correspond to an integral number of days\n * or months roughly equal to a year defined by the passage of the Earth around the Sun.\n */\n ChronoUnit.YEARS = new ChronoUnit('Years', Duration.ofSeconds(31556952));\n /**\n * Unit that represents the concept of a decade.\n * For the ISO calendar system, it is equal to 10 years.\n *\n * When used with other calendar systems it must correspond to an integral number of days\n * and is normally an integral number of years.\n */\n ChronoUnit.DECADES = new ChronoUnit('Decades', Duration.ofSeconds(31556952 * 10));\n /**\n * Unit that represents the concept of a century.\n * For the ISO calendar system, it is equal to 100 years.\n *\n * When used with other calendar systems it must correspond to an integral number of days\n * and is normally an integral number of years.\n */\n ChronoUnit.CENTURIES = new ChronoUnit('Centuries', Duration.ofSeconds(31556952 * 100));\n /**\n * Unit that represents the concept of a millennium.\n * For the ISO calendar system, it is equal to 1000 years.\n *\n * When used with other calendar systems it must correspond to an integral number of days\n * and is normally an integral number of years.\n */\n ChronoUnit.MILLENNIA = new ChronoUnit('Millennia', Duration.ofSeconds(31556952 * 1000));\n /**\n * Unit that represents the concept of an era.\n * The ISO calendar system doesn't have eras thus it is impossible to add\n * an era to a date or date-time.\n * The estimated duration of the era is artificially defined as {Year.MAX_VALUE} + 1.\n *\n * When used with other calendar systems there are no restrictions on the unit.\n */\n ChronoUnit.ERAS = new ChronoUnit('Eras', Duration.ofSeconds(31556952 * (YearConstants.MAX_VALUE + 1)));\n /**\n * Artificial unit that represents the concept of forever.\n * This is primarily used with {@link TemporalField} to represent unbounded fields\n * such as the year or era.\n * The estimated duration of the era is artificially defined as the largest duration\n * supported by {@link Duration}.\n */\n ChronoUnit.FOREVER = new ChronoUnit('Forever', Duration.ofSeconds(MathUtil.MAX_SAFE_INTEGER, 999999999));\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/temporal/ChronoUnit.js","/**\n * @copyright (c) 2016, Philipp Thürwächter & Pattrick Hüper\n * @copyright (c) 2007-present, Stephen Colebourne & Michael Nascimento Santos\n * @license BSD-3-Clause (see LICENSE in the root directory of this source tree)\n */\nimport {requireNonNull, requireInstance} from './assert';\nimport {ArithmeticException, DateTimeParseException, UnsupportedTemporalTypeException} from './errors';\nimport {MathUtil, MAX_SAFE_INTEGER, MIN_SAFE_INTEGER} from './MathUtil';\n\nimport {ChronoField} from './temporal/ChronoField';\nimport {ChronoUnit} from './temporal/ChronoUnit';\nimport {TemporalAmount} from './temporal/TemporalAmount';\nimport {TemporalUnit} from './temporal/TemporalUnit';\n\nimport {LocalTime} from './LocalTime';\n\n/**\n * A time-based amount of time, such as '34.5 seconds'.\n *\n * This class models a quantity or amount of time in terms of seconds and nanoseconds.\n * It can be accessed using other duration-based units, such as minutes and hours.\n * In addition, the {@link ChronoUnit#DAYS} unit can be used and is treated as\n * exactly equal to 24 hours, thus ignoring daylight savings effects.\n * See {@link Period} for the date-based equivalent to this class.\n *\n * A physical duration could be of infinite length.\n * For practicality, the duration is stored with constraints similar to {@link Instant}.\n * The duration uses nanosecond resolution with a maximum value of the seconds that can\n * be held in a `long`. This is greater than the current estimated age of the universe.\n *\n * The range of a duration requires the storage of a number larger than a `long`.\n * To achieve this, the class stores a `long` representing seconds and an `int`\n * representing nanosecond-of-second, which will always be between 0 and 999,999,999.\n *\n * The duration is measured in \"seconds\", but these are not necessarily identical to\n * the scientific \"SI second\" definition based on atomic clocks.\n * This difference only impacts durations measured near a leap-second and should not affect\n * most applications.\n * See {@link Instant} for a discussion as to the meaning of the second and time-scales.\n *\n * ### Static properties of Class {@link Duration}\n *\n * Duration.ZERO\n *\n * Constant for a duration of zero.\n *\n */\nexport class Duration extends TemporalAmount /*implements TemporalAmount, Comparable
\n * Duration.ofSeconds(3, 1);\n * Duration.ofSeconds(4, -999_999_999);\n * Duration.ofSeconds(2, 1000_000_001);\n *\n *\n * @param {Number} seconds - the number of seconds, positive or negative\n * @param {Number} nanoAdjustment the nanosecond adjustment to the number of seconds, positive or negative\n * @return {!Duration}\n * @throws ArithmeticException if the adjustment causes the seconds to exceed the capacity of {@link Duration}\n */\n static ofSeconds(seconds, nanoAdjustment = 0) {\n const secs = MathUtil.safeAdd(seconds, MathUtil.floorDiv(nanoAdjustment, LocalTime.NANOS_PER_SECOND));\n const nos = MathUtil.floorMod(nanoAdjustment, LocalTime.NANOS_PER_SECOND);\n return Duration._create(secs, nos);\n }\n\n //-----------------------------------------------------------------------\n /**\n * Obtains an instance of {@link Duration} from a number of milliseconds.\n *\n * The seconds and nanoseconds are extracted from the specified milliseconds.\n *\n * @param {Number} millis - the number of milliseconds, positive or negative\n * @return {!Duration}\n */\n static ofMillis(millis) {\n let secs = MathUtil.intDiv(millis, 1000);\n let mos = MathUtil.intMod(millis, 1000);\n if (mos < 0) {\n mos += 1000;\n secs--;\n }\n return Duration._create(secs, mos * 1000000);\n }\n\n //-----------------------------------------------------------------------\n /**\n * Obtains an instance of {@link Duration} from a number of nanoseconds.\n *\n * The seconds and nanoseconds are extracted from the specified nanoseconds.\n *\n * @param {Number} nanos - the number of nanoseconds, positive or negative\n * @return {!Duration}\n */\n static ofNanos(nanos) {\n let secs = MathUtil.intDiv(nanos, LocalTime.NANOS_PER_SECOND);\n let nos = MathUtil.intMod(nanos, LocalTime.NANOS_PER_SECOND);\n if (nos < 0) {\n nos += LocalTime.NANOS_PER_SECOND;\n secs--;\n }\n return this._create(secs, nos);\n }\n\n //-----------------------------------------------------------------------\n /**\n * Obtains an instance of {@link Duration} from a duration in the specified unit.\n *\n * The parameters represent the two parts of a phrase like '6 Hours'. For example:\n *
\n * Duration.of(3, SECONDS);\n * Duration.of(465, HOURS);\n *\n * Only a subset of units are accepted by this method.\n * The unit must either have an exact duration (see {@link TemporalUnit#isDurationEstimated}) or\n * be {@link ChronoUnit#DAYS} which is treated as 24 hours. Other units throw an exception.\n *\n * @param {Number} amount - the amount of the duration, measured in terms of the unit, positive or negative\n * @param {TemporalUnit} unit - the unit that the duration is measured in, must have an exact duration, not null\n * @return {!Duration}\n * @throws DateTimeException if the period unit has an estimated duration\n * @throws ArithmeticException if a numeric overflow occurs\n */\n static of(amount, unit) {\n return Duration.ZERO.plus(amount, unit);\n }\n\n //-----------------------------------------------------------------------\n /**\n * Obtains an instance of {@link Duration} from an amount.\n *\n * This obtains a duration based on the specified amount.\n * A TemporalAmount represents an amount of time, which may be date-based\n * or time-based, which this factory extracts to a duration.\n *\n * The conversion loops around the set of units from the amount and uses\n * the duration of the unit to calculate the total Duration.\n * Only a subset of units are accepted by this method.\n * The unit must either have an exact duration or be ChronoUnit.DAYS which\n * is treated as 24 hours. If any other units are found then an exception is thrown.\n *\n * @param {TemporalAmount} amount - the temporal amount to convert, not null\n * @return {Duration} the resulting duration, not null\n * @throws DateTimeException if the amount cannot be converted\n * @throws ArithmeticException if a numeric overflow occurs\n */\n static from(amount) {\n requireNonNull(amount, 'amount');\n requireInstance(amount, TemporalAmount);\n let duration = Duration.ZERO;\n amount.units().forEach((unit) => {\n duration = duration.plus(amount.get(unit), unit);\n });\n return duration;\n }\n\n /**\n * Obtains an instance of {@link Duration} representing the duration between two instants.\n *\n * Obtains a {@link Duration} representing the duration between two instants.\n * This calculates the duration between two temporal objects of the same type.\n * The difference in seconds is calculated using {@link Temporal#until}.\n * The difference in nanoseconds is calculated using by querying the\n * {@link ChronoField#NANO_OF_SECOND} field.\n *\n * The result of this method can be a negative period if the end is before the start.\n * To guarantee to obtain a positive duration call abs() on the result.\n *\n * @param {Temporal} startInclusive - the start instant, inclusive, not null\n * @param {Temporal} endExclusive - the end instant, exclusive, not null\n * @return {!Duration}\n * @throws DateTimeException if the seconds between the temporals cannot be obtained\n * @throws ArithmeticException if the calculation exceeds the capacity of {@link Duration}\n */\n static between(startInclusive, endExclusive) {\n requireNonNull(startInclusive, 'startInclusive');\n requireNonNull(endExclusive, 'endExclusive');\n let secs = startInclusive.until(endExclusive, ChronoUnit.SECONDS);\n let nanos = 0;\n if (startInclusive.isSupported(ChronoField.NANO_OF_SECOND) && endExclusive.isSupported(ChronoField.NANO_OF_SECOND)) {\n try {\n 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 {@link PnDTnHnMn.nS}.\n *\n * This will parse a textual representation of a duration, including the\n * string produced by {@link toString}. The formats accepted are based\n * on the ISO-8601 duration format {@link PnDTnHnMn.nS} with days\n * considered to be exactly 24 hours.\n *\n * The string starts with an optional sign, denoted by the ASCII negative\n * or positive symbol. If negative, the whole period is negated.\n * The ASCII letter \"P\" is next in upper or lower case.\n * There are then four sections, each consisting of a number and a suffix.\n * The sections have suffixes in ASCII of \"D\", \"H\", \"M\" and \"S\" for\n * days, hours, minutes and seconds, accepted in upper or lower case.\n * The suffixes must occur in order. The ASCII letter \"T\" must occur before\n * the first occurrence, if any, of an hour, minute or second section.\n * At least one of the four sections must be present, and if \"T\" is present\n * there must be at least one section after the \"T\".\n * The number part of each section must consist of one or more ASCII digits.\n * The number may be prefixed by the ASCII negative or positive symbol.\n * The number of days, hours and minutes must parse to a `long`.\n * The number of seconds must parse to a `long` with optional fraction.\n * The decimal point may be either a dot or a comma.\n * The fractional part may have from zero to 9 digits.\n *\n * The leading plus/minus sign, and negative values for other units are\n * not part of the ISO-8601 standard.\n *\n * Examples:\n *
\n * \"PT20.345S\" -> parses as \"20.345 seconds\"\n * \"PT15M\" -> parses as \"15 minutes\" (where a minute is 60 seconds)\n * \"PT10H\" -> parses as \"10 hours\" (where an hour is 3600 seconds)\n * \"P2D\" -> parses as \"2 days\" (where a day is 24 hours or 86400 seconds)\n * \"P2DT3H4M\" -> parses as \"2 days, 3 hours and 4 minutes\"\n * \"P-6H3M\" -> parses as \"-6 hours and +3 minutes\"\n * \"-P6H3M\" -> parses as \"-6 hours and -3 minutes\"\n * \"-P-6H+3M\" -> parses as \"+6 hours and -3 minutes\"\n *\n *\n * @param {String} text - the text to parse, not null\n * @return {Duration} the parsed duration, not null\n * @throws DateTimeParseException if the text cannot be parsed to a duration\n */\n static parse(text) {\n requireNonNull(text, 'text');\n /**\n * The pattern for parsing.\n */\n const PATTERN = new RegExp('([-+]?)P(?:([-+]?[0-9]+)D)?(T(?:([-+]?[0-9]+)H)?(?:([-+]?[0-9]+)M)?(?:([-+]?[0-9]+)(?:[.,]([0-9]{0,9}))?S)?)?', 'i');\n const matches = PATTERN.exec(text);\n if (matches !== null) {\n // check for letter T but no time sections\n if ('T' === matches[3] === false) {\n const negate = '-' === matches[1];\n const dayMatch = matches[2];\n const hourMatch = matches[4];\n const minuteMatch = matches[5];\n const secondMatch = matches[6];\n const fractionMatch = matches[7];\n if (dayMatch != null || hourMatch != null || minuteMatch != null || secondMatch != null) {\n const daysAsSecs = Duration._parseNumber(text, dayMatch, LocalTime.SECONDS_PER_DAY, 'days');\n const hoursAsSecs = Duration._parseNumber(text, hourMatch, LocalTime.SECONDS_PER_HOUR, 'hours');\n const minsAsSecs = Duration._parseNumber(text, minuteMatch, LocalTime.SECONDS_PER_MINUTE, 'minutes');\n const seconds = Duration._parseNumber(text, secondMatch, 1, 'seconds');\n const negativeSecs = secondMatch != null && secondMatch.charAt(0) === '-';\n const nanos = Duration._parseFraction(text, fractionMatch, negativeSecs ? -1 : 1);\n try {\n return Duration._create(negate, daysAsSecs, hoursAsSecs, minsAsSecs, seconds, nanos);\n } catch (ex) {\n throw new DateTimeParseException('Text cannot be parsed to a Duration: overflow', text, 0, ex);\n }\n }\n }\n }\n throw new DateTimeParseException('Text cannot be parsed to a Duration', text, 0);\n }\n\n static _parseNumber(text, parsed, multiplier, errorText) {\n // regex limits to [-+]?[0-9]+\n if (parsed == null) {\n return 0;\n }\n try {\n if (parsed[0] === '+') {\n parsed = parsed.substring(1);\n }\n return MathUtil.safeMultiply(parseFloat(parsed), multiplier);\n } catch (ex) {\n throw new DateTimeParseException('Text cannot be parsed to a Duration: ' + errorText, text, 0, ex);\n }\n }\n\n static _parseFraction(text, parsed, negate) {\n // regex limits to [0-9]{0,9}\n if (parsed == null || parsed.length === 0) {\n return 0;\n }\n parsed = (parsed + '000000000').substring(0, 9);\n return parseFloat(parsed) * negate;\n }\n\n //-----------------------------------------------------------------------\n /**\n * to handle function overriding this function accepts any number of arguments, checks their type and delegates to the appropriate\n * function\n *\n * @return {Duration}\n */\n static _create() {\n if (arguments.length <= 2) {\n return Duration._createSecondsNanos(arguments[0], arguments[1]);\n } else {\n return Duration._createNegateDaysHoursMinutesSecondsNanos(arguments[0], arguments[1], arguments[2], arguments[3], arguments[4], arguments[5]);\n }\n }\n\n static _createNegateDaysHoursMinutesSecondsNanos(negate, daysAsSecs, hoursAsSecs, minsAsSecs, secs, nanos) {\n const seconds = MathUtil.safeAdd(daysAsSecs, MathUtil.safeAdd(hoursAsSecs, MathUtil.safeAdd(minsAsSecs, secs)));\n if (negate) {\n return Duration.ofSeconds(seconds, nanos).negated();\n }\n return Duration.ofSeconds(seconds, nanos);\n }\n\n /**\n * Obtains an instance of {@link Duration} using seconds and nanoseconds.\n *\n * @param {Number} seconds - the length of the duration in seconds, positive or negative\n * @param {Number} nanoAdjustment - the nanosecond adjustment within the second, from 0 to 999,999,999\n */\n static _createSecondsNanos(seconds = 0, nanoAdjustment = 0) {\n if ((seconds | nanoAdjustment) === 0) {\n return Duration.ZERO;\n }\n return new Duration(seconds, nanoAdjustment);\n }\n\n //-----------------------------------------------------------------------\n /**\n * Gets the value of the requested unit.\n *\n * This returns a value for each of the two supported units,\n * {@link ChronoUnit#SECONDS} and {@link ChronoUnit#NANOS}.\n * All other units throw an exception.\n *\n * @param {TemporalUnit} unit the {@link TemporalUnit} for which to return the value\n * @return {number} the const value of the unit\n * @throws DateTimeException if the unit is not supported\n * @throws UnsupportedTemporalTypeException if the unit is not supported\n */\n get(unit) {\n if (unit === ChronoUnit.SECONDS) {\n return this._seconds;\n } else if (unit === ChronoUnit.NANOS) {\n return this._nanos;\n } else {\n throw new UnsupportedTemporalTypeException('Unsupported unit: ' + unit);\n }\n }\n\n units() {\n return [ChronoUnit.SECONDS, ChronoUnit.NANOS];\n }\n\n //-----------------------------------------------------------------------\n /**\n * Checks if this duration is zero length.\n *\n * A {@link Duration} represents a directed distance between two points on\n * the time-line and can therefore be positive, zero or negative.\n * This method checks whether the length is zero.\n *\n * @return {boolean} true if this duration has a total length equal to zero\n */\n isZero() {\n return (this._seconds | this._nanos) === 0;\n }\n\n /**\n * Checks if this duration is negative, excluding zero.\n *\n * A {@link Duration} represents a directed distance between two points on\n * the time-line and can therefore be positive, zero or negative.\n * This method checks whether the length is less than zero.\n *\n * @return {boolean} true if this duration has a total length less than zero\n */\n isNegative() {\n return this._seconds < 0;\n }\n\n //-----------------------------------------------------------------------\n /**\n * Gets the number of seconds in this duration.\n *\n * The length of the duration is stored using two fields - seconds and nanoseconds.\n * The nanoseconds part is a value from 0 to 999,999,999 that is an adjustment to\n * the length in seconds.\n * The total duration is defined by calling this method and {@link getNano}.\n *\n * A {@link Duration} represents a directed distance between two points on the time-line.\n * A negative duration is expressed by the negative sign of the seconds part.\n * A duration of -1 nanosecond is stored as -1 seconds plus 999,999,999 nanoseconds.\n *\n * @return {number} the whole seconds part of the length of the duration, positive or negative\n */\n seconds() {\n return this._seconds;\n }\n\n /**\n * Gets the number of nanoseconds within the second in this duration.\n *\n * The length of the duration is stored using two fields - seconds and nanoseconds.\n * The nanoseconds part is a value from 0 to 999,999,999 that is an adjustment to\n * the length in seconds.\n * The total duration is defined by calling this method and {@link getSeconds}.\n *\n * A {@link Duration} represents a directed distance between two points on the time-line.\n * A negative duration is expressed by the negative sign of the seconds part.\n * A duration of -1 nanosecond is stored as -1 seconds plus 999,999,999 nanoseconds.\n *\n * @return {number} the nanoseconds within the second part of the length of the duration, from 0 to 999,999,999\n */\n nano() {\n return this._nanos;\n }\n\n //-----------------------------------------------------------------------\n /**\n * Returns a copy of this duration with the specified amount of seconds.\n *\n * This returns a duration with the specified seconds, retaining the\n * nano-of-second part of this duration.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {Number} seconds - the seconds to represent, may be negative\n * @return {Duration} based on this period with the requested seconds, not null\n */\n withSeconds(seconds) {\n return Duration._create(seconds, this._nanos);\n }\n\n /**\n * Returns a copy of this duration with the specified nano-of-second.\n *\n * This returns a duration with the specified nano-of-second, retaining the\n * seconds part of this duration.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {Number} nanoOfSecond - the nano-of-second to represent, from 0 to 999,999,999\n * @return {Duration} based on this period with the requested nano-of-second, not null\n * @throws DateTimeException if the nano-of-second is invalid\n */\n withNanos(nanoOfSecond) {\n ChronoField.NANO_OF_SECOND.checkValidIntValue(nanoOfSecond);\n return Duration._create(this._seconds, nanoOfSecond);\n }\n\n //-----------------------------------------------------------------------\n /**\n * Returns a copy of this duration with the specified duration added.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {Duration} duration - the duration to add, positive or negative, not null\n * @return {Duration} based on this duration with the specified duration added, not null\n * @throws ArithmeticException if numeric overflow occurs\n */\n plusDuration(duration) {\n requireNonNull(duration, 'duration');\n return this.plus(duration.seconds(), duration.nano());\n }\n\n\n /**\n * function overloading for {@link Duration.plus}\n *\n * if called with 1 arguments, then {@link Duration.plusDuration} is executed.\n *\n * if called with 2 arguments and second argument is an instance of TemporalUnit, then {@link Duration.plusAmountUnit} is executed.\n *\n * Otherwise {@link Duration.plusSecondsNanos} is executed.\n *\n * @param {!(Duration|number)} durationOrNumber\n * @param {!TemporaloUnit|number} unitOrNumber\n * @returns {Duration}\n */\n plus(durationOrNumber, unitOrNumber) {\n if (arguments.length === 1) {\n return this.plusDuration(durationOrNumber);\n }\n else if (arguments.length === 2 && unitOrNumber instanceof TemporalUnit) {\n return this.plusAmountUnit(durationOrNumber, unitOrNumber);\n } else {\n return this.plusSecondsNanos(durationOrNumber, unitOrNumber);\n }\n }\n\n /**\n * Returns a copy of this duration with the specified duration added.\n *\n * The duration amount is measured in terms of the specified unit.\n * Only a subset of units are accepted by this method.\n * The unit must either have an exact duration (see {@link TemporalUnit#isDurationEstimated}) or\n * be {@link ChronoUnit#DAYS} which is treated as 24 hours. Other units throw an exception.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {Number} amountToAdd - the amount to add, measured in terms of the unit, positive or negative\n * @param {TemporalUnit} unit - the unit that the amount is measured in, must have an exact duration, not null\n * @return {Duration} based on this duration with the specified duration added, not null\n * @throws UnsupportedTemporalTypeException if the unit is not supported\n * @throws ArithmeticException if numeric overflow occurs\n */\n plusAmountUnit(amountToAdd, unit) {\n requireNonNull(amountToAdd, 'amountToAdd');\n requireNonNull(unit, 'unit');\n if (unit === ChronoUnit.DAYS) {\n return this.plusSecondsNanos(MathUtil.safeMultiply(amountToAdd, LocalTime.SECONDS_PER_DAY), 0);\n }\n if (unit.isDurationEstimated()) {\n throw new UnsupportedTemporalTypeException('Unit must not have an estimated duration');\n }\n if (amountToAdd === 0) {\n return this;\n }\n if (unit instanceof ChronoUnit) {\n switch (unit) {\n case ChronoUnit.NANOS: return this.plusNanos(amountToAdd);\n case ChronoUnit.MICROS: return this.plusSecondsNanos(MathUtil.intDiv(amountToAdd, (1000000 * 1000)) * 1000, MathUtil.intMod(amountToAdd, (1000000 * 1000)) * 1000);\n case ChronoUnit.MILLIS: return this.plusMillis(amountToAdd);\n case ChronoUnit.SECONDS: return this.plusSeconds(amountToAdd);\n }\n return this.plusSecondsNanos(MathUtil.safeMultiply(unit.duration().seconds(), amountToAdd), 0);\n }\n const duration = unit.duration().multipliedBy(amountToAdd);\n return this.plusSecondsNanos(duration.seconds(), duration.nano());\n }\n\n //-----------------------------------------------------------------------\n /**\n * Returns a copy of this duration with the specified duration in 24 hour days added.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {Number} daysToAdd - the days to add, positive or negative\n * @return {Duration} based on this duration with the specified days added, not null\n * @throws ArithmeticException if numeric overflow occurs\n */\n plusDays(daysToAdd) {\n return this.plusSecondsNanos(MathUtil.safeMultiply(daysToAdd, LocalTime.SECONDS_PER_DAY), 0);\n }\n\n /**\n * Returns a copy of this duration with the specified duration in hours added.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {Number} hoursToAdd - the hours to add, positive or negative\n * @return {Duration} based on this duration with the specified hours added, not null\n * @throws ArithmeticException if numeric overflow occurs\n */\n plusHours(hoursToAdd) {\n return this.plusSecondsNanos(MathUtil.safeMultiply(hoursToAdd, LocalTime.SECONDS_PER_HOUR), 0);\n }\n\n /**\n * Returns a copy of this duration with the specified duration in minutes added.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {Number} minutesToAdd - the minutes to add, positive or negative\n * @return {Duration} based on this duration with the specified minutes added, not null\n * @throws ArithmeticException if numeric overflow occurs\n */\n plusMinutes(minutesToAdd) {\n return this.plusSecondsNanos(MathUtil.safeMultiply(minutesToAdd, LocalTime.SECONDS_PER_MINUTE), 0);\n }\n\n /**\n * Returns a copy of this duration with the specified duration in seconds added.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {Number} secondsToAdd - the seconds to add, positive or negative\n * @return {Duration} based on this duration with the specified seconds added, not null\n * @throws ArithmeticException if numeric overflow occurs\n */\n plusSeconds(secondsToAdd) {\n return this.plusSecondsNanos(secondsToAdd, 0);\n }\n\n /**\n * Returns a copy of this duration with the specified duration in milliseconds added.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {Number} millisToAdd - the milliseconds to add, positive or negative\n * @return {Duration} based on this duration with the specified milliseconds added, not null\n * @throws ArithmeticException if numeric overflow occurs\n */\n plusMillis(millisToAdd) {\n return this.plusSecondsNanos(MathUtil.intDiv(millisToAdd, 1000), MathUtil.intMod(millisToAdd, 1000) * 1000000);\n }\n\n /**\n * Returns a copy of this duration with the specified duration in nanoseconds added.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {Number} nanosToAdd - the nanoseconds to add, positive or negative\n * @return {Duration} based on this duration with the specified nanoseconds added, not null\n * @throws ArithmeticException if numeric overflow occurs\n */\n plusNanos(nanosToAdd) {\n return this.plusSecondsNanos(0, nanosToAdd);\n }\n\n /**\n * Returns a copy of this duration with the specified duration added.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {Number} secondsToAdd - the seconds to add, positive or negative\n * @param {Number} nanosToAdd - the nanos to add, positive or negative\n * @return {Duration} based on this duration with the specified seconds added, not null\n * @throws ArithmeticException if numeric overflow occurs\n */\n plusSecondsNanos(secondsToAdd, nanosToAdd) {\n requireNonNull(secondsToAdd, 'secondsToAdd');\n requireNonNull(nanosToAdd, 'nanosToAdd');\n if ((secondsToAdd | nanosToAdd) === 0) {\n return this;\n }\n let epochSec = MathUtil.safeAdd(this._seconds, secondsToAdd);\n epochSec = MathUtil.safeAdd(epochSec, MathUtil.intDiv(nanosToAdd, LocalTime.NANOS_PER_SECOND));\n nanosToAdd = MathUtil.intMod(nanosToAdd, LocalTime.NANOS_PER_SECOND);\n const nanoAdjustment = MathUtil.safeAdd(this._nanos, nanosToAdd); // safe int+LocalTime.NANOS_PER_SECOND\n return Duration.ofSeconds(epochSec, nanoAdjustment);\n }\n\n //-----------------------------------------------------------------------\n /**\n * function overloading for {@link Duration.minus}\n *\n * if called with 1 arguments and first argument is an instance of Duration, then {@link Duration.minusDuration} is executed.\n *\n * Otherwise {@link Duration.minusAmountUnit} is executed.\n *\n * @param {!(Duration|number)} durationOrNumber\n * @param {?ChronoUnit} unit\n * @return {Duration}\n */\n minus(durationOrNumber, unit) {\n if (arguments.length === 1) {\n return this.minusDuration(durationOrNumber);\n } else {\n return this.minusAmountUnit(durationOrNumber, unit);\n }\n }\n\n /**\n * Returns a copy of this duration with the specified duration subtracted.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {Duration} duration - the duration to subtract, positive or negative, not null\n * @return {Duration} based on this duration with the specified duration subtracted, not null\n * @throws ArithmeticException if numeric overflow occurs\n */\n minusDuration(duration) {\n requireNonNull(duration, 'duration');\n const secsToSubtract = duration.seconds();\n const nanosToSubtract = duration.nano();\n if (secsToSubtract === MIN_SAFE_INTEGER) {\n return this.plus(MAX_SAFE_INTEGER, -nanosToSubtract);\n }\n return this.plus(-secsToSubtract, -nanosToSubtract);\n }\n\n /**\n * Returns a copy of this duration with the specified duration subtracted.\n *\n * The duration amount is measured in terms of the specified unit.\n * Only a subset of units are accepted by this method.\n * The unit must either have an exact duration (see {@link TemporalUnit#isDurationEstimated}) or\n * be {@link ChronoUnit#DAYS} which is treated as 24 hours. Other units throw an exception.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {Number} amountToSubtract - the amount to subtract, measured in terms of the unit, positive or negative\n * @param {TemporalUnit} unit - the unit that the amount is measured in, must have an exact duration, not null\n * @return {Duration} based on this duration with the specified duration subtracted, not null\n * @throws ArithmeticException if numeric overflow occurs\n */\n minusAmountUnit(amountToSubtract, unit) {\n requireNonNull(amountToSubtract, 'amountToSubtract');\n requireNonNull(unit, 'unit');\n return (amountToSubtract === MIN_SAFE_INTEGER ? this.plusAmountUnit(MAX_SAFE_INTEGER, unit) : this.plusAmountUnit(-amountToSubtract, unit));\n }\n\n //-----------------------------------------------------------------------\n /**\n * Returns a copy of this duration with the specified duration in 24 hour days subtracted.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {Number} daysToSubtract - the days to subtract, positive or negative\n * @return {Duration} based on this duration with the specified days subtracted, not null\n * @throws ArithmeticException if numeric overflow occurs\n */\n minusDays(daysToSubtract) {\n return (daysToSubtract === MIN_SAFE_INTEGER ? this.plusDays(MAX_SAFE_INTEGER) : this.plusDays(-daysToSubtract));\n }\n\n /**\n * Returns a copy of this duration with the specified duration in hours subtracted.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {Number} hoursToSubtract - the hours to subtract, positive or negative\n * @return {Duration} based on this duration with the specified hours subtracted, not null\n * @throws ArithmeticException if numeric overflow occurs\n */\n minusHours(hoursToSubtract) {\n return (hoursToSubtract === MIN_SAFE_INTEGER ? this.plusHours(MAX_SAFE_INTEGER) : this.plusHours(-hoursToSubtract));\n }\n\n /**\n * Returns a copy of this duration with the specified duration in minutes subtracted.\n *\n * The number of hours is multiplied by 60 to obtain the number of seconds to subtract.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {Number} minutesToSubtract - the minutes to subtract, positive or negative\n * @return {Duration} based on this duration with the specified minutes subtracted, not null\n * @throws ArithmeticException if numeric overflow occurs\n */\n minusMinutes(minutesToSubtract) {\n return (minutesToSubtract === MIN_SAFE_INTEGER ? this.plusMinutes(MAX_SAFE_INTEGER) : this.plusMinutes(-minutesToSubtract));\n }\n\n /**\n * Returns a copy of this duration with the specified duration in seconds subtracted.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {Number} secondsToSubtract - the seconds to subtract, positive or negative\n * @return {Duration} based on this duration with the specified seconds subtracted, not null\n * @throws ArithmeticException if numeric overflow occurs\n */\n minusSeconds(secondsToSubtract) {\n return (secondsToSubtract === MIN_SAFE_INTEGER ? this.plusSeconds(MAX_SAFE_INTEGER) : this.plusSeconds(-secondsToSubtract));\n }\n\n /**\n * Returns a copy of this duration with the specified duration in milliseconds subtracted.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {Number} millisToSubtract - the milliseconds to subtract, positive or negative\n * @return {Duration} based on this duration with the specified milliseconds subtracted, not null\n * @throws ArithmeticException if numeric overflow occurs\n */\n minusMillis(millisToSubtract) {\n return (millisToSubtract === MIN_SAFE_INTEGER ? this.plusMillis(MAX_SAFE_INTEGER) : this.plusMillis(-millisToSubtract));\n }\n\n /**\n * Returns a copy of this duration with the specified duration in nanoseconds subtracted.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {Number} nanosToSubtract - the nanoseconds to subtract, positive or negative\n * @return {Duration} based on this duration with the specified nanoseconds subtracted, not null\n * @throws ArithmeticException if numeric overflow occurs\n */\n minusNanos(nanosToSubtract) {\n return (nanosToSubtract === MIN_SAFE_INTEGER ? this.plusNanos(MAX_SAFE_INTEGER) : this.plusNanos(-nanosToSubtract));\n }\n\n //-----------------------------------------------------------------------\n /**\n * Returns a copy of this duration multiplied by the scalar.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {Number} multiplicand - the value to multiply the duration by, positive or negative\n * @return {Duration} based on this duration multiplied by the specified scalar, not null\n * @throws ArithmeticException if numeric overflow occurs\n */\n multipliedBy(multiplicand) {\n if (multiplicand === 0) {\n return Duration.ZERO;\n }\n if (multiplicand === 1) {\n return this;\n }\n let secs = MathUtil.safeMultiply(this._seconds, multiplicand);\n let nos = MathUtil.safeMultiply(this._nanos, multiplicand);\n secs = secs + MathUtil.intDiv(nos, LocalTime.NANOS_PER_SECOND);\n nos = MathUtil.intMod(nos, LocalTime.NANOS_PER_SECOND);\n return Duration.ofSeconds(secs, nos);\n }\n\n /**\n * Returns a copy of this duration divided by the specified value.\n *\n * In opposite to the threeten implementation the division is realized by floating point not by\n * fixed point arithmetic. Expect floating point rounding errors for {@link Duration.dividedBy}.\n *\n * @param {Number} divisor - the value to divide the duration by, positive or negative, not zero\n * @return {Duration} based on this duration divided by the specified divisor, not null\n * @throws ArithmeticException if the divisor is zero or if numeric overflow occurs\n */\n dividedBy(divisor) {\n if (divisor === 0) {\n throw new ArithmeticException('Cannot divide by zero');\n }\n if (divisor === 1) {\n return this;\n }\n const secs = MathUtil.intDiv(this._seconds, divisor);\n const secsMod = MathUtil.roundDown(((this._seconds/ divisor) - secs) * LocalTime.NANOS_PER_SECOND);\n let nos = MathUtil.intDiv(this._nanos, divisor);\n nos = secsMod + nos;\n return Duration.ofSeconds(secs, nos);\n }\n\n //-----------------------------------------------------------------------\n /**\n * Returns a copy of this duration with the length negated.\n *\n * This method swaps the sign of the total length of this duration.\n * For example, {@link PT1.3S} will be returned as {@link PT-1.3S}.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @return {Duration} based on this duration with the amount negated, not null\n * @throws ArithmeticException if numeric overflow occurs\n */\n negated() {\n return this.multipliedBy(-1);\n }\n\n /**\n * Returns a copy of this duration with a positive length.\n *\n * This method returns a positive duration by effectively removing the sign from any negative total length.\n * For example, {@link PT-1.3S} will be returned as {@link PT1.3S}.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @return {Duration} based on this duration with an absolute length, not null\n * @throws ArithmeticException if numeric overflow occurs\n */\n abs() {\n return this.isNegative() ? this.negated() : this;\n }\n\n //-------------------------------------------------------------------------\n /**\n * Adds this duration to the specified temporal object.\n *\n * This returns a temporal object of the same observable type as the input\n * with this duration added.\n *\n * In most cases, it is clearer to reverse the calling pattern by using\n * {@link Temporal#plus}.\n *
\n * // these two lines are equivalent, but the second approach is recommended\n * dateTime = thisDuration.addTo(dateTime);\n * dateTime = dateTime.plus(thisDuration);\n *\n *\n * The calculation will add the seconds, then nanos.\n * Only non-zero amounts will be added.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {Temporal} temporal - the temporal object to adjust, not null\n * @return {Temporal} an object of the same type with the adjustment made, not null\n * @throws DateTimeException if unable to add\n * @throws ArithmeticException if numeric overflow occurs\n */\n addTo(temporal) {\n requireNonNull(temporal, 'temporal');\n if (this._seconds !== 0) {\n temporal = temporal.plus(this._seconds, ChronoUnit.SECONDS);\n }\n if (this._nanos !== 0) {\n temporal = temporal.plus(this._nanos, ChronoUnit.NANOS);\n }\n return temporal;\n }\n\n /**\n * Subtracts this duration from the specified temporal object.\n *\n * This returns a temporal object of the same observable type as the input\n * with this duration subtracted.\n *\n * In most cases, it is clearer to reverse the calling pattern by using\n * {@link Temporal#minus}.\n *
\n * // these two lines are equivalent, but the second approach is recommended\n * dateTime = thisDuration.subtractFrom(dateTime);\n * dateTime = dateTime.minus(thisDuration);\n *\n *\n * The calculation will subtract the seconds, then nanos.\n * Only non-zero amounts will be added.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {Temporal} temporal - the temporal object to adjust, not null\n * @return {Temporal} an object of the same type with the adjustment made, not null\n * @throws DateTimeException if unable to subtract\n * @throws ArithmeticException if numeric overflow occurs\n */\n subtractFrom(temporal) {\n requireNonNull(temporal, 'temporal');\n if (this._seconds !== 0) {\n temporal = temporal.minus(this._seconds, ChronoUnit.SECONDS);\n }\n if (this._nanos !== 0) {\n temporal = temporal.minus(this._nanos, ChronoUnit.NANOS);\n }\n return temporal;\n }\n\n //-----------------------------------------------------------------------\n /**\n * Gets the number of days in this duration.\n *\n * This returns the total number of days in the duration by dividing the\n * number of seconds by 86400.\n * This is based on the standard definition of a day as 24 hours.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @return {number} the number of days in the duration, may be negative\n */\n toDays() {\n return MathUtil.intDiv(this._seconds, LocalTime.SECONDS_PER_DAY);\n }\n\n /**\n * Gets the number of hours in this duration.\n *\n * This returns the total number of hours in the duration by dividing the\n * number of seconds by 3600.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @return {number} the number of hours in the duration, may be negative\n */\n toHours() {\n return MathUtil.intDiv(this._seconds, LocalTime.SECONDS_PER_HOUR);\n }\n\n /**\n * Gets the number of minutes in this duration.\n *\n * This returns the total number of minutes in the duration by dividing the\n * number of seconds by 60.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @return {number} the number of minutes in the duration, may be negative\n */\n toMinutes() {\n return MathUtil.intDiv(this._seconds, LocalTime.SECONDS_PER_MINUTE);\n }\n\n /**\n * Converts this duration to the total length in milliseconds.\n *\n * If this duration is too large to fit in a `long` milliseconds, then an\n * exception is thrown.\n *\n * If this duration has greater than millisecond precision, then the conversion\n * will drop any excess precision information as though the amount in nanoseconds\n * was subject to integer division by one million.\n *\n * @return {number} the total length of the duration in milliseconds\n * @throws ArithmeticException if numeric overflow occurs\n */\n toMillis() {\n let millis = Math.round(MathUtil.safeMultiply(this._seconds, 1000));\n millis = MathUtil.safeAdd(millis, MathUtil.intDiv(this._nanos, 1000000));\n return millis;\n }\n\n /**\n * Converts this duration to the total length in nanoseconds expressed as a `long`.\n *\n * If this duration is too large to fit in a `long` nanoseconds, then an\n * exception is thrown.\n *\n * @return {number} the total length of the duration in nanoseconds\n * @throws ArithmeticException if numeric overflow occurs\n */\n toNanos() {\n let totalNanos = MathUtil.safeMultiply(this._seconds, LocalTime.NANOS_PER_SECOND);\n totalNanos = MathUtil.safeAdd(totalNanos, this._nanos);\n return totalNanos;\n }\n\n //-----------------------------------------------------------------------\n /**\n * Compares this duration to the specified {@link Duration}.\n *\n * The comparison is based on the total length of the durations.\n *\n * @param {Duration} otherDuration - the other duration to compare to, not null\n * @return {number} the comparator value, negative if less, positive if greater\n */\n compareTo(otherDuration) {\n requireNonNull(otherDuration, 'otherDuration');\n requireInstance(otherDuration, Duration, 'otherDuration');\n const cmp = MathUtil.compareNumbers(this._seconds, otherDuration.seconds());\n if (cmp !== 0) {\n return cmp;\n }\n return this._nanos - otherDuration.nano();\n }\n\n //-----------------------------------------------------------------------\n /**\n * Checks if this duration is equal to the specified {@link Duration}.\n *\n * The comparison is based on the total length of the durations.\n *\n * @param {*} otherDuration - the other duration, null returns false\n * @return {boolean} true if the other duration is equal to this one\n */\n equals(otherDuration) {\n if (this === otherDuration) {\n return true;\n }\n if (otherDuration instanceof Duration) {\n return this.seconds() === otherDuration.seconds() &&\n this.nano() === otherDuration.nano();\n }\n return false;\n }\n\n //-----------------------------------------------------------------------\n /**\n * A string representation of this duration using ISO-8601 seconds\n * based representation, such as {@link PT8H6M12.345S}.\n *\n * The format of the returned string will be {@link PTnHnMnS}, where n is\n * the relevant hours, minutes or seconds part of the duration.\n * Any fractional seconds are placed after a decimal 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 {@link Period}.\n *\n * @return {string} an ISO-8601 representation of this duration, not null\n */\n toString() {\n if (this === Duration.ZERO) {\n return 'PT0S';\n }\n const hours = MathUtil.intDiv(this._seconds, LocalTime.SECONDS_PER_HOUR);\n const minutes = MathUtil.intDiv(MathUtil.intMod(this._seconds, LocalTime.SECONDS_PER_HOUR), LocalTime.SECONDS_PER_MINUTE);\n const secs = MathUtil.intMod(this._seconds, LocalTime.SECONDS_PER_MINUTE);\n let rval = 'PT';\n if (hours !== 0) {\n rval += hours + 'H';\n }\n if (minutes !== 0) {\n rval += minutes + 'M';\n }\n if (secs === 0 && this._nanos === 0 && rval.length > 2) {\n return rval;\n }\n if (secs < 0 && this._nanos > 0) {\n if (secs === -1) {\n rval += '-0';\n } else {\n rval += secs + 1;\n }\n } else {\n rval += secs;\n }\n if (this._nanos > 0) {\n rval += '.';\n let nanoString;\n if (secs < 0) {\n nanoString = '' + (2 * LocalTime.NANOS_PER_SECOND - this._nanos);\n } else {\n nanoString = '' + (LocalTime.NANOS_PER_SECOND + this._nanos);\n }\n // remove the leading '1'\n nanoString = nanoString.slice(1, nanoString.length);\n rval += nanoString;\n while (rval.charAt(rval.length - 1) === '0') {\n rval = rval.slice(0, rval.length - 1);\n }\n }\n rval += 'S';\n return rval;\n }\n\n /**\n *\n * @return {string} same as {@link Duration.toString}\n */\n toJSON() {\n return this.toString();\n }\n\n}\n\nexport function _init() {\n /**\n * Constant for a duration of zero.\n */\n Duration.ZERO = new Duration(0, 0);\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/Duration.js","/*\n * @copyright (c) 2016, Philipp Thürwächter & Pattrick Hüper\n * @copyright (c) 2007-present, Stephen Colebourne & Michael Nascimento Santos\n * @license BSD-3-Clause (see LICENSE in the root directory of this source tree)\n */\n\nimport {abstractMethodFail} from '../assert';\n\n/**\n * Framework-level interface defining an amount of time, such as\n * \"6 hours\", \"8 days\" or \"2 years and 3 months\".\n *\n * This is the base interface type for amounts of time.\n * An amount is distinct from a date or time-of-day in that it is not tied\n * to any specific point on the time-line.\n *\n * The amount can be thought of as a {@link Map} of {@link TemporalUnit} to\n * `long`, exposed via {@link getUnits} and {@link get}.\n * A simple case might have a single unit-value pair, such as \"6 hours\".\n * A more complex case may have multiple unit-value pairs, such as\n * \"7 years, 3 months and 5 days\".\n *\n * There are two common implementations.\n * {@link Period} is a date-based implementation, storing years, months and days.\n * {@link Duration} is a time-based implementation, storing seconds and nanoseconds,\n * but providing some access using other duration based units such as minutes,\n * hours and fixed 24-hour days.\n *\n * This interface is a framework-level interface that should not be widely\n * used in application code. Instead, applications should create and pass\n * around instances of concrete types, such as {@link Period} and {@link Duration}.\n *\n * @interface\n */\nexport class TemporalAmount {\n /**\n * Returns the value of the requested unit.\n * The units returned from {@link getUnits} uniquely define the\n * value of the {@link TemporalAmount}. A value must be returned\n * for each unit listed in {@link getUnits}.\n *\n * @implSpec\n * Implementations may declare support for units not listed by {@link getUnits}.\n * Typically, the implementation would define additional units\n * as conversions for the convenience of developers.\n *\n * @param {TemporalUnit} unit - the {@link TemporalUnit} for which to return the value\n * @return {number} the long value of the unit\n * @throws DateTimeException if a value for the unit cannot be obtained\n * @throws UnsupportedTemporalTypeException if the {@link unit} is not supported\n */\n // eslint-disable-next-line no-unused-vars\n get(unit) {\n abstractMethodFail('get');\n }\n \n /**\n * Returns the list of units uniquely defining the value of this TemporalAmount.\n * The list of {@link TemporalUnits} is defined by the implementation class.\n * The list is a snapshot of the units at the time {@link getUnits}\n * is called and is not mutable.\n * The units are ordered from longest duration to the shortest duration\n * of the unit.\n *\n * @implSpec\n * The list of units completely and uniquely represents the\n * state of the object without omissions, overlaps or duplication.\n * The units are in order from longest duration to shortest.\n *\n * @return {TemporalUnit[]} the List of {@link TemporalUnits}; not null\n */\n units() {\n abstractMethodFail('units');\n }\n \n /**\n * Adds to the specified temporal object.\n *\n * Adds the amount to the specified temporal object using the logic\n * encapsulated in the implementing class.\n *\n * There are two equivalent ways of using this method.\n * The first is to invoke this method directly.\n * The second is to use {@link Temporal#plus}:\n *
\n * // These two lines are equivalent, but the second approach is recommended\n * dateTime = amount.addTo(dateTime);\n * dateTime = dateTime.plus(adder);\n *\n * It is recommended to use the second approach, {@link plus},\n * as it is a lot clearer to read in code.\n *\n * @implSpec\n * The implementation must take the input object and add to it.\n * The implementation defines the logic of the addition and is responsible for\n * documenting that logic. It may use any method on {@link Temporal} to\n * query the temporal object and perform the addition.\n * The returned object must have the same observable type as the input object\n *\n * The input object must not be altered.\n * Instead, an adjusted copy of the original must be returned.\n * This provides equivalent, safe behavior for immutable and mutable temporal objects.\n *\n * The input temporal object may be in a calendar system other than ISO.\n * Implementations may choose to document compatibility with other calendar systems,\n * or reject non-ISO temporal objects by querying the chronology (see {@link TemporalQueries#chronology}).\n *\n * This method may be called from multiple threads in parallel.\n * It must be thread-safe when invoked.\n *\n * @param {Temporal} temporal - the temporal object to add the amount to, not null\n * @return {Temporal} an object of the same observable type with the addition made, not null\n * @throws DateTimeException if unable to add\n * @throws ArithmeticException if numeric overflow occurs\n */\n // eslint-disable-next-line no-unused-vars\n addTo(temporal) {\n abstractMethodFail('addTo');\n }\n \n /**\n * Subtracts this object from the specified temporal object.\n *\n * Subtracts the amount from the specified temporal object using the logic\n * encapsulated in the implementing class.\n *\n * There are two equivalent ways of using this method.\n * The first is to invoke this method directly.\n * The second is to use {@link Temporal#minus}:\n *
\n * // these two lines are equivalent, but the second approach is recommended\n * dateTime = amount.subtractFrom(dateTime);\n * dateTime = dateTime.minus(amount);\n *\n * It is recommended to use the second approach, {@link minus},\n * as it is a lot clearer to read in code.\n *\n * @implSpec\n * The implementation must take the input object and subtract from it.\n * The implementation defines the logic of the subtraction and is responsible for\n * documenting that logic. It may use any method on {@link Temporal} to\n * query the temporal object and perform the subtraction.\n * The returned object must have the same observable type as the input object\n *\n * The input object must not be altered.\n * Instead, an adjusted copy of the original must be returned.\n * This provides equivalent, safe behavior for immutable and mutable temporal objects.\n *\n * The input temporal object may be in a calendar system other than ISO.\n * Implementations may choose to document compatibility with other calendar systems,\n * or reject non-ISO temporal objects by querying the chronology (see {@link TemporalQueries#chronology}).\n *\n * This method may be called from multiple threads in parallel.\n * It must be thread-safe when invoked.\n *\n * @param {Temporal} temporal - the temporal object to subtract the amount from, not null\n * @return {Temporal} an object of the same observable type with the subtraction made, not null\n * @throws DateTimeException if unable to subtract\n * @throws ArithmeticException if numeric overflow occurs\n */\n // eslint-disable-next-line no-unused-vars\n subtractFrom(temporal) {\n abstractMethodFail('subtractFrom');\n }\n \n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/temporal/TemporalAmount.js","/*\n * @copyright (c) 2016, Philipp Thürwächter & Pattrick Hüper\n * @copyright (c) 2007-present, Stephen Colebourne & Michael Nascimento Santos\n * @license BSD-3-Clause (see LICENSE in the root directory of this source tree)\n */\n\nimport {abstractMethodFail} from '../assert';\n\n/**\n * A unit of date-time, such as Days or Hours.\n *\n * Measurement of time is built on units, such as years, months, days, hours, minutes and seconds.\n * Implementations of this interface represent those units.\n *\n * An instance of this interface represents the unit itself, rather than an amount of the unit.\n * See {@link Period} for a class that represents an amount in terms of the common units.\n *\n * The most commonly used units are defined in {@link ChronoUnit}.\n * Further units are supplied in {@link IsoFields}.\n * Units can also be written by application code by implementing this interface.\n *\n * The unit works using double dispatch. Client code calls methods on a date-time like\n * {@link LocalDateTime} which check if the unit is a {@link ChronoUnit}.\n * If it is, then the date-time must handle it.\n * Otherwise, the method call is re-dispatched to the matching method in this interface.\n *\n * @interface\n */\nexport class TemporalUnit {\n /**\n * Gets the duration of this unit, which may be an estimate.\n *\n * All units return a duration measured in standard nanoseconds from this method.\n * The duration will be positive and non-zero.\n * For example, an hour has a duration of `60 * 60 * 1,000,000,000ns`.\n *\n * Some units may return an accurate duration while others return an estimate.\n * For example, days have an estimated duration due to the possibility of\n * daylight saving time changes.\n * To determine if the duration is an estimate, use {@link isDurationEstimated}.\n *\n * @return {Duration} the duration of this unit, which may be an estimate, not null\n */\n duration() {\n abstractMethodFail('duration');\n }\n\n /**\n * Checks if the duration of the unit is an estimate.\n *\n * All units have a duration, however the duration is not always accurate.\n * For example, days have an estimated duration due to the possibility of\n * daylight saving time changes.\n * This method returns true if the duration is an estimate and false if it is\n * accurate. Note that accurate/estimated ignores leap seconds.\n *\n * @return {boolean} true if the duration is estimated, false if accurate\n */\n isDurationEstimated() {\n abstractMethodFail('isDurationEstimated');\n }\n\n /**\n * Checks if this unit is date-based.\n *\n * @return {boolean} true if date-based\n */\n isDateBased() {\n abstractMethodFail('isDateBased');\n }\n\n /**\n * Checks if this unit is time-based.\n *\n * @return {boolean} true if time-based\n */\n isTimeBased() {\n abstractMethodFail('isTimeBased');\n }\n\n //-----------------------------------------------------------------------\n /**\n * Checks if this unit is supported by the specified temporal object.\n *\n * This checks that the implementing date-time can add/subtract this unit.\n * This can be used to avoid throwing an exception.\n *\n * @param {Temporal} temporal the temporal object to check, not null\n * @return {boolean} true if the unit is supported\n */\n // eslint-disable-next-line no-unused-vars\n isSupportedBy(temporal) {\n abstractMethodFail('isSupportedBy');\n }\n\n /**\n * Returns a copy of the specified temporal object with the specified period added.\n *\n * The period added is a multiple of this unit. For example, this method\n * could be used to add \"3 days\" to a date by calling this method on the\n * instance representing \"days\", passing the date and the period \"3\".\n * The period to be added may be negative, which is equivalent to subtraction.\n *\n * There are two equivalent ways of using this method.\n * The first is to invoke this method directly.\n * The second is to use {@link Temporal#plus}:\n *
\n * // these two lines are equivalent, but the second approach is recommended\n * temporal = thisUnit.doPlus(temporal);\n * temporal = temporal.plus(thisUnit);\n *\n * It is recommended to use the second approach, {@link plus},\n * as it is a lot clearer to read in code.\n *\n * Implementations should perform any queries or calculations using the units\n * available in {@link ChronoUnit} or the fields available in {@link ChronoField}.\n * If the field is not supported a {@link DateTimeException} must be thrown.\n *\n * Implementations must not alter the specified temporal object.\n * Instead, an adjusted copy of the original must be returned.\n * This provides equivalent, safe behavior for immutable and mutable implementations.\n *\n * @param {Temporal} dateTime the temporal object to adjust, not null\n * @param {number} periodToAdd the period of this unit to add, positive or negative\n * @return {Temporal} the adjusted temporal object, not null\n * @throws DateTimeException if the period cannot be added\n */\n // eslint-disable-next-line no-unused-vars\n addTo(dateTime, periodToAdd) {\n abstractMethodFail('addTo');\n }\n\n //-----------------------------------------------------------------------\n /**\n * Calculates the period in terms of this unit between two temporal objects of the same type.\n *\n * This calculates the period between two temporals in terms of this unit.\n * The start and end points are supplied as temporal objects and must be of the same type.\n * The result will be negative if the end is before the start.\n * For example, the period in hours between two temporal objects can be calculated\n * using {@link HOURS.between}.\n *\n * The calculation returns a whole number, representing the number of complete units between the two temporals.\n * For example, the period in hours between the times 11:30 and 13:29 will only b\n * one hour as it is one minute short of two hours.\n *\n * There are two equivalent ways of using this method.\n * The first is to invoke this method directly.\n * The second is to use {@link Temporal#until}:\n *
\n * // these two lines are equivalent\n * between = thisUnit.between(start, end);\n * between = start.until(end, thisUnit);\n *\n * The choice should be made based on which makes the code more readable.\n *\n * For example, this method allows the number of days between two dates to be calculated:\n *
\n * long daysBetween = DAYS.between(start, end);\n * // or alternatively\n * long daysBetween = start.until(end, DAYS);\n *\n * Implementations should perform any queries or calculations using the units available in\n * {@link ChronoUnit} or the fields available in {@link ChronoField}.\n * If the unit is not supported a DateTimeException must be thrown.\n * Implementations must not alter the specified temporal objects.\n *\n * @param {Temporal} temporal1 the base temporal object, not null\n * @param {Temporal} temporal2 the other temporal object, not null\n * @return {number} the period between temporal1 and temporal2 in terms of this unit;\n * positive if temporal2 is later than temporal1, negative if earlier\n * @throws DateTimeException if the period cannot be calculated\n * @throws ArithmeticException if numeric overflow occurs\n */\n // eslint-disable-next-line no-unused-vars\n between(temporal1, temporal2) {\n abstractMethodFail('between');\n }\n\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/temporal/TemporalUnit.js","/*\n * @copyright (c) 2016, Philipp Thürwächter & Pattrick Hüper\n * @license BSD-3-Clause (see LICENSE.md in the root directory of this source tree)\n */\n\n/**\n * attempt to avoid dependency cycles... define all constants here and they could be used\n * so instead of using e.g. Year.MAX_VALUE we could use YearConstants.MAX_VALUE to avoid the cycle\n */\nexport class YearConstants {}\n\nexport function _init() {\n /**\n * The minimum supported year\n */\n YearConstants.MIN_VALUE = -999999;\n /**\n * The maximum supported year\n */\n YearConstants.MAX_VALUE = 999999;\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/YearConstants.js","/**\n * @copyright (c) 2016, Philipp Thürwächter & Pattrick Hüper\n * @copyright (c) 2007-present, Stephen Colebourne & Michael Nascimento Santos\n * @license BSD-3-Clause (see LICENSE in the root directory of this source tree)\n */\n\n/**\n * A field of date-time, such as month-of-year or hour-of-minute.\n *\n * Date and time is expressed using fields which partition the time-line into something\n * meaningful for humans. Implementations of this interface represent those fields.\n *\n * The most commonly used units are defined in {@link ChronoField}.\n * Further fields are supplied in {@link IsoFields}, {@link WeekFields} and {@link JulianFields}.\n * Fields can also be written by application code by implementing this interface.\n *\n * The field works using double dispatch. Client code calls methods on a date-time like\n * {@link LocalDateTime} which check if the field is a {@link ChronoField}.\n * If it is, then the date-time must handle it.\n * Otherwise, the method call is re-dispatched to the matching method in this interface.\n *\n * @interface\n */\nexport class TemporalField {}\n\n\n\n// WEBPACK FOOTER //\n// ./src/temporal/TemporalField.js","/**\n * @copyright (c) 2016, Philipp Thürwächter & Pattrick Hüper\n * @copyright (c) 2007-present, Stephen Colebourne & Michael Nascimento Santos\n * @license BSD-3-Clause (see LICENSE in the root directory of this source tree)\n */\n\nimport {assert} from '../assert';\nimport {DateTimeException, IllegalArgumentException} from '../errors';\nimport {MathUtil} from '../MathUtil';\n\n/**\n * The range of valid values for a date-time field.\n * \n * All TemporalField instances have a valid range of values.\n * For example, the ISO day-of-month runs from 1 to somewhere between 28 and 31.\n * This class captures that valid range.\n * \n * It is important to be aware of the limitations of this class.\n * Only the minimum and maximum values are provided.\n * It is possible for there to be invalid values within the outer range.\n * For example, a weird field may have valid values of 1, 2, 4, 6, 7, thus\n * have a range of '1 - 7', despite that fact that values 3 and 5 are invalid.\n * \n * Instances of this class are not tied to a specific field.\n */\nexport class ValueRange {\n\n /**\n *\n * @param {!number} minSmallest\n * @param {!number} minLargest\n * @param {!number} maxSmallest\n * @param {!number} maxLargest\n */\n constructor(minSmallest, minLargest, maxSmallest, maxLargest) {\n assert(!(minSmallest > minLargest), 'Smallest minimum value \\'' + minSmallest +\n '\\' must be less than largest minimum value \\'' + minLargest + '\\'', IllegalArgumentException);\n assert(!(maxSmallest > maxLargest), 'Smallest maximum value \\'' + maxSmallest +\n '\\' must be less than largest maximum value \\'' + maxLargest + '\\'', IllegalArgumentException);\n assert(!(minLargest > maxLargest), 'Minimum value \\'' + minLargest +\n '\\' must be less than maximum value \\'' + maxLargest + '\\'', IllegalArgumentException);\n\n this._minSmallest = minSmallest;\n this._minLargest = minLargest;\n this._maxLargest = maxLargest;\n this._maxSmallest = maxSmallest;\n }\n\n /**\n * Is the value range fixed and fully known.\n *\n * For example, the ISO day-of-month runs from 1 to between 28 and 31.\n * Since there is uncertainty about the maximum value, the range is not fixed.\n * However, for the month of January, the range is always 1 to 31, thus it is fixed.\n *\n * @return {boolean} true if the set of values is fixed\n */\n isFixed() {\n return this._minSmallest === this._minLargest && this._maxSmallest === this._maxLargest;\n }\n\n /**\n *\n * @returns {number}\n */\n minimum(){\n return this._minSmallest;\n }\n\n /**\n *\n * @returns {number}\n */\n largestMinimum(){\n return this._minLargest;\n }\n\n /**\n *\n * @returns {number}\n */\n maximum(){\n return this._maxLargest;\n }\n\n /**\n *\n * @returns {number}\n */\n smallestMaximum(){\n return this._maxSmallest;\n }\n\n /**\n *\n * @returns {boolean}\n */\n isValidValue(value) {\n return (this.minimum() <= value && value <= this.maximum());\n }\n\n /**\n *\n * @param {number} value\n * @param {TemporalField} field\n */\n checkValidValue(value, field) {\n let msg;\n if (!this.isValidValue(value)) {\n if (field != null) {\n msg = ('Invalid value for ' + field + ' (valid values ' + (this.toString()) + '): ') + value;\n } else {\n msg = ('Invalid value (valid values ' + (this.toString()) + '): ') + value;\n }\n return assert(false, msg, DateTimeException);\n }\n }\n\n /**\n * Checks that the specified value is valid and fits in an `int`.\n *\n * This validates that the value is within the valid range of values and that\n * all valid values are within the bounds of an `int`.\n * The field is only used to improve the error message.\n *\n * @param {number} value - the value to check\n * @param {TemporalField} field - the field being checked, may be null\n * @return {number} the value that was passed in\n * @see #isValidIntValue(long)\n */\n checkValidIntValue(value, field) {\n if (this.isValidIntValue(value) === false) {\n throw new DateTimeException('Invalid int value for ' + field + ': ' + value);\n }\n return value;\n }\n\n /**\n * Checks if the value is within the valid range and that all values\n * in the range fit in an `int`.\n *\n * This method combines {@link isIntValue} and {@link isValidValue}.\n *\n * @param {number} value - the value to check\n * @return true if the value is valid and fits in an `int`\n */\n isValidIntValue(value) {\n return this.isIntValue() && this.isValidValue(value);\n }\n\n /**\n * Checks if all values in the range fit in an `int`.\n *\n * This checks that all valid values are within the bounds of an `int`.\n *\n * For example, the ISO month-of-year has values from 1 to 12, which fits in an `int`.\n * By comparison, ISO nano-of-day runs from 1 to 86,400,000,000,000 which does not fit in an `int`.\n *\n * This implementation uses {@link getMinimum} and {@link getMaximum}.\n *\n * @return boolean if a valid value always fits in an `int`\n */\n isIntValue() { // should be isSafeIntegerValue\n return this.minimum() >= MathUtil.MIN_SAFE_INTEGER && this.maximum() <= MathUtil.MAX_SAFE_INTEGER;\n }\n\n /**\n * Checks if this range is equal to another range.\n *\n * The comparison is based on the four values, minimum, largest minimum,\n * smallest maximum and maximum.\n * Only objects of type {@link ValueRange} are compared, other types return false.\n *\n * @param {*} other - the object to check, null returns false\n * @return {boolean} true if this is equal to the other range\n */\n equals(other) {\n if (other === this) {\n return true;\n }\n if (other instanceof ValueRange) {\n return this._minSmallest === other._minSmallest && this._minLargest === other._minLargest &&\n this._maxSmallest === other._maxSmallest && this._maxLargest === other._maxLargest;\n }\n return false;\n }\n\n /**\n * A hash code for this range.\n *\n * @return {number} a suitable hash code\n */\n hashCode() {\n const 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 let str = this.minimum() + (this.minimum() !== this.largestMinimum() ? '/' + (this.largestMinimum()) : '');\n str += ' - ';\n str += this.smallestMaximum() + (this.smallestMaximum() !== this.maximum() ? '/' + (this.maximum()) : '');\n return str;\n }\n\n /*\n * called with 2 params: Obtains a fixed value range.\n *\n * This factory obtains a range where the minimum and maximum values are fixed.\n * For example, the ISO month-of-year always runs from 1 to 12.\n *\n * @param min the minimum value\n * @param max the maximum value\n * @return the ValueRange for min, max, not null\n\n * called with 3 params: Obtains a variable value range.\n *\n * This factory obtains a range where the minimum value is fixed and the maximum value may vary.\n * For example, the ISO day-of-month always starts at 1, but ends between 28 and 31.\n *\n * @param min the minimum value\n * @param maxSmallest the smallest maximum value\n * @param maxLargest the largest maximum value\n * @return the ValueRange for min, smallest max, largest max, not null\n\n * called with 4 params: Obtains a fully variable value range.\n *\n * This factory obtains a range where both the minimum and maximum value may vary.\n *\n * @param minSmallest the smallest minimum value\n * @param minLargest the largest minimum value\n * @param maxSmallest the smallest maximum value\n * @param maxLargest the largest maximum value\n *\n * @return {ValueRange} the ValueRange for smallest min, largest min, smallest max, largest max, not null\n */\n static of() {\n if (arguments.length === 2) {\n return new ValueRange(arguments[0], arguments[0], arguments[1], arguments[1]);\n } else if (arguments.length === 3) {\n return new ValueRange(arguments[0], arguments[0], arguments[1], arguments[2]);\n } else if (arguments.length === 4) {\n return new ValueRange(arguments[0], arguments[1], arguments[2], arguments[3]);\n } else {\n return assert(false, 'Invalid number of arguments ' + arguments.length, IllegalArgumentException);\n }\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/temporal/ValueRange.js","/*\n * @copyright (c) 2016, Philipp Thürwächter & Pattrick Hüper\n * @copyright (c) 2007-present, Stephen Colebourne & Michael Nascimento Santos\n * @license BSD-3-Clause (see LICENSE in the root directory of this source tree)\n */\n\nimport {TemporalAccessor} from './TemporalAccessor';\n\n/**\n * Framework-level interface defining read-write access to a temporal object,\n * such as a date, time, offset or some combination of these.\n *\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 fields (see {@link TemporalField}) or queries (see {@link TemporalQuery}).\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 {@link TemporalField} with the number held using\n * a `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} and the {@link ZoneId}.\n * These can be accessed using 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 {@link 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 * ### When to implement\n *\n * A class should implement this interface if it meets three criteria:\n *\n * * it provides access to date/time/offset information, as per {@link TemporalAccessor}\n * * the set of fields are contiguous from the largest to the smallest\n * * the set of fields are complete, such that no other field is needed to define the\n * valid range of values for the fields that are represented\n *\n * Four examples make this clear:\n *\n * * {@link LocalDate} implements this interface as it represents a set of fields\n * that are contiguous from days to forever and require no external information to determine\n * the validity of each date. It is therefore able to implement plus/minus correctly.\n * * {@link LocalTime} implements this interface as it represents a set of fields\n * that are contiguous from nanos to within days and require no external information to determine\n * validity. It is able to implement plus/minus correctly, by wrapping around the day.\n * * {@link MonthDay}, the combination of month-of-year and day-of-month, does not implement\n * this interface. While the combination is contiguous, from days to months within years,\n * the combination does not have sufficient information to define the valid range of values\n * for day-of-month. As such, it is unable to implement plus/minus correctly.\n * * The combination day-of-week and day-of-month (\"Friday the 13th\") should not implement\n * this interface. It does not represent a contiguous set of fields, as days to weeks overlaps\n * days to months.\n *\n * @interface\n */\nexport class Temporal extends TemporalAccessor {}\n\n\n\n// WEBPACK FOOTER //\n// ./src/temporal/Temporal.js","/**\n * @copyright (c) 2016, Philipp Thürwächter & Pattrick Hüper\n * @copyright (c) 2007-present, Stephen Colebourne & Michael Nascimento Santos\n * @license BSD-3-Clause (see LICENSE in the root directory of this source tree)\n */\n\nimport {UnsupportedTemporalTypeException} from '../errors';\n\nimport {ChronoField} from './ChronoField';\nimport {TemporalQueries} from './TemporalQueries';\n\nexport class TemporalAccessor {\n /**\n * Queries this date-time.\n *\n * This queries this date-time using the specified query strategy object.\n *\n * Queries are a key tool for extracting information from date-times.\n * They exists to externalize the process of querying, permitting different\n * approaches, as per the strategy design pattern.\n * Examples might be a query that checks if the date is the day before February 29th\n * in a leap year, or calculates the number of days to your next birthday.\n *\n * The most common query implementations are method references, such as\n * {@link LocalDate::from} and {@link ZoneId::from}.\n * Further implementations are on {@link TemporalQueries}.\n * Queries may also be defined by applications.\n *\n * @implSpec\n * Implementations of this method must behave as follows:\n *
\n if (query == TemporalQueries.zoneId()\n || query == TemporalQueries.chronology()\n || query == TemporalQueries.precision()) {\n return null;\n }\n return query.queryFrom(this);\n *\n *\n * @param {TemporalQuery} query the query to invoke, not null\n * @return the query result, null may be returned (defined by the query)\n * @throws DateTimeException if unable to query\n * @throws ArithmeticException if numeric overflow occurs\n */\n query(query) {\n if (query === TemporalQueries.zoneId()\n || query === TemporalQueries.chronology()\n || query === TemporalQueries.precision()) {\n return null;\n }\n return query.queryFrom(this);\n }\n\n /**\n * Gets the value of the specified field as an `int`.\n *\n * This queries the date-time for the value for the specified field.\n * The returned value will always be within the valid range of values for the field.\n * If the date-time cannot return the value, because the field is unsupported or for\n * some other reason, an exception will be thrown.\n *\n * ### Specification for implementors\n *\n * Implementations must check and handle all fields defined in {@link ChronoField}.\n * If the field is supported and has an `int` range, then the value of\n * the field must be returned.\n * If unsupported, then a {@link DateTimeException} must be thrown.\n *\n * If the field is not a {@link ChronoField}, then the result of this method\n * is obtained by invoking {@link TemporalField.getFrom}\n * passing `this` as the argument.\n *\n * Implementations must not alter either this object.\n *\n * @param {TemporalField} field - the field to get, not null\n * @return {number} the value for the field, within the valid range of values\n * @throws DateTimeException if a value for the field cannot be obtained\n * @throws DateTimeException if the range of valid values for the field exceeds an `int`\n * @throws DateTimeException if the value is outside the range of valid values for the field\n * @throws ArithmeticException if numeric overflow occurs\n */\n get(field) {\n return this.range(field).checkValidIntValue(this.getLong(field), field);\n }\n\n /**\n * Gets the range of valid values for the specified field.\n *\n * All fields can be expressed as a `long` integer.\n * This method returns an object that describes the valid range for that value.\n * The value of this temporal object is used to enhance the accuracy of the returned range.\n * If the date-time cannot return the range, because the field is unsupported or for\n * some other reason, an exception will be thrown.\n *\n * Note that the result only describes the minimum and maximum valid values\n * and it is important not to read too much into them. For example, there\n * could be values within the range that are invalid for the field.\n *\n * ### Specification for implementors\n *\n * Implementations must check and handle all fields defined in {@link ChronoField}.\n * If the field is supported, then the range of the field must be returned.\n * If unsupported, then a {@link DateTimeException} must be thrown.\n *\n * If the field is not a {@link ChronoField}, then the result of this method\n * is obtained by invoking {@link TemporalField.rangeRefinedBy}\n * passing `this` as the argument.\n *\n * Implementations must not alter either this object.\n *\n * @param {TemporalField} field the field to query the range for, not null\n * @return {ValueRange} the range of valid values for the field, not null\n * @throws DateTimeException if the range for the field cannot be obtained\n */\n range(field) {\n if (field instanceof ChronoField) {\n if (this.isSupported(field)) {\n return field.range();\n }\n throw new UnsupportedTemporalTypeException('Unsupported field: ' + field);\n }\n return field.rangeRefinedBy(this);\n }\n\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/temporal/TemporalAccessor.js","/**\n * @copyright (c) 2016, Philipp Thürwächter & Pattrick Hüper\n * @copyright (c) 2007-present, Stephen Colebourne & Michael Nascimento Santos\n * @license BSD-3-Clause (see LICENSE in the root directory of this source tree)\n */\n\n/**\n * Common implementations of {@link TemporalQuery}.\n *\n * This class provides common implementations of {@link TemporalQuery}.\n * These queries are primarily used as optimizations, allowing the internals\n * of other objects to be extracted effectively. Note that application code\n * can also use the {@link from} method on most temporal\n * objects as a method reference matching the query interface, such as\n * {@link LocalDate::from} and {@link ZoneId::from}.\n *\n * There are two equivalent ways of using a {@link TemporalQuery}.\n * The first is to invoke the method on the interface directly.\n * The second is to use {@link TemporalAccessor#query}:\n *
\n * // these two lines are equivalent, but the second approach is recommended\n * dateTime = query.queryFrom(dateTime);\n * dateTime = dateTime.query(query);\n *\n * It is recommended to use the second approach, {@link query},\n * as it is a lot clearer to read in code.\n *\n */\nexport class TemporalQueries {\n\n /**\n * A strict query for the {@link ZoneId}.\n *\n * This queries a {@link TemporalAccessor} for the zone.\n * The zone is only returned if the date-time conceptually contains a {@link ZoneId}.\n * It will not be returned if the date-time only conceptually has an {@link ZoneOffset}.\n * Thus a {@link ZonedDateTime} will return the result of\n * {@link getZone}, but an {@link OffsetDateTime} will\n * return null.\n *\n * In most cases, applications should use {@link ZONE} as this query is too strict.\n *\n * The result from JDK classes implementing {@link TemporalAccessor} is as follows:\n * * * {@link LocalDate} returns null\n * * {@link LocalTime} returns null\n * * {@link LocalDateTime} returns null\n * * {@link ZonedDateTime} returns the associated zone\n * * {@link OffsetTime} returns null\n * * {@link OffsetDateTime} returns null\n * * {@link ChronoLocalDate} returns null\n * * {@link ChronoLocalDateTime} returns null\n * * {@link ChronoZonedDateTime} returns the associated zone\n * * {@link Era} returns null\n * * {@link DayOfWeek} returns null\n * * {@link Month} returns null\n * * {@link Year} returns null\n * * {@link YearMonth} returns null\n * * {@link MonthDay} returns null\n * * {@link ZoneOffset} returns null\n * * {@link Instant} returns null\n *\n * @return a query that can obtain the zone ID of a temporal, not null\n */\n static zoneId() {\n return TemporalQueries.ZONE_ID;\n }\n\n /**\n * A query for the {@link Chronology}.\n *\n * This queries a {@link TemporalAccessor} for the chronology.\n * If the target {@link TemporalAccessor} represents a date, or part of a date,\n * then it should return the chronology that the date is expressed in.\n * As a result of this definition, objects only representing time, such as\n * {@link LocalTime}, will return null.\n *\n * The result from js-joda classes implementing {@link TemporalAccessor} is as follows:\n *\n * * {@link LocalDate} returns * {@link IsoChronology.INSTANCE}\n * * {@link LocalTime} returns null (does not represent a date)\n * * {@link LocalDateTime} returns * {@link IsoChronology.INSTANCE}\n * * {@link ZonedDateTime} returns * {@link IsoChronology.INSTANCE}\n * * {@link OffsetTime} returns null (does not represent a date)\n * * {@link OffsetDateTime} returns * {@link IsoChronology.INSTANCE}\n * * {@link ChronoLocalDate} returns the associated chronology\n * * {@link ChronoLocalDateTime} returns the associated chronology\n * * {@link ChronoZonedDateTime} returns the associated chronology\n * * {@link Era} returns the associated chronology\n * * {@link DayOfWeek} returns null (shared across chronologies)\n * * {@link Month} returns * {@link IsoChronology.INSTANCE}\n * * {@link Year} returns * {@link IsoChronology.INSTANCE}\n * * {@link YearMonth} returns * {@link IsoChronology.INSTANCE}\n * * {@link MonthDay} returns null * {@link IsoChronology.INSTANCE}\n * * {@link ZoneOffset} returns null (does not represent a date)\n * * {@link Instant} returns null (does not represent a date)\n *\n * The method {@link Chronology#from} can be used as a\n * {@link TemporalQuery}\n * That method is equivalent to this query, except that it throws an\n * exception if a chronology cannot be obtained.\n *\n * @return {TemporalQuery} a query that can obtain the chronology of a temporal, not null\n */\n static chronology() {\n return TemporalQueries.CHRONO;\n }\n\n /**\n * A query for the smallest supported unit.\n *\n * This queries a {@link TemporalAccessor} for the time precision.\n * If the target {@link TemporalAccessor} represents a consistent or complete date-time,\n * date or time then this must return the smallest precision actually supported.\n * Note that fields such as {@link NANO_OF_DAY} and {@link NANO_OF_SECOND}\n * are defined to always return ignoring the precision, thus this is the only\n * way to find the actual smallest supported unit.\n * For example, were {@link GregorianCalendar} to implement {@link TemporalAccessor}\n * it would return a precision of {@link MILLIS}.\n *\n * The result from js-joda classes implementing {@link TemporalAccessor} is as follows:\n *\n * {@link LocalDate} returns {@link DAYS}\n * {@link LocalTime} returns {@link NANOS}\n * {@link LocalDateTime} returns {@link NANOS}\n * {@link ZonedDateTime} returns {@link NANOS}\n * {@link OffsetTime} returns {@link NANOS}\n * {@link OffsetDateTime} returns {@link NANOS}\n * {@link ChronoLocalDate} returns {@link DAYS}\n * {@link ChronoLocalDateTime} returns {@link NANOS}\n * {@link ChronoZonedDateTime} returns {@link NANOS}\n * {@link Era} returns {@link ERAS}\n * {@link DayOfWeek} returns {@link DAYS}\n * {@link Month} returns {@link MONTHS}\n * {@link Year} returns {@link YEARS}\n * {@link YearMonth} returns {@link MONTHS}\n * {@link MonthDay} returns null (does not represent a complete date or time)\n * {@link ZoneOffset} returns null (does not represent a date or time)\n * {@link Instant} returns {@link NANOS}\n *\n * @return a query that can obtain the precision of a temporal, not null\n */\n static precision() {\n return TemporalQueries.PRECISION;\n }\n\n /**\n * A lenient query for the {@link ZoneId}, falling back to the {@link ZoneOffset}.\n *\n * This queries a {@link TemporalAccessor} for the zone.\n * It first tries to obtain the zone, using {@link zoneId}.\n * If that is not found it tries to obtain the {@link offset}.\n *\n * In most cases, applications should use this query rather than {@link zoneId}.\n *\n * This query examines the {@link ChronoField#OFFSET_SECONDS}\n * field and uses it to create a {@link ZoneOffset}.\n *\n * The method {@link ZoneId#from} can be used as a\n * {@link TemporalQuery} via a method reference, {@link ZoneId::from}.\n * That method is equivalent to this query, except that it throws an\n * exception if a zone cannot be obtained.\n *\n * @return a query that can obtain the zone ID or offset of a temporal, not null\n */\n static zone() {\n return TemporalQueries.ZONE;\n }\n\n /**\n * A query for {@link ZoneOffset} returning null if not found.\n *\n * This returns a {@link TemporalQuery} that can be used to query a temporal\n * object for the offset. The query will return null if the temporal\n * object cannot supply an offset.\n *\n * The query implementation examines the {@link ChronoField#OFFSET_SECONDS}\n * field and uses it to create a {@link ZoneOffset}.\n *\n * The method {@link java.time.ZoneOffset#from} can be used as a\n * {@link TemporalQuery} via a method reference, {@link ZoneOffset::from}.\n * This query and {@link ZoneOffset::from} will return the same result if the\n * temporal object contains an offset. If the temporal object does not contain\n * an offset, then the method reference will throw an exception, whereas this\n * query will return null.\n *\n * @return a query that can obtain the offset of a temporal, not null\n */\n static offset() {\n return TemporalQueries.OFFSET;\n }\n\n /**\n * A query for {@link LocalDate} returning null if not found.\n *\n * This returns a {@link TemporalQuery} that can be used to query a temporal\n * object for the local date. The query will return null if the temporal\n * object cannot supply a local date.\n *\n * The query implementation examines the {@link ChronoField#EPOCH_DAY}\n * field and uses it to create a {@link LocalDate}.\n *\n * @return a query that can obtain the date of a temporal, not null\n */\n static localDate() {\n return TemporalQueries.LOCAL_DATE;\n }\n\n /**\n * A query for {@link LocalTime} returning null if not found.\n *\n * This returns a {@link TemporalQuery} that can be used to query a temporal\n * object for the local time. The query will return null if the temporal\n * object cannot supply a local time.\n *\n * The query implementation examines the {@link ChronoField#NANO_OF_DAY}\n * field and uses it to create a {@link LocalTime}.\n *\n * @return a query that can obtain the time of a temporal, not null\n */\n static localTime() {\n return TemporalQueries.LOCAL_TIME;\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/temporal/TemporalQueries.js","/*\n * @copyright (c) 2016, Philipp Thürwächter & Pattrick Hüper\n * @copyright (c) 2007-present, Stephen Colebourne & Michael Nascimento Santos\n * @license BSD-3-Clause (see LICENSE in the root directory of this source tree)\n */\n\nimport {abstractMethodFail} from '../assert';\nimport {Enum} from '../Enum';\n\n\n/**\n * Strategy for querying a temporal object.\n *\n * Queries are a key tool for extracting information from temporal objects.\n * They exist to externalize the process of querying, permitting different\n * approaches, as per the strategy design pattern.\n * Examples might be a query that checks if the date is the day before February 29th\n * in a leap year, or calculates the number of days to your next birthday.\n *\n * The {@link TemporalField} interface provides another mechanism for querying\n * temporal objects. That interface is limited to returning a `long`.\n * By contrast, queries can return any type.\n *\n * There are two equivalent ways of using a {@link TemporalQuery}.\n * The first is to invoke the method on this interface directly.\n * The second is to use {@link TemporalAccessor#query}:\n *
\n * // these two lines are equivalent, but the second approach is recommended\n * temporal = thisQuery.queryFrom(temporal);\n * temporal = temporal.query(thisQuery);\n *\n * It is recommended to use the second approach, {@link query},\n * as it is a lot clearer to read in code.\n *\n * The most common implementations are method references, such as\n * {@link LocalDate::from} and {@link ZoneId::from}.\n * Further implementations are on {@link TemporalQueries}.\n * Queries may also be defined by applications.\n *\n * ### Specification for implementors\n *\n * This interface places no restrictions on the mutability of implementations,\n * however immutability is strongly recommended.\n *\n * @interface\n */\nexport class TemporalQuery extends Enum {\n /**\n * Queries the specified temporal object.\n *\n * This queries the specified temporal object to return an object using the logic\n * encapsulated in the implementing class.\n * Examples might be a query that checks if the date is the day before February 29th\n * in a leap year, or calculates the number of days to your next birthday.\n *\n * There are two equivalent ways of using this method.\n * The first is to invoke this method directly.\n * The second is to use {@link TemporalAccessor#query}:\n *
\n * // these two lines are equivalent, but the second approach is recommended\n * temporal = thisQuery.queryFrom(temporal);\n * temporal = temporal.query(thisQuery);\n *\n * It is recommended to use the second approach, {@link query},\n * as it is a lot clearer to read in code.\n *\n * ### Specification for implementors\n *\n * The implementation must take the input object and query it.\n * The implementation defines the logic of the query and is responsible for\n * documenting that logic.\n * It may use any method on {@link TemporalAccessor} to determine the result.\n * The input object must not be altered.\n *\n * The input temporal object may be in a calendar system other than ISO.\n * Implementations may choose to document compatibility with other calendar systems,\n * or reject non-ISO temporal objects by querying the chronology (see {@link TemporalQueries#chronology}).\n *\n * This method may be called from multiple threads in parallel.\n * It must be thread-safe when invoked.\n *\n * @param {TemporalAccessor} temporal the temporal object to query, not null\n * @return the queried value, may return null to indicate not found\n * @throws DateTimeException if unable to query\n * @throws ArithmeticException if numeric overflow occurs\n */\n // eslint-disable-next-line no-unused-vars\n queryFrom(temporal){\n abstractMethodFail('queryFrom');\n }\n\n}\n\n/**\n * 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// WEBPACK FOOTER //\n// ./src/temporal/TemporalQuery.js","/**\n * @copyright (c) 2016, Philipp Thürwächter & Pattrick Hüper\n * @copyright (c) 2007-present, Stephen Colebourne & Michael Nascimento Santos\n * @license BSD-3-Clause (see LICENSE in the root directory of this source tree)\n */\n\nimport {assert} from './assert';\nimport {MathUtil} from './MathUtil';\n\nimport {ChronoField} from './temporal/ChronoField';\nimport {ChronoUnit} from './temporal/ChronoUnit';\nimport {DateTimeException, IllegalArgumentException, 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 `int` value.\n * The `int` value follows normal usage and the ISO-8601 standard,\n * from 1 (January) to 12 (December). It is recommended that applications use the static values defined by this class\n * rather than the `int` value to ensure code clarity.\n *\n * This class represents a common concept that is found in many calendar systems.\n * As such, this class may be used by any calendar system that has the month-of-year\n * concept defined exactly equivalent to the ISO-8601 calendar system.\n *\n * ### Static properties of Class {@link Month}\n *\n * Month.JANUARY, Month.FEBRUARY, Month.MARCH, Month.APRIL, Month.MAY, Month.JUNE,\n * Month.JULY, Month.AUGUST, Month.SEPTEMBER, Month.OCTOBER, Month.NOVEMBER, Month.DECEMBER\n *\n */\nexport class Month extends Temporal {\n \n /**\n *\n * @param {number} value\n */\n constructor(value) {\n super();\n this._value = value;\n }\n\n /**\n *\n * @return {number} gets the value\n */\n value() {\n return this._value;\n }\n \n /**\n * Gets the textual representation, such as 'Jan' or 'December'.\n *\n * This returns the textual name used to identify the month-of-year.\n * The parameters control the length of the returned text and the locale.\n *\n * If no textual mapping is found then the numeric value (see {@link getValue}) is returned.\n *\n * @param {TextStyle} style - the length of the text required, not null\n * @param {Locale} locale - the locale to use, not null\n * @return {string} the text value of the day-of-week, not null\n */\n getDisplayName(style, locale) {\n // TODO:\n throw new IllegalArgumentException('Pattern using (localized) text not implemented yet!');\n //eslint-disable-next-line no-unreachable\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 range (see {@link range}) and\n * get (see {@link get}) methods will throw an exception.\n *\n * If the field is MONTH_OF_YEAR (see {@link ChronoField#MONTH_OF_YEAR}) then\n * this method returns true.\n * All other {@link ChronoField} instances will return false.\n *\n * If the field is not a {@link ChronoField}, then the result of this method\n * is obtained by invoking {@link TemporalField.isSupportedBy}\n * passing `this` as the argument.\n * Whether the field is supported is determined by the field.\n *\n * @param {TemporalField} field - the field to check, null returns false\n * @return {boolean} true if the field is supported on this month-of-year, false if not\n */\n isSupported(field) {\n if (null === field) {\n return false;\n }\n if (field instanceof ChronoField) {\n return field === ChronoField.MONTH_OF_YEAR;\n }\n return field != null && field.isSupportedBy(this);\n }\n\n /**\n * Gets the value of the specified field from this month-of-year as an `int`.\n *\n * This queries this month for the value of the specified field.\n * The returned value will always be within the valid range of values for the field.\n * If it is not possible to return the value, because the field is not supported\n * or for some other reason, an exception is thrown.\n *\n * If the field is MONTH_OF_YEAR (see {@link ChronoField#MONTH_OF_YEAR}) then the\n * value of the month-of-year, from 1 to 12, will be returned.\n * All other {@link ChronoField} instances will throw an {@link UnsupportedTemporalTypeException}.\n *\n * If the field is not a {@link ChronoField}, then the result of this method\n * is obtained by invoking {@link TemporalField.getFrom}\n * passing `this` as the argument. Whether the value can be obtained,\n * and what the value represents, is determined by the field.\n *\n * @param {TemporalField} field - the field to get, not null\n * @return {Number} the value for the field, within the valid range of values\n * @throws DateTimeException if a value for the field cannot be obtained or\n * the value is outside the range of valid values for the field\n * @throws UnsupportedTemporalTypeException if the field is not supported or\n * the range of values exceeds an `int`\n * @throws ArithmeticException if numeric overflow occurs\n */\n get(field) {\n if (field === ChronoField.MONTH_OF_YEAR) {\n return this.value();\n }\n return this.range(field).checkValidIntValue(this.getLong(field), field);\n }\n\n /**\n * Gets the value of the specified field from this month-of-year as a `long`.\n *\n * This queries this month for the value of the specified field.\n * If it is not possible to return the value, because the field is not supported\n * or for some other reason, an exception is thrown.\n *\n * If the field is MONTH_OF_YEAR (see {@link ChronoField#MONTH_OF_YEAR}) then the\n * value of the month-of-year, from 1 to 12, will be returned.\n * All other {@link ChronoField} instances will throw an {@link UnsupportedTemporalTypeException}.\n *\n * If the field is not a {@link ChronoField}, then the result of this method\n * is obtained by invoking {@link TemporalField.getFrom}\n * passing `this` as the argument. Whether the value can be obtained,\n * and what the value represents, is determined by the field.\n *\n * @param {TemporalField} field - the field to get, not null\n * @return {Number} the value for the field\n * @throws DateTimeException if a value for the field cannot be obtained\n * @throws UnsupportedTemporalTypeException if the field is not supported\n * @throws ArithmeticException if numeric overflow occurs\n */\n getLong(field) {\n if (field === ChronoField.MONTH_OF_YEAR) {\n return this.value();\n } else if (field instanceof ChronoField) {\n throw new UnsupportedTemporalTypeException('Unsupported field: ' + field);\n }\n return field.getFrom(this);\n }\n \n /**\n * Returns the month-of-year that is the specified number of months after this one.\n *\n * The calculation rolls around the end of the year from December to January.\n * The specified period may be negative.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {number} months - the months to add, positive or negative\n * @return {Month} the resulting month, not null\n */\n plus(months) {\n const amount = MathUtil.intMod(months, 12) + 12; // + 12 to make sure negative arguments are positive, the total is \"corrected\" by the next % 12\n let newMonthVal = MathUtil.intMod((this.value() + amount), 12);\n /* December is 12, not 0, but 12 % 12 = 0 */\n newMonthVal = newMonthVal === 0 ? 12 : newMonthVal;\n return Month.of(newMonthVal);\n }\n\n /**\n * Returns the month-of-year that is the specified number of months before this one.\n *\n * The calculation rolls around the start of the year from January to December.\n * The specified period may be negative.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {number} months - the months to subtract, positive or negative\n * @return {Month} the resulting month, not null\n */\n minus(months) {\n return this.plus(-1 * MathUtil.intMod(months, 12));\n }\n\n /**\n * Gets the length of this month in days.\n *\n * This takes a flag to determine whether to return the length for a leap year or not.\n *\n * February has 28 days in a standard year and 29 days in a leap year.\n * April, June, September and November have 30 days.\n * All other months have 31 days.\n *\n * @param {boolean} leapYear - true if the length is required for a leap year\n * @return {number} the length of this month in days, from 28 to 31\n */\n length(leapYear) {\n switch (this) {\n case Month.FEBRUARY:\n return (leapYear ? 29 : 28);\n case Month.APRIL:\n case Month.JUNE:\n case Month.SEPTEMBER:\n case Month.NOVEMBER:\n return 30;\n default:\n return 31;\n }\n }\n\n /**\n * Gets the minimum length of this month in days.\n *\n * February has a minimum length of 28 days.\n * April, June, September and November have 30 days.\n * All other months have 31 days.\n *\n * @return {number} the minimum length of this month in days, from 28 to 31\n */\n minLength() {\n switch (this) {\n case Month.FEBRUARY:\n return 28;\n case Month.APRIL:\n case Month.JUNE:\n case Month.SEPTEMBER:\n case Month.NOVEMBER:\n return 30;\n default:\n return 31;\n }\n }\n\n /**\n * Gets the maximum length of this month in days.\n *\n * February has a maximum length of 29 days.\n * April, June, September and November have 30 days.\n * All other months have 31 days.\n *\n * @return {number} the maximum length of this month in days, from 29 to 31\n */\n maxLength() {\n switch (this) {\n case Month.FEBRUARY:\n return 29;\n case Month.APRIL:\n case Month.JUNE:\n case Month.SEPTEMBER:\n case Month.NOVEMBER:\n return 30;\n default:\n return 31;\n }\n }\n\n /**\n * Gets the day-of-year corresponding to the first day of this month.\n *\n * This returns the day-of-year that this month begins on, using the leap\n * year flag to determine the length of February.\n *\n * @param {boolean} leapYear - true if the length is required for a leap year\n * @return {number} the day of year corresponding to the first day of this month, from 1 to 336\n */\n firstDayOfYear(leapYear) {\n const leap = leapYear ? 1 : 0;\n switch (this) {\n case Month.JANUARY:\n return 1;\n case Month.FEBRUARY:\n return 32;\n case Month.MARCH:\n return 60 + leap;\n case Month.APRIL:\n return 91 + leap;\n case Month.MAY:\n return 121 + leap;\n case Month.JUNE:\n return 152 + leap;\n case Month.JULY:\n return 182 + leap;\n case Month.AUGUST:\n return 213 + leap;\n case Month.SEPTEMBER:\n return 244 + leap;\n case Month.OCTOBER:\n return 274 + leap;\n case Month.NOVEMBER:\n return 305 + leap;\n case Month.DECEMBER:\n default:\n return 335 + leap;\n }\n }\n\n /**\n * Gets the month corresponding to the first month of this quarter.\n *\n * The year can be divided into four quarters.\n * This method returns the first month of the quarter for the base month.\n * January, February and March return January.\n * April, May and June return April.\n * July, August and September return July.\n * October, November and December return October.\n *\n * @return {Month} the first month of the quarter corresponding to this month, not null\n */\n firstMonthOfQuarter() {\n switch (this) {\n case Month.JANUARY:\n case Month.FEBRUARY:\n case Month.MARCH:\n return Month.JANUARY;\n case Month.APRIL:\n case Month.MAY:\n case Month.JUNE:\n return Month.APRIL;\n case Month.JULY:\n case Month.AUGUST:\n case Month.SEPTEMBER:\n return Month.JULY;\n case Month.OCTOBER:\n case Month.NOVEMBER:\n case Month.DECEMBER:\n default:\n return Month.OCTOBER;\n }\n }\n \n /**\n * Queries this month-of-year using the specified query.\n *\n * This queries this month-of-year using the specified query strategy object.\n * The {@link TemporalQuery} object defines the logic to be used to\n * obtain the result. Read the documentation of the query to understand\n * what the result of this method will be.\n *\n * The result of this method is obtained by invoking the\n * {@link TemporalQuery#queryFrom} method on the\n * specified query passing `this` as the argument.\n *\n * @param {TemporalQuery} query - the query to invoke, not null\n * @return {*} the query result, null may be returned (defined by the query)\n * @throws DateTimeException if unable to query (defined by the query)\n * @throws ArithmeticException if numeric overflow occurs (defined by the query)\n */\n query(query) {\n assert(query != null, 'query() parameter must not be null', DateTimeException);\n if (query === TemporalQueries.chronology()) {\n return IsoChronology.INSTANCE;\n } else if (query === TemporalQueries.precision()) {\n return ChronoUnit.MONTHS;\n }\n return super.query(query);\n }\n\n\n\n /**\n * toString implementation... in JDK this is inherited from the Enum class\n * \n * @return {String}\n */\n toString() {\n switch (this) {\n case Month.JANUARY:\n return 'JANUARY';\n case Month.FEBRUARY:\n return 'FEBRUARY';\n case Month.MARCH:\n return 'MARCH';\n case Month.APRIL:\n return 'APRIL';\n case Month.MAY:\n return 'MAY';\n case Month.JUNE:\n return 'JUNE';\n case Month.JULY:\n return 'JULY';\n case Month.AUGUST:\n return 'AUGUST';\n case Month.SEPTEMBER:\n return 'SEPTEMBER';\n case Month.OCTOBER:\n return 'OCTOBER';\n case Month.NOVEMBER:\n return 'NOVEMBER';\n case Month.DECEMBER:\n return 'DECEMBER';\n default:\n return 'unknown Month, value: ' + this.value();\n }\n }\n\n /**\n * Adjusts the specified temporal object to have this month-of-year.\n *\n * This returns a temporal object of the same observable type as the input\n * with the month-of-year changed to be the same as this.\n *\n * The adjustment is equivalent to using {@link Temporal#with}\n * passing {@link ChronoField#MONTH_OF_YEAR} as the field.\n * If the specified temporal object does not use the ISO calendar system then\n * a {@link DateTimeException} is thrown.\n *\n * In most cases, it is clearer to reverse the calling pattern by using\n * {@link Temporal#with}:\n *
\n * // these two lines are equivalent, but the second approach is recommended\n * temporal = thisMonth.adjustInto(temporal);\n * temporal = temporal.with(thisMonth);\n *\n *\n * For example, given a date in May, the following are output:\n *
\n * dateInMay.with(JANUARY); // four months earlier\n * dateInMay.with(APRIL); // one months earlier\n * dateInMay.with(MAY); // same date\n * dateInMay.with(JUNE); // one month later\n * dateInMay.with(DECEMBER); // seven months later\n *\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {Temporal} temporal - the target object to be adjusted, not null\n * @return {Temporal} the adjusted object, not null\n * @throws DateTimeException if unable to make the adjustment\n * @throws ArithmeticException if numeric overflow occurs\n */\n adjustInto(temporal) {\n /* we support only ISO for now\n if (Chronology.from(temporal).equals(IsoChronology.INSTANCE) === false) {\n throw new DateTimeException('Adjustment only supported on ISO date-time');\n }\n */\n return temporal.with(ChronoField.MONTH_OF_YEAR, this.value());\n }\n \n /**\n * replacement for enum values\n * @return {Month[]}\n */\n static values(){\n return MONTHS.slice();\n }\n\n /**\n *\n * @param {number} month\n * @return {Month} not null\n **/\n static of(month) {\n if (month < 1 || month > 12) {\n assert(false, 'Invalid value for MonthOfYear: ' + month, DateTimeException);\n }\n return MONTHS[month-1];\n }\n \n /**\n * Obtains an instance of {@link Month} from a temporal object.\n *\n * This obtains a month based on the specified temporal.\n * A {@link TemporalAccessor} represents an arbitrary set of date and time information,\n * which this factory converts to an instance of {@link Month}.\n *\n * The conversion extracts the MONTH_OF_YEAR (see {@link ChronoField#MONTH_OF_YEAR}) field.\n * The extraction is only permitted if the temporal object has an ISO\n * chronology, or can be converted to a {@link LocalDate}.\n *\n * This method matches the signature of the functional interface {@link TemporalQuery}\n * allowing it to be used in queries via method reference, {@link Month::from}.\n *\n * @param {TemporalAccessor} temporal the temporal object to convert, not null\n * @return {Month} the month-of-year, not null\n * @throws DateTimeException if unable to convert to a {@link Month}\n */\n static from(temporal) {\n if (temporal instanceof Month) {\n return temporal;\n }\n try {\n /* only ISO for now\n if (IsoChronology.INSTANCE.equals(Chronology.from(temporal)) == false) {\n temporal = LocalDate.from(temporal);\n }*/\n return Month.of(temporal.get(ChronoField.MONTH_OF_YEAR));\n } catch (ex) {\n throw new DateTimeException('Unable to obtain Month from TemporalAccessor: ' +\n temporal + ' of type ' + (temporal && temporal.constructor != null ? temporal.constructor.name : ''), ex);\n }\n }\n}\n\nlet MONTHS;\n\nexport function _init() {\n Month.JANUARY = new Month(1);\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 * @copyright (c) 2016, Philipp Thürwächter & Pattrick Hüper\n * @copyright (c) 2007-present, Stephen Colebourne & Michael Nascimento Santos\n * @license BSD-3-Clause (see LICENSE in the root directory of this source tree)\n */\n\nimport {assert, requireNonNull, requireInstance} from '../assert';\nimport {IllegalArgumentException, IllegalStateException} from '../errors';\nimport {MathUtil} from '../MathUtil';\n\nimport {LocalDate} from '../LocalDate';\nimport {LocalDateTime} from '../LocalDateTime';\nimport {ZoneOffset} from '../ZoneOffset';\nimport {ChronoLocalDate} from '../chrono/ChronoLocalDate';\nimport {ChronoField} from '../temporal/ChronoField';\nimport {IsoFields} from '../temporal/IsoFields';\nimport {TemporalQueries} from '../temporal/TemporalQueries';\n\nimport {DateTimeFormatter} from './DateTimeFormatter';\nimport {DecimalStyle} from './DecimalStyle';\nimport {SignStyle} from './SignStyle';\nimport {TextStyle} from './TextStyle';\nimport {ResolverStyle} from './ResolverStyle';\n\nimport {CharLiteralPrinterParser} from './parser/CharLiteralPrinterParser';\nimport {CompositePrinterParser} from './parser/CompositePrinterParser';\nimport {FractionPrinterParser} from './parser/FractionPrinterParser';\nimport {NumberPrinterParser, ReducedPrinterParser} from './parser/NumberPrinterParser';\nimport {OffsetIdPrinterParser} from './parser/OffsetIdPrinterParser';\nimport {PadPrinterParserDecorator} from './parser/PadPrinterParserDecorator';\nimport {SettingsParser} from './parser/SettingsParser';\nimport {StringLiteralPrinterParser} from './parser/StringLiteralPrinterParser';\nimport {ZoneIdPrinterParser} from './parser/ZoneIdPrinterParser';\n\nconst MAX_WIDTH = 15; // can't parse all numbers with more then 15 digits in javascript\n\nexport class DateTimeFormatterBuilder {\n\n /**\n * Constructs a new instance of the builder.\n *\n * @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 {@link parseCaseInsensitive}.\n *\n * @return {DateTimeFormatterBuilder} this, for chaining, not null\n */\n parseCaseSensitive() {\n this._appendInternalPrinterParser(SettingsParser.SENSITIVE);\n return this;\n }\n\n /**\n * Changes the parse style to be case insensitive for the remainder of the formatter.\n *\n * Parsing can be case sensitive or insensitive - by default it is case sensitive.\n * This method allows the case sensitivity setting of parsing to be changed.\n *\n * Calling this method changes the state of the builder such that all\n * subsequent builder method calls will parse text in case sensitive mode.\n * See {@link parseCaseSensitive} for the opposite setting.\n * The parse case sensitive/insensitive methods may be called at any point\n * in the builder, thus the parser can swap between case parsing modes\n * multiple times during the parse.\n *\n * @return {DateTimeFormatterBuilder} this, for chaining, not null\n */\n parseCaseInsensitive() {\n this._appendInternalPrinterParser(SettingsParser.INSENSITIVE);\n return this;\n }\n\n //-----------------------------------------------------------------------\n /**\n * Changes the parse style to be strict for the remainder of the formatter.\n *\n * Parsing can be strict or lenient - by default its strict.\n * This controls the degree of flexibility in matching the text and sign styles.\n *\n * When used, this method changes the parsing to be strict from this point onwards.\n * As strict is the default, this is normally only needed after calling {@link parseLenient}.\n * The change will remain in force until the end of the formatter that is eventually\n * constructed or until {@link parseLenient} is called.\n *\n * @return {DateTimeFormatterBuilder} this, for chaining, not null\n */\n parseStrict() {\n this._appendInternalPrinterParser(SettingsParser.STRICT);\n return this;\n }\n\n /**\n * Changes the parse style to be lenient for the remainder of the formatter.\n * Note that case sensitivity is set separately to this method.\n *\n * Parsing can be strict or lenient - by default its strict.\n * This controls the degree of flexibility in matching the text and sign styles.\n * Applications calling this method should typically also call {@link parseCaseInsensitive}.\n *\n * When used, this method changes the parsing to be strict from this point onwards.\n * The change will remain in force until the end of the formatter that is eventually\n * constructed or until {@link parseStrict} is called.\n *\n * @return {DateTimeFormatterBuilder} this, for chaining, not null\n */\n parseLenient() {\n this._appendInternalPrinterParser(SettingsParser.LENIENT);\n return this;\n }\n\n /**\n * appendValue function overloading\n */\n appendValue(){\n if(arguments.length === 1){\n return this._appendValue1.apply(this, arguments);\n } else if(arguments.length === 2){\n return this._appendValue2.apply(this, arguments);\n } else {\n return this._appendValue4.apply(this, arguments);\n }\n }\n\n /**\n * Appends the value of a date-time field to the formatter using a normal\n * output style.\n *\n * The value of the field will be output during a print.\n * If the value cannot be obtained then an exception will be thrown.\n *\n * The value will be printed as per the normal print of an integer value.\n * Only negative numbers will be signed. No padding will be added.\n *\n * The parser for a variable width value such as this normally behaves greedily,\n * requiring one digit, but accepting as many digits as possible.\n * This behavior can be affected by 'adjacent value parsing'.\n * See {@link appendValue} for full details.\n *\n * @param field the field to append, not null\n * @return {DateTimeFormatterBuilder} this, for chaining, not null\n */\n _appendValue1(field) {\n requireNonNull(field);\n this._appendValuePrinterParser(new NumberPrinterParser(field, 1, MAX_WIDTH, SignStyle.NORMAL));\n return this;\n }\n\n /**\n * Appends the value of a date-time field to the formatter using a fixed\n * width, zero-padded approach.\n *\n * The value of the field will be output during a print.\n * If the value cannot be obtained then an exception will be thrown.\n *\n * The value will be zero-padded on the left. If the size of the value\n * means that it cannot be printed within the width then an exception is thrown.\n * If the value of the field is negative then an exception is thrown during printing.\n *\n * This method supports a special technique of parsing known as 'adjacent value parsing'.\n * This technique solves the problem where a variable length value is followed by one or more\n * fixed length values. The standard parser is greedy, and thus it would normally\n * steal the digits that are needed by the fixed width value parsers that follow the\n * variable width one.\n *\n * No action is required to initiate 'adjacent value parsing'.\n * When a call to {@link appendValue} with a variable width is made, the builder\n * enters adjacent value parsing setup mode. If the immediately subsequent method\n * call or calls on the same builder are to this method, then the parser will reserve\n * space so that the fixed width values can be parsed.\n *\n * For example, consider `builder.appendValue(YEAR).appendValue(MONTH_OF_YEAR, 2)`.\n * The year is a variable width parse of between 1 and 19 digits.\n * The month is a fixed width parse of 2 digits.\n * Because these were appended to the same builder immediately after one another,\n * the year parser will reserve two digits for the month to parse.\n * Thus, the text '201106' will correctly parse to a year of 2011 and a month of 6.\n * Without adjacent value parsing, the year would greedily parse all six digits and leave\n * nothing for the month.\n *\n * Adjacent value parsing applies to each set of fixed width not-negative values in the parser\n * that immediately follow any kind of variable width value.\n * Calling any other append method will end the setup of adjacent value parsing.\n * Thus, in the unlikely event that you need to avoid adjacent value parsing behavior,\n * simply add the `appendValue` to another {@link DateTimeFormatterBuilder}\n * and add that to this builder.\n *\n * If adjacent parsing is active, then parsing must match exactly the specified\n * number of digits in both strict and lenient modes.\n * In addition, no positive or negative sign is permitted.\n *\n * @param field the field to append, not null\n * @param width the width of the printed field, from 1 to 19\n * @return this, for chaining, not null\n * @throws IllegalArgumentException if the width is invalid\n */\n _appendValue2(field, width) {\n requireNonNull(field);\n if (width < 1 || width > MAX_WIDTH) {\n throw new IllegalArgumentException(`The width must be from 1 to ${MAX_WIDTH} inclusive but was ${width}`);\n }\n const pp = new NumberPrinterParser(field, width, width, SignStyle.NOT_NEGATIVE);\n this._appendValuePrinterParser(pp);\n return this;\n }\n\n /**\n * Appends the value of a date-time field to the formatter providing full\n * control over printing.\n *\n * The value of the field will be output during a print.\n * If the value cannot be obtained then an exception will be thrown.\n *\n * This method provides full control of the numeric formatting, including\n * zero-padding and the positive/negative sign.\n *\n * The parser for a variable width value such as this normally behaves greedily,\n * accepting as many digits as possible.\n * This behavior can be affected by 'adjacent value parsing'.\n * See {@link appendValue} for full details.\n *\n * In strict parsing mode, the minimum number of parsed digits is `minWidth`.\n * In lenient parsing mode, the minimum number of parsed digits is one.\n *\n * If this method is invoked with equal minimum and maximum widths and a sign style of\n * `NOT_NEGATIVE` then it delegates to `appendValue(TemporalField, int)`.\n * In this scenario, the printing and parsing behavior described there occur.\n *\n * @param field the field to append, not null\n * @param minWidth the minimum field width of the printed field, from 1 to 19\n * @param maxWidth the maximum field width of the printed field, from 1 to 19\n * @param signStyle the positive/negative output style, not null\n * @return {DateTimeFormatterBuilder} this, for chaining, not null\n * @throws IllegalArgumentException if the widths are invalid\n */\n _appendValue4(field, minWidth, maxWidth, signStyle) {\n requireNonNull(field);\n requireNonNull(signStyle);\n if (minWidth === maxWidth && signStyle === SignStyle.NOT_NEGATIVE) {\n return this._appendValue2(field, maxWidth);\n }\n if (minWidth < 1 || minWidth > MAX_WIDTH) {\n throw new IllegalArgumentException(`The minimum width must be from 1 to ${MAX_WIDTH} inclusive but was ${minWidth}`);\n }\n if (maxWidth < 1 || maxWidth > MAX_WIDTH) {\n throw new IllegalArgumentException(`The minimum width must be from 1 to ${MAX_WIDTH} inclusive but was ${maxWidth}`);\n }\n if (maxWidth < minWidth) {\n throw new IllegalArgumentException(`The maximum width must exceed or equal the minimum width but ${maxWidth} < ${minWidth}`);\n }\n const pp = new NumberPrinterParser(field, minWidth, maxWidth, signStyle);\n this._appendValuePrinterParser(pp);\n return this;\n }\n\n /**\n * appendValueReduced function overloading\n */\n appendValueReduced() {\n if (arguments.length === 4 && arguments[3] instanceof ChronoLocalDate) {\n return this._appendValueReducedFieldWidthMaxWidthBaseDate.apply(this, arguments);\n } else {\n return this._appendValueReducedFieldWidthMaxWidthBaseValue.apply(this, arguments);\n }\n }\n\n /**\n * Appends the reduced value of a date-time field to the formatter.\n *\n * Since fields such as year vary by chronology, it is recommended to use the\n * {@link appendValueReduced} date}\n * variant of this method in most cases. This variant is suitable for\n * simple fields or working with only the ISO chronology.\n *\n * For formatting, the `width` and `maxWidth` are used to\n * determine the number of characters to format.\n * If they are equal then the format is fixed width.\n * If the value of the field is within the range of the `baseValue` using\n * `width` characters then the reduced value is formatted otherwise the value is\n * truncated to fit `maxWidth`.\n * The rightmost characters are output to match the width, left padding with zero.\n *\n * For strict parsing, the number of characters allowed by `width` to `maxWidth` are parsed.\n * For lenient parsing, the number of characters must be at least 1 and less than 10.\n * If the number of digits parsed is equal to `width` and the value is positive,\n * the value of the field is computed to be the first number greater than\n * or equal to the `baseValue` with the same least significant characters,\n * otherwise the value parsed is the field value.\n * This allows a reduced value to be entered for values in range of the baseValue\n * and width and absolute values can be entered for values outside the range.\n *\n * For example, a base value of `1980` and a width of `2` will have\n * valid values from `1980` to `2079`.\n * During parsing, the text `\"12\"` will result in the value `2012` as that\n * is the value within the range where the last two characters are \"12\".\n * By contrast, parsing the text `\"1915\"` will result in the value `1915`.\n *\n * @param {TemporalField} field the field to append, not null\n * @param {number} width the field width of the printed and parsed field, from 1 to 10\n * @param {number} maxWidth the maximum field width of the printed field, from 1 to 10\n * @param {number} baseValue the base value of the range of valid values\n * @return {DateTimeFormatterBuilder} this, for chaining, not null\n * @throws IllegalArgumentException if the width or base value is invalid\n */\n _appendValueReducedFieldWidthMaxWidthBaseValue(field, width, maxWidth, baseValue) {\n requireNonNull(field, 'field');\n const pp = new ReducedPrinterParser(field, width, maxWidth, baseValue, null);\n this._appendValuePrinterParser(pp);\n return this;\n }\n\n /**\n * Appends the reduced value of a date-time field to the formatter.\n *\n * This is typically used for formatting and parsing a two digit year.\n *\n * The base date is used to calculate the full value during parsing.\n * For example, if the base date is 1950-01-01 then parsed values for\n * a two digit year parse will be in the range 1950-01-01 to 2049-12-31.\n * Only the year would be extracted from the date, thus a base date of\n * 1950-08-25 would also parse to the range 1950-01-01 to 2049-12-31.\n * This behavior is necessary to support fields such as week-based-year\n * or other calendar systems where the parsed value does not align with\n * standard ISO years.\n *\n * The exact behavior is as follows. Parse the full set of fields and\n * determine the effective chronology using the last chronology if\n * it appears more than once. Then convert the base date to the\n * effective chronology. Then extract the specified field from the\n * chronology-specific base date and use it to determine the\n * `baseValue` used below.\n *\n * For formatting, the `width` and `maxWidth` are used to\n * determine the number of characters to format.\n * If they are equal then the format is fixed width.\n * If the value of the field is within the range of the `baseValue` using\n * `width` characters then the reduced value is formatted otherwise the value is\n * truncated to fit `maxWidth`.\n * The rightmost characters are output to match the width, left padding with zero.\n *\n * For strict parsing, the number of characters allowed by `width` to `maxWidth` are parsed.\n * For lenient parsing, the number of characters must be at least 1 and less than 10.\n * If the number of digits parsed is equal to `width` and the value is positive,\n * the value of the field is computed to be the first number greater than\n * or equal to the `baseValue` with the same least significant characters,\n * otherwise the value parsed is the field value.\n * This allows a reduced value to be entered for values in range of the baseValue\n * and width and absolute values can be entered for values outside the range.\n *\n * For example, a base value of `1980` and a width of `2` will have\n * valid values from `1980` to `2079`.\n * During parsing, the text `\"12\"` will result in the value `2012` as that\n * is the value within the range where the last two characters are \"12\".\n * By contrast, parsing the text `\"1915\"` will result in the value `1915`.\n *\n * @param {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 const pp = new ReducedPrinterParser(field, width, maxWidth, 0, baseDate);\n this._appendValuePrinterParser(pp);\n return this;\n }\n\n /**\n * Appends a fixed width printer-parser.\n *\n * @param pp the printer-parser, not null\n * @return {DateTimeFormatterBuilder} this, for chaining, not null\n */\n _appendValuePrinterParser(pp) {\n assert(pp != null);\n if (this._active._valueParserIndex >= 0 &&\n this._active._printerParsers[this._active._valueParserIndex] instanceof NumberPrinterParser) {\n const activeValueParser = this._active._valueParserIndex;\n\n // adjacent parsing mode, update setting in previous parsers\n let basePP = this._active._printerParsers[activeValueParser];\n if (pp.minWidth() === pp.maxWidth() && pp.signStyle() === SignStyle.NOT_NEGATIVE) {\n // Append the width to the subsequentWidth of the active parser\n basePP = basePP.withSubsequentWidth(pp.maxWidth());\n // Append the new parser as a fixed width\n this._appendInternal(pp.withFixedWidth());\n // Retain the previous active parser\n this._active._valueParserIndex = activeValueParser;\n } else {\n // Modify the active parser to be fixed width\n basePP = basePP.withFixedWidth();\n // The new parser becomes the mew active parser\n this._active._valueParserIndex = this._appendInternal(pp);\n }\n // Replace the modified parser with the updated one\n this._active._printerParsers[activeValueParser] = basePP;\n } else {\n // The new Parser becomes the active parser\n this._active._valueParserIndex = this._appendInternal(pp);\n }\n return this;\n }\n\n //-----------------------------------------------------------------------\n /**\n * Appends the fractional value of a date-time field to the formatter.\n *\n * The fractional value of the field will be output including the\n * preceding decimal point. The preceding value is not output.\n * For example, the second-of-minute value of 15 would be output as `.25`.\n *\n * The width of the printed fraction can be controlled. Setting the\n * minimum width to zero will cause no output to be generated.\n * The printed fraction will have the minimum width necessary between\n * the minimum and maximum widths - trailing zeroes are omitted.\n * No rounding occurs due to the maximum width - digits are simply dropped.\n *\n * When parsing in strict mode, the number of parsed digits must be between\n * the minimum and maximum width. When parsing in lenient mode, the minimum\n * width is considered to be zero and the maximum is nine.\n *\n * If the value cannot be obtained then an exception will be thrown.\n * If the value is negative an exception will be thrown.\n * If the field does not have a fixed set of valid values then an\n * exception will be thrown.\n * If the field value in the date-time to be printed is invalid it\n * cannot be printed and an exception will be thrown.\n *\n * @param {TemporalField} field the field to append, not null\n * @param {Number} minWidth the minimum width of the field excluding the decimal point, from 0 to 9\n * @param {Number} maxWidth the maximum width of the field excluding the decimal point, from 1 to 9\n * @param {boolean} decimalPoint whether to output the localized decimal point symbol\n * @return {DateTimeFormatterBuilder} this, for chaining, not null\n * @throws IllegalArgumentException if the field has a variable set of valid values or\n * either width is invalid\n */\n appendFraction(field, minWidth, maxWidth, decimalPoint) {\n this._appendInternal(new FractionPrinterParser(field, minWidth, maxWidth, decimalPoint));\n return this;\n }\n\n /**\n * Appends an instant using ISO-8601 to the formatter with control over\n * the number of fractional digits.\n *\n * Instants have a fixed output format, although this method provides some\n * control over the fractional digits. They are converted to a date-time\n * with a zone-offset of UTC and printed using the standard ISO-8601 format.\n * The localized decimal style is not used.\n *\n * The {@link this.fractionalDigits} parameter allows the output of the fractional\n * second to be controlled. Specifying zero will cause no fractional digits\n * to be output. From 1 to 9 will output an increasing number of digits, using\n * zero right-padding if necessary. The special value -1 is used to output as\n * many digits as necessary to avoid any trailing zeroes.\n *\n * When parsing in strict mode, the number of parsed digits must match the\n * fractional digits. When parsing in lenient mode, any number of fractional\n * digits from zero to nine are accepted.\n *\n * The instant is obtained using {@link ChronoField#INSTANT_SECONDS}\n * and optionally (@code NANO_OF_SECOND). The value of {@link INSTANT_SECONDS}\n * may be outside the maximum range of {@link LocalDateTime}.\n *\n * The {@link ResolverStyle} has no effect on instant parsing.\n * The end-of-day time of '24:00' is handled as midnight at the start of the following day.\n * The leap-second time of '23:59:59' is handled to some degree, see\n * {@link DateTimeFormatter#parsedLeapSecond} for full details.\n *\n * An alternative to this method is to format/parse the instant as a single\n * epoch-seconds value. That is achieved using `appendValue(INSTANT_SECONDS)`.\n *\n * @param {number} [fractionalDigits=-2] - the number of fractional second digits to format with,\n * from 0 to 9, or -1 to use as many digits as necessary\n * @return {DateTimeFormatterBuilder} this, for chaining, not null\n */\n appendInstant(fractionalDigits=-2) {\n if (fractionalDigits < -2 || fractionalDigits > 9) {\n throw new IllegalArgumentException('Invalid fractional digits: ' + fractionalDigits);\n }\n this._appendInternal(new InstantPrinterParser(fractionalDigits));\n return this;\n }\n\n\n /**\n * Appends the zone offset, such as '+01:00', to the formatter.\n *\n * This appends an instruction to print/parse the offset ID to the builder.\n * This is equivalent to calling `appendOffset(\"HH:MM:ss\", \"Z\")`.\n *\n * @return {DateTimeFormatterBuilder} this, for chaining, not null\n */\n appendOffsetId() {\n this._appendInternal(OffsetIdPrinterParser.INSTANCE_ID);\n return this;\n }\n\n /**\n * Appends the zone offset, such as '+01:00', to the formatter.\n *\n * This appends an instruction to print/parse the offset ID to the builder.\n *\n * During printing, the offset is obtained using a mechanism equivalent\n * to querying the temporal with {@link TemporalQueries#offset}.\n * It will be printed using the format defined below.\n * If the offset cannot be obtained then an exception is thrown unless the\n * section of the formatter is optional.\n *\n * During parsing, the offset is parsed using the format defined below.\n * If the offset cannot be parsed then an exception is thrown unless the\n * section of the formatter is optional.\n *\n * The format of the offset is controlled by a pattern which must be one\n * of the following:\n *\n * * `+HH` - hour only, ignoring minute and second\n * * `+HHmm` - hour, with minute if non-zero, ignoring second, no colon\n * * `+HH:mm` - hour, with minute if non-zero, ignoring second, with colon\n * * `+HHMM` - hour and minute, ignoring second, no colon\n * * `+HH:MM` - hour and minute, ignoring second, with colon\n * * `+HHMMss` - hour and minute, with second if non-zero, no colon\n * * `+HH:MM:ss` - hour and minute, with second if non-zero, with colon\n * * `+HHMMSS` - hour, minute and second, no colon\n * * `+HH:MM:SS` - hour, minute and second, with colon\n *\n * The \"no offset\" text controls what text is printed when the total amount of\n * the offset fields to be output is zero.\n * Example values would be 'Z', '+00:00', 'UTC' or 'GMT'.\n * Three formats are accepted for parsing UTC - the \"no offset\" text, and the\n * plus and minus versions of zero defined by the pattern.\n *\n * @param {String} pattern the pattern to use, not null\n * @param {String} noOffsetText the text to use when the offset is zero, not null\n * @return {DateTimeFormatterBuilder} this, for chaining, not null\n */\n appendOffset(pattern, noOffsetText) {\n this._appendInternalPrinterParser(new OffsetIdPrinterParser(noOffsetText, pattern));\n return this;\n }\n\n /**\n * Appends the time-zone ID, such as 'Europe/Paris' or '+02:00', to the formatter.\n *\n * This appends an instruction to print/parse the zone ID to the builder.\n * The zone ID is obtained in a strict manner suitable for {@link ZonedDateTime}.\n * By contrast, {@link OffsetDateTime} does not have a zone ID suitable\n * for use with this method, see {@link appendZoneOrOffsetId}.\n *\n * During printing, the zone is obtained using a mechanism equivalent\n * to querying the temporal with {@link TemporalQueries#zoneId}.\n * It will be printed using the result of {@link ZoneId#getId}.\n * If the zone cannot be obtained then an exception is thrown unless the\n * section of the formatter is optional.\n *\n * During parsing, the zone is parsed and must match a known zone or offset.\n * If the zone cannot be parsed then an exception is thrown unless the\n * section of the formatter is optional.\n *\n * @return {DateTimeFormatterBuilder} this, for chaining, not null\n * @see #appendZoneRegionId()\n */\n appendZoneId() {\n this._appendInternal(new ZoneIdPrinterParser(TemporalQueries.zoneId(), 'ZoneId()'));\n return this;\n }\n\n //-----------------------------------------------------------------------\n /**\n * Appends the elements defined by the specified pattern to the builder.\n *\n * All letters 'A' to 'Z' and 'a' to 'z' are reserved as pattern letters.\n * The characters '{' and '}' are reserved for future use.\n * The characters '[' and ']' indicate optional patterns.\n * The following pattern letters are defined:\n *
\n * Symbol Meaning Presentation Examples\n * ------ ------- ------------ -------\n * G era number/text 1; 01; AD; Anno Domini\n * 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 short form (see {@link TextStyle#SHORT}).\n * Exactly 4 pattern letters will use the full form (see {@link TextStyle#FULL}).\n * Exactly 5 pattern letters will use the narrow form (see {@link TextStyle#NARROW}).\n *\n * **Number**: If the count of letters is one, then the value is printed using the minimum number\n * of digits and without padding as per {@link appendValue}. Otherwise, the\n * count of digits is used as the width of the output field as per {@link appendValue}.\n *\n * **Number/Text**: If the count of pattern letters is 3 or greater, use the Text rules above.\n * Otherwise use the Number rules above.\n *\n * **Fraction**: Outputs the nano-of-second field as a fraction-of-second.\n * The nano-of-second value has nine digits, thus the count of pattern letters is from 1 to 9.\n * If it is less than 9, then the nano-of-second value is truncated, with only the most\n * significant digits being output.\n * When parsing in strict mode, the number of parsed digits must match the count of pattern letters.\n * When parsing in lenient mode, the number of parsed digits must be at least the count of pattern\n * letters, up to 9 digits.\n *\n * **Year**: The count of letters determines the minimum field width below which padding is used.\n * If the count of letters is two, then a reduced (see {@link appendValueReduced}) two digit form is used.\n * For printing, this outputs the rightmost two digits. For parsing, this will parse using the\n * base value of 2000, resulting in a year within the range 2000 to 2099 inclusive.\n * If the count of letters is less than four (but not two), then the sign is only output for negative\n * years as per {@link SignStyle#NORMAL}.\n * Otherwise, the sign is output if the pad width is exceeded, as per {@link SignStyle#EXCEEDS_PAD}\n *\n * **ZoneId**: This outputs the time-zone ID, such as 'Europe/Paris'.\n * If the count of letters is two, then the time-zone ID is output.\n * Any other count of letters throws {@link IllegalArgumentException}.\n *
\n * Pattern Equivalent builder methods\n * VV appendZoneId()\n *\n *\n * **Zone names**: This outputs the display name of the time-zone ID.\n * If the count of letters is one, two or three, then the short name is output.\n * If the count of letters is four, then the full name is output.\n * Five or more letters throws {@link IllegalArgumentException}.\n *
\n * Pattern Equivalent builder methods\n * z appendZoneText(TextStyle.SHORT)\n * zz appendZoneText(TextStyle.SHORT)\n * zzz appendZoneText(TextStyle.SHORT)\n * zzzz appendZoneText(TextStyle.FULL)\n *\n *\n * **Offset X and x**: This formats the offset based on the number of pattern letters.\n * One letter outputs just the hour', such as '+01', unless the minute is non-zero\n * in which case the minute is also output, such as '+0130'.\n * Two letters outputs the hour and minute, without a colon, such as '+0130'.\n * Three letters outputs the hour and minute, with a colon, such as '+01:30'.\n * Four letters outputs the hour and minute and optional second, without a colon, such as '+013015'.\n * Five letters outputs the hour and minute and optional second, with a colon, such as '+01:30:15'.\n * Six or more letters throws {@link IllegalArgumentException}.\n * Pattern letter 'X' (upper case) will output 'Z' when the offset to be output would be zero,\n * whereas pattern letter 'x' (lower case) will output '+00', '+0000', or '+00:00'.\n *
\n * Pattern Equivalent builder methods\n * X appendOffset(\"+HHmm\",\"Z\")\n * XX appendOffset(\"+HHMM\",\"Z\")\n * XXX appendOffset(\"+HH:MM\",\"Z\")\n * XXXX appendOffset(\"+HHMMss\",\"Z\")\n * XXXXX appendOffset(\"+HH:MM:ss\",\"Z\")\n * x appendOffset(\"+HHmm\",\"+00\")\n * xx appendOffset(\"+HHMM\",\"+0000\")\n * xxx appendOffset(\"+HH:MM\",\"+00:00\")\n * xxxx appendOffset(\"+HHMMss\",\"+0000\")\n * xxxxx appendOffset(\"+HH:MM:ss\",\"+00:00\")\n *\n *\n * **Offset Z**: This formats the offset based on the number of pattern letters.\n * One, two or three letters outputs the hour and minute, without a colon, such as '+0130'.\n * Four or more letters throws {@link IllegalArgumentException}.\n * The output will be '+0000' when the offset is zero.\n *
\n * Pattern Equivalent builder methods\n * Z appendOffset(\"+HHMM\",\"+0000\")\n * ZZ appendOffset(\"+HHMM\",\"+0000\")\n * ZZZ appendOffset(\"+HHMM\",\"+0000\")\n *\n *\n * **Optional section**: The optional section markers work exactly like calling {@link optionalStart}\n * and {@link optionalEnd}.\n *\n * **Pad modifier**: Modifies the pattern that immediately follows to be padded with spaces.\n * The pad width is determined by the number of pattern letters.\n * This is the same as calling {@link padNext}.\n *\n * For example, 'ppH' outputs the hour-of-day padded on the left with spaces to a width of 2.\n *\n * Any unrecognized letter is an error.\n * Any non-letter character, other than '[', ']', '{', '}' and the single quote will be output directly.\n * Despite this, it is recommended to use single quotes around all characters that you want to\n * output directly to ensure that future changes do not break your application.\n *\n * Note that the pattern string is similar, but not identical, to\n * {@link java.text.SimpleDateFormat}.\n * The pattern string is also similar, but not identical, to that defined by the\n * Unicode Common Locale Data Repository (CLDR/LDML).\n * Pattern letters 'E' and 'u' are merged, which changes the meaning of \"E\" and \"EE\" to be numeric.\n * Pattern letters 'X' is aligned with Unicode CLDR/LDML, which affects pattern 'X'.\n * Pattern letter 'y' and 'Y' parse years of two digits and more than 4 digits differently.\n * Pattern letters 'n', 'A', 'N', 'I' and 'p' are added.\n * Number types will reject large numbers.\n *\n * @param {String} pattern the pattern to add, not null\n * @return {DateTimeFormatterBuilder} this, for chaining, not null\n * @throws IllegalArgumentException if the pattern is invalid\n */\n appendPattern(pattern) {\n requireNonNull(pattern, 'pattern');\n this._parsePattern(pattern);\n return this;\n }\n\n _parsePattern(pattern) {\n /** Map of letters to fields. */\n const FIELD_MAP = {\n 'G': ChronoField.ERA,\n 'y': ChronoField.YEAR_OF_ERA,\n 'u': ChronoField.YEAR,\n 'Q': IsoFields.QUARTER_OF_YEAR,\n 'q': IsoFields.QUARTER_OF_YEAR,\n 'M': ChronoField.MONTH_OF_YEAR,\n 'L': ChronoField.MONTH_OF_YEAR,\n 'D': ChronoField.DAY_OF_YEAR,\n 'd': ChronoField.DAY_OF_MONTH,\n 'F': ChronoField.ALIGNED_DAY_OF_WEEK_IN_MONTH,\n 'E': ChronoField.DAY_OF_WEEK,\n 'c': ChronoField.DAY_OF_WEEK,\n 'e': ChronoField.DAY_OF_WEEK,\n 'a': ChronoField.AMPM_OF_DAY,\n 'H': ChronoField.HOUR_OF_DAY,\n 'k': ChronoField.CLOCK_HOUR_OF_DAY,\n 'K': ChronoField.HOUR_OF_AMPM,\n 'h': ChronoField.CLOCK_HOUR_OF_AMPM,\n 'm': ChronoField.MINUTE_OF_HOUR,\n 's': ChronoField.SECOND_OF_MINUTE,\n 'S': ChronoField.NANO_OF_SECOND,\n 'A': ChronoField.MILLI_OF_DAY,\n 'n': ChronoField.NANO_OF_SECOND,\n 'N': ChronoField.NANO_OF_DAY\n };\n\n for (let pos = 0; pos < pattern.length; pos++) {\n let cur = pattern.charAt(pos);\n if ((cur >= 'A' && cur <= 'Z') || (cur >= 'a' && cur <= 'z')) {\n let start = pos++;\n for (; pos < pattern.length && pattern.charAt(pos) === cur; pos++); // short loop\n let count = pos - start;\n // padding\n if (cur === 'p') {\n let pad = 0;\n if (pos < pattern.length) {\n cur = pattern.charAt(pos);\n if ((cur >= 'A' && cur <= 'Z') || (cur >= 'a' && cur <= 'z')) {\n pad = count;\n start = pos++;\n for (; pos < pattern.length && pattern.charAt(pos) === cur; pos++); // short loop\n count = pos - start;\n }\n }\n if (pad === 0) {\n throw new IllegalArgumentException(\n 'Pad letter \\'p\\' must be followed by valid pad pattern: ' + pattern);\n }\n this.padNext(pad); // pad and continue parsing\n }\n // main rules\n const field = FIELD_MAP[cur];\n if (field != null) {\n this._parseField(cur, count, field);\n } else if (cur === 'z') {\n if (count > 4) {\n throw new IllegalArgumentException('Too many pattern letters: ' + cur);\n } else if (count === 4) {\n //TODO:\n throw new IllegalArgumentException('Pattern using (localized) text not implemented yet!');\n // eslint-disable-next-line no-unreachable\n this.appendZoneText(TextStyle.FULL);\n } else {\n //TODO:\n throw new IllegalArgumentException('Pattern using (localized) text not implemented yet!');\n // eslint-disable-next-line no-unreachable\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 // eslint-disable-next-line no-unreachable\n this.appendLocalizedOffset(TextStyle.FULL);\n } else if (count === 5) {\n this.appendOffset('+HH:MM:ss', 'Z');\n } else {\n throw new IllegalArgumentException('Too many pattern letters: ' + cur);\n }\n } else if (cur === 'O') {\n if (count === 1) {\n //TODO:\n throw new IllegalArgumentException('Pattern using (localized) text not implemented yet!');\n // eslint-disable-next-line no-unreachable\n this.appendLocalizedOffset(TextStyle.SHORT);\n } else if (count === 4) {\n //TODO:\n throw new IllegalArgumentException('Pattern using (localized) text not implemented yet!');\n // eslint-disable-next-line no-unreachable\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 const start = pos++;\n for (; pos < pattern.length; pos++) {\n if (pattern.charAt(pos) === '\\'') {\n if (pos + 1 < pattern.length && pattern.charAt(pos + 1) === '\\'') {\n pos++;\n } else {\n break; // end of literal\n }\n }\n }\n if (pos >= pattern.length) {\n throw new IllegalArgumentException('Pattern ends with an incomplete string literal: ' + pattern);\n }\n const str = pattern.substring(start + 1, pos);\n if (str.length === 0) {\n this.appendLiteral('\\'');\n } else {\n this.appendLiteral(str.replace('\\'\\'', '\\''));\n }\n\n } else if (cur === '[') {\n this.optionalStart();\n\n } else if (cur === ']') {\n if (this._active._parent === null) {\n throw new IllegalArgumentException('Pattern invalid as it contains ] without previous [');\n }\n this.optionalEnd();\n\n } else if (cur === '{' || cur === '}' || cur === '#') {\n throw new IllegalArgumentException('Pattern includes reserved character: \\'' + cur + '\\'');\n } else {\n this.appendLiteral(cur);\n }\n }\n }\n\n _parseField(cur, count, field) {\n switch (cur) {\n case 'u':\n case 'y':\n if (count === 2) {\n this.appendValueReduced(field, 2, 2, ReducedPrinterParser.BASE_DATE);\n } else if (count < 4) {\n this.appendValue(field, count, MAX_WIDTH, SignStyle.NORMAL);\n } else {\n this.appendValue(field, count, MAX_WIDTH, SignStyle.EXCEEDS_PAD);\n }\n break;\n case 'M':\n case 'Q':\n switch (count) {\n case 1:\n this.appendValue(field);\n break;\n case 2:\n this.appendValue(field, 2);\n break;\n case 3:\n //TODO:\n throw new IllegalArgumentException('Pattern using (localized) text not implemented yet!');\n // eslint-disable-next-line no-unreachable\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 // eslint-disable-next-line no-unreachable\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 // eslint-disable-next-line no-unreachable\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 // eslint-disable-next-line no-unreachable\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 // eslint-disable-next-line no-unreachable\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 // eslint-disable-next-line no-unreachable\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 // eslint-disable-next-line no-unreachable, no-undef\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 // eslint-disable-next-line no-unreachable\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 // eslint-disable-next-line no-unreachable\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 // eslint-disable-next-line no-unreachable\n this.appendText(field, TextStyle.NARROW);\n break;\n default:\n throw new IllegalArgumentException('Too many pattern letters: ' + cur);\n }\n // eslint-disable-next-line no-unreachable\n break;\n case 'c':\n switch (count) {\n case 1:\n // TODO: WeekFieldsPrinterParser\n throw new IllegalArgumentException('Pattern using WeekFields not implemented yet!');\n // eslint-disable-next-line no-unreachable, no-undef\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 // eslint-disable-next-line no-unreachable\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 // eslint-disable-next-line no-unreachable\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 // eslint-disable-next-line no-unreachable\n this.appendText(field, TextStyle.NARROW_STANDALONE);\n break;\n default:\n throw new IllegalArgumentException('Too many pattern letters: ' + cur);\n }\n // eslint-disable-next-line no-unreachable\n break;\n case 'a':\n if (count === 1) {\n //TODO:\n throw new IllegalArgumentException('Pattern using (localized) text not implemented yet!');\n // eslint-disable-next-line no-unreachable\n this.appendText(field, TextStyle.SHORT);\n } else {\n throw new IllegalArgumentException('Too many pattern letters: ' + cur);\n }\n // eslint-disable-next-line no-unreachable\n break;\n case 'E':\n case 'G':\n switch (count) {\n case 1:\n case 2:\n case 3:\n //TODO:\n throw new IllegalArgumentException('Pattern using (localized) text not implemented yet!');\n // eslint-disable-next-line no-unreachable\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 // eslint-disable-next-line no-unreachable\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 // eslint-disable-next-line no-unreachable\n this.appendText(field, TextStyle.NARROW);\n break;\n default:\n throw new IllegalArgumentException('Too many pattern letters: ' + cur);\n }\n // eslint-disable-next-line no-unreachable\n break;\n case 'S':\n this.appendFraction(ChronoField.NANO_OF_SECOND, count, count, false);\n break;\n case 'F':\n if (count === 1) {\n this.appendValue(field);\n } else {\n throw new IllegalArgumentException('Too many pattern letters: ' + cur);\n }\n break;\n case 'd':\n case 'h':\n case 'H':\n case 'k':\n case 'K':\n case 'm':\n case 's':\n if (count === 1) {\n this.appendValue(field);\n } else if (count === 2) {\n this.appendValue(field, count);\n } else {\n throw new IllegalArgumentException('Too many pattern letters: ' + cur);\n }\n break;\n case 'D':\n if (count === 1) {\n this.appendValue(field);\n } else if (count <= 3) {\n this.appendValue(field, count);\n } else {\n throw new IllegalArgumentException('Too many pattern letters: ' + cur);\n }\n break;\n default:\n if (count === 1) {\n this.appendValue(field);\n } else {\n this.appendValue(field, count);\n }\n break;\n }\n }\n\n /**\n * padNext function overloading\n */\n padNext() {\n if (arguments.length === 1) {\n return this._padNext1.apply(this, arguments);\n } else {\n return this._padNext2.apply(this, arguments);\n }\n }\n\n /**\n * Causes the next added printer/parser to pad to a fixed width using a space.\n *\n * This padding will pad to a fixed width using spaces.\n *\n * During formatting, the decorated element will be output and then padded\n * to the specified width. An exception will be thrown during printing if\n * the pad width is exceeded.\n *\n * During parsing, the padding and decorated element are parsed.\n * If parsing is lenient, then the pad width is treated as a maximum.\n * If parsing is case insensitive, then the pad character is matched ignoring case.\n * The padding is parsed greedily. Thus, if the decorated element starts with\n * the pad character, it will not be parsed.\n *\n * @param {number} padWidth the pad width, 1 or greater\n * @return {DateTimeFormatterBuilder} this, for chaining, not null\n * @throws IllegalArgumentException if pad width is too small\n */\n _padNext1(padWidth) {\n return this._padNext2(padWidth, ' ');\n }\n\n /**\n * Causes the next added printer/parser to pad to a fixed width.\n *\n * This padding is intended for padding other than zero-padding.\n * Zero-padding should be achieved using the appendValue methods.\n *\n * During formatting, the decorated element will be output and then padded\n * to the specified width. An exception will be thrown during printing if\n * the pad width is exceeded.\n *\n * During parsing, the padding and decorated element are parsed.\n * If parsing is lenient, then the pad width is treated as a maximum.\n * If parsing is case insensitive, then the pad character is matched ignoring case.\n * The padding is parsed greedily. Thus, if the decorated element starts with\n * the pad character, it will not be parsed.\n *\n * @param {number} padWidth the pad width, 1 or greater\n * @param {String} padChar the pad character\n * @return {DateTimeFormatterBuilder} this, for chaining, not null\n * @throws IllegalArgumentException if pad width is too small\n */\n _padNext2(padWidth, padChar) {\n if (padWidth < 1) {\n throw new IllegalArgumentException('The pad width must be at least one but was ' + padWidth);\n }\n this._active._padNextWidth = padWidth;\n this._active._padNextChar = padChar;\n this._active._valueParserIndex = -1;\n return this;\n }\n\n\n //-----------------------------------------------------------------------\n /**\n * Mark the start of an optional section.\n *\n * The output of printing can include optional sections, which may be nested.\n * An optional section is started by calling this method and ended by calling\n * {@link optionalEnd} or by ending the build process.\n *\n * All elements in the optional section are treated as optional.\n * During printing, the section is only output if data is available in the\n * {@link TemporalAccessor} for all the elements in the section.\n * During parsing, the whole section may be missing from the parsed string.\n *\n * For example, consider a builder setup as\n * `builder.appendValue(HOUR_OF_DAY,2).optionalStart().appendValue(MINUTE_OF_HOUR,2)`.\n * The optional section ends automatically at the end of the builder.\n * During printing, the minute will only be output if its value can be obtained from the date-time.\n * During parsing, the input will be successfully parsed whether the minute is present or not.\n *\n * @return {DateTimeFormatterBuilder} this, for chaining, not null\n */\n optionalStart() {\n this._active._valueParserIndex = -1;\n this._active = 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 `optionalStart`\n * will throw an exception.\n * Calling this method immediately after calling `optionalStart` has no effect\n * on the formatter other than ending the (empty) optional section.\n *\n * All elements in the optional section are treated as optional.\n * During printing, the section is only output if data is available in the\n * {@link TemporalAccessor} for all the elements in the section.\n * During parsing, the whole section may be missing from the parsed string.\n *\n * For example, consider a builder setup as\n * `builder.appendValue(HOUR_OF_DAY,2).optionalStart().appendValue(MINUTE_OF_HOUR,2).optionalEnd()`.\n * During printing, the minute will only be output if its value can be obtained from the date-time.\n * During parsing, the input will be successfully parsed whether the minute is present or not.\n *\n * @return {DateTimeFormatterBuilder} this, for chaining, not null\n * @throws IllegalStateException if there was no previous call to `optionalStart`\n */\n optionalEnd() {\n if (this._active._parent == null) {\n throw new IllegalStateException('Cannot call optionalEnd() as there was no previous call to optionalStart()');\n }\n if (this._active._printerParsers.length > 0) {\n const cpp = new CompositePrinterParser(this._active._printerParsers, this._active._optional);\n this._active = this._active._parent;\n this._appendInternal(cpp);\n } else {\n this._active = this._active._parent;\n }\n return this;\n }\n\n /**\n * Appends a printer and/or parser to the internal list handling padding.\n *\n * @param pp the printer-parser to add, not null\n * @return the index into the active parsers list\n */\n _appendInternal(pp) {\n assert(pp != null);\n if (this._active._padNextWidth > 0) {\n if (pp != null) {\n pp = new PadPrinterParserDecorator(pp, this._active._padNextWidth, this._active._padNextChar);\n }\n this._active._padNextWidth = 0;\n this._active._padNextChar = 0;\n }\n this._active._printerParsers.push(pp);\n this._active._valueParserIndex = -1;\n return this._active._printerParsers.length - 1;\n }\n\n /**\n * Appends a string literal to the formatter.\n *\n * This string will be output during a print.\n *\n * If the literal is empty, nothing is added to the formatter.\n *\n * @param literal the literal to append, not null\n * @return {DateTimeFormatterBuilder} this, for chaining, not null\n */\n appendLiteral(literal) {\n assert(literal != null);\n if (literal.length > 0) {\n if (literal.length === 1) {\n this._appendInternalPrinterParser(new CharLiteralPrinterParser(literal.charAt(0)));\n } else {\n this._appendInternalPrinterParser(new StringLiteralPrinterParser(literal));\n }\n }\n return this;\n }\n\n /**\n * Appends a printer and/or parser to the internal list handling padding.\n *\n * @param pp the printer-parser to add, not null\n * @return the index into the active parsers list\n */\n _appendInternalPrinterParser(pp) {\n assert(pp != null);\n if (this._active._padNextWidth > 0) {\n if (pp != null) {\n pp = new PadPrinterParserDecorator(pp, this._active._padNextWidth, this._active._padNextChar);\n }\n this._active._padNextWidth = 0;\n this._active._padNextChar = 0;\n }\n this._active._printerParsers.push(pp);\n this._active._valueParserIndex = -1;\n return this._active._printerParsers.length - 1;\n }\n\n //-----------------------------------------------------------------------\n /**\n * Appends all the elements of a formatter to the builder.\n *\n * This method has the same effect as appending each of the constituent\n * parts of the formatter directly to this builder.\n *\n * @param {DateTimeFormatter} formatter the formatter to add, not null\n * @return {DateTimeFormatterBuilder} this, for chaining, not null\n */\n append(formatter) {\n requireNonNull(formatter, 'formatter');\n this._appendInternal(formatter.toPrinterParser(false));\n return this;\n }\n\n /**\n * Completes this builder by creating the DateTimeFormatter.\n *\n * This will create a formatter with the specified locale.\n * Numbers will be printed and parsed using the standard non-localized set of symbols.\n *\n * Calling this method will end any open optional sections by repeatedly\n * calling {@link optionalEnd} before creating the formatter.\n *\n * This builder can still be used after creating the formatter if desired,\n * although the state may have been changed by calls to `optionalEnd`.\n *\n * @param resolverStyle the new resolver style\n * @return the created formatter, not null\n */\n toFormatter(resolverStyle=ResolverStyle.SMART) {\n while (this._active._parent != null) {\n this.optionalEnd();\n }\n const pp = new CompositePrinterParser(this._printerParsers, false);\n return new DateTimeFormatter(pp, null, DecimalStyle.STANDARD, resolverStyle, null, null, null);\n }\n\n}\n\n// days in a 400 year cycle = 146097\n// days in a 10,000 year cycle = 146097 * 25\n// seconds per day = 86400\nconst SECONDS_PER_10000_YEARS = 146097 * 25 * 86400;\nconst SECONDS_0000_TO_1970 = ((146097 * 5) - (30 * 365 + 7)) * 86400;\n\n/**\n * Prints or parses an ISO-8601 instant.\n */\nclass InstantPrinterParser {\n\n constructor(fractionalDigits) {\n this.fractionalDigits = fractionalDigits;\n }\n\n print(context, buf) {\n // use INSTANT_SECONDS, thus this code is not bound by Instant.MAX\n const inSecs = context.getValue(ChronoField.INSTANT_SECONDS);\n let inNanos = 0;\n if (context.temporal().isSupported(ChronoField.NANO_OF_SECOND)) {\n inNanos = context.temporal().getLong(ChronoField.NANO_OF_SECOND);\n }\n if (inSecs == null) {\n return false;\n }\n const inSec = inSecs;\n let inNano = ChronoField.NANO_OF_SECOND.checkValidIntValue(inNanos);\n if (inSec >= -SECONDS_0000_TO_1970) {\n // current era\n let zeroSecs = inSec - SECONDS_PER_10000_YEARS + SECONDS_0000_TO_1970;\n let hi = MathUtil.floorDiv(zeroSecs, SECONDS_PER_10000_YEARS) + 1;\n let lo = MathUtil.floorMod(zeroSecs, SECONDS_PER_10000_YEARS);\n let ldt = LocalDateTime.ofEpochSecond(lo - SECONDS_0000_TO_1970, 0, ZoneOffset.UTC);\n if (hi > 0) {\n buf.append('+').append(hi);\n }\n buf.append(ldt);\n if (ldt.second() === 0) {\n buf.append(':00');\n }\n } else {\n // before current era\n let zeroSecs = inSec + SECONDS_0000_TO_1970;\n let hi = MathUtil.intDiv(zeroSecs, SECONDS_PER_10000_YEARS);\n let lo = MathUtil.intMod(zeroSecs, SECONDS_PER_10000_YEARS);\n let ldt = LocalDateTime.ofEpochSecond(lo - SECONDS_0000_TO_1970, 0, ZoneOffset.UTC);\n let pos = buf.length();\n buf.append(ldt);\n if (ldt.second() === 0) {\n buf.append(':00');\n }\n if (hi < 0) {\n if (ldt.year() === -10000) {\n buf.replace(pos, pos + 2, '' + (hi - 1));\n } else if (lo === 0) {\n buf.insert(pos, hi);\n } else {\n buf.insert(pos + 1, Math.abs(hi));\n }\n }\n }\n //fraction\n if (this.fractionalDigits === -2) {\n if (inNano !== 0) {\n buf.append('.');\n if (MathUtil.intMod(inNano, 1000000) === 0) {\n buf.append(('' + (MathUtil.intDiv(inNano, 1000000) + 1000)).substring(1));\n } else if (MathUtil.intMod(inNano, 1000) === 0) {\n buf.append(('' + (MathUtil.intDiv(inNano, 1000) + 1000000)).substring(1));\n } else {\n buf.append(('' + ((inNano) + 1000000000)).substring(1));\n }\n }\n } else if (this.fractionalDigits > 0 || (this.fractionalDigits === -1 && inNano > 0)) {\n buf.append('.');\n let div = 100000000;\n for (let i = 0; ((this.fractionalDigits === -1 && inNano > 0) || i < this.fractionalDigits); i++) {\n let digit = MathUtil.intDiv(inNano, div);\n buf.append(digit);\n inNano = inNano - (digit * div);\n div = MathUtil.intDiv(div, 10);\n }\n }\n buf.append('Z');\n return true;\n }\n\n parse(context, text, position) {\n // new context to avoid overwriting fields like year/month/day\n const newContext = context.copy();\n const minDigits = (this.fractionalDigits < 0 ? 0 : this.fractionalDigits);\n const maxDigits = (this.fractionalDigits < 0 ? 9 : this.fractionalDigits);\n const parser = new DateTimeFormatterBuilder()\n .append(DateTimeFormatter.ISO_LOCAL_DATE).appendLiteral('T')\n .appendValue(ChronoField.HOUR_OF_DAY, 2).appendLiteral(':').appendValue(ChronoField.MINUTE_OF_HOUR, 2).appendLiteral(':')\n .appendValue(ChronoField.SECOND_OF_MINUTE, 2).appendFraction(ChronoField.NANO_OF_SECOND, minDigits, maxDigits, true).appendLiteral('Z')\n .toFormatter().toPrinterParser(false);\n const pos = parser.parse(newContext, text, position);\n if (pos < 0) {\n return pos;\n }\n // parser restricts most fields to 2 digits, so definitely int\n // correctly parsed nano is also guaranteed to be valid\n const yearParsed = newContext.getParsed(ChronoField.YEAR);\n const month = newContext.getParsed(ChronoField.MONTH_OF_YEAR);\n const day = newContext.getParsed(ChronoField.DAY_OF_MONTH);\n let hour = newContext.getParsed(ChronoField.HOUR_OF_DAY);\n const min = newContext.getParsed(ChronoField.MINUTE_OF_HOUR);\n const secVal = newContext.getParsed(ChronoField.SECOND_OF_MINUTE);\n const nanoVal = newContext.getParsed(ChronoField.NANO_OF_SECOND);\n let sec = (secVal != null ? secVal : 0);\n const nano = (nanoVal != null ? nanoVal : 0);\n const year = MathUtil.intMod(yearParsed, 10000);\n let days = 0;\n if (hour === 24 && min === 0 && sec === 0 && nano === 0) {\n hour = 0;\n days = 1;\n } else if (hour === 23 && min === 59 && sec === 60) {\n context.setParsedLeapSecond();\n sec = 59;\n }\n let instantSecs;\n try {\n const ldt = LocalDateTime.of(year, month, day, hour, min, sec, 0).plusDays(days);\n instantSecs = ldt.toEpochSecond(ZoneOffset.UTC);\n instantSecs += MathUtil.safeMultiply(MathUtil.intDiv(yearParsed, 10000), SECONDS_PER_10000_YEARS);\n } catch (ex) {\n return ~position;\n }\n let successPos = pos;\n successPos = context.setParsedField(ChronoField.INSTANT_SECONDS, instantSecs, position, successPos);\n return context.setParsedField(ChronoField.NANO_OF_SECOND, nano, position, successPos);\n }\n\n toString() {\n return 'Instant()';\n }\n}\n\n\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\n// WEBPACK FOOTER //\n// ./src/format/DateTimeFormatterBuilder.js","/**\n * @copyright (c) 2016, Philipp Thürwächter & Pattrick Hüper\n * @copyright (c) 2007-present, Stephen Colebourne & Michael Nascimento Santos\n * @license BSD-3-Clause (see LICENSE in the root directory of this source tree)\n */\n\nimport {requireNonNull} from './assert';\nimport {DateTimeException} from './errors';\nimport {MathUtil} from './MathUtil';\n\nimport {LocalTime} from './LocalTime';\nimport {ZoneId} from './ZoneId';\n\nimport {ChronoField} from './temporal/ChronoField';\nimport {TemporalQueries} from './temporal/TemporalQueries';\n\nimport {ZoneRules} from './zone/ZoneRules';\n\nconst SECONDS_CACHE = {};\nconst ID_CACHE = {};\n\n/**\n *\n * ### Static properties of Class {@link LocalDate}\n *\n * ZoneOffset.MAX_SECONDS = 18 * LocalTime.SECONDS_PER_HOUR;\n *\n * ZoneOffset.UTC = ZoneOffset.ofTotalSeconds(0);\n *\n * ZoneOffset.MIN = ZoneOffset.ofTotalSeconds(-ZoneOffset.MAX_SECONDS);\n *\n * ZoneOffset.MAX = ZoneOffset.ofTotalSeconds(ZoneOffset.MAX_SECONDS);\n *\n */\nexport class ZoneOffset extends ZoneId {\n /**\n *\n * @param {number} totalSeconds\n */\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 const absTotalSeconds = Math.abs(totalSeconds);\n const absHours = MathUtil.intDiv(absTotalSeconds, LocalTime.SECONDS_PER_HOUR);\n const absMinutes = MathUtil.intMod(MathUtil.intDiv(absTotalSeconds, LocalTime.SECONDS_PER_MINUTE), LocalTime.MINUTES_PER_HOUR);\n let buf = '' + (totalSeconds < 0 ? '-' : '+')\n + (absHours < 10 ? '0' : '') + (absHours)\n + (absMinutes < 10 ? ':0' : ':') + (absMinutes);\n const absSeconds = MathUtil.intMod(absTotalSeconds, LocalTime.SECONDS_PER_MINUTE);\n if (absSeconds !== 0) {\n buf += (absSeconds < 10 ? ':0' : ':') + (absSeconds);\n }\n return buf;\n }\n }\n\n\n /**\n *\n * @param {number} totalSeconds\n * @private\n */\n static _validateTotalSeconds(totalSeconds){\n if (Math.abs(totalSeconds) > ZoneOffset.MAX_SECONDS) {\n throw new DateTimeException('Zone offset not in valid range: -18:00 to +18:00');\n }\n }\n\n /**\n *\n * @param {number} hours\n * @param {number} minutes\n * @param {number} seconds\n * @private\n */\n static _validate(hours, minutes, seconds) {\n if (hours < -18 || hours > 18) {\n throw new DateTimeException('Zone offset hours not in valid range: value ' + hours +\n ' is not in the range -18 to 18');\n }\n if (hours > 0) {\n if (minutes < 0 || seconds < 0) {\n throw new DateTimeException('Zone offset minutes and seconds must be positive because hours is positive');\n }\n } else if (hours < 0) {\n if (minutes > 0 || seconds > 0) {\n throw new DateTimeException('Zone offset minutes and seconds must be negative because hours is negative');\n }\n } else if ((minutes > 0 && seconds < 0) || (minutes < 0 && seconds > 0)) {\n throw new DateTimeException('Zone offset minutes and seconds must have the same sign');\n }\n if (Math.abs(minutes) > 59) {\n throw new DateTimeException('Zone offset minutes not in valid range: abs(value) ' +\n Math.abs(minutes) + ' is not in the range 0 to 59');\n }\n if (Math.abs(seconds) > 59) {\n throw new DateTimeException('Zone offset seconds not in valid range: abs(value) ' +\n Math.abs(seconds) + ' is not in the range 0 to 59');\n }\n if (Math.abs(hours) === 18 && (Math.abs(minutes) > 0 || Math.abs(seconds) > 0)) {\n throw new DateTimeException('Zone offset not in valid range: -18:00 to +18:00');\n }\n }\n\n //-----------------------------------------------------------------------\n /**\n * Obtains an instance of {@link ZoneOffset} using the ID.\n *\n * This method parses the string ID of a {@link ZoneOffset} to\n * return an instance. The parsing accepts all the formats generated by\n * {@link getId}, plus some additional formats:\n *\n * * {@link Z} - for UTC\n * * `+h`\n * * `+hh`\n * * `+hh:mm`\n * * `-hh:mm`\n * * `+hhmm`\n * * `-hhmm`\n * * `+hh:mm:ss`\n * * `-hh:mm:ss`\n * * `+hhmmss`\n * * `-hhmmss`\n *\n * Note that ± means either the plus or minus symbol.\n *\n * The ID of the returned offset will be normalized to one of the formats\n * described by {@link getId}.\n *\n * The maximum supported range is from +18:00 to -18:00 inclusive.\n *\n * @param {string} offsetId the offset ID, not null\n * @return {ZoneOffset} the zone-offset, not null\n * @throws DateTimeException if the offset ID is invalid\n */\n static of(offsetId) {\n requireNonNull(offsetId, 'offsetId');\n // \"Z\" is always in the cache\n const offset = ID_CACHE[offsetId];\n if (offset != null) {\n return offset;\n }\n\n // parse - +h, +hh, +hhmm, +hh:mm, +hhmmss, +hh:mm:ss\n let hours, minutes, seconds;\n switch (offsetId.length) {\n case 2:\n offsetId = offsetId[0] + '0' + offsetId[1]; // fallthru\n // eslint-disable-next-line no-fallthrough\n case 3:\n hours = ZoneOffset._parseNumber(offsetId, 1, false);\n minutes = 0;\n seconds = 0;\n break;\n case 5:\n hours = ZoneOffset._parseNumber(offsetId, 1, false);\n minutes = ZoneOffset._parseNumber(offsetId, 3, false);\n seconds = 0;\n break;\n case 6:\n hours = ZoneOffset._parseNumber(offsetId, 1, false);\n minutes = ZoneOffset._parseNumber(offsetId, 4, true);\n seconds = 0;\n break;\n case 7:\n hours = ZoneOffset._parseNumber(offsetId, 1, false);\n minutes = ZoneOffset._parseNumber(offsetId, 3, false);\n seconds = ZoneOffset._parseNumber(offsetId, 5, false);\n break;\n case 9:\n hours = ZoneOffset._parseNumber(offsetId, 1, false);\n minutes = ZoneOffset._parseNumber(offsetId, 4, true);\n seconds = ZoneOffset._parseNumber(offsetId, 7, true);\n break;\n default:\n throw new DateTimeException('Invalid ID for ZoneOffset, invalid format: ' + offsetId);\n }\n const first = offsetId[0];\n if (first !== '+' && first !== '-') {\n throw new DateTimeException('Invalid ID for ZoneOffset, plus/minus not found when expected: ' + offsetId);\n }\n if (first === '-') {\n return ZoneOffset.ofHoursMinutesSeconds(-hours, -minutes, -seconds);\n } else {\n return ZoneOffset.ofHoursMinutesSeconds(hours, minutes, seconds);\n }\n }\n\n /**\n * Parse a two digit zero-prefixed number.\n *\n * @param {string} offsetId - the offset ID, not null\n * @param {number} pos - the position to parse, valid\n * @param {boolean} precededByColon - should this number be prefixed by a precededByColon\n * @return {number} the parsed number, from 0 to 99\n */\n static _parseNumber(offsetId, pos, precededByColon) {\n if (precededByColon && offsetId[pos - 1] !== ':') {\n throw new DateTimeException('Invalid ID for ZoneOffset, colon not found when expected: ' + offsetId);\n }\n const ch1 = offsetId[pos];\n const ch2 = offsetId[pos + 1];\n if (ch1 < '0' || ch1 > '9' || ch2 < '0' || ch2 > '9') {\n throw new DateTimeException('Invalid ID for ZoneOffset, non numeric characters found: ' + offsetId);\n }\n return (ch1.charCodeAt(0) - 48) * 10 + (ch2.charCodeAt(0) - 48);\n }\n\n /**\n *\n * @param {number} hours\n * @returns {ZoneOffset}\n */\n static ofHours(hours) {\n return ZoneOffset.ofHoursMinutesSeconds(hours, 0, 0);\n }\n\n /**\n *\n * @param {number} hours\n * @param {number} minutes\n * @returns {ZoneOffset}\n */\n static ofHoursMinutes(hours, minutes) {\n return ZoneOffset.ofHoursMinutesSeconds(hours, minutes, 0);\n }\n\n /**\n *\n * @param {number} hours\n * @param {number} minutes\n * @param {number} seconds\n * @returns {ZoneOffset}\n */\n static ofHoursMinutesSeconds(hours, minutes, seconds) {\n ZoneOffset._validate(hours, minutes, seconds);\n const totalSeconds = hours * LocalTime.SECONDS_PER_HOUR + minutes * LocalTime.SECONDS_PER_MINUTE + seconds;\n return ZoneOffset.ofTotalSeconds(totalSeconds);\n }\n\n /**\n *\n * @param {number} totalMinutes\n * @returns {ZoneOffset}\n */\n static ofTotalMinutes(totalMinutes) {\n const totalSeconds = totalMinutes * LocalTime.SECONDS_PER_MINUTE;\n return ZoneOffset.ofTotalSeconds(totalSeconds);\n }\n\n /**\n *\n * @param {number} totalSeconds\n * @returns {ZoneOffset}\n */\n static ofTotalSeconds(totalSeconds) {\n if (totalSeconds % (15 * LocalTime.SECONDS_PER_MINUTE) === 0) {\n const totalSecs = totalSeconds;\n let result = SECONDS_CACHE[totalSecs];\n if (result == null) {\n result = new ZoneOffset(totalSeconds);\n SECONDS_CACHE[totalSecs] = result;\n ID_CACHE[result.id()] = result;\n }\n return result;\n } else {\n return new ZoneOffset(totalSeconds);\n }\n }\n\n /**\n * Gets the associated time-zone rules.\n *\n * The rules will always return this offset when queried.\n * The implementation class is immutable, thread-safe and serializable.\n *\n * @return {ZoneRules} the rules, not null\n */\n rules() {\n return this._rules;\n }\n\n /**\n * Gets the value of the specified field from this offset as an `int`.\n *\n * This queries this offset for the value for the specified field.\n * The returned value will always be within the valid range of values for the field.\n * If it is not possible to return the value, because the field is not supported\n * or for some other reason, an exception is thrown.\n *\n * If the field is a {@link ChronoField} then the query is implemented here.\n * The {@link OFFSET_SECONDS} field returns the value of the offset.\n * All other {@link ChronoField} instances will throw a {@link DateTimeException}.\n *\n * If the field is not a {@link ChronoField}, then the result of this method\n * is obtained by invoking {@link TemporalField.getFrom}\n * passing `this` as the argument. Whether the value can be obtained,\n * and what the value represents, is determined by the field.\n *\n * @param {TemporalField} field - the field to get, not null\n * @return {number} the value for the field\n * @throws DateTimeException if a value for the field cannot be obtained\n * @throws ArithmeticException if numeric overflow occurs\n */\n get(field) {\n return this.getLong(field);\n }\n\n /**\n * Gets the value of the specified field from this offset as a `long`.\n *\n * This queries this offset for the value for the specified field.\n * If it is not possible to return the value, because the field is not supported\n * or for some other reason, an exception is thrown.\n *\n * If the field is a {@link ChronoField} then the query is implemented here.\n * The {@link OFFSET_SECONDS} field returns the value of the offset.\n * All other {@link ChronoField} instances will throw a {@link DateTimeException}.\n *\n * If the field is not a {@link ChronoField}, then the result of this method\n * is obtained by invoking {@link TemporalField.getFrom}\n * passing `this` as the argument. Whether the value can be obtained,\n * and what the value represents, is determined by the field.\n *\n * @param {TemporalField} field - the field to get, not null\n * @return {number} the value for the field\n * @throws DateTimeException if a value for the field cannot be obtained\n * @throws ArithmeticException if numeric overflow occurs\n */\n getLong(field) {\n if (field === ChronoField.OFFSET_SECONDS) {\n return this._totalSeconds;\n } else if (field instanceof ChronoField) {\n throw new DateTimeException('Unsupported field: ' + field);\n }\n return field.getFrom(this);\n }\n\n //-----------------------------------------------------------------------\n /**\n * Queries this offset using the specified query.\n *\n * This queries this offset using the specified query strategy object.\n * The {@link TemporalQuery} object defines the logic to be used to\n * obtain the result. Read the documentation of the query to understand\n * what the result of this method will be.\n *\n * The result of this method is obtained by invoking the\n * {@link TemporalQuery#queryFrom} method on the\n * specified query passing `this` as the argument.\n *\n * @param {TemporalQuery} query - the query to invoke, not null\n * @return {*} the query result, null may be returned (defined by the query)\n * @throws DateTimeException if unable to query (defined by the query)\n * @throws ArithmeticException if numeric overflow occurs (defined by the query)\n */\n query(query) {\n requireNonNull(query, 'query');\n if (query === TemporalQueries.offset() || query === TemporalQueries.zone()) {\n return this;\n } else if (query === TemporalQueries.localDate() || query === TemporalQueries.localTime() ||\n query === TemporalQueries.precision() || query === TemporalQueries.chronology() || query === TemporalQueries.zoneId()) {\n return null;\n }\n return query.queryFrom(this);\n }\n\n /**\n * Adjusts the specified temporal object to have the same offset as this object.\n *\n * This returns a temporal object of the same observable type as the input\n * with the offset changed to be the same as this.\n *\n * The adjustment is equivalent to using {@link Temporal#with}\n * passing {@link ChronoField#OFFSET_SECONDS} as the field.\n *\n * In most cases, it is clearer to reverse the calling pattern by using\n * {@link Temporal#with}:\n *
\n * // these two lines are equivalent, but the second approach is recommended\n * temporal = thisOffset.adjustInto(temporal);\n * temporal = temporal.with(thisOffset);\n *\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {Temporal} temporal - the target object to be adjusted, not null\n * @return {Temporal} the adjusted object, not null\n * @throws DateTimeException if unable to make the adjustment\n * @throws ArithmeticException if numeric overflow occurs\n */\n adjustInto(temporal) {\n return temporal.with(ChronoField.OFFSET_SECONDS, this._totalSeconds);\n }\n\n /**\n * Compares this offset to another offset in descending order.\n *\n * The offsets are compared in the order that they occur for the same time\n * of day around the world. Thus, an offset of `+10:00` comes before an\n * offset of `+09:00` and so on down to `-18:00`.\n *\n * The comparison is \"consistent with equals\", as defined by {@link Comparable}.\n *\n * @param {!ZoneOffset} other - the other date to compare to, not null\n * @return {number} the comparator value, negative if less, postive if greater\n * @throws NullPointerException if {@link other} is null\n */\n compareTo(other) {\n requireNonNull(other, 'other');\n return other._totalSeconds - this._totalSeconds;\n }\n\n\n /**\n * Checks if this offset is equal to another offset.\n *\n * The comparison is based on the amount of the offset in seconds.\n * This is equivalent to a comparison by ID.\n *\n * @param {*} obj - the object to check, null returns false\n * @return {boolean} true if this is equal to the other offset\n */\n equals(obj) {\n if (this === obj) {\n return true;\n }\n if (obj instanceof ZoneOffset) {\n return this._totalSeconds === obj._totalSeconds;\n }\n return false;\n }\n\n /**\n * @return {number}\n */\n hashCode(){\n return this._totalSeconds;\n }\n\n /**\n *\n * @returns {string}\n */\n toString(){\n return this._id;\n }\n}\n\nexport function _init() {\n ZoneOffset.MAX_SECONDS = 18 * LocalTime.SECONDS_PER_HOUR;\n ZoneOffset.UTC = ZoneOffset.ofTotalSeconds(0);\n ZoneOffset.MIN = ZoneOffset.ofTotalSeconds(-ZoneOffset.MAX_SECONDS);\n ZoneOffset.MAX = ZoneOffset.ofTotalSeconds(ZoneOffset.MAX_SECONDS);\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/ZoneOffset.js","/*\n * @copyright (c) 2016, Philipp Thürwächter & Pattrick Hüper\n * @copyright (c) 2007-present, Stephen Colebourne & Michael Nascimento Santos\n * @license BSD-3-Clause (see LICENSE in the root directory of this source tree)\n */\n\nimport {abstractMethodFail} from './assert';\nimport {StringUtil} from './StringUtil';\n\nimport {Instant} from './Instant';\n\nexport class ZoneId {\n //-----------------------------------------------------------------------\n /**\n * Gets the unique time-zone ID.\n *\n * This ID uniquely defines this object.\n * The format of an offset based ID is defined by {@link ZoneOffset#getId}.\n *\n * @return {String} the time-zone unique ID, not null\n */\n id(){\n abstractMethodFail('ZoneId.id');\n }\n\n //-----------------------------------------------------------------------\n /**\n * Gets the time-zone rules for this ID allowing calculations to be performed.\n *\n * The rules provide the functionality associated with a time-zone,\n * such as finding the offset for a given instant or local date-time.\n *\n * A time-zone can be invalid if it is deserialized in a Java Runtime which\n * does not have the same rules loaded as the Java Runtime that stored it.\n * In this case, calling this method will throw a {@link ZoneRulesException}.\n *\n * The rules are supplied by {@link ZoneRulesProvider}. An advanced provider may\n * support dynamic updates to the rules without restarting the Java Runtime.\n * If so, then the result of this method may change over time.\n * Each individual call will be still remain thread-safe.\n *\n * {@link ZoneOffset} will always return a set of rules where the offset never changes.\n *\n * @return {!ZoneRules} the rules, not null\n * @throws ZoneRulesException if no rules are available for this ID\n */\n rules(){\n abstractMethodFail('ZoneId.rules');\n }\n\n /**\n * Normalizes the time-zone ID, returning a {@link ZoneOffset} where possible.\n *\n * The returns a normalized {@link ZoneId} that can be used in place of this ID.\n * The result will have {@link ZoneRules} equivalent to those returned by this object,\n * however the ID returned by {@link getId} may be different.\n *\n * The normalization checks if the rules of this {@link ZoneId} have a fixed offset.\n * If they do, then the {@link ZoneOffset} equal to that offset is returned.\n * Otherwise `this` is returned.\n *\n * @return {ZoneId} the time-zone unique ID, not null\n */\n normalized() {\n const rules = this.rules();\n if (rules.isFixedOffset()) {\n return rules.offset(Instant.EPOCH);\n }\n //try {\n //} catch (ZoneRulesException ex) {\n // // ignore invalid objects\n //}\n return this;\n }\n\n //-----------------------------------------------------------------------\n /**\n * Checks if this time-zone ID is equal to another time-zone ID.\n *\n * The comparison is based on the ID.\n *\n * @param {*} other the object to check, null returns false\n * @return {boolean} true if this is equal to the other time-zone ID\n */\n equals(other) {\n if (this === other) {\n return true;\n }\n if (other instanceof ZoneId) {\n return this.id() === other.id();\n }\n return false;\n }\n\n /**\n * A hash code for this time-zone ID.\n *\n * @return {number} a suitable hash code\n */\n hashCode() {\n return StringUtil.hashCode(this.id());\n }\n\n //-----------------------------------------------------------------------\n /**\n * Outputs this zone as a string, using the ID.\n *\n * @return {string} a string representation of this time-zone ID, not null\n */\n toString() {\n return this.id();\n }\n\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/ZoneId.js","/*\n * @copyright (c) 2016, Philipp Thürwächter & Pattrick Hüper\n * @license BSD-3-Clause (see LICENSE in the root directory of this source tree)\n */\n\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 let 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 * @copyright (c) 2016, Philipp Thürwächter & Pattrick Hüper\n * @copyright (c) 2007-present, Stephen Colebourne & Michael Nascimento Santos\n * @license BSD-3-Clause (see LICENSE in the root directory of this source tree)\n */\n\nimport {requireNonNull, abstractMethodFail} from '../assert';\n\nimport {Duration} from '../Duration';\nimport {Instant} from '../Instant';\n\nexport class ZoneRules {\n\n /**\n * Obtains an instance of {@link ZoneRules} that always uses the same offset.\n *\n * The returned rules always have the same offset.\n *\n * @param {ZoneOffset} offset - the offset, not null\n * @return {ZoneRules} the zone rules, not null\n */\n static of(offset) {\n requireNonNull(offset, 'offset');\n return new Fixed(offset);\n }\n\n\n //-----------------------------------------------------------------------\n /**\n * Checks of the zone rules are fixed, such that the offset never varies.\n *\n * @return {boolean} true if the time-zone is fixed and the offset never changes\n */\n isFixedOffset(){\n abstractMethodFail('ZoneRules.isFixedOffset');\n }\n\n //-----------------------------------------------------------------------\n\n /**\n *\n * @param instantOrLocalDateTime\n * @returns {ZoneOffset}\n */\n offset(instantOrLocalDateTime){\n if(instantOrLocalDateTime instanceof Instant){\n return this.offsetOfInstant(instantOrLocalDateTime);\n } else {\n return this.offsetOfLocalDateTime(instantOrLocalDateTime);\n }\n }\n\n /**\n * Gets the offset applicable at the specified instant in these rules.\n *\n * The mapping from an instant to an offset is simple, there is only\n * one valid offset for each instant.\n * This method returns that offset.\n *\n * @param {Instant} instant - the instant to find the offset for, not null, but null\n * may be ignored if the rules have a single offset for all instants\n * @return {ZoneOffset} the offset, not null\n */\n // eslint-disable-next-line no-unused-vars\n offsetOfInstant(instant){\n abstractMethodFail('ZoneRules.offsetInstant');\n }\n\n /**\n * Gets the offset applicable at the specified epochMilli in these rules.\n *\n * The method is for javascript performance optimisation.\n *\n * @param {number} epochMilli - the epoch millisecond to find the offset for, not null, but null\n * may be ignored if the rules have a single offset for all instants\n * @return {ZoneOffset} the offset, not null\n */\n // eslint-disable-next-line no-unused-vars\n offsetOfEpochMilli(epochMilli){\n abstractMethodFail('ZoneRules.offsetOfEpochMilli');\n }\n\n\n /**\n * Gets a suitable offset for the specified local date-time in these rules.\n *\n * The mapping from a local date-time to an offset is not straightforward.\n * There are three cases:\n *\n * * Normal, with one valid offset. For the vast majority of the year, the normal\n * case applies, where there is a single valid offset for the local date-time.\n * * Gap, with zero valid offsets. This is when clocks jump forward typically\n * due to the spring daylight savings change from \"winter\" to \"summer\".\n * In a gap there are local date-time values with no valid offset.\n * * Overlap, with two valid offsets. This is when clocks are set back typically\n * due to the autumn daylight savings change from \"summer\" to \"winter\".\n * In an overlap there are local date-time values with two valid offsets.\n *\n * Thus, for any given local date-time there can be zero, one or two valid offsets.\n * This method returns the single offset in the Normal case, and in the Gap or Overlap\n * case it returns the offset before the transition.\n *\n * Since, in the case of Gap and Overlap, the offset returned is a \"best\" value, rather\n * than the \"correct\" value, it should be treated with care. Applications that care\n * about the correct offset should use a combination of this method,\n * {@link getValidOffsets} and {@link getTransition}.\n *\n * @param {LocalDateTime} localDateTime - the local date-time to query, not null, but null\n * may be ignored if the rules have a single offset for all instants\n * @return {ZoneOffset} the best available offset for the local date-time, not null\n */\n // eslint-disable-next-line no-unused-vars\n offsetOfLocalDateTime(localDateTime){\n abstractMethodFail('ZoneRules.offsetLocalDateTime');\n }\n\n /**\n * Gets the offset applicable at the specified local date-time in these rules.\n *\n * The mapping from a local date-time to an offset is not straightforward.\n * There are three cases:\n *\n * * Normal, with one valid offset. For the vast majority of the year, the normal\n * case applies, where there is a single valid offset for the local date-time.\n * * Gap, with zero valid offsets. This is when clocks jump forward typically\n * due to the spring daylight savings change from \"winter\" to \"summer\".\n * In a gap there are local date-time values with no valid offset.\n * * Overlap, with two valid offsets. This is when clocks are set back typically\n * due to the autumn daylight savings change from \"summer\" to \"winter\".\n * In an overlap there are local date-time values with two valid offsets.\n *\n * Thus, for any given local date-time there can be zero, one or two valid offsets.\n * This method returns that list of valid offsets, which is a list of size 0, 1 or 2.\n * In the case where there are two offsets, the earlier offset is returned at index 0\n * and the later offset at index 1.\n *\n * There are various ways to handle the conversion from a {@link LocalDateTime}.\n * One technique, using this method, would be:\n *
\n * List\n *\n * In theory, it is possible for there to be more than two valid offsets.\n * This would happen if clocks to be put back more than once in quick succession.\n * This has never happened in the history of time-zones and thus has no special handling.\n * However, if it were to happen, then the list would return more than 2 entries.\n *\n * @param {LocalDateTime} localDateTime - the local date-time to query for valid offsets, not null\n * may be ignored if the rules have a single offset for all instants\n * @return {ZoneOffset[]} the list of valid offsets, may be immutable, not null\n */\n // eslint-disable-next-line no-unused-vars\n validOffsets(localDateTime){\n abstractMethodFail('ZoneRules.validOffsets');\n }\n\n /**\n * Gets the offset transition applicable at the specified local date-time in these rules.\n *\n * The mapping from a local date-time to an offset is not straightforward.\n * There are three cases:\n *\n * * Normal, with one valid offset. For the vast majority of the year, the normal\n * case applies, where there is a single valid offset for the local date-time.\n * * Gap, with zero valid offsets. This is when clocks jump forward typically\n * due to the spring daylight savings change from \"winter\" to \"summer\".\n * In a gap there are local date-time values with no valid offset.\n * * Overlap, with two valid offsets. This is when clocks are set back typically\n * due to the autumn daylight savings change from \"summer\" to \"winter\".\n * In an overlap there are local date-time values with two valid offsets.\n *\n * A transition is used to model the cases of a Gap or Overlap.\n * The Normal case will return null.\n *\n * There are various ways to handle the conversion from a {@link LocalDateTime}.\n * One technique, using this method, would be:\n *validOffsets = rules.getOffset(localDT);\n * if (validOffsets.size() == 1) {\n * // Normal case: only one valid offset\n * zoneOffset = validOffsets.get(0);\n * } else {\n * // Gap or Overlap: determine what to do from transition (which will be non-null)\n * ZoneOffsetTransition trans = rules.getTransition(localDT);\n * }\n *
\n * ZoneOffsetTransition trans = rules.getTransition(localDT);\n * if (trans != null) {\n * // Gap or Overlap: determine what to do from transition\n * } else {\n * // Normal case: only one valid offset\n * zoneOffset = rule.getOffset(localDT);\n * }\n *\n *\n * @param {LocalDateTime} localDateTime the local date-time to query for offset transition, not null, but null\n * may be ignored if the rules have a single offset for all instants\n * @return {ZoneOffsetTransition} the offset transition, null if the local date-time is not in transition\n */\n // eslint-disable-next-line no-unused-vars\n transition(localDateTime){\n abstractMethodFail('ZoneRules.transition');\n }\n\n //-----------------------------------------------------------------------\n /**\n * Gets the standard offset for the specified instant in this zone.\n *\n * This provides access to historic information on how the standard offset\n * has changed over time.\n * The standard offset is the offset before any daylight saving time is applied.\n * This is typically the offset applicable during winter.\n *\n * @param {Instant} instant - the instant to find the offset information for, not null, but null\n * may be ignored if the rules have a single offset for all instants\n * @return {ZoneOffset} the standard offset, not null\n */\n // eslint-disable-next-line no-unused-vars\n standardOffset(instant){\n abstractMethodFail('ZoneRules.standardOffset');\n }\n\n /**\n * Gets the amount of daylight savings in use for the specified instant in this zone.\n *\n * This provides access to historic information on how the amount of daylight\n * savings has changed over time.\n * This is the difference between the standard offset and the actual offset.\n * Typically the amount is zero during winter and one hour during summer.\n * Time-zones are second-based, so the nanosecond part of the duration will be zero.\n *\n * @param {Instant} instant - the instant to find the daylight savings for, not null, but null\n * may be ignored if the rules have a single offset for all instants\n * @return {Duration} the difference between the standard and actual offset, not null\n */\n // eslint-disable-next-line no-unused-vars\n daylightSavings(instant){\n abstractMethodFail('ZoneRules.daylightSavings');\n // default {\n // ZoneOffset standardOffset = getStandardOffset(instant);\n // ZoneOffset actualOffset = getOffset(instant);\n // return actualOffset.toDuration().minus(standardOffset.toDuration()).normalized();\n // }\n }\n\n /**\n * Checks if the specified instant is in daylight savings.\n *\n * This checks if the standard and actual offsets are the same at the specified instant.\n *\n * @param {Instant} instant - the instant to find the offset information for, not null, but null\n * may be ignored if the rules have a single offset for all instants\n * @return {boolean} the standard offset, not null\n */\n // eslint-disable-next-line no-unused-vars\n isDaylightSavings(instant) {\n abstractMethodFail('ZoneRules.isDaylightSavings');\n // default {\n // return (getStandardOffset(instant).equals(getOffset(instant)) == false);\n // }\n }\n\n /**\n * Checks if the offset date-time is valid for these rules.\n *\n * To be valid, the local date-time must not be in a gap and the offset\n * must match the valid offsets.\n *\n * @param {LocalDateTime} localDateTime - the date-time to check, not null, but null\n * may be ignored if the rules have a single offset for all instants\n * @param {ZoneOffset} offset - the offset to check, null returns false\n * @return {boolean} true if the offset date-time is valid for these rules\n */\n // eslint-disable-next-line no-unused-vars\n isValidOffset(localDateTime, offset){\n abstractMethodFail('ZoneRules.isValidOffset');\n }\n\n //-----------------------------------------------------------------------\n /**\n * Gets the next transition after the specified instant.\n *\n * This returns details of the next transition after the specified instant.\n * For example, if the instant represents a point where \"Summer\" daylight savings time\n * applies, then the method will return the transition to the next \"Winter\" time.\n *\n * @param {Instant} instant - the instant to get the next transition after, not null, but null\n * may be ignored if the rules have a single offset for all instants\n * @return {ZoneOffsetTransition} the next transition after the specified instant, null if this is after the last transition\n */\n // eslint-disable-next-line no-unused-vars\n nextTransition(instant){\n abstractMethodFail('ZoneRules.nextTransition');\n }\n\n /**\n * Gets the previous transition before the specified instant.\n *\n * This returns details of the previous transition after the specified instant.\n * For example, if the instant represents a point where \"summer\" daylight saving time\n * applies, then the method will return the transition from the previous \"winter\" time.\n *\n * @param {Instant} instant - the instant to get the previous transition after, not null, but null\n * may be ignored if the rules have a single offset for all instants\n * @return {ZoneOffsetTransition} the previous transition after the specified instant, null if this is before the first transition\n */\n // eslint-disable-next-line no-unused-vars\n previousTransition(instant){\n abstractMethodFail('ZoneRules.previousTransition');\n }\n\n /**\n * Gets the complete list of fully defined transitions.\n *\n * The complete set of transitions for this rules instance is defined by this method\n * and {@link getTransitionRules}. This method returns those transitions that have\n * been fully defined. These are typically historical, but may be in the future.\n *\n * The list will be empty for fixed offset rules and for any time-zone where there has\n * only ever been a single offset. The list will also be empty if the transition rules are unknown.\n *\n * @return {ZoneOffsetTransition[]} an immutable list of fully defined transitions, not null\n */\n transitions(){\n abstractMethodFail('ZoneRules.transitions');\n }\n\n /**\n * Gets the list of transition rules for years beyond those defined in the transition list.\n *\n * The complete set of transitions for this rules instance is defined by this method\n * and {@link getTransitions}. This method returns instances of {@link ZoneOffsetTransitionRule}\n * that define an algorithm for when transitions will occur.\n *\n * For any given {@link ZoneRules}, this list contains the transition rules for years\n * beyond those years that have been fully defined. These rules typically refer to future\n * daylight saving time rule changes.\n *\n * If the zone defines daylight savings into the future, then the list will normally\n * be of size two and hold information about entering and exiting daylight savings.\n * If the zone does not have daylight savings, or information about future changes\n * is uncertain, then the list will be empty.\n *\n * The list will be empty for fixed offset rules and for any time-zone where there is no\n * daylight saving time. The list will also be empty if the transition rules are unknown.\n *\n * @return {ZoneOffsetTransitionRule[]} an immutable list of transition rules, not null\n */\n transitionRules(){\n abstractMethodFail('ZoneRules.transitionRules');\n }\n}\n\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 validOffsets(){\n return [this._offset];\n }\n\n transition(){\n return null;\n }\n\n standardOffset(){\n return this._offset;\n }\n\n daylightSavings(){\n return Duration.ZERO;\n }\n\n isDaylightSavings(){\n return false;\n }\n\n /**\n *\n * @param {LocalDateTime} LocalDateTime\n * @param {ZoneOffset} offset\n * @return {boolean}\n */\n isValidOffset(dateTime, offset) {\n return this._offset.equals(offset);\n }\n\n nextTransition(){\n return null;\n }\n\n previousTransition(){\n return null;\n }\n\n transitions(){\n return [];\n }\n\n transitionRules(){\n return [];\n }\n\n //-----------------------------------------------------------------------\n /**\n *\n * @param other\n * @returns {boolean}\n */\n equals(other) {\n if (this === other) {\n return true;\n }\n if (other instanceof Fixed) {\n return this._offset.equals(other._offset);\n }\n return false;\n }\n\n /**\n *\n * @returns {string}\n */\n toString() {\n return 'FixedRules:' + this._offset.toString();\n }\n\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/zone/ZoneRules.js","/*\n * @copyright (c) 2016, Philipp Thürwächter & Pattrick Hüper\n * @copyright (c) 2007-present, Stephen Colebourne & Michael Nascimento Santos\n * @license BSD-3-Clause (see LICENSE in the root directory of this source tree)\n */\n\nimport {requireNonNull, requireInstance} from '../assert';\n\nimport {ChronoField} from '../temporal/ChronoField';\nimport {ChronoUnit} from '../temporal/ChronoUnit';\nimport {DateTimeFormatter} from '../format/DateTimeFormatter';\nimport {TemporalQueries} from '../temporal/TemporalQueries';\nimport {Temporal} from '../temporal/Temporal';\n\nimport {LocalDate} from '../LocalDate';\n\n/**\n * A date without time-of-day or time-zone in an arbitrary chronology, intended\n * for advanced globalization use cases.\n *\n * **Most applications should declare method signatures, fields and variables\n * as {@link LocalDate}, not this interface.**\n *\n * A {@link ChronoLocalDate} is the abstract representation of a date where the\n * {@link Chronology}, or calendar system, is pluggable.\n * The date is defined in terms of fields expressed by {@link TemporalField},\n * where most common implementations are defined in {@link ChronoField}.\n * The chronology defines how the calendar system operates and the meaning of\n * the standard fields.\n *\n * #### When to use this interface\n *\n * The design of the API encourages the use of {@link LocalDate} rather than this\n * interface, even in the case where the application needs to deal with multiple\n * calendar systems. The rationale for this is explored in the following documentation.\n *\n * The primary use case where this interface should be used is where the generic\n * type parameter `C` is fully defined as a specific chronology.\n * In that case, the assumptions of that chronology are known at development\n * time and specified in the code.\n *\n * When the chronology is defined in the generic type parameter as ? or otherwise\n * unknown at development time, the rest of the discussion below applies.\n *\n * To emphasize the point, declaring a method signature, field or variable as this\n * interface type can initially seem like the sensible way to globalize an application,\n * however it is usually the wrong approach.\n * As such, it should be considered an application-wide architectural decision to choose\n * to use this interface as opposed to {@link LocalDate}.\n *\n * #### Architectural issues to consider\n *\n * These are some of the points that must be considered before using this interface\n * throughout an application.\n *\n * 1) Applications using this interface, as opposed to using just {@link LocalDate},\n * face a significantly higher probability of bugs. This is because the calendar system\n * in use is not known at development time. A key cause of bugs is where the developer\n * applies assumptions from their day-to-day knowledge of the ISO calendar system\n * to code that is intended to deal with any arbitrary calendar system.\n * The section below outlines how those assumptions can cause problems\n * The primary mechanism for reducing this increased risk of bugs is a strong code review process.\n * This should also be considered a extra cost in maintenance for the lifetime of the code.\n *\n * 2) This interface does not enforce immutability of implementations.\n * While the implementation notes indicate that all implementations must be immutable\n * there is nothing in the code or type system to enforce this. Any method declared\n * to accept a {@link ChronoLocalDate} could therefore be passed a poorly or\n * maliciously written mutable implementation.\n *\n * 3) Applications using this interface must consider the impact of eras.\n * {@link LocalDate} shields users from the concept of eras, by ensuring that `getYear()`\n * returns the proleptic year. That decision ensures that developers can think of\n * {@link LocalDate} instances as consisting of three fields - year, month-of-year and day-of-month.\n * By contrast, users of this interface must think of dates as consisting of four fields -\n * era, year-of-era, month-of-year and day-of-month. The extra era field is frequently\n * forgotten, yet it is of vital importance to dates in an arbitrary calendar system.\n * For example, in the Japanese calendar system, the era represents the reign of an Emperor.\n * Whenever one reign ends and another starts, the year-of-era is reset to one.\n *\n * 4) The only agreed international standard for passing a date between two systems\n * is the ISO-8601 standard which requires the ISO calendar system. Using this interface\n * throughout the application will inevitably lead to the requirement to pass the date\n * across a network or component boundary, requiring an application specific protocol or format.\n *\n * 5) Long term persistence, such as a database, will almost always only accept dates in the\n * ISO-8601 calendar system (or the related Julian-Gregorian). Passing around dates in other\n * calendar systems increases the complications of interacting with persistence.\n *\n * 6) Most of the time, passing a {@link ChronoLocalDate} throughout an application\n * is unnecessary, as discussed in the last section below.\n *\n * #### False assumptions causing bugs in multi-calendar system code\n *\n * As indicated above, there are many issues to consider when try to use and manipulate a\n * date in an arbitrary calendar system. These are some of the key issues.\n *\n * Code that queries the day-of-month and assumes that the value will never be more than\n * 31 is invalid. Some calendar systems have more than 31 days in some months.\n *\n * Code that adds 12 months to a date and assumes that a year has been added is invalid.\n * Some calendar systems have a different number of months, such as 13 in the Coptic or Ethiopic.\n *\n * Code that adds one month to a date and assumes that the month-of-year value will increase\n * by one or wrap to the next year is invalid. Some calendar systems have a variable number\n * of months in a year, such as the Hebrew.\n *\n * Code that adds one month, then adds a second one month and assumes that the day-of-month\n * will remain close to its original value is invalid. Some calendar systems have a large difference\n * between the length of the longest month and the length of the shortest month.\n * For example, the Coptic or Ethiopic have 12 months of 30 days and 1 month of 5 days.\n *\n * Code that adds seven days and assumes that a week has been added is invalid.\n * Some calendar systems have weeks of other than seven days, such as the French Revolutionary.\n *\n * Code that assumes that because the year of `date1` is greater than the year of `date2`\n * then `date1` is after `date2` is invalid. This is invalid for all calendar systems\n * when referring to the year-of-era, and especially untrue of the Japanese calendar system\n * where the year-of-era restarts with the reign of every new Emperor.\n *\n * Code that treats month-of-year one and day-of-month one as the start of the year is invalid.\n * Not all calendar systems start the year when the month value is one.\n *\n * In general, manipulating a date, and even querying a date, is wide open to bugs when the\n * calendar system is unknown at development time. This is why it is essential that code using\n * this interface is subjected to additional code reviews. It is also why an architectural\n * decision to avoid this interface type is usually the correct one.\n *\n * #### Using LocalDate instead\n *\n * The primary alternative to using this interface throughout your application is as follows.\n *\n * * Declare all method signatures referring to dates in terms of {@link LocalDate}.\n * * Either store the chronology (calendar system) in the user profile or lookup the chronology\n * from the user locale.\n * * Convert the ISO {@link LocalDate} to and from the user's preferred calendar system during\n * printing and parsing.\n *\n * This approach treats the problem of globalized calendar systems as a localization issue\n * and confines it to the UI layer. This approach is in keeping with other localization\n * issues in the java platform.\n *\n * As discussed above, performing calculations on a date where the rules of the calendar system\n * are pluggable requires skill and is not recommended.\n * Fortunately, the need to perform calculations on a date in an arbitrary calendar system\n * is extremely rare. For example, it is highly unlikely that the business rules of a library\n * book rental scheme will allow rentals to be for one month, where meaning of the month\n * is dependent on the user's preferred calendar system.\n *\n * A key use case for calculations on a date in an arbitrary calendar system is producing\n * a month-by-month calendar for display and user interaction. Again, this is a UI issue,\n * and use of this interface solely within a few methods of the UI layer may be justified.\n *\n * In any other part of the system, where a date must be manipulated in a calendar system\n * other than ISO, the use case will generally specify the calendar system to use.\n * For example, an application may need to calculate the next Islamic or Hebrew holiday\n * which may require manipulating the date.\n * This kind of use case can be handled as follows:\n *\n * * start from the ISO {@link LocalDate} being passed to the method\n * * convert the date to the alternate calendar system, which for this use case is known\n * rather than arbitrary\n * * perform the calculation\n * * convert back to {@link LocalDate}\n *\n * Developers writing low-level frameworks or libraries should also avoid this interface.\n * Instead, one of the two general purpose access interfaces should be used.\n * Use {@link TemporalAccessor} if read-only access is required, or use {@link Temporal}\n * if read-write access is required.\n *\n * ### Specification for implementors\n *\n * This interface must be implemented with care to ensure other classes operate correctly.\n * All implementations that can be instantiated must be final, immutable and thread-safe.\n * Subclasses should be Serializable wherever possible.\n *\n * Additional calendar systems may be added to the system.\n * See {@link Chronology} for more details.\n *\n * In JDK 8, this is an interface with default methods.\n * Since there are no default methods in JDK 7, an abstract class is used.\n */\nexport class ChronoLocalDate extends Temporal {\n\n isSupported(fieldOrUnit) {\n if (fieldOrUnit instanceof ChronoField) {\n return fieldOrUnit.isDateBased();\n } else if (fieldOrUnit instanceof ChronoUnit) {\n return fieldOrUnit.isDateBased();\n }\n return fieldOrUnit != null && fieldOrUnit.isSupportedBy(this);\n }\n\n query(query) {\n if (query === TemporalQueries.chronology()) {\n return this.chronology();\n } else if (query === TemporalQueries.precision()) {\n return ChronoUnit.DAYS;\n } else if (query === TemporalQueries.localDate()) {\n return LocalDate.ofEpochDay(this.toEpochDay());\n } else if (query === TemporalQueries.localTime() || query === TemporalQueries.zone() ||\n query === TemporalQueries.zoneId() || query === TemporalQueries.offset()) {\n return null;\n }\n return super.query(query);\n }\n\n adjustInto(temporal) {\n return temporal.with(ChronoField.EPOCH_DAY, this.toEpochDay());\n }\n /**\n * Formats this date using the specified formatter.\n *\n * This date will be passed to the formatter to produce a string.\n *\n * The default implementation must behave as follows:\n *
\n * return formatter.format(this);\n *\n *\n * @param {DateTimeFormatter} formatter the formatter to use, not null\n * @return {String} the formatted date string, not null\n * @throws DateTimeException if an error occurs during printing\n */\n format(formatter) {\n requireNonNull(formatter, 'formatter');\n requireInstance(formatter, DateTimeFormatter, 'formatter');\n return formatter.format(this);\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/chrono/ChronoLocalDate.js","/**\n * @copyright (c) 2016, Philipp Thürwächter & Pattrick Hüper\n * @copyright (c) 2007-present, Stephen Colebourne & Michael Nascimento Santos\n * @license BSD-3-Clause (see LICENSE in the root directory of this source tree)\n */\n\nimport {assert, requireNonNull} from '../assert';\n\nimport {DateTimeParseException, NullPointerException} from '../errors';\n\nimport {Period} from '../Period';\n\nimport {ParsePosition} from './ParsePosition';\nimport {DateTimeBuilder} from './DateTimeBuilder';\nimport {DateTimeParseContext} from './DateTimeParseContext';\nimport {DateTimePrintContext} from './DateTimePrintContext';\nimport {DateTimeFormatterBuilder} from './DateTimeFormatterBuilder';\nimport {SignStyle} from './SignStyle';\nimport {StringBuilder} from './StringBuilder';\nimport {ResolverStyle} from './ResolverStyle';\n\nimport {IsoChronology} from '../chrono/IsoChronology';\nimport {ChronoField} from '../temporal/ChronoField';\nimport {createTemporalQuery} from '../temporal/TemporalQuery';\n\n/**\n *\n * ### Static properties of Class {@link DateTimeFormatter}\n *\n * DateTimeFormatter.ISO_LOCAL_DATE\n *\n * DateTimeFormatter.ISO_LOCAL_TIME\n *\n * DateTimeFormatter.ISO_LOCAL_DATE_TIME\n *\n */\nexport class DateTimeFormatter {\n\n //-----------------------------------------------------------------------\n /**\n * A query that provides access to the excess days that were parsed.\n *\n * This returns a singleton {@link TemporalQuery} that provides\n * access to additional information from the parse. The query always returns\n * a non-null period, with a zero period returned instead of null.\n *\n * There are two situations where this query may return a non-zero period.\n *\n * * If the {@link ResolverStyle} is {@link LENIENT} and a time is parsed\n * without a date, then the complete result of the parse consists of a\n * {@link LocalTime} and an excess {@link Period} in days.\n * * If the {@link ResolverStyle} is {@link SMART} and a time is parsed\n * without a date where the time is 24:00:00, then the complete result of\n * the parse consists of a {@link LocalTime} of 00:00:00 and an excess\n * {@link Period} of one day.\n *\n * In both cases, if a complete {@link ChronoLocalDateTime} or {@link Instant}\n * is parsed, then the excess days are added to the date part.\n * As a result, this query will return a zero period.\n *\n * The {@link SMART} behaviour handles the common \"end of day\" 24:00 value.\n * Processing in {@link LENIENT} mode also produces the same result:\n *
\n * Text to parse Parsed object Excess days\n * \"2012-12-03T00:00\" LocalDateTime.of(2012, 12, 3, 0, 0) ZERO\n * \"2012-12-03T24:00\" LocalDateTime.of(2012, 12, 4, 0, 0) ZERO\n * \"00:00\" LocalTime.of(0, 0) ZERO\n * \"24:00\" LocalTime.of(0, 0) Period.ofDays(1)\n *\n * The query can be used as follows:\n *
\n * TemporalAccessor parsed = formatter.parse(str);\n * LocalTime time = parsed.query(LocalTime.FROM);\n * Period extraDays = parsed.query(DateTimeFormatter.parsedExcessDays());\n *\n * @return {TemporalQuery} a query that provides access to the excess days that were parsed\n */\n static parsedExcessDays() {\n return DateTimeFormatter.PARSED_EXCESS_DAYS;\n }\n\n /**\n * A query that provides access to whether a leap-second was parsed.\n *\n * This returns a singleton {@link TemporalQuery} that provides\n * access to additional information from the parse. The query always returns\n * a non-null boolean, true if parsing saw a leap-second, false if not.\n *\n * Instant parsing handles the special \"leap second\" time of '23:59:60'.\n * Leap seconds occur at '23:59:60' in the UTC time-zone, but at other\n * local times in different time-zones. To avoid this potential ambiguity,\n * the handling of leap-seconds is limited to\n * {@link DateTimeFormatterBuilder#appendInstant}, as that method\n * always parses the instant with the UTC zone offset.\n *\n * If the time '23:59:60' is received, then a simple conversion is applied,\n * replacing the second-of-minute of 60 with 59. This query can be used\n * on the parse result to determine if the leap-second adjustment was made.\n * The query will return one second of excess if it did adjust to remove\n * the leap-second, and zero if not. Note that applying a leap-second\n * smoothing mechanism, such as UTC-SLS, is the responsibility of the\n * application, as follows:\n *
\n * TemporalAccessor parsed = formatter.parse(str);\n * Instant instant = parsed.query(Instant::from);\n * if (parsed.query(DateTimeFormatter.parsedLeapSecond())) {\n * // validate leap-second is correct and apply correct smoothing\n * }\n *\n * @return a query that provides access to whether a leap-second was parsed\n */\n static parsedLeapSecond() {\n return DateTimeFormatter.PARSED_LEAP_SECOND;\n }\n\n /**\n * Creates a formatter using the specified pattern.\n *\n * This method will create a formatter based on a simple pattern of letters and symbols.\n *\n * The returned formatter will use the default locale, but this can be changed\n * using {@link DateTimeFormatter.withLocale}.\n *\n * All letters 'A' to 'Z' and 'a' to 'z' are reserved as pattern letters.\n * The following pattern letters are defined:\n *
\n * |Symbol |Meaning |Presentation |Examples\n * |--------|----------------------------|------------------|----------------------------------------------------\n * | G | era | number/text | 1; 01; AD; Anno Domini\n * | 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 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 {@link Temporal} object contains a date then it will\n * be converted to a date in the override chronology.\n * Any time or zone will be retained unless overridden.\n * The converted result will behave in a manner equivalent to an implementation\n * of {@link ChronoLocalDate},{@link ChronoLocalDateTime} or {@link ChronoZonedDateTime}.\n *\n * When parsing, the override chronology will be used to interpret the\n * {@link ChronoField} into a date unless the\n * formatter directly parses a valid chronology.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param chrono the new chronology, not null\n * @return a formatter based on this formatter with the requested override chronology, not null\n */\n withChronology(chrono) {\n if (this._chrono != null && this._chrono.equals(chrono)) {\n return this;\n }\n return new DateTimeFormatter(this._printerParser, this._locale, this._decimalStyle,\n this._resolverStyle, this._resolverFields, chrono, this._zone);\n }\n\n /**\n * not yet supported\n * @returns {DateTimeFormatter}\n */\n withLocale(){\n return this;\n }\n\n //-----------------------------------------------------------------------\n /**\n * Formats a date-time object using this formatter.\n *\n * This formats the date-time to a String using the rules of the formatter.\n *\n * @param {TemporalAccessor} temporal the temporal object to print, not null\n * @return {String} the printed string, not null\n * @throws DateTimeException if an error occurs during formatting\n */\n format(temporal) {\n const buf = new StringBuilder(32);\n this._formatTo(temporal, buf);\n return buf.toString();\n }\n\n //-----------------------------------------------------------------------\n /**\n * Formats a date-time object to an {@link Appendable} using this formatter.\n *\n * This formats the date-time to the specified destination.\n * {@link Appendable} is a general purpose interface that is implemented by all\n * key character output classes including {@link StringBuffer}, {@link StringBuilder},\n * {@link PrintStream} and {@link Writer}.\n *\n * Although {@link Appendable} methods throw an {@link IOException}, this method does not.\n * Instead, any {@link IOException} is wrapped in a runtime exception.\n *\n * @param {TemporalAccessor} temporal - the temporal object to print, not null\n * @param {StringBuilder} appendable - the appendable to print to, not null\n * @throws DateTimeException if an error occurs during formatting\n */\n _formatTo(temporal, appendable) {\n requireNonNull(temporal, 'temporal');\n requireNonNull(appendable, 'appendable');\n const context = new DateTimePrintContext(temporal, this);\n this._printerParser.print(context, appendable);\n }\n\n /**\n * function overloading for {@link DateTimeFormatter.parse}\n *\n * if called with one arg {@link DateTimeFormatter.parse1} is called\n * otherwise {@link DateTimeFormatter.parse2}\n *\n * @param {string} text\n * @param {TemporalQuery} type\n * @return {TemporalAccessor}\n */\n parse(text, type){\n if(arguments.length === 1){\n return this.parse1(text);\n } else {\n return this.parse2(text, type);\n }\n }\n\n /**\n * Fully parses the text producing a temporal object.\n *\n * This parses the entire text producing a temporal object.\n * It is typically more useful to use {@link parse}.\n * The result of this method is {@link TemporalAccessor} which has been resolved,\n * applying basic validation checks to help ensure a valid date-time.\n *\n * If the parse completes without reading the entire length of the text,\n * or a problem occurs during parsing or merging, then an exception is thrown.\n *\n * @param {String} text the text to parse, not null\n * @return {TemporalAccessor} the parsed temporal object, not null\n * @throws DateTimeParseException if unable to parse the requested result\n */\n parse1(text) {\n requireNonNull(text, 'text');\n try {\n return this._parseToBuilder(text, null).resolve(this._resolverStyle, this._resolverFields);\n } catch (ex) {\n if(ex instanceof DateTimeParseException){\n throw ex;\n } else {\n throw this._createError(text, ex);\n }\n }\n }\n\n /**\n * Fully parses the text producing a temporal object.\n *\n * This parses the entire text producing a temporal object.\n * It is typically more useful to use {@link parse}.\n * The result of this method is {@link TemporalAccessor} which has been resolved,\n * applying basic validation checks to help ensure a valid date-time.\n *\n * If the parse completes without reading the entire length of the text,\n * or a problem occurs during parsing or merging, then an exception is thrown.\n *\n * @param text the text to parse, not null\n * @param type the type to extract, not null\n * @return the parsed temporal object, not null\n * @throws DateTimeParseException if unable to parse the requested result\n */\n parse2(text, type) {\n requireNonNull(text, 'text');\n requireNonNull(type, 'type');\n try {\n const builder = this._parseToBuilder(text, null).resolve(this._resolverStyle, this._resolverFields);\n return builder.build(type);\n } catch (ex) {\n if(ex instanceof DateTimeParseException){\n throw ex;\n } else {\n throw this._createError(text, ex);\n }\n }\n }\n\n _createError(text, ex) {\n let abbr = '';\n if (text.length > 64) {\n abbr = text.subString(0, 64) + '...';\n } else {\n abbr = text;\n }\n return new DateTimeParseException('Text \\'' + abbr + '\\' could not be parsed: ' + ex.message, text, 0, ex);\n }\n\n\n /**\n * Parses the text to a builder.\n *\n * This parses to a {@link DateTimeBuilder} ensuring that the text is fully parsed.\n * This method throws {@link DateTimeParseException} if unable to parse, or\n * some other {@link DateTimeException} if another date/time problem occurs.\n *\n * @param text the text to parse, not null\n * @param position the position to parse from, updated with length parsed\n * and the index of any error, null if parsing whole string\n * @return the engine representing the result of the parse, not null\n * @throws DateTimeParseException if the parse fails\n */\n _parseToBuilder(text, position) {\n const pos = (position != null ? position : new ParsePosition(0));\n const result = this._parseUnresolved0(text, pos);\n if (result == null || pos.getErrorIndex() >= 0 || (position == null && pos.getIndex() < text.length)) {\n let abbr = '';\n if (text.length > 64) {\n abbr = text.substr(0, 64).toString() + '...';\n } else {\n abbr = text;\n }\n if (pos.getErrorIndex() >= 0) {\n throw new DateTimeParseException('Text \\'' + abbr + '\\' could not be parsed at index ' +\n pos.getErrorIndex(), text, pos.getErrorIndex());\n } else {\n throw new DateTimeParseException('Text \\'' + abbr + '\\' could not be parsed, unparsed text found at index ' +\n pos.getIndex(), text, pos.getIndex());\n }\n }\n return result.toBuilder();\n }\n\n /**\n * Parses the text using this formatter, without resolving the result, intended\n * for advanced use cases.\n *\n * Parsing is implemented as a two-phase operation.\n * First, the text is parsed using the layout defined by the formatter, producing\n * a {@link Map} of field to value, a {@link ZoneId} and a {@link Chronology}.\n * Second, the parsed data is *resolved*, by validating, combining and\n * simplifying the various fields into more useful ones.\n * This method performs the parsing stage but not the resolving stage.\n *\n * The result of this method is {@link TemporalAccessor} which represents the\n * data as seen in the input. Values are not validated, thus parsing a date string\n * of '2012-00-65' would result in a temporal with three fields - year of '2012',\n * month of '0' and day-of-month of '65'.\n *\n * The text will be parsed from the specified start {@link ParsePosition}.\n * The entire length of the text does not have to be parsed, the {@link ParsePosition}\n * will be updated with the index at the end of parsing.\n *\n * Errors are returned using the error index field of the {@link ParsePosition}\n * instead of {@link DateTimeParseException}.\n * The returned error index will be set to an index indicative of the error.\n * Callers must check for errors before using the context.\n *\n * If the formatter parses the same field more than once with different values,\n * the result will be an error.\n *\n * This method is intended for advanced use cases that need access to the\n * internal state during parsing. Typical application code should use\n * {@link parse} or the parse method on the target type.\n *\n * @param text the text to parse, not null\n * @param position the position to parse from, updated with length parsed\n * and the index of any error, not null\n * @return the parsed text, null if the parse results in an error\n * @throws DateTimeException if some problem occurs during parsing\n * @throws IndexOutOfBoundsException if the position is invalid\n */\n parseUnresolved(text, position) {\n return this._parseUnresolved0(text, position);\n }\n\n _parseUnresolved0(text, position) {\n assert(text != null, 'text', NullPointerException);\n assert(position != null, 'position', NullPointerException);\n const context = new DateTimeParseContext(this);\n let pos = position.getIndex();\n pos = this._printerParser.parse(context, text, pos);\n if (pos < 0) {\n position.setErrorIndex(~pos); // index not updated from input\n return null;\n }\n position.setIndex(pos); // errorIndex not updated from input\n return context.toParsed();\n }\n\n /**\n * Returns the formatter as a composite printer parser.\n *\n * @param {boolean} optional whether the printer/parser should be optional\n * @return {CompositePrinterParser} the printer/parser, not null\n */\n toPrinterParser(optional) {\n return this._printerParser.withOptional(optional);\n }\n\n toString() {\n const pattern = this._printerParser.toString();\n return pattern.indexOf('[') === 0 ? pattern : pattern.substring(1, pattern.length - 1);\n }\n\n}\n\nexport function _init() {\n\n DateTimeFormatter.ISO_LOCAL_DATE = new DateTimeFormatterBuilder()\n .appendValue(ChronoField.YEAR, 4, 10, SignStyle.EXCEEDS_PAD)\n .appendLiteral('-')\n .appendValue(ChronoField.MONTH_OF_YEAR, 2)\n .appendLiteral('-')\n .appendValue(ChronoField.DAY_OF_MONTH, 2)\n .toFormatter(ResolverStyle.STRICT).withChronology(IsoChronology.INSTANCE);\n\n DateTimeFormatter.ISO_LOCAL_TIME = new DateTimeFormatterBuilder()\n .appendValue(ChronoField.HOUR_OF_DAY, 2)\n .appendLiteral(':')\n .appendValue(ChronoField.MINUTE_OF_HOUR, 2)\n .optionalStart()\n .appendLiteral(':')\n .appendValue(ChronoField.SECOND_OF_MINUTE, 2)\n .optionalStart()\n .appendFraction(ChronoField.NANO_OF_SECOND, 0, 9, true)\n .toFormatter(ResolverStyle.STRICT);\n\n DateTimeFormatter.ISO_LOCAL_DATE_TIME = new DateTimeFormatterBuilder()\n .parseCaseInsensitive()\n .append(DateTimeFormatter.ISO_LOCAL_DATE)\n .appendLiteral('T')\n .append(DateTimeFormatter.ISO_LOCAL_TIME)\n .toFormatter(ResolverStyle.STRICT).withChronology(IsoChronology.INSTANCE);\n\n DateTimeFormatter.ISO_INSTANT = new DateTimeFormatterBuilder()\n .parseCaseInsensitive()\n .appendInstant()\n .toFormatter(ResolverStyle.STRICT);\n\n DateTimeFormatter.ISO_OFFSET_DATE_TIME = new DateTimeFormatterBuilder()\n .parseCaseInsensitive()\n .append(DateTimeFormatter.ISO_LOCAL_DATE_TIME)\n .appendOffsetId()\n .toFormatter(ResolverStyle.STRICT).withChronology(IsoChronology.INSTANCE);\n\n DateTimeFormatter.ISO_ZONED_DATE_TIME = new DateTimeFormatterBuilder()\n .append(DateTimeFormatter.ISO_OFFSET_DATE_TIME)\n .optionalStart()\n .appendLiteral('[')\n .parseCaseSensitive()\n .appendZoneId()\n // .appendZoneRegionId()\n .appendLiteral(']')\n .toFormatter(ResolverStyle.STRICT).withChronology(IsoChronology.INSTANCE);\n\n DateTimeFormatter.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\n// WEBPACK FOOTER //\n// ./src/format/DateTimeFormatter.js","/*\n * @copyright (c) 2016, Philipp Thürwächter & Pattrick Hüper\n * @copyright (c) 2007-present, Stephen Colebourne & Michael Nascimento Santos\n * @license BSD-3-Clause (see LICENSE in the root directory of this source tree)\n */\n\nimport {MathUtil} from './MathUtil';\nimport {requireNonNull, requireInstance} from './assert';\nimport {DateTimeException, UnsupportedTemporalTypeException, ArithmeticException, DateTimeParseException} from './errors';\n\nimport {IsoChronology} from './chrono/IsoChronology';\n\nimport {ChronoUnit} from './temporal/ChronoUnit';\nimport {TemporalAmount} from './temporal/TemporalAmount';\n\nimport {LocalDate} from './LocalDate';\n\n/**\n * The pattern for parsing.\n */\nconst PATTERN = /([-+]?)P(?:([-+]?[0-9]+)Y)?(?:([-+]?[0-9]+)M)?(?:([-+]?[0-9]+)W)?(?:([-+]?[0-9]+)D)?/;\n\n/**\n * A date-based amount of time, such as '2 years, 3 months and 4 days'.\n *\n * This class models a quantity or amount of time in terms of years, months and days.\n * See {@link Duration} for the time-based equivalent to this class.\n *\n * Durations and period differ in their treatment of daylight savings time\n * when added to {@link ZonedDateTime}. A {@link Duration} will add an exact\n * number of seconds, thus a duration of one day is always exactly 24 hours.\n * By contrast, a {@link Period} will add a conceptual day, trying to maintain\n * the local time.\n *\n * For example, consider adding a period of one day and a duration of one day to\n * 18:00 on the evening before a daylight savings gap. The {@link Period} will add\n * the conceptual day and result in a {@link ZonedDateTime} at 18:00 the following day.\n * By contrast, the {@link Duration} will add exactly 24 hours, resulting in a\n * {@link ZonedDateTime} at 19:00 the following day (assuming a one hour DST gap).\n *\n * The supported units of a period are {@link ChronoUnit#YEARS},\n * {@link ChronoUnit#MONTHS} and {@link ChronoUnit#DAYS}.\n * All three fields are always present, but may be set to zero.\n *\n * The period may be used with any calendar system.\n * The meaning of a 'year' or 'month' is only applied when the object is added to a date.\n *\n * The period is modeled as a directed amount of time, meaning that individual parts of the\n * period may be negative.\n *\n * The months and years fields may be normalized (see {@link normalized}).\n * The normalization assumes a 12 month year, so is not appropriate for all calendar systems.\n *\n * ### Static properties of Class {@link Period}\n *\n * Period.ZERO\n *\n * A constant for a period of zero.\n *\n */\nexport class Period extends TemporalAmount /* extends ChronoPeriod */ {\n\n /**\n * do not call the constructor directly\n * use a factory method instead\n *\n * @param {number} years\n * @param {number} months\n * @param {number} days\n * @private\n */\n constructor(years, months, days){\n super();\n 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 = MathUtil.safeToInt(years);\n /**\n * The number of months.\n */\n this._months = MathUtil.safeToInt(months);\n /**\n * The number of days.\n */\n this._days = MathUtil.safeToInt(days);\n }\n\n static _validate(years, month, days){\n requireNonNull(years, 'years');\n requireNonNull(month, 'month');\n requireNonNull(days, 'days');\n }\n\n //-----------------------------------------------------------------------\n /**\n * Obtains a {@link Period} representing a number of years.\n *\n * The resulting period will have the specified years.\n * The months and days units will be zero.\n *\n * @param {number} years - the number of years, positive or negative\n * @return {Period} the period of years, not null\n */\n static ofYears(years) {\n return Period.create(years, 0, 0);\n }\n\n /**\n * Obtains a {@link Period} representing a number of months.\n *\n * The resulting period will have the specified months.\n * The years and days units will be zero.\n *\n * @param {number} months - the number of months, positive or negative\n * @return {Period} the period of months, not null\n */\n static ofMonths(months) {\n return Period.create(0, months, 0);\n }\n\n /**\n * Obtains a {@link Period} representing a number of weeks.\n *\n * The resulting period will have days equal to the weeks multiplied by seven.\n * The years and months units will be zero.\n *\n * @param {number} weeks - the number of weeks, positive or negative\n * @return {Period} the period of days, not null\n */\n static ofWeeks(weeks) {\n return Period.create(0, 0, MathUtil.safeMultiply(weeks, 7));\n }\n\n /**\n * Obtains a {@link Period} representing a number of days.\n *\n * The resulting period will have the specified days.\n * The years and months units will be zero.\n *\n * @param {number} days - the number of days, positive or negative\n * @return {Period} the period of days, not null\n */\n static ofDays(days) {\n return Period.create(0, 0, days);\n }\n\n //-----------------------------------------------------------------------\n /**\n * Obtains a {@link Period} representing a number of years, months and days.\n *\n * This creates an instance based on years, months and days.\n *\n * @param {!number} years - the amount of years, may be negative\n * @param {!number} months - the amount of months, may be negative\n * @param {!number} days - the amount of days, may be negative\n * @return {Period} the period of years, months and days, not null\n */\n static of(years, months, days) {\n return Period.create(years, months, days);\n }\n\n //-----------------------------------------------------------------------\n /**\n * Obtains an instance of {@link Period} from a temporal amount.\n *\n * This obtains a period based on the specified amount.\n * A {@link TemporalAmount} represents an - amount of time, which may be\n * date-based or time-based, which this factory extracts to a {@link Period}.\n *\n * The conversion loops around the set of units from the amount and uses\n * the {@link ChronoUnit#YEARS}, {@link ChronoUnit#MONTHS}\n * and {@link ChronoUnit#DAYS} units to create a period.\n * If any other units are found then an exception is thrown.\n *\n * If the amount is a {@link ChronoPeriod} then it must use the ISO chronology.\n *\n * @param {TemporalAmount} amount - the temporal amount to convert, not null\n * @return {Period} the equivalent period, not null\n * @throws DateTimeException if unable to convert to a {@link Period}\n * @throws ArithmeticException if the amount of years, months or days exceeds an int\n */\n static from(amount) {\n if (amount instanceof Period) {\n return amount;\n }\n/*\n if (amount instanceof ChronoPeriod) {\n if (IsoChronology.INSTANCE !== amount.chronology()) {\n throw new DateTimeException('Period requires ISO chronology: ' + amount);\n }\n }\n*/\n requireNonNull(amount, 'amount');\n let years = 0;\n let months = 0;\n let days = 0;\n const units = amount.units();\n for (let i=0; i
\n * // these two lines are equivalent, but the second approach is recommended\n * dateTime = thisPeriod.addTo(dateTime);\n * dateTime = dateTime.plus(thisPeriod);\n *\n *\n * The calculation will add the years, then months, then days.\n * Only non-zero amounts will be added.\n * If the date-time has a calendar system with a fixed number of months in a\n * year, then the years and months will be combined before being added.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {Temporal} temporal - the temporal object to adjust, not null\n * @return {Temporal} an object of the same type with the adjustment made, not null\n * @throws DateTimeException if unable to add\n * @throws ArithmeticException if numeric overflow occurs\n */\n addTo(temporal) {\n requireNonNull(temporal, 'temporal');\n if (this._years !== 0) {\n if (this._months !== 0) {\n temporal = temporal.plus(this.toTotalMonths(), ChronoUnit.MONTHS);\n } else {\n temporal = temporal.plus(this._years, ChronoUnit.YEARS);\n }\n } else if (this._months !== 0) {\n temporal = temporal.plus(this._months, ChronoUnit.MONTHS);\n }\n if (this._days !== 0) {\n temporal = temporal.plus(this._days, ChronoUnit.DAYS);\n }\n return temporal;\n }\n\n /**\n * Subtracts this period from the specified temporal object.\n *\n * This returns a temporal object of the same observable type as the input\n * with this period subtracted.\n *\n * In most cases, it is clearer to reverse the calling pattern by using\n * {@link Temporal#minus}.\n *
\n * // these two lines are equivalent, but the second approach is recommended\n * dateTime = thisPeriod.subtractFrom(dateTime);\n * dateTime = dateTime.minus(thisPeriod);\n *\n *\n * The calculation operates as follows.\n * First, the chronology of the temporal is checked to ensure it is ISO chronology or null.\n * Second, if the months are zero, the years are added if non-zero, otherwise\n * the combination of years and months is added if non-zero.\n * Finally, any days are added.\n *\n * The calculation will subtract the years, then months, then days.\n * Only non-zero amounts will be subtracted.\n * If the date-time has a calendar system with a fixed number of months in a\n * year, then the years and months will be combined before being subtracted.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {Temporal} temporal - the temporal object to adjust, not null\n * @return {Temporal} an object of the same type with the adjustment made, not null\n * @throws DateTimeException if unable to subtract\n * @throws ArithmeticException if numeric overflow occurs\n */\n subtractFrom(temporal) {\n requireNonNull(temporal, 'temporal');\n if (this._years !== 0) {\n if (this._months !== 0) {\n temporal = temporal.minus(this.toTotalMonths(), ChronoUnit.MONTHS);\n } else {\n temporal = temporal.minus(this._years, ChronoUnit.YEARS);\n }\n } else if (this._months !== 0) {\n temporal = temporal.minus(this._months, ChronoUnit.MONTHS);\n }\n if (this._days !== 0) {\n temporal = temporal.minus(this._days, ChronoUnit.DAYS);\n }\n return temporal;\n }\n\n //-----------------------------------------------------------------------\n /**\n * Checks if this period is equal to another period.\n *\n * The comparison is based on the amounts held in the period.\n * To be equal, the years, months and days units must be individually equal.\n * Note that this means that a period of '15 Months' is not equal to a period\n * of '1 Year and 3 Months'.\n *\n * @param {*} obj - the object to check, null returns false\n * @return {boolean} true if this is equal to the other period\n */\n equals(obj) {\n if (this === obj) {\n return true;\n }\n if (obj instanceof Period) {\n const other = obj;\n return this._years === other._years &&\n this._months === other._months &&\n this._days === other._days;\n }\n return false;\n }\n\n /**\n * A hash code for this period.\n *\n * @return {number} a suitable hash code\n */\n hashCode() {\n return this._years + (this._months << 8) + (this._days << 16);\n }\n\n //-----------------------------------------------------------------------\n /**\n * Outputs this period as a string, such as {@link P6Y3M1D}.\n *\n * The output will be in the ISO-8601 period format.\n * A zero period will be represented as zero days, 'P0D'.\n *\n * @return {string} a string representation of this period, not null\n */\n toString() {\n if (this === Period.ZERO) {\n return 'P0D';\n } else {\n let buf = 'P';\n if (this._years !== 0) {\n buf += '' + this._years + 'Y';\n }\n if (this._months !== 0) {\n buf += '' + this._months + 'M';\n }\n if (this._days !== 0) {\n buf += '' + this._days + 'D';\n }\n return buf;\n }\n }\n\n /**\n *\n * @return {string} same as {@link Period.toString}\n */\n toJSON() {\n return this.toString();\n }\n}\n\nexport function _init() {\n /**\n * A constant for a period of zero.\n */\n Period.ZERO = makeZeroPeriod();\n\n function makeZeroPeriod() {\n const 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\n// WEBPACK FOOTER //\n// ./src/Period.js","/*\n * @copyright (c) 2016, Philipp Thürwächter & Pattrick Hüper\n * @copyright (c) 2007-present, Stephen Colebourne & Michael Nascimento Santos\n * @license BSD-3-Clause (see LICENSE in the root directory of this source tree)\n */\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\n// WEBPACK FOOTER //\n// ./src/format/ParsePosition.js","/*\n * @copyright (c) 2016, Philipp Thürwächter & Pattrick Hüper\n * @copyright (c) 2007-present, Stephen Colebourne & Michael Nascimento Santos\n * @license BSD-3-Clause (see LICENSE in the root directory of this source tree)\n */\n\nimport {requireNonNull} from '../assert';\nimport {DateTimeException} from '../errors';\nimport {MathUtil} from '../MathUtil';\n\nimport {EnumMap} from './EnumMap';\nimport {ResolverStyle} from './ResolverStyle';\n\nimport {IsoChronology} from '../chrono/IsoChronology';\nimport {ChronoLocalDate} from '../chrono/ChronoLocalDate';\nimport {ChronoField} from '../temporal/ChronoField';\nimport {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 * * from {@link TemporalField} to `long` value, where the value may be\n * outside the valid range for the field\n * * from {@link Class} to {@link TemporalAccessor}, holding larger scale objects\n * like {@link LocalDateTime}.\n */\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} on an empty builder.\n *\n * @param {TemporalField} field - the field to add, not null\n * @param {number} value - the value to add, not null\n * @return {DateTimeBuilder}\n */\n static create(field, value) {\n const dtb = new DateTimeBuilder();\n dtb._addFieldValue(field, value);\n return dtb;\n }\n\n\n constructor(){\n super();\n\n /**\n * The map of other fields.\n */\n this.fieldValues = new EnumMap();\n /**\n * The chronology.\n */\n this.chrono = null;\n /**\n * The zone.\n */\n this.zone = null;\n /**\n * The date.\n */\n this.date = null;\n /**\n * The time.\n */\n this.time = null;\n /**\n * The leap second flag.\n */\n this.leapSecond = false;\n /**\n * The excess days.\n */\n this.excessDays = null;\n }\n\n /**\n *\n * @param {TemporalField} field\n * @return {Number} field value\n */\n getFieldValue0(field) {\n return this.fieldValues.get(field);\n }\n\n /**\n * Adds a field-value pair to the builder.\n *\n * This adds a field to the builder.\n * If the field is not already present, then the field-value pair is added to the map.\n * If the field is already present and it has the same value as that specified, no action occurs.\n * If the field is already present and it has a different value to that specified, then\n * an exception is thrown.\n *\n * @param {TemporalField} field - the field to add, not null\n * @param {Number} value - the value to add, not null\n * @return {DateTimeBuilder}, this for method chaining\n * @throws DateTimeException if the field is already present with a different value\n */\n _addFieldValue(field, value) {\n requireNonNull(field, 'field');\n const old = this.getFieldValue0(field); // check first for better error message\n if (old != null && old !== value) {\n throw new DateTimeException('Conflict found: ' + field + ' ' + old + ' differs from ' + field + ' ' + value + ': ' + this);\n }\n return this._putFieldValue0(field, value);\n }\n\n /**\n * @param {TemporalField} field\n * @param {Number} value\n * @return {DateTimeBuilder}, this for method chaining\n */\n _putFieldValue0(field, value) {\n this.fieldValues.put(field, value);\n return this;\n }\n\n /**\n * Resolves the builder, evaluating the date and time.\n *\n * This examines the contents of the build.er and resolves it to produce the best\n * available date and time, throwing an exception if a problem occurs.\n * Calling this method changes the state of the builder.\n *\n * @param {ResolverStyle} resolverStyle - how to resolve\n * @param {TemporalField[]} resolverFields\n * @return {DateTimeBuilder} this, for method chaining\n */\n resolve(resolverStyle, resolverFields) {\n if (resolverFields != null) {\n this.fieldValues.retainAll(resolverFields);\n }\n // handle standard fields\n // this._mergeInstantFields();\n this._mergeDate(resolverStyle);\n this._mergeTime(resolverStyle);\n //if (resolveFields(resolverStyle)) {\n // mergeInstantFields();\n // mergeDate(resolverStyle);\n // mergeTime(resolverStyle);\n //}\n this._resolveTimeInferZeroes(resolverStyle);\n //this._crossCheck();\n if (this.excessDays != null && this.excessDays.isZero() === false && this.date != null && this.time != null) {\n this.date = this.date.plus(this.excessDays);\n this.excessDays = Period.ZERO;\n }\n //resolveFractional();\n //resolveInstant();\n return this;\n }\n\n /**\n *\n * @param {ResolverStyle} resolverStyle\n * @private\n */\n _mergeDate(resolverStyle) {\n //if (this.chrono instanceof IsoChronology) {\n this._checkDate(IsoChronology.INSTANCE.resolveDate(this.fieldValues, resolverStyle));\n //} else {\n // if (this.fieldValues.containsKey(ChronoField.EPOCH_DAY)) {\n // this._checkDate(LocalDate.ofEpochDay(this.fieldValues.remove(ChronoField.EPOCH_DAY)));\n // return;\n // }\n //}\n }\n\n /**\n *\n * @param {LocalDate} date\n * @private\n */\n _checkDate(date) {\n if (date != null) {\n this._addObject(date);\n for (let fieldName in this.fieldValues.keySet()) {\n let field = ChronoField.byName(fieldName);\n if (field !== null) {\n if (this.fieldValues.get(field) !== undefined) { // undefined if \"removed\" in EnumMap\n if (field.isDateBased()) {\n let val1;\n try {\n val1 = date.getLong(field);\n } catch (ex) {\n if (ex instanceof DateTimeException) {\n continue;\n } else {\n throw ex;\n }\n }\n const val2 = this.fieldValues.get(field);\n if (val1 !== val2) {\n throw new DateTimeException('Conflict found: Field ' + field + ' ' + val1 + ' differs from ' + field + ' ' + val2 + ' derived from ' + date);\n }\n }\n }\n }\n }\n }\n }\n\n /**\n *\n * @param {ResolverStyle} resolverStyle\n * @private\n */\n _mergeTime(resolverStyle) {\n if (this.fieldValues.containsKey(ChronoField.CLOCK_HOUR_OF_DAY)) {\n const ch = this.fieldValues.remove(ChronoField.CLOCK_HOUR_OF_DAY);\n if (resolverStyle !== ResolverStyle.LENIENT) {\n if (resolverStyle === ResolverStyle.SMART && ch === 0) {\n // ok\n } else {\n ChronoField.CLOCK_HOUR_OF_DAY.checkValidValue(ch);\n }\n }\n this._addFieldValue(ChronoField.HOUR_OF_DAY, ch === 24 ? 0 : ch);\n }\n if (this.fieldValues.containsKey(ChronoField.CLOCK_HOUR_OF_AMPM)) {\n const ch = this.fieldValues.remove(ChronoField.CLOCK_HOUR_OF_AMPM);\n if (resolverStyle !== ResolverStyle.LENIENT) {\n if (resolverStyle === ResolverStyle.SMART && ch === 0) {\n // ok\n } else {\n ChronoField.CLOCK_HOUR_OF_AMPM.checkValidValue(ch);\n }\n }\n this._addFieldValue(ChronoField.HOUR_OF_AMPM, ch === 12 ? 0 : ch);\n }\n if (resolverStyle !== ResolverStyle.LENIENT) {\n if (this.fieldValues.containsKey(ChronoField.AMPM_OF_DAY)) {\n ChronoField.AMPM_OF_DAY.checkValidValue(this.fieldValues.get(ChronoField.AMPM_OF_DAY));\n }\n if (this.fieldValues.containsKey(ChronoField.HOUR_OF_AMPM)) {\n ChronoField.HOUR_OF_AMPM.checkValidValue(this.fieldValues.get(ChronoField.HOUR_OF_AMPM));\n }\n }\n if (this.fieldValues.containsKey(ChronoField.AMPM_OF_DAY) && this.fieldValues.containsKey(ChronoField.HOUR_OF_AMPM)) {\n const ap = this.fieldValues.remove(ChronoField.AMPM_OF_DAY);\n const hap = this.fieldValues.remove(ChronoField.HOUR_OF_AMPM);\n this._addFieldValue(ChronoField.HOUR_OF_DAY, ap * 12 + hap);\n }\n// if (timeFields.containsKey(HOUR_OF_DAY) && timeFields.containsKey(MINUTE_OF_HOUR)) {\n// const hod = timeFields.remove(HOUR_OF_DAY);\n// const moh = timeFields.remove(MINUTE_OF_HOUR);\n// this._addFieldValue(MINUTE_OF_DAY, hod * 60 + moh);\n// }\n// if (timeFields.containsKey(MINUTE_OF_DAY) && timeFields.containsKey(SECOND_OF_MINUTE)) {\n// const mod = timeFields.remove(MINUTE_OF_DAY);\n// const som = timeFields.remove(SECOND_OF_MINUTE);\n// this._addFieldValue(SECOND_OF_DAY, mod * 60 + som);\n// }\n if (this.fieldValues.containsKey(ChronoField.NANO_OF_DAY)) {\n const nod = this.fieldValues.remove(ChronoField.NANO_OF_DAY);\n if (resolverStyle !== ResolverStyle.LENIENT) {\n ChronoField.NANO_OF_DAY.checkValidValue(nod);\n }\n this._addFieldValue(ChronoField.SECOND_OF_DAY, MathUtil.intDiv(nod, 1000000000));\n this._addFieldValue(ChronoField.NANO_OF_SECOND, MathUtil.intMod(nod, 1000000000));\n }\n if (this.fieldValues.containsKey(ChronoField.MICRO_OF_DAY)) {\n const cod = this.fieldValues.remove(ChronoField.MICRO_OF_DAY);\n if (resolverStyle !== ResolverStyle.LENIENT) {\n ChronoField.MICRO_OF_DAY.checkValidValue(cod);\n }\n this._addFieldValue(ChronoField.SECOND_OF_DAY, MathUtil.intDiv(cod, 1000000));\n this._addFieldValue(ChronoField.MICRO_OF_SECOND, MathUtil.intMod(cod, 1000000));\n }\n if (this.fieldValues.containsKey(ChronoField.MILLI_OF_DAY)) {\n const lod = this.fieldValues.remove(ChronoField.MILLI_OF_DAY);\n if (resolverStyle !== ResolverStyle.LENIENT) {\n ChronoField.MILLI_OF_DAY.checkValidValue(lod);\n }\n this._addFieldValue(ChronoField.SECOND_OF_DAY, MathUtil.intDiv(lod, 1000));\n this._addFieldValue(ChronoField.MILLI_OF_SECOND, MathUtil.intMod(lod, 1000));\n }\n if (this.fieldValues.containsKey(ChronoField.SECOND_OF_DAY)) {\n const sod = this.fieldValues.remove(ChronoField.SECOND_OF_DAY);\n if (resolverStyle !== ResolverStyle.LENIENT) {\n ChronoField.SECOND_OF_DAY.checkValidValue(sod);\n }\n this._addFieldValue(ChronoField.HOUR_OF_DAY, MathUtil.intDiv(sod, 3600));\n this._addFieldValue(ChronoField.MINUTE_OF_HOUR, MathUtil.intMod(MathUtil.intDiv(sod, 60), 60));\n this._addFieldValue(ChronoField.SECOND_OF_MINUTE, MathUtil.intMod(sod, 60));\n }\n if (this.fieldValues.containsKey(ChronoField.MINUTE_OF_DAY)) {\n const mod = this.fieldValues.remove(ChronoField.MINUTE_OF_DAY);\n if (resolverStyle !== ResolverStyle.LENIENT) {\n ChronoField.MINUTE_OF_DAY.checkValidValue(mod);\n }\n this._addFieldValue(ChronoField.HOUR_OF_DAY, MathUtil.intDiv(mod, 60));\n this._addFieldValue(ChronoField.MINUTE_OF_HOUR, MathUtil.intMod(mod, 60));\n }\n\n// const sod = MathUtil.intDiv(nod, 1000000000L);\n// this._addFieldValue(HOUR_OF_DAY, MathUtil.intDiv(sod, 3600));\n// this._addFieldValue(MINUTE_OF_HOUR, MathUtil.intMod(MathUtil.intDiv(sod, 60), 60));\n// this._addFieldValue(SECOND_OF_MINUTE, MathUtil.intMod(sod, 60));\n// this._addFieldValue(NANO_OF_SECOND, MathUtil.intMod(nod, 1000000000L));\n if (resolverStyle !== ResolverStyle.LENIENT) {\n if (this.fieldValues.containsKey(ChronoField.MILLI_OF_SECOND)) {\n ChronoField.MILLI_OF_SECOND.checkValidValue(this.fieldValues.get(ChronoField.MILLI_OF_SECOND));\n }\n if (this.fieldValues.containsKey(ChronoField.MICRO_OF_SECOND)) {\n ChronoField.MICRO_OF_SECOND.checkValidValue(this.fieldValues.get(ChronoField.MICRO_OF_SECOND));\n }\n }\n if (this.fieldValues.containsKey(ChronoField.MILLI_OF_SECOND) && this.fieldValues.containsKey(ChronoField.MICRO_OF_SECOND)) {\n const los = this.fieldValues.remove(ChronoField.MILLI_OF_SECOND);\n const cos = this.fieldValues.get(ChronoField.MICRO_OF_SECOND);\n this._putFieldValue0(ChronoField.MICRO_OF_SECOND, los * 1000 + (MathUtil.intMod(cos, 1000)));\n }\n if (this.fieldValues.containsKey(ChronoField.MICRO_OF_SECOND) && this.fieldValues.containsKey(ChronoField.NANO_OF_SECOND)) {\n const nos = this.fieldValues.get(ChronoField.NANO_OF_SECOND);\n this._putFieldValue0(ChronoField.MICRO_OF_SECOND, MathUtil.intDiv(nos, 1000));\n this.fieldValues.remove(ChronoField.MICRO_OF_SECOND);\n }\n if (this.fieldValues.containsKey(ChronoField.MILLI_OF_SECOND) && this.fieldValues.containsKey(ChronoField.NANO_OF_SECOND)) {\n const nos = this.fieldValues.get(ChronoField.NANO_OF_SECOND);\n this._putFieldValue0(ChronoField.MILLI_OF_SECOND, MathUtil.intDiv(nos, 1000000));\n this.fieldValues.remove(ChronoField.MILLI_OF_SECOND);\n }\n if (this.fieldValues.containsKey(ChronoField.MICRO_OF_SECOND)) {\n const cos = this.fieldValues.remove(ChronoField.MICRO_OF_SECOND);\n this._putFieldValue0(ChronoField.NANO_OF_SECOND, cos * 1000);\n } else if (this.fieldValues.containsKey(ChronoField.MILLI_OF_SECOND)) {\n const los = this.fieldValues.remove(ChronoField.MILLI_OF_SECOND);\n this._putFieldValue0(ChronoField.NANO_OF_SECOND, los * 1000000);\n }\n }\n\n /**\n *\n * @param {ResolverStyle} resolverStyle\n * @private\n */\n _resolveTimeInferZeroes(resolverStyle) {\n let hod = this.fieldValues.get(ChronoField.HOUR_OF_DAY);\n const moh = this.fieldValues.get(ChronoField.MINUTE_OF_HOUR);\n const som = this.fieldValues.get(ChronoField.SECOND_OF_MINUTE);\n let nos = this.fieldValues.get(ChronoField.NANO_OF_SECOND);\n if (hod == null) {\n return;\n }\n if (moh == null && (som != null || nos != null)) {\n return;\n }\n if (moh != null && som == null && nos != null) {\n return;\n }\n if (resolverStyle !== ResolverStyle.LENIENT) {\n if (hod != null) {\n if (resolverStyle === ResolverStyle.SMART &&\n hod === 24 &&\n (moh == null || moh === 0) &&\n (som == null || som === 0) &&\n (nos == null || nos === 0)) {\n hod = 0;\n this.excessDays = Period.ofDays(1);\n }\n let hodVal = ChronoField.HOUR_OF_DAY.checkValidIntValue(hod);\n if (moh != null) {\n let mohVal = ChronoField.MINUTE_OF_HOUR.checkValidIntValue(moh);\n if (som != null) {\n let somVal = ChronoField.SECOND_OF_MINUTE.checkValidIntValue(som);\n if (nos != null) {\n let nosVal = ChronoField.NANO_OF_SECOND.checkValidIntValue(nos);\n this._addObject(LocalTime.of(hodVal, mohVal, somVal, nosVal));\n } else {\n this._addObject(LocalTime.of(hodVal, mohVal, somVal));\n }\n } else {\n if (nos == null) {\n this._addObject(LocalTime.of(hodVal, mohVal));\n }\n }\n } else {\n if (som == null && nos == null) {\n this._addObject(LocalTime.of(hodVal, 0));\n }\n }\n }\n } else {\n if (hod != null) {\n let hodVal = hod;\n if (moh != null) {\n if (som != null) {\n if (nos == null) {\n nos = 0;\n }\n let totalNanos = MathUtil.safeMultiply(hodVal, 3600000000000);\n totalNanos = MathUtil.safeAdd(totalNanos, MathUtil.safeMultiply(moh, 60000000000));\n totalNanos = MathUtil.safeAdd(totalNanos, MathUtil.safeMultiply(som, 1000000000));\n totalNanos = MathUtil.safeAdd(totalNanos, nos);\n let excessDays = MathUtil.floorDiv(totalNanos, 86400000000000); // safe int cast\n let nod = MathUtil.floorMod(totalNanos, 86400000000000);\n this._addObject(LocalTime.ofNanoOfDay(nod));\n this.excessDays = Period.ofDays(excessDays);\n } else {\n let totalSecs = MathUtil.safeMultiply(hodVal, 3600);\n totalSecs = MathUtil.safeAdd(totalSecs, MathUtil.safeMultiply(moh, 60));\n let excessDays = MathUtil.floorDiv(totalSecs, 86400); // safe int cast\n let sod = MathUtil.floorMod(totalSecs, 86400);\n this._addObject(LocalTime.ofSecondOfDay(sod));\n this.excessDays = Period.ofDays(excessDays);\n }\n } else {\n let excessDays = MathUtil.safeToInt(MathUtil.floorDiv(hodVal, 24));\n hodVal = MathUtil.floorMod(hodVal, 24);\n this._addObject(LocalTime.of(hodVal, 0));\n this.excessDays = Period.ofDays(excessDays);\n }\n }\n }\n this.fieldValues.remove(ChronoField.HOUR_OF_DAY);\n this.fieldValues.remove(ChronoField.MINUTE_OF_HOUR);\n this.fieldValues.remove(ChronoField.SECOND_OF_MINUTE);\n this.fieldValues.remove(ChronoField.NANO_OF_SECOND);\n }\n\n /**\n *\n * @param {ChronoLocalDate|LocalTime} dateOrTime\n * @private\n */\n _addObject(dateOrTime) {\n if (dateOrTime instanceof ChronoLocalDate){\n this.date = dateOrTime;\n } else if (dateOrTime instanceof LocalTime){\n this.time = dateOrTime;\n }\n }\n\n /**\n * Builds the specified type from the values in this builder.\n *\n * This attempts to build the specified type from this builder.\n * If the builder cannot return the type, an exception is thrown.\n *\n * @param {!TemporalQuery} type - the type to invoke `from` on, not null\n * @return {*} the extracted value, not null\n * @throws DateTimeException if an error occurs\n */\n build(type) {\n return type.queryFrom(this);\n }\n\n /**\n *\n * @param {TemporalField} field\n * @returns {number}\n */\n isSupported(field) {\n if (field == null) {\n return false;\n }\n return (this.fieldValues.containsKey(field) && this.fieldValues.get(field) !== undefined) ||\n (this.date != null && this.date.isSupported(field)) ||\n (this.time != null && this.time.isSupported(field));\n }\n\n /**\n *\n * @param {TemporalField} field\n * @returns {number}\n */\n getLong(field) {\n requireNonNull(field, 'field');\n const value = this.getFieldValue0(field);\n if (value == null) {\n if (this.date != null && this.date.isSupported(field)) {\n return this.date.getLong(field);\n }\n if (this.time != null && this.time.isSupported(field)) {\n return this.time.getLong(field);\n }\n throw new DateTimeException('Field not found: ' + field);\n }\n return value;\n }\n\n /**\n *\n * @param {!TemporalQuery} query\n * @returns {*}\n */\n query(query) {\n if (query === TemporalQueries.zoneId()) {\n return this.zone;\n } else if (query === TemporalQueries.chronology()) {\n return this.chrono;\n } else if (query === TemporalQueries.localDate()) {\n return this.date != null ? LocalDate.from(this.date) : null;\n } else if (query === TemporalQueries.localTime()) {\n return this.time;\n } else if (query === TemporalQueries.zone() || query === TemporalQueries.offset()) {\n return query.queryFrom(this);\n } else if (query === TemporalQueries.precision()) {\n return null; // not a complete date/time\n }\n // inline TemporalAccessor.super.query(query) as an optimization\n // non-JDK classes are not permitted to make this optimization\n return query.queryFrom(this);\n }\n\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/format/DateTimeBuilder.js","/*\n * @copyright (c) 2016, Philipp Thürwächter & Pattrick Hüper\n * @license BSD-3-Clause (see LICENSE in the root directory of this source tree)\n */\n\nexport class EnumMap {\n constructor(){\n this._map = {};\n }\n\n putAll(otherMap){\n for(let key in otherMap._map){\n this._map[key] = otherMap._map[key];\n }\n return this;\n }\n\n containsKey(key){\n return (this._map.hasOwnProperty(key.name())) && (this.get(key) !== undefined);\n }\n\n get(key) {\n return this._map[key.name()];\n }\n\n put(key, val) {\n return this.set(key, val);\n }\n\n set(key, val) {\n this._map[key.name()] = val;\n return this;\n }\n\n retainAll(keyList){\n const map = {};\n for(let i=0; i
\n * // these two lines are equivalent, but the second approach is recommended\n * temporal = thisYear.adjustInto(temporal);\n * temporal = temporal.with(thisYear);\n *\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {Temporal} temporal the target object to be adjusted, not null\n * @return {Temporal} the adjusted object, not null\n * @throws DateTimeException if unable to make the adjustment\n * @throws ArithmeticException if numeric overflow occurs\n */\n adjustInto(temporal) {\n requireNonNull(temporal, 'temporal');\n /* TODO: only IsoChronology for now\n if (Chronology.from(temporal).equals(IsoChronology.INSTANCE) == false) {\n throw new DateTimeException(\"Adjustment only supported on ISO date-time\");\n }*/\n return temporal.with(ChronoField.YEAR, this._year);\n }\n\n /**\n * Checks if the month-day is valid for this year.\n *\n * This method checks whether this year and the input month and day form\n * a valid date.\n *\n * @param {MonthDay} monthDay the month-day to validate, null returns false\n * @return {boolean} true if the month and day are valid for this year\n */\n isValidMonthDay(monthDay) {\n return monthDay != null && monthDay.isValidYear(this._year);\n }\n\n /**\n * Gets the length of this year in days.\n *\n * @return {number} the length of this year in days, 365 or 366\n */\n length() {\n return this.isLeap() ? 366 : 365;\n }\n\n //-----------------------------------------------------------------------\n /**\n * Combines this year with a day-of-year to create a {@link LocalDate}.\n *\n * This returns a {@link LocalDate} formed from this year and the specified day-of-year.\n *\n * The day-of-year value 366 is only valid in a leap year.\n *\n * @param {number} dayOfYear the day-of-year to use, not null\n * @return {LocalDate} the local date formed from this year and the specified date of year, not null\n * @throws DateTimeException if the day of year is zero or less, 366 or greater or equal\n * to 366 and this is not a leap year\n */\n atDay(dayOfYear) {\n return LocalDate.ofYearDay(this._year, dayOfYear);\n }\n\n /**\n * function overloading for {@link Year.atMonth}\n *\n * if called with 1 arguments and first argument is instance of Month, then {@link Year.atMonthMonth} is executed.\n *\n * Otherwise {@link Year.atMonthNumber} is executed.\n *\n * @param {Month|number} monthOrNumber\n * @returns {YearMonth}\n */\n atMonth(monthOrNumber) {\n if (arguments.length === 1 && monthOrNumber instanceof Month) {\n return this.atMonthMonth(monthOrNumber);\n } else {\n return this.atMonthNumber(monthOrNumber);\n }\n }\n\n /**\n * Combines this year with a month to create a {@link YearMonth}.\n *\n * This returns a {@link YearMonth} formed from this year and the specified month.\n * All possible combinations of year and month are valid.\n *\n * This method can be used as part of a chain to produce a date:\n *
\n * LocalDate date = year.atMonth(month).atDay(day);\n *\n *\n * @param {Month} month the month-of-year to use, not null\n * @return {YearMonth} the year-month formed from this year and the specified month, not null\n */\n atMonthMonth(month) {\n requireNonNull(month, 'month');\n requireInstance(month, Month, 'month');\n return YearMonth.of(this._year, month);\n }\n\n /**\n * Combines this year with a month to create a {@link YearMonth}.\n *\n * This returns a {@link YearMonth} formed from this year and the specified month.\n * All possible combinations of year and month are valid.\n *\n * This method can be used as part of a chain to produce a date:\n *
\n * LocalDate date = year.atMonth(month).atDay(day);\n *\n *\n * @param {number} month the month-of-year to use, from 1 (January) to 12 (December)\n * @return {YearMonth} the year-month formed from this year and the specified month, not null\n * @throws DateTimeException if the month is invalid\n */\n atMonthNumber(month) {\n requireNonNull(month, 'month');\n return YearMonth.of(this._year, month);\n }\n\n /**\n * Combines this year with a month-day to create a {@link LocalDate}.\n *\n * This returns a {@link LocalDate} formed from this year and the specified month-day.\n *\n * A month-day of February 29th will be adjusted to February 28th in the resulting\n * date if the year is not a leap year.\n *\n * @param {MonthDay} monthDay the month-day to use, not null\n * @return {LocalDate} the local date formed from this year and the specified month-day, not null\n */\n atMonthDay(monthDay) {\n requireNonNull(monthDay, 'monthDay');\n requireInstance(monthDay, MonthDay, 'monthDay');\n return monthDay.atYear(this._year);\n }\n\n\n //-----------------------------------------------------------------------\n /**\n * Queries this year using the specified query.\n *\n * This queries this year using the specified query strategy object.\n * The {@link TemporalQuery} object defines the logic to be used to\n * obtain the result. Read the documentation of the query to understand\n * what the result of this method will be.\n *\n * The result of this method is obtained by invoking the\n * {@link TemporalQuery#queryFrom} method on the\n * specified query passing `this` as the argument.\n *\n * @param {TemporalQuery} query the query to invoke, not null\n * @return {*} the query result, null may be returned (defined by the query)\n * @throws DateTimeException if unable to query (defined by the query)\n * @throws ArithmeticException if numeric overflow occurs (defined by the query)\n */\n query(query) {\n requireNonNull(query, 'query()');\n requireInstance(query, TemporalQuery, 'query()');\n if (query === TemporalQueries.chronology()) {\n return IsoChronology.INSTANCE;\n } else if (query === TemporalQueries.precision()) {\n return ChronoUnit.YEARS;\n } else if (query === TemporalQueries.localDate() || query === TemporalQueries.localTime() ||\n query === TemporalQueries.zone() || query === TemporalQueries.zoneId() || query === TemporalQueries.offset()) {\n return null;\n }\n return super.query(query);\n }\n //-----------------------------------------------------------------------\n /**\n * Compares this year to another year.\n *\n * The comparison is based on the value of the year.\n * It is \"consistent with equals\", as defined by {@link Comparable}.\n *\n * @param {Year} other the other year to compare to, not null\n * @return {number} the comparator value, negative if less, positive if greater\n */\n compareTo(other) {\n requireNonNull(other, 'other');\n requireInstance(other, Year, 'other');\n return this._year - other._year;\n }\n\n /**\n * Is this year after the specified year.\n *\n * @param {Year} other the other year to compare to, not null\n * @return {boolean} true if this is after the specified year\n */\n isAfter(other) {\n requireNonNull(other, 'other');\n requireInstance(other, Year, 'other');\n return this._year > other._year;\n }\n\n /**\n * Is this year before the specified year.\n *\n * @param {Year} other the other year to compare to, not null\n * @return {boolean} true if this point is before the specified year\n */\n isBefore(other) {\n requireNonNull(other, 'other');\n requireInstance(other, Year, 'other');\n return this._year < other._year;\n }\n /**\n * Outputs this year as a string using the formatter.\n *\n * @param {DateTimeFormatter} formatter the formatter to use, not null\n * @return {String} the formatted year string, not null\n * @throws DateTimeException if an error occurs during printing\n */\n format(formatter) {\n requireNonNull(formatter, 'formatter');\n requireInstance(formatter, DateTimeFormatter, 'formatter');\n return formatter.format(this);\n }\n\n /**\n * Checks if this year is equal to the specified {@link Year}.\n *\n * The comparison is based on the value\n *\n * @param {*} 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 string.\n *\n * @return {String} a string representation of this year, not null\n */\n toString() {\n return '' + this._year;\n }\n}\n\nlet PARSER;\n\nexport function _init() {\n\n Year.MIN_VALUE = YearConstants.MIN_VALUE;\n Year.MAX_VALUE = YearConstants.MAX_VALUE;\n\n PARSER = new DateTimeFormatterBuilder()\n .appendValue(ChronoField.YEAR, 4, 10, SignStyle.EXCEEDS_PAD)\n .toFormatter();\n\n Year.FROM = createTemporalQuery('Year.FROM', (temporal) => {\n return Year.from(temporal);\n });\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/Year.js","/*\n * @copyright (c) 2016, Philipp Thürwächter & Pattrick Hüper\n * @license BSD-3-Clause (see LICENSE.md in the root directory of this source tree)\n */\n\nimport {requireNonNull, requireInstance} from './assert';\nimport {DateTimeException, UnsupportedTemporalTypeException} from './errors';\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 `--12-03`.\n *\n * {@link MonthDay} is an immutable date-time object that represents the combination\n * of a year and month. Any field that can be derived from a month and day, such as\n * quarter-of-year, can be obtained.\n *\n * This class does not store or represent a year, time or time-zone.\n * For example, the value \"December 3rd\" can be stored in a {@link MonthDay}.\n *\n * Since a {@link MonthDay} does not possess a year, the leap day of\n * February 29th is considered valid.\n *\n * This class implements {@link TemporalAccessor} rather than {@link Temporal}.\n * This is because it is not possible to define whether February 29th is valid or not\n * without external information, preventing the implementation of plus/minus.\n * Related to this, {@link MonthDay} only provides access to query and set the fields\n * {@link MONTH_OF_YEAR} and {@link DAY_OF_MONTH}.\n *\n * The ISO-8601 calendar system is the modern civil calendar system used today\n * in most of the world. It is equivalent to the proleptic Gregorian calendar\n * system, in which today's rules for leap years are applied for all time.\n * For most applications written today, the ISO-8601 rules are entirely suitable.\n * However, any application that makes use of historical dates, and requires them\n * to be accurate will find the ISO-8601 approach unsuitable.\n *\n * ### Specification for implementors\n *\n * This class is immutable and thread-safe.\n */\nexport class MonthDay extends Temporal {\n /**\n * function overloading for {@link MonthDay.now}\n *\n * if called with 0 argument {@link MonthDay.now0} is executed,\n *\n * if called with 1 argument and first argument is an instance of ZoneId, then {@link MonthDay.nowZoneId} is executed,\n *\n * otherwise {@link MonthDay.nowClock} is executed\n *\n * @param {?(ZoneId|Clock)} zoneIdOrClock\n * @returns {MonthDay}\n */\n static now(zoneIdOrClock) {\n if (arguments.length === 0) {\n return MonthDay.now0();\n } else if (arguments.length === 1 && zoneIdOrClock instanceof ZoneId) {\n return MonthDay.nowZoneId(zoneIdOrClock);\n } else {\n return MonthDay.nowClock(zoneIdOrClock);\n }\n }\n /**\n * Obtains the current month-day from the system clock in the default time-zone.\n *\n * This will query the system clock (see {@link Clock#systemDefaultZone}) in the default\n * time-zone to obtain the current month-day.\n *\n * Using this method will prevent the ability to use an alternate clock for testing\n * because the clock is hard-coded.\n *\n * @return {MonthDay} the current month-day using the system clock and default time-zone, not null\n */\n static now0() {\n return this.nowClock(Clock.systemDefaultZone());\n }\n\n /**\n * Obtains the current month-day from the system clock in the specified time-zone.\n *\n * This will query the system clock (see {@link Clock#system}) to obtain the current month-day.\n * Specifying the time-zone avoids dependence on the default time-zone.\n *\n * Using this method will prevent the ability to use an alternate clock for testing\n * because the clock is hard-coded.\n *\n * @param {ZoneId} zone the zone ID to use, not null\n * @return {MonthDay} the current month-day using the system clock, not null\n */\n static nowZoneId(zone) {\n requireNonNull(zone, 'zone');\n return this.nowClock(Clock.system(zone));\n }\n\n /**\n * Obtains the current month-day from the specified clock.\n *\n * This will query the specified clock to obtain the current month-day.\n * Using this method allows the use of an alternate clock for testing.\n * The alternate clock may be introduced using dependency injection (see {@link Clock}).\n *\n * @param {Clock} clock the clock to use, not null\n * @return {MonthDay} the current month-day, not null\n */\n static nowClock(clock) {\n requireNonNull(clock, 'clock');\n 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 executed,\n *\n * otherwise {@link MonthDay.ofNumberNumber} is executed\n *\n * @param {!(Month|number)} monthOrNumber\n * @param {?number} number\n * @returns {MonthDay}\n */\n static of(monthOrNumber, number) {\n if (arguments.length === 2 && monthOrNumber instanceof Month) {\n return MonthDay.ofMonthNumber(monthOrNumber, number);\n } else {\n return MonthDay.ofNumberNumber(monthOrNumber, number);\n }\n }\n /**\n * Obtains an instance of {@link MonthDay}.\n *\n * The day-of-month must be valid for the month within a leap year.\n * Hence, for February, day 29 is valid.\n *\n * For example, passing in April and day 31 will throw an exception, as\n * there can never be April 31st in any year. By contrast, passing in\n * February 29th is permitted, as that month-day can sometimes be valid.\n *\n * @param {Month} month the month-of-year to represent, not null\n * @param {number} dayOfMonth the day-of-month to represent, from 1 to 31\n * @return {MonthDay} the month-day, not null\n * @throws DateTimeException if the value of any field is out of range\n * @throws DateTimeException if the day-of-month is invalid for the month\n */\n static ofMonthNumber(month, dayOfMonth) {\n requireNonNull(month, 'month');\n ChronoField.DAY_OF_MONTH.checkValidValue(dayOfMonth);\n if (dayOfMonth > month.maxLength()) {\n throw new DateTimeException('Illegal value for DayOfMonth field, value ' + dayOfMonth +\n ' is not valid for month ' + month.toString());\n }\n return new MonthDay(month.value(), dayOfMonth);\n }\n\n /**\n * Obtains an instance of {@link MonthDay}.\n *\n * The day-of-month must be valid for the month within a leap year.\n * Hence, for month 2 (February), day 29 is valid.\n *\n * For example, passing in month 4 (April) and day 31 will throw an exception, as\n * there can never be April 31st in any year. By contrast, passing in\n * February 29th is permitted, as that month-day can sometimes be valid.\n *\n * @param {number} month the month-of-year to represent, from 1 (January) to 12 (December)\n * @param {number} dayOfMonth the day-of-month to represent, from 1 to 31\n * @return {MonthDay} the month-day, not null\n * @throws DateTimeException if the value of any field is out of range\n * @throws DateTimeException if the day-of-month is invalid for the month\n */\n static ofNumberNumber(month, dayOfMonth) {\n requireNonNull(month, 'month');\n requireNonNull(dayOfMonth, 'dayOfMonth');\n return MonthDay.of(Month.of(month), dayOfMonth);\n }\n //-----------------------------------------------------------------------\n /**\n * Obtains an instance of {@link MonthDay} from a temporal object.\n *\n * A {@link TemporalAccessor} represents some form of date and time information.\n * This factory converts the arbitrary temporal object to an instance of {@link MonthDay}.\n *\n * The conversion extracts the MONTH_OF_YEAR (see {@link ChronoField#MONTH_OF_YEAR}) and\n * DAY_OF_MONTH (see {@link ChronoField#DAY_OF_MONTH}) fields.\n * The extraction is only permitted if the date-time has an ISO chronology.\n *\n * This method matches the signature of the functional interface {@link TemporalQuery}\n * allowing it to be used in queries via method reference, {@link MonthDay::from}.\n *\n * @param {TemporalAccessor} temporal the temporal object to convert, not null\n * @return {MonthDay} the month-day, not null\n * @throws DateTimeException if unable to convert to a {@link MonthDay}\n */\n static from(temporal) {\n requireNonNull(temporal, 'temporal');\n requireInstance(temporal, TemporalAccessor, 'temporal');\n if (temporal instanceof MonthDay) {\n return temporal;\n }\n try {\n /* TODO: only IsoChronology for now\n if (IsoChronology.INSTANCE.equals(Chronology.from(temporal)) == false) {\n temporal = LocalDate.from(temporal);\n }*/\n return MonthDay.of(temporal.get(ChronoField.MONTH_OF_YEAR), temporal.get(ChronoField.DAY_OF_MONTH));\n } catch (ex) {\n throw new DateTimeException('Unable to obtain MonthDay from TemporalAccessor: ' +\n temporal + ', type ' + (temporal && temporal.constructor != null ? temporal.constructor.name : ''));\n }\n }\n //-----------------------------------------------------------------------\n /**\n * function overloading for {@link MonthDay.parse}\n *\n * if called with 1 argument, then {@link MonthDay.parseString} is executed,\n *\n * otherwise {@link MonthDay.parseStringFormatter} is executed\n *\n * @param {!(String)} text\n * @param {?DateTimeFormatter} formatter\n * @returns {MonthDay}\n */\n static parse(text, formatter) {\n if (arguments.length === 1) {\n return MonthDay.parseString(text);\n } else {\n return MonthDay.parseStringFormatter(text, formatter);\n }\n }\n\n /**\n * Obtains an instance of {@link MonthDay} from a text string such as `--12-03`.\n *\n * The string must represent a valid month-day.\n * The format is `--MM-dd`.\n *\n * @param {String} text the text to parse such as \"--12-03\", not null\n * @return {MonthDay} the parsed month-day, not null\n * @throws DateTimeParseException if the text cannot be parsed\n */\n static parseString(text) {\n return MonthDay.parseStringFormatter(text, PARSER);\n }\n\n /**\n * Obtains an instance of {@link MonthDay} from a text string using a specific formatter.\n *\n * The text is parsed using the formatter, returning a month-day.\n *\n * @param {String} text the text to parse, not null\n * @param {DateTimeFormatter} formatter the formatter to use, not null\n * @return {MonthDay} the parsed month-day, not null\n * @throws DateTimeParseException if the text cannot be parsed\n */\n static parseStringFormatter(text, formatter) {\n requireNonNull(text, 'text');\n requireNonNull(formatter, 'formatter');\n requireInstance(formatter, DateTimeFormatter, 'formatter');\n return formatter.parse(text, MonthDay.FROM);\n }\n\n //-----------------------------------------------------------------------\n /**\n * Constructor, previously validated.\n *\n * @param {number} month the month-of-year to represent, validated from 1 to 12\n * @param {number} dayOfMonth the day-of-month to represent, validated from 1 to 29-31\n */\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 `int` from 1 to 12.\n * Application code is frequently clearer if the enum {@link Month}\n * is used by calling {@link getMonth}.\n *\n * @return {number} the month-of-year, from 1 to 12\n * @see #month()\n */\n monthValue() {\n return this._month;\n }\n\n /**\n * Gets the month-of-year field using the {@link Month} enum.\n *\n * This method returns the enum {@link Month} for the month.\n * This avoids confusion as to what `int` values mean.\n * If you need access to the primitive `int` value then the enum\n * provides the int value (see {@link Month#getValue}).\n *\n * @return {Month} the month-of-year, not null\n * @see #getMonthValue()\n */\n month() {\n return Month.of(this._month);\n }\n\n /**\n * Gets the day-of-month field.\n *\n * This method returns the primitive `int` value for the day-of-month.\n *\n * @return {number} the day-of-month, from 1 to 31\n */\n dayOfMonth() {\n return this._day;\n }\n\n //-----------------------------------------------------------------------\n /**\n * Checks if the specified field is supported.\n *\n * This checks if this month-day can be queried for the specified field.\n * If false, then calling the range (see {@link range}) and\n * get (see {@link get}) methods will throw an exception.\n *\n * If the field is a {@link ChronoField} then the query is implemented here.\n * The supported fields (see {@link isSupported}) will return valid\n * values based on this date-time.\n * The supported fields are:\n *\n * * {@link MONTH_OF_YEAR}\n * * {@link YEAR}\n *\n * All other {@link ChronoField} instances will return false.\n *\n * If the field is not a {@link ChronoField}, then the result of this method\n * is obtained by invoking {@link TemporalField.isSupportedBy}\n * passing `this` as the argument.\n * Whether the field is supported is determined by the field.\n *\n * @param {TemporalField} field the field to check, null returns false\n * @return {boolean} true if the field is supported on this month-day, false if not\n */\n isSupported(field) {\n if (field instanceof ChronoField) {\n return field === ChronoField.MONTH_OF_YEAR || field === ChronoField.DAY_OF_MONTH;\n }\n return field != null && field.isSupportedBy(this);\n }\n\n /**\n * Gets the range of valid values for the specified field.\n *\n * The range object expresses the minimum and maximum valid values for a field.\n * This month-day is used to enhance the accuracy of the returned range.\n * If it is not possible to return the range, because the field is not supported\n * or for some other reason, an exception is thrown.\n *\n * If the field is a {@link ChronoField} then the query is implemented here.\n * The supported fields (see {@link isSupported}) will return\n * appropriate range instances.\n * All other {@link ChronoField} instances will throw a {@link DateTimeException}.\n *\n * If the field is not a {@link ChronoField}, then the result of this method\n * is obtained by invoking {@link TemporalField.rangeRefinedBy}\n * passing `this` as the argument.\n * Whether the range can be obtained is determined by the field.\n *\n * @param {TemporalField} field the field to query the range for, not null\n * @return {ValueRange} the range of valid values for the field, not null\n * @throws DateTimeException if the range for the field cannot be obtained\n */\n range(field) {\n if (field === ChronoField.MONTH_OF_YEAR) {\n return field.range();\n } else if (field === ChronoField.DAY_OF_MONTH) {\n return ValueRange.of(1, this.month().minLength(), this.month().maxLength());\n }\n return super.range(field);\n }\n\n /**\n * Gets the value of the specified field from this month-day as an `int`.\n *\n * This queries this month-day for the value for the specified field.\n * The returned value will always be within the valid range of values for the field.\n * If it is not possible to return the value, because the field is not supported\n * or for some other reason, an exception is thrown.\n *\n * If the field is a {@link ChronoField} then the query is implemented here.\n * The supported fields (see {@link isSupported}) will return valid\n * values based on this month-day.\n * All other {@link ChronoField} instances will throw a {@link DateTimeException}.\n *\n * If the field is not a {@link ChronoField}, then the result of this method\n * is obtained by invoking {@link TemporalField.getFrom}\n * passing `this` as the argument. Whether the value can be obtained,\n * and what the value represents, is determined by the field.\n *\n * @param {TemporalField} field the field to get, not null\n * @return {number} the value for the field\n * @throws DateTimeException if a value for the field cannot be obtained\n * @throws ArithmeticException if numeric overflow occurs\n */\n get(field) {\n return this.range(field).checkValidIntValue(this.getLong(field), field);\n }\n\n /**\n * Gets the value of the specified field from this month-day as a `long`.\n *\n * This queries this month-day for the value for the specified field.\n * If it is not possible to return the value, because the field is not supported\n * or for some other reason, an exception is thrown.\n *\n * If the field is a {@link ChronoField} then the query is implemented here.\n * The supported fields (see {@link isSupported}) will return valid\n * values based on this month-day.\n * All other {@link ChronoField} instances will throw a {@link DateTimeException}.\n *\n * If the field is not a {@link ChronoField}, then the result of this method\n * is obtained by invoking {@link TemporalField.getFrom}\n * passing `this` as the argument. Whether the value can be obtained,\n * and what the value represents, is determined by the field.\n *\n * @param {TemporalField} field the field to get, not null\n * @return {number} the value for the field\n * @throws DateTimeException if a value for the field cannot be obtained\n * @throws ArithmeticException if numeric overflow occurs\n */\n getLong(field) {\n requireNonNull(field, 'field');\n if (field instanceof ChronoField) {\n switch (field) {\n // alignedDOW and alignedWOM not supported because they cannot be set in with()\n case ChronoField.DAY_OF_MONTH: return this._day;\n case ChronoField.MONTH_OF_YEAR: return this._month;\n }\n throw new UnsupportedTemporalTypeException('Unsupported field: ' + field);\n }\n return field.getFrom(this);\n }\n //-----------------------------------------------------------------------\n /**\n * Checks if the year is valid for this month-day.\n *\n * This method checks whether this month and day and the input year form\n * a valid date. This can only return false for February 29th.\n *\n * @param {number} year the year to validate, an out of range value returns false\n * @return {boolean} true if the year is valid for this month-day\n * @see Year#isValidMonthDay(MonthDay)\n */\n isValidYear(year) {\n return (this._day === 29 && this._month === 2 && Year.isLeap(year) === false) === false;\n }\n\n //-----------------------------------------------------------------------\n /**\n * Returns a copy of this {@link MonthDay} with the month-of-year altered.\n *\n * This returns a month-day with the specified month.\n * If the day-of-month is invalid for the specified month, the day will\n * be adjusted to the last valid day-of-month.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {number} month the month-of-year to set in the returned month-day, from 1 (January) to 12 (December)\n * @return {MonthDay} based on this month-day with the requested month, not null\n * @throws DateTimeException if the month-of-year value is invalid\n */\n withMonth(month) {\n return this.with(Month.of(month));\n }\n\n /**\n * Returns a copy of this {@link MonthDay} with the month-of-year altered.\n *\n * This returns a month-day with the specified month.\n * If the day-of-month is invalid for the specified month, the day will\n * be adjusted to the last valid day-of-month.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {Month} month the month-of-year to set in the returned month-day, not null\n * @return {MonthDay} based on this month-day with the requested month, not null\n */\n with(month) {\n requireNonNull(month, 'month');\n if (month.value() === this._month) {\n return this;\n }\n let day = Math.min(this._day, month.maxLength());\n return new MonthDay(month.value(), day);\n }\n\n /**\n * Returns a copy of this {@link MonthDay} with the day-of-month altered.\n *\n * This returns a month-day with the specified day-of-month.\n * If the day-of-month is invalid for the month, an exception is thrown.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {number} dayOfMonth the day-of-month to set in the return month-day, from 1 to 31\n * @return {MonthDay} based on this month-day with the requested day, not null\n * @throws DateTimeException if the day-of-month value is invalid\n * @throws DateTimeException if the day-of-month is invalid for the month\n */\n withDayOfMonth(dayOfMonth) {\n if (dayOfMonth === this._day) {\n return this;\n }\n return MonthDay.of(this._month, dayOfMonth);\n }\n\n //-----------------------------------------------------------------------\n /**\n * Queries this month-day using the specified query.\n *\n * This queries this month-day using the specified query strategy object.\n * The {@link TemporalQuery} object defines the logic to be used to\n * obtain the result. Read the documentation of the query to understand\n * what the result of this method will be.\n *\n * The result of this method is obtained by invoking the\n * {@link TemporalQuery#queryFrom} method on the\n * specified query passing `this` as the argument.\n *\n * @param {TemporalQuery} query the query to invoke, not null\n * @return {*} the query result, null may be returned (defined by the query)\n * @throws DateTimeException if unable to query (defined by the query)\n * @throws ArithmeticException if numeric overflow occurs (defined by the query)\n */\n query(query) {\n requireNonNull(query, 'query');\n requireInstance(query, TemporalQuery, 'query');\n if (query === TemporalQueries.chronology()) {\n return IsoChronology.INSTANCE;\n }\n return super.query(query);\n }\n\n /**\n * Adjusts the specified temporal object to have this month-day.\n *\n * This returns a temporal object of the same observable type as the input\n * with the month and day-of-month changed to be the same as this.\n *\n * The adjustment is equivalent to using {@link Temporal#with}\n * twice, passing {@link ChronoField#MONTH_OF_YEAR} and\n * {@link ChronoField#DAY_OF_MONTH} as the fields.\n * If the specified temporal object does not use the ISO calendar system then\n * a {@link DateTimeException} is thrown.\n *\n * In most cases, it is clearer to reverse the calling pattern by using\n * {@link Temporal#with}:\n *
\n * // these two lines are equivalent, but the second approach is recommended\n * temporal = thisMonthDay.adjustInto(temporal);\n * temporal = temporal.with(thisMonthDay);\n *\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {Temporal} temporal the target object to be adjusted, not null\n * @return {Temporal} the adjusted object, not null\n * @throws DateTimeException if unable to make the adjustment\n * @throws ArithmeticException if numeric overflow occurs\n */\n adjustInto(temporal) {\n requireNonNull(temporal, 'temporal');\n /* TODO: only IsoChronology for now\n if (Chronology.from(temporal).equals(IsoChronology.INSTANCE) == false) {\n throw new DateTimeException(\"Adjustment only supported on ISO date-time\");\n }*/\n temporal = temporal.with(ChronoField.MONTH_OF_YEAR, this._month);\n return temporal.with(ChronoField.DAY_OF_MONTH, Math.min(temporal.range(ChronoField.DAY_OF_MONTH).maximum(), this._day));\n }\n\n //-----------------------------------------------------------------------\n /**\n * Combines this month-day with a year to create a {@link LocalDate}.\n *\n * This returns a {@link LocalDate} formed from this month-day and the specified year.\n *\n * A month-day of February 29th will be adjusted to February 28th in the resulting\n * date if the year is not a leap year.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {number} year the year to use, from MIN_YEAR to MAX_YEAR\n * @return {LocalDate} the local date formed from this month-day and the specified year, not null\n * @throws DateTimeException if the year is outside the valid range of years\n */\n atYear(year) {\n return LocalDate.of(year, this._month, this.isValidYear(year) ? this._day : 28);\n }\n //-----------------------------------------------------------------------\n /**\n * Compares this month-day to another month-day.\n *\n * The comparison is based first on value of the month, then on the value of the day.\n * It is \"consistent with equals\", as defined by {@link Comparable}.\n *\n * @param {MonthDay} other the other month-day to compare to, not null\n * @return {number} the comparator value, negative if less, positive if greater\n */\n compareTo(other) {\n requireNonNull(other, 'other');\n requireInstance(other, MonthDay, 'other');\n let cmp = (this._month - other.monthValue());\n if (cmp === 0) {\n cmp = (this._day - other.dayOfMonth());\n }\n return cmp;\n }\n\n /**\n * Is this month-day after the specified month-day.\n *\n * @param {MonthDay} other the other month-day to compare to, not null\n * @return {boolean} true if this is after the specified month-day\n */\n isAfter(other) {\n requireNonNull(other, 'other');\n requireInstance(other, MonthDay, 'other');\n return this.compareTo(other) > 0;\n }\n\n /**\n * Is this month-day before the specified month-day.\n *\n * @param {MonthDay} other the other month-day to compare to, not null\n * @return {boolean} true if this point is before the specified month-day\n */\n isBefore(other) {\n requireNonNull(other, 'other');\n requireInstance(other, MonthDay, 'other');\n return this.compareTo(other) < 0;\n }\n\n\n //-----------------------------------------------------------------------\n /**\n * Checks if this month-day is equal to another month-day.\n *\n * The comparison is based on the time-line position of the month-day within a year.\n *\n * @param {*} obj the object to check, null returns false\n * @return {boolean} true if this is equal to the other month-day\n */\n equals(obj) {\n if (this === obj) {\n return true;\n }\n if (obj instanceof MonthDay) {\n 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 string, such as `--12-03`.\n *\n * The output will be in the format `--MM-dd`:\n *\n * @return {String} a string representation of this month-day, not null\n */\n toString() {\n return '--'\n + (this._month < 10 ? '0' : '') + this._month\n + (this._day < 10 ? '-0' : '-') + this._day;\n }\n\n /**\n * Outputs this month-day as a string using the formatter.\n *\n * This month-day will be passed to the formatter\n * print method (see {@link DateTimeFormatter#format}).\n *\n * @param {DateTimeFormatter} formatter the formatter to use, not null\n * @return {String} the formatted month-day string, not null\n * @throws DateTimeException if an error occurs during printing\n */\n format(formatter) {\n requireNonNull(formatter, 'formatter');\n requireInstance(formatter, DateTimeFormatter, 'formatter');\n return formatter.format(this);\n }\n\n}\n\nlet PARSER;\n\nexport function _init() {\n PARSER = new DateTimeFormatterBuilder()\n .appendLiteral('--')\n .appendValue(ChronoField.MONTH_OF_YEAR, 2)\n .appendLiteral('-')\n .appendValue(ChronoField.DAY_OF_MONTH, 2)\n .toFormatter();\n\n MonthDay.FROM = createTemporalQuery('MonthDay.FROM', (temporal) => {\n return MonthDay.from(temporal);\n });\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/MonthDay.js","/*\n * @copyright (c) 2016, Philipp Thürwächter & Pattrick Hüper\n * @license BSD-3-Clause (see LICENSE.md in the root directory of this source tree)\n */\n\nimport {requireNonNull, requireInstance} from './assert';\nimport {DateTimeException, UnsupportedTemporalTypeException} from './errors';\nimport {MathUtil} from './MathUtil';\n\nimport {ChronoField} from './temporal/ChronoField';\nimport {ChronoUnit} from './temporal/ChronoUnit';\nimport {Clock} from './Clock';\nimport {DateTimeFormatterBuilder} from './format/DateTimeFormatterBuilder';\nimport {IsoChronology} from './chrono/IsoChronology';\nimport {LocalDate} from './LocalDate';\nimport {Month} from './Month';\nimport {SignStyle} from './format/SignStyle';\nimport {Temporal} from './temporal/Temporal';\nimport {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 `2007-12`.\n *\n * {@link YearMonth} is an immutable date-time object that represents the combination\n * of a year and month. Any field that can be derived from a year and month, such as\n * quarter-of-year, can be obtained.\n *\n * This class does not store or represent a day, time or time-zone.\n * For example, the value \"October 2007\" can be stored in a {@link YearMonth}.\n *\n * The ISO-8601 calendar system is the modern civil calendar system used today\n * in most of the world. It is equivalent to the proleptic Gregorian calendar\n * system, in which today's rules for leap years are applied for all time.\n * For most applications written today, the ISO-8601 rules are entirely suitable.\n * However, any application that makes use of historical dates, and requires them\n * to be accurate will find the ISO-8601 approach unsuitable.\n *\n * ### Specification for implementors\n *\n * This class is immutable and thread-safe.\n */\nexport class YearMonth extends Temporal {\n //-----------------------------------------------------------------------\n /**\n * function overloading for {@link YearMonth.now}\n *\n * if called with 0 argument {@link YearMonth.now0} is executed,\n *\n * if called with 1 argument and first argument is an instance of ZoneId, then {@link YearMonth.nowZoneId} is executed,\n *\n * otherwise {@link YearMonth.nowClock} is executed\n *\n * @param {?(ZoneId|Clock)} zoneIdOrClock\n * @returns {YearMonth}\n */\n static now(zoneIdOrClock) {\n if (arguments.length === 0) {\n return YearMonth.now0();\n } else if (arguments.length === 1 && zoneIdOrClock instanceof ZoneId) {\n return YearMonth.nowZoneId(zoneIdOrClock);\n } else {\n return YearMonth.nowClock(zoneIdOrClock);\n }\n }\n\n /**\n * Obtains the current year-month from the system clock in the default time-zone.\n *\n * This will query the system clock (see {@link Clock#systemDefaultZone}) in the default\n * time-zone to obtain the current year-month.\n * The zone and offset will be set based on the time-zone in the clock.\n *\n * Using this method will prevent the ability to use an alternate clock for testing\n * because the clock is hard-coded.\n *\n * @return {YearMonth} the current year-month using the system clock and default time-zone, not null\n */\n static now0() {\n return YearMonth.nowClock(Clock.systemDefaultZone());\n }\n\n /**\n * Obtains the current year-month from the system clock in the specified time-zone.\n *\n * This will query the system clock (see {@link Clock#system}) to obtain the current year-month.\n * Specifying the time-zone avoids dependence on the default time-zone.\n *\n * Using this method will prevent the ability to use an alternate clock for testing\n * because the clock is hard-coded.\n *\n * @param {ZoneId} zone the zone ID to use, not null\n * @return {YearMonth} the current year-month using the system clock, not null\n */\n static nowZoneId(zone) {\n return YearMonth.nowClock(Clock.system(zone));\n }\n\n /**\n * Obtains the current year-month from the specified clock.\n *\n * This will query the specified clock to obtain the current year-month.\n * Using this method allows the use of an alternate clock for testing.\n * The alternate clock may be introduced using dependency injection.\n *\n * @param {Clock} clock the clock to use, not null\n * @return {YearMonth} the current year-month, not null\n */\n static nowClock(clock) {\n 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 executed,\n *\n * otherwise {@link YearMonth.ofNumberNumber} is executed\n *\n * @param {!number} year\n * @param {!(Month|number)} monthOrNumber\n * @returns {YearMonth}\n */\n static of(year, monthOrNumber) {\n if (arguments.length === 2 && monthOrNumber instanceof Month) {\n return YearMonth.ofNumberMonth(year, monthOrNumber);\n } else {\n return YearMonth.ofNumberNumber(year, monthOrNumber);\n }\n }\n\n /**\n * Obtains an instance of {@link YearMonth} from a year and month.\n *\n * @param {number} year the year to represent, from MIN_YEAR to MAX_YEAR\n * @param {Month} month the month-of-year to represent, not null\n * @return {YearMonth} the year-month, not null\n * @throws DateTimeException if the year value is invalid\n */\n static ofNumberMonth(year, month) {\n requireNonNull(month, 'month');\n requireInstance(month, Month, 'month');\n return YearMonth.ofNumberNumber(year, month.value());\n }\n\n /**\n * Obtains an instance of {@link YearMonth} from a year and month.\n *\n * @param {number} year the year to represent, from MIN_YEAR to MAX_YEAR\n * @param {number} month the month-of-year to represent, from 1 (January) to 12 (December)\n * @return {YearMonth} the year-month, not null\n * @throws DateTimeException if either field value is invalid\n */\n static ofNumberNumber(year, month) {\n requireNonNull(year, 'year');\n requireNonNull(month, 'month');\n ChronoField.YEAR.checkValidValue(year);\n ChronoField.MONTH_OF_YEAR.checkValidValue(month);\n return new YearMonth(year, month);\n }\n\n //-----------------------------------------------------------------------\n /**\n * Obtains an instance of {@link YearMonth} from a temporal object.\n *\n * A {@link TemporalAccessor} represents some form of date and time information.\n * This factory converts the arbitrary temporal object to an instance of {@link YearMonth}.\n *\n * The conversion extracts the {@link ChronoField#YEAR} and\n * {@link ChronoField#MONTH_OF_YEAR} fields.\n * The extraction is only permitted if the temporal object has an ISO\n * chronology, or can be converted to a {@link LocalDate}.\n *\n * This method matches the signature of the functional interface {@link TemporalQuery}\n * allowing it to be used in queries via method reference, {@link YearMonth::from}.\n *\n * @param {TemporalAccessor} temporal the temporal object to convert, not null\n * @return {YearMonth} the year-month, not null\n * @throws DateTimeException if unable to convert to a {@link YearMonth}\n */\n static from(temporal) {\n requireNonNull(temporal, 'temporal');\n if (temporal instanceof YearMonth) {\n return temporal;\n }\n try {\n /* TODO: only IsoChronology for now\n if (IsoChronology.INSTANCE.equals(Chronology.from(temporal)) == false) {\n temporal = LocalDate.from(temporal);\n }*/\n return YearMonth.of(temporal.get(ChronoField.YEAR), temporal.get(ChronoField.MONTH_OF_YEAR));\n } catch (ex) {\n throw new DateTimeException('Unable to obtain YearMonth from TemporalAccessor: ' +\n temporal + ', type ' + (temporal && temporal.constructor != null ? temporal.constructor.name : ''));\n }\n }\n //-----------------------------------------------------------------------\n /**\n * function overloading for {@link YearMonth.parse}\n *\n * if called with 2 argument and first argument is an instance of Month, then {@link YearMonth.parseString} is executed,\n *\n * otherwise {@link YearMonth.parseStringFormatter} is executed\n *\n * @param {!(String)} text\n * @param {?DateTimeFormatter} formatter\n * @returns {YearMonth}\n */\n static parse(text, formatter) {\n if (arguments.length === 1) {\n return YearMonth.parseString(text);\n } else {\n return YearMonth.parseStringFormatter(text, formatter);\n }\n }\n\n /**\n * Obtains an instance of {@link YearMonth} from a text string such as `2007-12`.\n *\n * The string must represent a valid year-month.\n * The format must be {@link yyyy-MM}.\n * Years outside the range 0000 to 9999 must be prefixed by the plus or minus symbol.\n *\n * @param {String} text the text to parse such as \"2007-12\", not null\n * @return {YearMonth} the parsed year-month, not null\n * @throws DateTimeParseException if the text cannot be parsed\n */\n static parseString(text) {\n return YearMonth.parseStringFormatter(text, PARSER);\n }\n\n /**\n * Obtains an instance of {@link YearMonth} from a text string using a specific formatter.\n *\n * The text is parsed using the formatter, returning a year-month.\n *\n * @param {String} text the text to parse, not null\n * @param {DateTimeFormatter} formatter the formatter to use, not null\n * @return the parsed year-month, not null\n * @throws DateTimeParseException if the text cannot be parsed\n */\n static parseStringFormatter(text, formatter) {\n requireNonNull(formatter, 'formatter');\n return formatter.parse(text, YearMonth.FROM);\n }\n\n\n /**\n * Constructor.\n *\n * @param {number} year the year to represent, validated from MIN_YEAR to MAX_YEAR\n * @param {number} month the month-of-year to represent, validated from 1 (January) to 12 (December)\n */\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 executed,\n *\n * otherwise {@link YearMonth.isSupportedUnit} is executed\n *\n * @param {!(TemporalField|ChronoUnit)} fieldOrUnit\n * @returns {boolean}\n */\n isSupported(fieldOrUnit) {\n if (arguments.length === 1 && fieldOrUnit instanceof TemporalField) {\n return this.isSupportedField(fieldOrUnit);\n } else {\n return this.isSupportedUnit(fieldOrUnit);\n }\n }\n\n /**\n * Checks if the specified field is supported.\n *\n * This checks if this year-month can be queried for the specified field.\n * If false, then calling {@link range} and {@link get} will throw an exception.\n *\n * If the field is a {@link ChronoField} then the query is implemented here.\n * The supported fields (see {@link isSupported}) will return valid\n * values based on this date-time.\n * The supported fields are:\n *\n * * {@link MONTH_OF_YEAR}\n * * {@link EPOCH_MONTH}\n * * {@link YEAR_OF_ERA}\n * * {@link YEAR}\n * * {@link ERA}\n *\n * All other {@link ChronoField} instances will return false.\n *\n * If the field is not a {@link ChronoField}, then the result of this method\n * is obtained by invoking {@link TemporalField.isSupportedBy}\n * passing `this` as the argument.\n * Whether the field is supported is determined by the field.\n *\n * @param {TemporalField} field the field to check, null returns false\n * @return {boolean} true if the field is supported on this year-month, false if not\n */\n isSupportedField(field) {\n if (field instanceof ChronoField) {\n return field === ChronoField.YEAR || field === ChronoField.MONTH_OF_YEAR ||\n field === ChronoField.PROLEPTIC_MONTH || field === ChronoField.YEAR_OF_ERA || field === ChronoField.ERA;\n }\n return field != null && field.isSupportedBy(this);\n }\n\n isSupportedUnit(unit) {\n if (unit instanceof ChronoUnit) {\n return unit === ChronoUnit.MONTHS || unit === ChronoUnit.YEARS || unit === ChronoUnit.DECADES || unit === ChronoUnit.CENTURIES || unit === ChronoUnit.MILLENNIA || unit === ChronoUnit.ERAS;\n }\n return unit != null && unit.isSupportedBy(this);\n }\n\n /**\n * Gets the range of valid values for the specified field.\n *\n * The range object expresses the minimum and maximum valid values for a field.\n * This year-month is used to enhance the accuracy of the returned range.\n * If it is not possible to return the range, because the field is not supported\n * or for some other reason, an exception is thrown.\n *\n * If the field is a {@link ChronoField} then the query is implemented here.\n * The supported fields (see {@link isSupported}) will return\n * appropriate range instances.\n * All other {@link ChronoField} instances will throw a {@link DateTimeException}.\n *\n * If the field is not a {@link ChronoField}, then the result of this method\n * is obtained by invoking {@link TemporalField.rangeRefinedBy}\n * passing `this` as the argument.\n * Whether the range can be obtained is determined by the field.\n *\n * @param {TemporalField} field the field to query the range for, not null\n * @return {ValueRange} the range of valid values for the field, not null\n * @throws DateTimeException if the range for the field cannot be obtained\n */\n range(field) {\n if (field === ChronoField.YEAR_OF_ERA) {\n return (this.year() <= 0 ? ValueRange.of(1, Year.MAX_VALUE + 1) : ValueRange.of(1, Year.MAX_VALUE));\n }\n return super.range(field);\n }\n\n /**\n * Gets the value of the specified field from this year-month as an `int`.\n *\n * This queries this year-month for the value for the specified field.\n * The returned value will always be within the valid range of values for the field.\n * If it is not possible to return the value, because the field is not supported\n * or for some other reason, an exception is thrown.\n *\n * If the field is a {@link ChronoField} then the query is implemented here.\n * The supported fields (see {@link isSupported}) will return valid\n * values based on this year-month, except {@link EPOCH_MONTH} which is too\n * large to fit in an `int` and throw a {@link DateTimeException}.\n * All other {@link ChronoField} instances will throw a {@link DateTimeException}.\n *\n * If the field is not a {@link ChronoField}, then the result of this method\n * is obtained by invoking {@link TemporalField.getFrom}\n * passing `this` as the argument. Whether the value can be obtained,\n * and what the value represents, is determined by the field.\n *\n * @param {TemporalField} field the field to get, not null\n * @return {number} the value for the field\n * @throws DateTimeException if a value for the field cannot be obtained\n * @throws ArithmeticException if numeric overflow occurs\n */\n get(field) {\n requireNonNull(field, 'field');\n requireInstance(field, TemporalField, 'field');\n return this.range(field).checkValidIntValue(this.getLong(field), field);\n }\n\n /**\n * Gets the value of the specified field from this year-month as a `long`.\n *\n * This queries this year-month for the value for the specified field.\n * If it is not possible to return the value, because the field is not supported\n * or for some other reason, an exception is thrown.\n *\n * If the field is a {@link ChronoField} then the query is implemented here.\n * The supported fields (see {@link isSupported}) will return valid\n * values based on this year-month.\n * All other {@link ChronoField} instances will throw a {@link DateTimeException}.\n *\n * If the field is not a {@link ChronoField}, then the result of this method\n * is obtained by invoking {@link TemporalField.getFrom}\n * passing `this` as the argument. Whether the value can be obtained,\n * and what the value represents, is determined by the field.\n *\n * @param {TemporalField} field the field to get, not null\n * @return {number} the value for the field\n * @throws DateTimeException if a value for the field cannot be obtained\n * @throws ArithmeticException if numeric overflow occurs\n */\n getLong( field) {\n requireNonNull(field, 'field');\n requireInstance(field, TemporalField, 'field');\n if (field instanceof ChronoField) {\n switch (field) {\n case ChronoField.MONTH_OF_YEAR: return this._month;\n case ChronoField.PROLEPTIC_MONTH: return this._getProlepticMonth();\n case ChronoField.YEAR_OF_ERA: return (this._year < 1 ? 1 - this._year : this._year);\n case ChronoField.YEAR: return this._year;\n case ChronoField.ERA: return (this._year < 1 ? 0 : 1);\n }\n throw new UnsupportedTemporalTypeException('Unsupported field: ' + field);\n }\n return field.getFrom(this);\n }\n\n _getProlepticMonth() {\n return MathUtil.safeAdd(MathUtil.safeMultiply(this._year, 12), (this._month - 1));\n }\n\n //-----------------------------------------------------------------------\n /**\n * Gets the year field.\n *\n * This method returns the primitive `int` value for the year.\n *\n * The year returned by this method is proleptic as per {@link get}.\n *\n * @return {number} the year, from MIN_YEAR to MAX_YEAR\n */\n year() {\n return this._year;\n }\n\n /**\n * Gets the month-of-year field from 1 to 12.\n *\n * This method returns the month as an `int` from 1 to 12.\n * Application code is frequently clearer if the enum {@link Month}\n * is used by calling {@link getMonth}.\n *\n * @return {number} the month-of-year, from 1 to 12\n * @see #getMonth()\n */\n monthValue() {\n return this._month;\n }\n\n /**\n * Gets the month-of-year field using the {@link Month} enum.\n *\n * This method returns the enum {@link Month} for the month.\n * This avoids confusion as to what `int` values mean.\n * If you need access to the primitive `int` value, use {@link Month#getValue}.\n *\n * @return {Month} the month-of-year, not null\n */\n month() {\n return Month.of(this._month);\n }\n\n //-----------------------------------------------------------------------\n /**\n * Checks if the year is a leap year, according to the ISO proleptic\n * calendar system rules.\n *\n * This method applies the current rules for leap years across the whole time-line.\n * In general, a year is a leap year if it is divisible by four without\n * remainder. However, years divisible by 100, are not leap years, with\n * the exception of years divisible by 400 which are.\n *\n * For example, 1904 is a leap year it is divisible by 4.\n * 1900 was not a leap year as it is divisible by 100, however 2000 was a\n * leap year as it is divisible by 400.\n *\n * The calculation is proleptic - applying the same rules into the far future and far past.\n * This is historically inaccurate, but is correct for the ISO-8601 standard.\n *\n * @return {boolean} true if the year is leap, false otherwise\n */\n isLeapYear() {\n return IsoChronology.isLeapYear(this._year);\n }\n\n /**\n * Checks if the day-of-month is valid for this year-month.\n *\n * This method checks whether this year and month and the input day form\n * a valid date.\n *\n * @param {number} dayOfMonth the day-of-month to validate, from 1 to 31, invalid value returns false\n * @return {boolean} true if the day is valid for this year-month\n */\n isValidDay(dayOfMonth) {\n return dayOfMonth >= 1 && dayOfMonth <= this.lengthOfMonth();\n }\n\n /**\n * Returns the length of the month, taking account of the year.\n *\n * This returns the length of the month in days.\n * For example, a date in January would return 31.\n *\n * @return {number} the length of the month in days, from 28 to 31\n */\n lengthOfMonth() {\n return this.month().length(this.isLeapYear());\n }\n\n /**\n * Returns the length of the year.\n *\n * This returns the length of the year in days, either 365 or 366.\n *\n * @return {number} 366 if the year is leap, 365 otherwise\n */\n lengthOfYear() {\n return (this.isLeapYear() ? 366 : 365);\n }\n\n /**\n * function overloading for {@link YearMonth.with}\n *\n * if called with 1 argument, then {@link YearMonth.withAdjuster} is executed,\n *\n * if called with 2 arguments and first argument is an instance of TemporalField, then {@link YearMonth.withFieldValue} is executed,\n *\n * otherwise {@link YearMonth.withYearMonth} is executed\n *\n * @param {!(TemporalAdjuster|TemporalField|Number)} adjusterOrFieldOrNumber\n * @param {?number} value nullable only of first argument is an instance of TemporalAdjuster\n * @returns {YearMonth}\n */\n with(adjusterOrFieldOrNumber, value) {\n if (arguments.length === 1) {\n return this.withAdjuster(adjusterOrFieldOrNumber);\n } else if (arguments.length === 2 && adjusterOrFieldOrNumber instanceof TemporalField){\n return this.withFieldValue(adjusterOrFieldOrNumber, value);\n } else {\n return this.withYearMonth(adjusterOrFieldOrNumber, value);\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 requireNonNull(newYear);\n requireNonNull(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 {@link 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} 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 {YearMonth} based on `this` with the adjustment made, not null\n * @throws DateTimeException if the adjustment cannot be made\n * @throws ArithmeticException if numeric overflow occurs\n */\n withAdjuster(adjuster) {\n requireNonNull(adjuster, 'adjuster');\n 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 {@link YearMonth}, based on this one, with the value\n * for the specified field changed.\n * This can be used to change any supported field, such as the year or month.\n * If it is not possible to set the value, because the field is not supported or for\n * some other reason, an exception is thrown.\n *\n * If the field is a {@link ChronoField} then the adjustment is implemented here.\n * The supported fields behave as follows:\n *\n * * {@link MONTH_OF_YEAR} -\n * Returns a {@link YearMonth} with the specified month-of-year.\n * The year will be unchanged.\n * * {@link PROLEPTIC_MONTH} -\n * Returns a {@link YearMonth} with the specified proleptic-month.\n * This completely replaces the year and month of this object.\n * * {@link YEAR_OF_ERA} -\n * Returns a {@link YearMonth} with the specified year-of-era\n * The month and era will be unchanged.\n * * {@link YEAR} -\n * Returns a {@link YearMonth} with the specified year.\n * The month will be unchanged.\n * * {@link ERA} -\n * Returns a {@link YearMonth} with the specified era.\n * The month and year-of-era will be unchanged.\n *\n * In all cases, if the new value is outside the valid range of values for the field\n * then a {@link DateTimeException} will be thrown.\n *\n * All other {@link ChronoField} instances will throw a {@link DateTimeException}.\n *\n * If the field is not a {@link ChronoField}, then the result of this method\n * is obtained by invoking {@link TemporalField.adjustInto}\n * passing `this` as the argument. In this case, the field determines\n * whether and how to adjust the instant.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {TemporalField} field the field to set in the result, not null\n * @param {number} newValue the new value of the field in the result\n * @return a {@link YearMonth} based on `this` with the specified field set, not null\n * @throws DateTimeException if the field cannot be set\n * @throws ArithmeticException if numeric overflow occurs\n */\n 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 {@link YearMonth} with the year altered.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {number} year the year to set in the returned year-month, from MIN_YEAR to MAX_YEAR\n * @return {YearMonth} based on this year-month with the requested year, not null\n * @throws DateTimeException if the year value is invalid\n */\n withYear(year) {\n ChronoField.YEAR.checkValidValue(year);\n return this.withYearMonth(year, this._month);\n }\n\n /**\n * Returns a copy of this {@link YearMonth} with the month-of-year altered.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {number} month the month-of-year to set in the returned year-month, from 1 (January) to 12 (December)\n * @return {YearMonth} based on this year-month with the requested month, not null\n * @throws DateTimeException if the month-of-year value is invalid\n */\n withMonth(month) {\n ChronoField.MONTH_OF_YEAR.checkValidValue(month);\n return 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)} amountOrNumber\n * @param {?TemporalUnit} unit nullable only if first argument is an instance of TemporalAmount\n * @returns {YearMonth}\n */\n plus(amountOrNumber, unit) {\n if (arguments.length === 1) {\n return this.plusAmount(amountOrNumber);\n } else {\n return this.plusAmountUnit(amountOrNumber, unit);\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 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}.\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 if the addition cannot be made\n * @throws ArithmeticException if numeric overflow occurs\n */\n plusAmountUnit(amountToAdd, unit) {\n requireNonNull(unit, 'unit');\n requireInstance(unit, TemporalUnit, 'unit');\n if (unit instanceof ChronoUnit) {\n switch (unit) {\n case ChronoUnit.MONTHS: return this.plusMonths(amountToAdd);\n case ChronoUnit.YEARS: return this.plusYears(amountToAdd);\n case ChronoUnit.DECADES: return this.plusYears(MathUtil.safeMultiply(amountToAdd, 10));\n case ChronoUnit.CENTURIES: return this.plusYears(MathUtil.safeMultiply(amountToAdd, 100));\n case ChronoUnit.MILLENNIA: return this.plusYears(MathUtil.safeMultiply(amountToAdd, 1000));\n case ChronoUnit.ERAS: return this.with(ChronoField.ERA, MathUtil.safeAdd(this.getLong(ChronoField.ERA), amountToAdd));\n }\n throw new UnsupportedTemporalTypeException('Unsupported unit: ' + unit);\n }\n return unit.addTo(this, amountToAdd);\n }\n\n /**\n * Returns a copy of this year-month with the specified period in years added.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {number} yearsToAdd the years to add, may be negative\n * @return {YearMonth} based on this year-month with the years added, not null\n * @throws DateTimeException if the result exceeds the supported range\n */\n plusYears(yearsToAdd) {\n if (yearsToAdd === 0) {\n return this;\n }\n 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)} amountOrNumber\n * @param {?TemporalUnit} unit\n * @returns {YearMonth}\n */\n minus(amountOrNumber, unit) {\n if (arguments.length === 1) {\n return this.minusAmount(amountOrNumber);\n } else {\n return this.minusAmountUnit(amountOrNumber, unit);\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 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}.\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 requireNonNull(amount, '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 if the subtraction cannot be made\n * @throws ArithmeticException if numeric overflow occurs\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 {@link TemporalQuery} object defines the logic to be used to\n * obtain the result. Read the documentation of the query to understand\n * what the result of this method will be.\n *\n * The result of this method is obtained by invoking the\n * {@link TemporalQuery#queryFrom} method on the\n * specified query passing `this` as the argument.\n *\n * @param {TemporalQuery} query the query to invoke, not null\n * @return {*} the query result, null may be returned (defined by the query)\n * @throws DateTimeException if unable to query (defined by the query)\n * @throws ArithmeticException if numeric overflow occurs (defined by the query)\n */\n query(query) {\n requireNonNull(query, 'query');\n requireInstance(query, TemporalQuery, 'query');\n if (query === TemporalQueries.chronology()) {\n return IsoChronology.INSTANCE;\n } else if (query === TemporalQueries.precision()) {\n return ChronoUnit.MONTHS;\n } else if (query === TemporalQueries.localDate() || query === TemporalQueries.localTime() ||\n query === TemporalQueries.zone() || query === TemporalQueries.zoneId() || query === TemporalQueries.offset()) {\n return null;\n }\n return super.query(query);\n }\n\n /**\n * Adjusts the specified temporal object to have this year-month.\n *\n * This returns a temporal object of the same observable type as the input\n * with the year and month changed to be the same as this.\n *\n * The adjustment is equivalent to using {@link Temporal#with}\n * passing {@link ChronoField#PROLEPTIC_MONTH} as the field.\n * If the specified temporal object does not use the ISO calendar system then\n * a {@link DateTimeException} is thrown.\n *\n * In most cases, it is clearer to reverse the calling pattern by using\n * {@link Temporal#with}:\n *
\n * // these two lines are equivalent, but the second approach is recommended\n * temporal = thisYearMonth.adjustInto(temporal);\n * temporal = temporal.with(thisYearMonth);\n *\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {Temporal} temporal the target object to be adjusted, not null\n * @return {Temporal} the adjusted object, not null\n * @throws DateTimeException if unable to make the adjustment\n * @throws ArithmeticException if numeric overflow occurs\n */\n adjustInto(temporal) {\n requireNonNull(temporal, 'temporal');\n requireInstance(temporal, Temporal, 'temporal');\n /* TODO: only IsoChronology for now\n if (Chronology.from(temporal).equals(IsoChronology.INSTANCE) == false) {\n throw new DateTimeException(\"Adjustment only supported on ISO date-time\");\n }*/\n return temporal.with(ChronoField.PROLEPTIC_MONTH, this._getProlepticMonth());\n }\n\n /**\n * Calculates the period between this year-month and another year-month in\n * terms of the specified unit.\n *\n * This calculates the period between two year-months in terms of a single unit.\n * The start and end points are `this` and the specified year-month.\n * The result will be negative if the end is before the start.\n * The {@link Temporal} passed to this method must be a {@link YearMonth}.\n * For example, the period in years between two year-months can be calculated\n * using {@link startYearMonth.until}.\n *\n * The calculation returns a whole number, representing the number of\n * complete units between the two year-months.\n * For example, the period in decades between 2012-06 and 2032-05\n * will only be one decade as it is one month short of two decades.\n *\n * This method operates in association with {@link TemporalUnit#between}.\n * The result of this method is a `long` representing the amount of\n * the specified unit. By contrast, the result of {@link between} is an\n * object that can be used directly in addition/subtraction:\n *
\n * long period = start.until(end, YEARS); // this method\n * dateTime.plus(YEARS.between(start, end)); // use in plus/minus\n *\n *\n * The calculation is implemented in this method for {@link ChronoUnit}.\n * The units {@link MONTHS}, {@link YEARS}, {@link DECADES},\n * {@link CENTURIES}, {@link MILLENNIA} and {@link ERAS} are supported.\n * Other {@link ChronoUnit} values will throw an exception.\n *\n * If the unit is not a {@link ChronoUnit}, then the result of this method\n * is obtained by invoking {@link TemporalUnit.between}\n * passing `this` as the first argument and the input temporal as\n * the second argument.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {Temporal} endExclusive the end year-month, which is converted to a {@link YearMonth}, not null\n * @param {TemporalUnit} unit the unit to measure the period in, not null\n * @return {number} the amount of the period between this year-month and the end year-month\n * @throws DateTimeException if the period cannot be calculated\n * @throws ArithmeticException if numeric overflow occurs\n */\n until(endExclusive, unit) {\n requireNonNull(endExclusive, 'endExclusive');\n requireNonNull(unit, 'unit');\n requireInstance(endExclusive, Temporal, 'endExclusive');\n requireInstance(unit, TemporalUnit, 'unit');\n\n 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 {@link LocalDate}.\n *\n * This returns a {@link LocalDate} formed from this year-month and the specified day-of-month.\n *\n * The day-of-month value must be valid for the year-month.\n *\n * This method can be used as part of a chain to produce a date:\n *
\n * LocalDate date = year.atMonth(month).atDay(day);\n *\n *\n * @param {number} dayOfMonth the day-of-month to use, from 1 to 31\n * @return {LocalDate} the date formed from this year-month and the specified day, not null\n * @throws DateTimeException if the day is invalid for the year-month\n * @see #isValidDay(int)\n */\n atDay(dayOfMonth) {\n return LocalDate.of(this._year, this._month, dayOfMonth);\n }\n\n /**\n * Returns a {@link LocalDate} at the end of the month.\n *\n * This returns a {@link LocalDate} based on this year-month.\n * The day-of-month is set to the last valid day of the month, taking\n * into account leap years.\n *\n * This method can be used as part of a chain to produce a date:\n *
\n * LocalDate date = year.atMonth(month).atEndOfMonth();\n *\n *\n * @return {LocalDate} the last valid date of this year-month, not null\n */\n atEndOfMonth() {\n return LocalDate.of(this._year, this._month, this.lengthOfMonth());\n }\n\n //-----------------------------------------------------------------------\n /**\n * Compares this year-month to another year-month.\n *\n * The comparison is based first on the value of the year, then on the value of the month.\n * It is \"consistent with equals\", as defined by {@link Comparable}.\n *\n * @param {YearMonth} other the other year-month to compare to, not null\n * @return {number} the comparator value, negative if less, positive if greater\n */\n compareTo(other) {\n requireNonNull(other, 'other');\n requireInstance(other, YearMonth, 'other');\n let cmp = (this._year - other.year());\n if (cmp === 0) {\n cmp = (this._month - other.monthValue());\n }\n return cmp;\n }\n\n /**\n * Is this year-month after the specified year-month.\n *\n * @param {YearMonth} other the other year-month to compare to, not null\n * @return {boolean} true if this is after the specified year-month\n */\n isAfter(other) {\n return this.compareTo(other) > 0;\n }\n\n /**\n * Is this year-month before the specified year-month.\n *\n * @param {YearMonth} other the other year-month to compare to, not null\n * @return {boolean} true if this point is before the specified year-month\n */\n isBefore(other) {\n return this.compareTo(other) < 0;\n }\n\n //-----------------------------------------------------------------------\n /**\n * Checks if this year-month is equal to another year-month.\n *\n * The comparison is based on the time-line position of the year-months.\n *\n * @param {*} obj the object to check, null returns false\n * @return {boolean} true if this is equal to the other year-month\n */\n equals(obj) {\n if (this === obj) {\n return true;\n }\n if (obj instanceof YearMonth) {\n 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 string, such as `2007-12`.\n *\n * The output will be in the format {@link yyyy-MM}:\n *\n * @return {String} a string representation of this year-month, not null\n */\n toString() {\n return PARSER.format(this);\n }\n\n /**\n * Outputs this year-month as a string using the formatter.\n *\n * @param {DateTimeFormatter} formatter the formatter to use, not null\n * @return {String} the formatted year-month string, not null\n * @throws DateTimeException if an error occurs during printing\n */\n format(formatter) {\n requireNonNull(formatter, 'formatter');\n return formatter.format(this);\n }\n\n}\n\nlet PARSER;\n\nexport function _init() {\n\n PARSER = new DateTimeFormatterBuilder()\n .appendValue(ChronoField.YEAR, 4, 10, SignStyle.EXCEEDS_PAD)\n .appendLiteral('-')\n .appendValue(ChronoField.MONTH_OF_YEAR, 2)\n .toFormatter();\n\n YearMonth.FROM = createTemporalQuery('YearMonth.FROM', (temporal) => {\n return YearMonth.from(temporal);\n });\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/YearMonth.js","/*\n * @copyright (c) 2016, Philipp Thürwächter & Pattrick Hüper\n * @copyright (c) 2007-present, Stephen Colebourne & Michael Nascimento Santos\n * @license BSD-3-Clause (see LICENSE in the root directory of this source tree)\n */\n\nimport {requireNonNull} from '../assert';\nimport {IllegalStateException} from '../errors';\n\nimport {TemporalAdjuster} from './TemporalAdjuster';\nimport {ChronoField} from '../temporal/ChronoField';\nimport {ChronoUnit} from '../temporal/ChronoUnit';\nimport {MathUtil} from '../MathUtil';\n\n/**\n * Common implementations of {@link TemporalAdjuster}.\n *\n * This class provides common implementations of {@link TemporalAdjuster}.\n * They are especially useful to document the intent of business logic and\n * often link well to requirements.\n * For example, these two pieces of code do the same thing, but the second\n * one is clearer (assuming that there is a static import of this class):\n *
\n * // direct manipulation\n * date.withDayOfMonth(1).plusMonths(1).minusDays(1);\n * // use of an adjuster from this class\n * date.with(lastDayOfMonth());\n *\n * There are two equivalent ways of using a {@link TemporalAdjuster}.\n * The first is to invoke the method on the interface directly.\n * The second is to use {@link Temporal#with}:\n *
\n * // these two lines are equivalent, but the second approach is recommended\n * dateTime = adjuster.adjustInto(dateTime);\n * dateTime = dateTime.with(adjuster);\n *\n * It is recommended to use the second approach, {@link with},\n * as it is a lot clearer to read in code.\n *\n * ### Specification for implementors\n *\n * This is a thread-safe utility class.\n * All returned adjusters are immutable and thread-safe.\n *\n * The JDK 8 ofDateAdjuster(UnaryOperator) method is not backported.\n */\nexport class TemporalAdjusters {\n\n //-----------------------------------------------------------------------\n /**\n * Returns the 'first day of month' adjuster, which returns a new date set to\n * the first day of the current month.\n *\n * The ISO calendar system behaves as follows:\n *\n * * The input 2011-01-15 will return 2011-01-01.\n * * The input 2011-02-15 will return 2011-02-01.\n *\n * The behavior is suitable for use with most calendar systems.\n * It is equivalent to:\n *
\n * temporal.with(DAY_OF_MONTH, 1);\n *\n *\n * @return {TemporalAdjuster} the first day-of-month adjuster, not null\n */\n static firstDayOfMonth() {\n return Impl.FIRST_DAY_OF_MONTH;\n }\n\n /**\n * Returns the 'last day of month' adjuster, which returns a new date set to\n * the last day of the current month.\n *\n * The ISO calendar system behaves as follows:\n *\n * * The input 2011-01-15 will return 2011-01-31.\n * * The input 2011-02-15 will return 2011-02-28.\n * * The input 2012-02-15 will return 2012-02-29 (leap year).\n * * The input 2011-04-15 will return 2011-04-30.\n *\n * The behavior is suitable for use with most calendar systems.\n * It is equivalent to:\n *
\n * long lastDay = temporal.range(DAY_OF_MONTH).getMaximum();\n * temporal.with(DAY_OF_MONTH, lastDay);\n *\n *\n * @return {TemporalAdjuster} the last day-of-month adjuster, not null\n */\n static lastDayOfMonth() {\n return Impl.LAST_DAY_OF_MONTH;\n }\n\n /**\n * Returns the 'first day of next month' adjuster, which returns a new date set to\n * the first day of the next month.\n *\n * The ISO calendar system behaves as follows:\n *\n * * The input 2011-01-15 will return 2011-02-01.\n * * The input 2011-02-15 will return 2011-03-01.\n *\n * The behavior is suitable for use with most calendar systems.\n * It is equivalent to:\n *
\n * temporal.with(DAY_OF_MONTH, 1).plus(1, MONTHS);\n *\n *\n * @return {TemporalAdjuster} the first day of next month adjuster, not null\n */\n static firstDayOfNextMonth() {\n return Impl.FIRST_DAY_OF_NEXT_MONTH;\n }\n\n //-----------------------------------------------------------------------\n /**\n * Returns the 'first day of year' adjuster, which returns a new date set to\n * the first day of the current year.\n *\n * The ISO calendar system behaves as follows:\n *\n * * The input 2011-01-15 will return 2011-01-01.\n * * The input 2011-02-15 will return 2011-01-01.\n *\n * The behavior is suitable for use with most calendar systems.\n * It is equivalent to:\n *
\n * temporal.with(DAY_OF_YEAR, 1);\n *\n *\n * @return {TemporalAdjuster} the first day-of-year adjuster, not null\n */\n static firstDayOfYear() {\n return Impl.FIRST_DAY_OF_YEAR;\n }\n\n /**\n * Returns the 'last day of year' adjuster, which returns a new date set to\n * the last day of the current year.\n *\n * The ISO calendar system behaves as follows:\n *\n * * The input 2011-01-15 will return 2011-12-31.\n * * The input 2011-02-15 will return 2011-12-31.\n *\n * The behavior is suitable for use with most calendar systems.\n * It is equivalent to:\n *
\n * long lastDay = temporal.range(DAY_OF_YEAR).getMaximum();\n * temporal.with(DAY_OF_YEAR, lastDay);\n *\n *\n * @return {TemporalAdjuster} the last day-of-year adjuster, not null\n */\n static lastDayOfYear() {\n return Impl.LAST_DAY_OF_YEAR;\n }\n\n /**\n * Returns the 'first day of next year' adjuster, which returns a new date set to\n * the first day of the next year.\n *\n * The ISO calendar system behaves as follows:\n *\n * * The input 2011-01-15 will return 2012-01-01.\n *\n * The behavior is suitable for use with most calendar systems.\n * It is equivalent to:\n *
\n * temporal.with(DAY_OF_YEAR, 1).plus(1, YEARS);\n *\n *\n * @return {TemporalAdjuster} the first day of next month adjuster, not null\n */\n static firstDayOfNextYear() {\n return Impl.FIRST_DAY_OF_NEXT_YEAR;\n }\n\n //-----------------------------------------------------------------------\n /**\n * Returns the first in month adjuster, which returns a new date\n * in the same month with the first matching day-of-week.\n * This is used for expressions like 'first Tuesday in March'.\n *\n * The ISO calendar system behaves as follows:\n *\n * * The input 2011-12-15 for (MONDAY) will return 2011-12-05.\n * * The input 2011-12-15 for (FRIDAY) will return 2011-12-02.\n *\n * The behavior is suitable for use with most calendar systems.\n * It uses the {@link DAY_OF_WEEK} and {@link DAY_OF_MONTH} fields\n * and the {@link DAYS} unit, and assumes a seven day week.\n *\n * @param {DayOfWeek} dayOfWeek the day-of-week, not null\n * @return {TemporalAdjuster} the first in month adjuster, not null\n */\n static firstInMonth(dayOfWeek) {\n requireNonNull(dayOfWeek, 'dayOfWeek');\n return new DayOfWeekInMonth(1, dayOfWeek);\n }\n\n /**\n * Returns the last in month adjuster, which returns a new date\n * in the same month with the last matching day-of-week.\n * This is used for expressions like 'last Tuesday in March'.\n *\n * The ISO calendar system behaves as follows:\n *\n * * The input 2011-12-15 for (MONDAY) will return 2011-12-26.\n * * The input 2011-12-15 for (FRIDAY) will return 2011-12-30.\n *\n * The behavior is suitable for use with most calendar systems.\n * It uses the {@link DAY_OF_WEEK} and {@link DAY_OF_MONTH} fields\n * and the {@link DAYS} unit, and assumes a seven day week.\n *\n * @param {DayOfWeek} dayOfWeek the day-of-week, not null\n * @return {TemporalAdjuster} the first in month adjuster, not null\n */\n static lastInMonth(dayOfWeek) {\n requireNonNull(dayOfWeek, 'dayOfWeek');\n return new DayOfWeekInMonth(-1, dayOfWeek);\n }\n\n /**\n * Returns the day-of-week in month adjuster, which returns a new date\n * in the same month with the ordinal day-of-week.\n * This is used for expressions like the 'second Tuesday in March'.\n *\n * The ISO calendar system behaves as follows:\n *\n * * The input 2011-12-15 for (1,TUESDAY) will return 2011-12-06.\n * * The input 2011-12-15 for (2,TUESDAY) will return 2011-12-13.\n * * The input 2011-12-15 for (3,TUESDAY) will return 2011-12-20.\n * * The input 2011-12-15 for (4,TUESDAY) will return 2011-12-27.\n * * The input 2011-12-15 for (5,TUESDAY) will return 2012-01-03.\n * * The input 2011-12-15 for (-1,TUESDAY) will return 2011-12-27 (last in month).\n * * The input 2011-12-15 for (-4,TUESDAY) will return 2011-12-06 (3 weeks before last in month).\n * * The input 2011-12-15 for (-5,TUESDAY) will return 2011-11-29 (4 weeks before last in month).\n * * The input 2011-12-15 for (0,TUESDAY) will return 2011-11-29 (last in previous month).\n *\n * For a positive or zero ordinal, the algorithm is equivalent to finding the first\n * day-of-week that matches within the month and then adding a number of weeks to it.\n * For a negative ordinal, the algorithm is equivalent to finding the last\n * day-of-week that matches within the month and then subtracting a number of weeks to it.\n * The ordinal number of weeks is not validated and is interpreted leniently\n * according to this algorithm. This definition means that an ordinal of zero finds\n * the last matching day-of-week in the previous month.\n *\n * The behavior is suitable for use with most calendar systems.\n * It uses the {@link DAY_OF_WEEK} and {@link DAY_OF_MONTH} fields\n * and the {@link DAYS} unit, and assumes a seven day week.\n *\n * @param {Number} ordinal the week within the month, unbounded but typically from -5 to 5\n * @param {DayOfWeek} dayOfWeek the day-of-week, not null\n * @return {TemporalAdjuster} the day-of-week in month adjuster, not null\n */\n static dayOfWeekInMonth(ordinal, dayOfWeek) {\n requireNonNull(dayOfWeek, 'dayOfWeek');\n return new DayOfWeekInMonth(ordinal, dayOfWeek);\n }\n\n //-----------------------------------------------------------------------\n /**\n * Returns the next day-of-week adjuster, which adjusts the date to the\n * first occurrence of the specified day-of-week after the date being adjusted.\n *\n * The ISO calendar system behaves as follows:\n *\n * * The input 2011-01-15 (a Saturday) for parameter (MONDAY) will return 2011-01-17 (two days later).\n * * The input 2011-01-15 (a Saturday) for parameter (WEDNESDAY) will return 2011-01-19 (four days later).\n * * The input 2011-01-15 (a Saturday) for parameter (SATURDAY) will return 2011-01-22 (seven days later).\n *\n * The behavior is suitable for use with most calendar systems.\n * It uses the {@link DAY_OF_WEEK} field and the {@link DAYS} unit,\n * and assumes a seven day week.\n *\n * @param {DayOfWeek} dayOfWeek the day-of-week to move the date to, not null\n * @return {TemporalAdjuster} the next day-of-week adjuster, not null\n */\n static next(dayOfWeek) {\n return new RelativeDayOfWeek(2, dayOfWeek);\n }\n\n /**\n * Returns the next-or-same day-of-week adjuster, which adjusts the date to the\n * first occurrence of the specified day-of-week after the date being adjusted\n * unless it is already on that day in which case the same object is returned.\n *\n * The ISO calendar system behaves as follows:\n *\n * * The input 2011-01-15 (a Saturday) for parameter (MONDAY) will return 2011-01-17 (two days later).\n * * The input 2011-01-15 (a Saturday) for parameter (WEDNESDAY) will return 2011-01-19 (four days later).\n * * The input 2011-01-15 (a Saturday) for parameter (SATURDAY) will return 2011-01-15 (same as input).\n *\n * The behavior is suitable for use with most calendar systems.\n * It uses the {@link DAY_OF_WEEK} field and the {@link DAYS} unit,\n * and assumes a seven day week.\n *\n * @param {DayOfWeek} dayOfWeek the day-of-week to check for or move the date to, not null\n * @return {TemporalAdjuster} the next-or-same day-of-week adjuster, not null\n */\n static nextOrSame(dayOfWeek) {\n return new RelativeDayOfWeek(0, dayOfWeek);\n }\n\n /**\n * Returns the previous day-of-week adjuster, which adjusts the date to the\n * first occurrence of the specified day-of-week before the date being adjusted.\n *\n * The ISO calendar system behaves as follows:\n *\n * * The input 2011-01-15 (a Saturday) for parameter (MONDAY) will return 2011-01-10 (five days earlier).\n * * The input 2011-01-15 (a Saturday) for parameter (WEDNESDAY) will return 2011-01-12 (three days earlier).\n * * The input 2011-01-15 (a Saturday) for parameter (SATURDAY) will return 2011-01-08 (seven days earlier).\n *\n * The behavior is suitable for use with most calendar systems.\n * It uses the {@link DAY_OF_WEEK} field and the {@link DAYS} unit,\n * and assumes a seven day week.\n *\n * @param {DayOfWeek} dayOfWeek the day-of-week to move the date to, not null\n * @return {TemporalAdjuster} the previous day-of-week adjuster, not null\n */\n static previous(dayOfWeek) {\n return new RelativeDayOfWeek(3, dayOfWeek);\n }\n\n /**\n * Returns the previous-or-same day-of-week adjuster, which adjusts the date to the\n * first occurrence of the specified day-of-week before the date being adjusted\n * unless it is already on that day in which case the same object is returned.\n *\n * The ISO calendar system behaves as follows:\n *\n * * The input 2011-01-15 (a Saturday) for parameter (MONDAY) will return 2011-01-10 (five days earlier).\n * * The input 2011-01-15 (a Saturday) for parameter (WEDNESDAY) will return 2011-01-12 (three days earlier).\n * * The input 2011-01-15 (a Saturday) for parameter (SATURDAY) will return 2011-01-15 (same as input).\n *\n * The behavior is suitable for use with most calendar systems.\n * It uses the {@link DAY_OF_WEEK} field and the {@link DAYS} unit,\n * and assumes a seven day week.\n *\n * @param {DayOfWeek} dayOfWeek the day-of-week to check for or move the date to, not null\n * @return {TemporalAdjuster} the previous-or-same day-of-week adjuster, not null\n */\n static previousOrSame(dayOfWeek) {\n return new RelativeDayOfWeek(1, dayOfWeek);\n }\n\n}\n\n//-----------------------------------------------------------------------\n/**\n * Enum implementing the adjusters.\n */\nclass Impl extends TemporalAdjuster {\n\n 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 const calDow = temporal.get(ChronoField.DAY_OF_WEEK);\n if (this._relative < 2 && calDow === this._dowValue) {\n return temporal;\n }\n if ((this._relative & 1) === 0) {\n 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// WEBPACK FOOTER //\n// ./src/temporal/TemporalAdjusters.js","/*\n * @copyright (c) 2016, Philipp Thürwächter & Pattrick Hüper\n * @copyright (c) 2007-present, Stephen Colebourne & Michael Nascimento Santos\n * @license BSD-3-Clause (see LICENSE in the root directory of this source tree)\n */\n\nimport {abstractMethodFail} from '../assert';\n\n/**\n * Strategy for adjusting a temporal object.\n *\n * Adjusters are a key tool for modifying temporal objects.\n * They exist to externalize the process of adjustment, permitting different\n * approaches, as per the strategy design pattern.\n * Examples might be an adjuster that sets the date avoiding weekends, or one that\n * sets the date to the last day of the month.\n *\n * There are two equivalent ways of using a {@link TemporalAdjuster}.\n * The first is to invoke the method on this interface directly.\n * The second is to use {@link Temporal#with}:\n *
\n * // these two lines are equivalent, but the second approach is recommended\n * temporal = thisAdjuster.adjustInto(temporal);\n * temporal = temporal.with(thisAdjuster);\n *\n * It is recommended to use the second approach, {@link with},\n * as it is a lot clearer to read in code.\n *\n * See {@link TemporalAdjusters} for a standard set of adjusters, including finding the\n * last day of the month.\n * Adjusters may also be defined by applications.\n *\n * ### Specification for implementors\n *\n * This interface places no restrictions on the mutability of implementations,\n * however immutability is strongly recommended.\n *\n * @interface\n */\nexport class TemporalAdjuster {\n\n /**\n * Adjusts the specified temporal object.\n *\n * This adjusts the specified temporal object using the logic\n * encapsulated in the implementing class.\n * Examples might be an adjuster that sets the date avoiding weekends, or one that\n * sets the date to the last day of the month.\n *\n * There are two equivalent ways of using this method.\n * The first is to invoke this method directly.\n * The second is to use {@link Temporal#with}:\n *
\n * // these two lines are equivalent, but the second approach is recommended\n * temporal = thisAdjuster.adjustInto(temporal);\n * temporal = temporal.with(thisAdjuster);\n *\n * It is recommended to use the second approach, {@link with},\n * as it is a lot clearer to read in code.\n *\n * ### Specification for implementors\n *\n * The implementation must take the input object and adjust it.\n * The implementation defines the logic of the adjustment and is responsible for\n * documenting that logic. It may use any method on {@link Temporal} to\n * query the temporal object and perform the adjustment.\n * The returned object must have the same observable type as the input object\n *\n * The input object must not be altered.\n * Instead, an adjusted copy of the original must be returned.\n * This provides equivalent, safe behavior for immutable and mutable temporal objects.\n *\n * The input temporal object may be in a calendar system other than ISO.\n * Implementations may choose to document compatibility with other calendar systems,\n * or reject non-ISO temporal objects by querying the chronology (see {@link TemporalQueries#chronology}).\n *\n * This method may be called from multiple threads in parallel.\n * It must be thread-safe when invoked.\n *\n * @param {Temporal} temporal the temporal object to adjust, not null\n * @return {Temporal} an object of the same observable type with the adjustment made, not null\n * @throws DateTimeException if unable to make the adjustment\n * @throws ArithmeticException if numeric overflow occurs\n *\n * @abstract\n */\n // eslint-disable-next-line no-unused-vars\n adjustInto(temporal){\n abstractMethodFail('adjustInto');\n }\n\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/temporal/TemporalAdjuster.js","/*\n * @copyright (c) 2016, Philipp Thürwächter & Pattrick Hüper\n * @copyright (c) 2007-present, Stephen Colebourne & Michael Nascimento Santos\n * @license BSD-3-Clause (see LICENSE in the root directory of this source tree)\n */\n\nimport {requireNonNull} from './assert';\nimport {DateTimeException, IllegalArgumentException} from './errors';\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 `2007-12-03T10:15:30+01:00 Europe/Paris`.\n *\n * `ZonedDateTime` is an immutable representation of a date-time with a time-zone.\n * This class stores all date and time fields, to a precision of nanoseconds,\n * and a time-zone, with a zone offset used to handle ambiguous local date-times.\n * For example, the value\n * '2nd October 2007 at 13:45.30.123456789 +02:00 in the Europe/Paris time-zone'\n * can be stored in a {@link ZonedDateTime}.\n *\n * This class handles conversion from the local time-line of {@link LocalDateTime}\n * to the instant time-line of {@link Instant}.\n * The difference between the two time-lines is the offset from UTC/Greenwich,\n * represented by a {@link ZoneOffset}.\n *\n * Converting between the two time-lines involves calculating the offset using the\n * {@link ZoneRules} rules accessed from the {@link ZoneId}.\n * Obtaining the offset for an instant is simple, as there is exactly one valid\n * offset for each instant. By contrast, obtaining the offset for a local date-time\n * is not straightforward. There are three cases:\n *\n * * Normal, with one valid offset. For the vast majority of the year, the normal\n * case applies, where there is a single valid offset for the local date-time.\n * * Gap, with zero valid offsets. This is when clocks jump forward typically\n * due to the spring daylight savings change from 'winter' to 'summer'.\n * In a gap there are local date-time values with no valid offset.\n * * Overlap, with two valid offsets. This is when clocks are set back typically\n * due to the autumn daylight savings change from 'summer' to 'winter'.\n * In an overlap there are local date-time values with two valid offsets.\n *\n * Any method that converts directly or implicitly from a local date-time to an\n * instant by obtaining the offset has the potential to be complicated.\n *\n * For Gaps, the general strategy is that if the local date-time falls in the\n * middle of a Gap, then the resulting zoned date-time will have a local date-time\n * shifted forwards by the length of the Gap, resulting in a date-time in the later\n * offset, typically 'summer' time.\n *\n * For Overlaps, the general strategy is that if the local date-time falls in the\n * middle of an Overlap, then the previous offset will be retained. If there is no\n * previous offset, or the previous offset is invalid, then the earlier offset is\n * used, typically 'summer' time. Two additional methods,\n * {@link withEarlierOffsetAtOverlap} and {@link withLaterOffsetAtOverlap},\n * help manage the case of an overlap.\n *\n * ### Specification for implementors\n *\n * A {@link ZonedDateTime} holds state equivalent to three separate objects,\n * a {@link LocalDateTime}, a {@link ZoneId} and the resolved {@link ZoneOffset}.\n * The offset and local date-time are used to define an instant when necessary.\n * The zone ID is used to obtain the rules for how and when the offset changes.\n * The offset cannot be freely set, as the zone controls which offsets are valid.\n */\nexport class ZonedDateTime extends ChronoZonedDateTime {\n\n //-----------------------------------------------------------------------\n /**\n * Obtains the current date-time from the system clock in the specified time-zone or clock\n * or default time zone.\n *\n * This will query the system clock (see {@link Clock#systemDefaultZone}) in the default\n * time-zone to obtain the current date-time.\n * The zone and offset will be set based on the time-zone in the clock.\n *\n * Using this method will prevent the ability to use an alternate clock for testing\n * because the clock is hard-coded.\n *\n * @param {Clock|ZoneId} [clockOrZone=Clock.systemDefaultZone()]\n * @return {ZonedDateTime} the current date-time using the system clock, not null\n */\n static now(clockOrZone) {\n let clock;\n if(clockOrZone instanceof ZoneId){\n clock = Clock.system(clockOrZone);\n } else {\n clock = clockOrZone == null ? Clock.systemDefaultZone() : clockOrZone;\n }\n return ZonedDateTime.ofInstant(clock.instant(), clock.zone());\n }\n\n //-----------------------------------------------------------------------\n /**\n * function overloading for static {@link ZonedDateTime.of}\n *\n * if called with 2 (or less) args {@link ZonedDateTime.of2} is called,\n * if called with 3 args and the first arg is an instance of LocalDate {@link ZonedDateTime.of3} is called,\n * otherwise {@link ZonedDateTime.of8} is called.\n */\n static of(){\n if(arguments.length <= 2){\n return ZonedDateTime.of2.apply(this, arguments);\n } else if (arguments.length === 3 && arguments[0] instanceof LocalDate){\n return ZonedDateTime.of3.apply(this, arguments);\n } else {\n return ZonedDateTime.of8.apply(this, arguments);\n }\n }\n /**\n * Obtains an instance of {@link ZonedDateTime} from a local date and time.\n *\n * This creates a zoned date-time matching the input local date and time as closely as possible.\n * Time-zone rules, such as daylight savings, mean that not every local date-time\n * is valid for the specified zone, thus the local date-time may be adjusted.\n *\n * The local date time and first combined to form a local date-time.\n * The local date-time is then resolved to a single instant on the time-line.\n * This is achieved by finding a valid offset from UTC/Greenwich for the local\n * date-time as defined by the {@link ZoneRules} of the zone ID.\n *\n * In most cases, there is only one valid offset for a local date-time.\n * In the case of an overlap, when clocks are set back, there are two valid offsets.\n * This method uses the earlier offset typically corresponding to 'summer'.\n *\n * In the case of a gap, when clocks jump forward, there is no valid offset.\n * Instead, the local date-time is adjusted to be later by the length of the gap.\n * For a typical one hour daylight savings change, the local date-time will be\n * moved one hour later into the offset typically corresponding to 'summer'.\n *\n * @param {LocalDate} date - the local date, not null\n * @param {LocalTime} time - the local time, not null\n * @param {ZoneId} zone - the time-zone, not null\n * @return {ZonedDateTime} the offset date-time, not null\n */\n static of3(date, time, zone) {\n return ZonedDateTime.of2(LocalDateTime.of(date, time), zone);\n }\n\n /**\n * Obtains an instance of {@link ZonedDateTime} from a local date-time.\n *\n * This creates a zoned date-time matching the input local date-time as closely as possible.\n * Time-zone rules, such as daylight savings, mean that not every local date-time\n * is valid for the specified zone, thus the local date-time may be adjusted.\n *\n * The local date-time is resolved to a single instant on the time-line.\n * This is achieved by finding a valid offset from UTC/Greenwich for the local\n * date-time as defined by the {@link ZoneRules} of the zone ID.\n *\n * In most cases, there is only one valid offset for a local date-time.\n * In the case of an overlap, when clocks are set back, there are two valid offsets.\n * This method uses the earlier offset typically corresponding to 'summer'.\n *\n * In the case of a gap, when clocks jump forward, there is no valid offset.\n * Instead, the local date-time is adjusted to be later by the length of the gap.\n * For a typical one hour daylight savings change, the local date-time will be\n * moved one hour later into the offset typically corresponding to 'summer'.\n *\n * @param {!LocalDateTime} localDateTime - the local date-time, not null\n * @param {!ZoneId} zone - the time-zone, not null\n * @return {ZonedDateTime} the zoned date-time, not null\n */\n static of2(localDateTime, zone) {\n return ZonedDateTime.ofLocal(localDateTime, zone, null);\n }\n\n /**\n * Obtains an instance of {@link ZonedDateTime} from a year, month, day,\n * hour, minute, second, nanosecond and time-zone.\n *\n * This creates a zoned date-time matching the local date-time of the seven\n * specified fields as closely as possible.\n * Time-zone rules, such as daylight savings, mean that not every local date-time\n * is valid for the specified zone, thus the local date-time may be adjusted.\n *\n * The local date-time is resolved to a single instant on the time-line.\n * This is achieved by finding a valid offset from UTC/Greenwich for the local\n * date-time as defined by the {@link ZoneRules} of the zone ID.\n *\n * In most cases, there is only one valid offset for a local date-time.\n * In the case of an overlap, when clocks are set back, there are two valid offsets.\n * This method uses the earlier offset typically corresponding to 'summer'.\n *\n * In the case of a gap, when clocks jump forward, there is no valid offset.\n * Instead, the local date-time is adjusted to be later by the length of the gap.\n * For a typical one hour daylight savings change, the local date-time will be\n * moved one hour later into the offset typically corresponding to 'summer'.\n *\n * This method exists primarily for writing test cases.\n * Non test-code will typically use other methods to create an offset time.\n * {@link LocalDateTime} has five additional convenience variants of the\n * equivalent factory method taking fewer arguments.\n * They are not provided here to reduce the footprint of the API.\n *\n * @param {number} year - the year to represent, from MIN_YEAR to MAX_YEAR\n * @param {number} month - the month-of-year to represent, from 1 (January) to 12 (December)\n * @param {number} dayOfMonth - the day-of-month to represent, from 1 to 31\n * @param {number} hour - the hour-of-day to represent, from 0 to 23\n * @param {number} minute - the minute-of-hour to represent, from 0 to 59\n * @param {number} second - the second-of-minute to represent, from 0 to 59\n * @param {number} nanoOfSecond - the nano-of-second to represent, from 0 to 999,999,999\n * @param {ZoneId} zone - the time-zone, not null\n * @return {ZonedDateTime } the offset date-time, not null\n * @throws DateTimeException if the value of any field is out of range, or\n * if the day-of-month is invalid for the month-year\n */\n static of8(\n year, month, dayOfMonth,\n hour, minute, second, nanoOfSecond, zone) {\n const dt = LocalDateTime.of(year, month, dayOfMonth, hour, minute, second, nanoOfSecond);\n return ZonedDateTime.ofLocal(dt, zone, null);\n }\n\n /**\n * Obtains an instance of {@link ZonedDateTime} from a local date-time\n * using the preferred offset if possible.\n *\n * The local date-time is resolved to a single instant on the time-line.\n * This is achieved by finding a valid offset from UTC/Greenwich for the local\n * date-time as defined by the {@link ZoneRules} of the zone ID.\n *\n * In most cases, there is only one valid offset for a local date-time.\n * In the case of an overlap, where clocks are set back, there are two valid offsets.\n * If the preferred offset is one of the valid offsets then it is used.\n * Otherwise the earlier valid offset is used, typically corresponding to 'summer'.\n *\n * In the case of a gap, where clocks jump forward, there is no valid offset.\n * Instead, the local date-time is adjusted to be later by the length of the gap.\n * For a typical one hour daylight savings change, the local date-time will be\n * moved one hour later into the offset typically corresponding to 'summer'.\n *\n * @param {!LocalDateTime} localDateTime - the local date-time, not null\n * @param {!ZoneId} zone - the time-zone, not null\n * @param {ZoneOffset} preferredOffset - the zone offset, null if no preference\n * @return {ZonedDateTime} the zoned date-time, not null\n */\n static ofLocal(localDateTime, zone, preferredOffset) {\n requireNonNull(localDateTime, 'localDateTime');\n requireNonNull(zone, 'zone');\n if (zone instanceof ZoneOffset) {\n return new ZonedDateTime(localDateTime, zone, zone);\n }\n let offset = null;\n let rules = zone.rules();\n let validOffsets = rules.validOffsets(localDateTime);\n if (validOffsets.length === 1) {\n offset = validOffsets[0];\n } else if (validOffsets.length === 0) {\n let trans = rules.transition(localDateTime);\n localDateTime = localDateTime.plusSeconds(trans.duration().seconds());\n offset = trans.offsetAfter();\n } else {\n if (preferredOffset != null &&\n validOffsets.some((validOffset) => {return validOffset.equals(preferredOffset);})) {\n offset = preferredOffset;\n } else {\n offset = requireNonNull(validOffsets[0], 'offset'); // protect against bad ZoneRules\n }\n }\n\n return new ZonedDateTime(localDateTime, offset, zone);\n }\n\n //-----------------------------------------------------------------------\n /**\n * function overloading for {@link ZonedDateTime.ofInstant}.\n * if called with 2 args {@link ZonedDateTime.ofInstant2} is called\n * otherwise {@link ZonedDateTime.ofInstant3}.\n */\n static ofInstant(){\n if (arguments.length === 2){\n return ZonedDateTime.ofInstant2.apply(this, arguments);\n } else {\n return ZonedDateTime.ofInstant3.apply(this, arguments);\n }\n }\n /**\n * Obtains an instance of {@link ZonedDateTime} from an {@link Instant}.\n *\n * This creates a zoned date-time with the same instant as that specified.\n * Calling {@link toInstant} will return an instant equal to the one used here.\n *\n * Converting an instant to a zoned date-time is simple as there is only one valid\n * offset for each instant.\n *\n * @param {!Instant} instant - the instant to create the date-time from, not null\n * @param {!ZoneId} zone - the time-zone, not null\n * @return {ZonedDateTime} the zoned date-time, not null\n * @throws DateTimeException if the result exceeds the supported range\n */\n static ofInstant2(instant, zone) {\n requireNonNull(instant, 'instant');\n requireNonNull(zone, 'zone');\n return ZonedDateTime._create(instant.epochSecond(), instant.nano(), zone);\n }\n\n /**\n * Obtains an instance of {@link ZonedDateTime} from the instant formed by combining\n * the local date-time and offset.\n *\n * This creates a zoned date-time by combining the {@link LocalDateTime} and {@link ZoneOffset}.\n * This combination uniquely specifies an instant without ambiguity.\n *\n * Converting an instant to a zoned date-time is simple as there is only one valid\n * offset for each instant. If the valid offset is different to the offset specified,\n * the the date-time and offset of the zoned date-time will differ from those specified.\n *\n * If the {@link ZoneId} to be used is a {@link ZoneOffset}, this method is equivalent\n * to {@link of}.\n *\n * @param {LocalDateTime} localDateTime - the local date-time, not null\n * @param {ZoneOffset} offset - the zone offset, not null\n * @param {ZoneId} zone - the time-zone, not null\n * @return {ZonedDateTime} the zoned date-time, not null\n */\n static ofInstant3(localDateTime, offset, zone) {\n requireNonNull(localDateTime, 'localDateTime');\n requireNonNull(offset, 'offset');\n requireNonNull(zone, 'zone');\n return ZonedDateTime._create(localDateTime.toEpochSecond(offset), localDateTime.nano(), zone);\n }\n\n /**\n * Obtains an instance of {@link ZonedDateTime} using seconds from the\n * epoch of 1970-01-01T00:00:00Z.\n *\n * @param {number} epochSecond - the number of seconds from the epoch of 1970-01-01T00:00:00Z\n * @param {number} nanoOfSecond - the nanosecond within the second, from 0 to 999,999,999\n * @param {ZoneId} zone - the time-zone, not null\n * @return {ZonedDateTime} the zoned date-time, not null\n * @throws DateTimeException if the result exceeds the supported range\n */\n static _create(epochSecond, nanoOfSecond, zone) {\n const rules = zone.rules();\n const instant = Instant.ofEpochSecond(epochSecond, nanoOfSecond); // TODO: rules should be queryable by epochSeconds\n const offset = rules.offset(instant);\n const ldt = LocalDateTime.ofEpochSecond(epochSecond, nanoOfSecond, offset);\n return new ZonedDateTime(ldt, offset, zone);\n }\n\n //-----------------------------------------------------------------------\n /**\n * Obtains an instance of {@link ZonedDateTime} strictly validating the\n * combination of local date-time, offset and zone ID.\n *\n * This creates a zoned date-time ensuring that the offset is valid for the\n * local date-time according to the rules of the specified zone.\n * If the offset is invalid, an exception is thrown.\n *\n * @param {LocalDateTime} localDateTime - the local date-time, not null\n * @param {ZoneOffset} offset - the zone offset, not null\n * @param {ZoneId} zone - the time-zone, not null\n * @return {ZonedDateTime} the zoned date-time, not null\n */\n static ofStrict(localDateTime, offset, zone) {\n requireNonNull(localDateTime, 'localDateTime');\n requireNonNull(offset, 'offset');\n requireNonNull(zone, 'zone');\n const rules = zone.rules();\n if (rules.isValidOffset(localDateTime, offset) === false) {\n const trans = rules.transition(localDateTime);\n if (trans != null && trans.isGap()) {\n // error message says daylight savings for simplicity\n // even though there are other kinds of gaps\n throw new DateTimeException('LocalDateTime ' + localDateTime +\n ' does not exist in zone ' + zone +\n ' due to a gap in the local time-line, typically caused by daylight savings');\n }\n throw new DateTimeException('ZoneOffset \"' + offset + '\" is not valid for LocalDateTime \"' +\n localDateTime + '\" in zone \"' + zone + '\"');\n }\n return new ZonedDateTime(localDateTime, offset, zone);\n }\n\n /**\n * Obtains an instance of {@link ZonedDateTime} leniently, for advanced use cases,\n * allowing any combination of local date-time, offset and zone ID.\n *\n * This creates a zoned date-time with no checks other than no nulls.\n * This means that the resulting zoned date-time may have an offset that is in conflict\n * with the zone ID.\n *\n * This method is intended for advanced use cases.\n * For example, consider the case where a zoned date-time with valid fields is created\n * and then stored in a database or serialization-based store. At some later point,\n * the object is then re-loaded. However, between those points in time, the government\n * that defined the time-zone has changed the rules, such that the originally stored\n * local date-time now does not occur. This method can be used to create the object\n * in an 'invalid' state, despite the change in rules.\n *\n * @param {LocalDateTime} localDateTime - the local date-time, not null\n * @param {ZoneOffset} offset - the zone offset, not null\n * @param {ZoneId} zone - the time-zone, not null\n * @return {ZonedDateTime} the zoned date-time, not null\n */\n static ofLenient(localDateTime, offset, zone) {\n requireNonNull(localDateTime, 'localDateTime');\n requireNonNull(offset, 'offset');\n requireNonNull(zone, 'zone');\n if (zone instanceof ZoneOffset && offset.equals(zone) === false) {\n throw new IllegalArgumentException('ZoneId must match ZoneOffset');\n }\n return new ZonedDateTime(localDateTime, offset, zone);\n }\n\n //-----------------------------------------------------------------------\n /**\n * Obtains an instance of {@link ZonedDateTime} from a temporal object.\n *\n * A {@link TemporalAccessor} represents some form of date and time information.\n * This factory converts the arbitrary temporal object to an instance of {@link ZonedDateTime}.\n *\n * The conversion will first obtain a {@link ZoneId}. It will then try to obtain an instant.\n * If that fails it will try to obtain a local date-time.\n * The zoned date time will either be a combination of {@link ZoneId} and instant,\n * or {@link ZoneId} and local date-time.\n *\n * This method matches the signature of the functional interface {@link TemporalQuery}\n * allowing it to be used in queries via method reference, {@link ZonedDateTime::from}.\n *\n * @param {!TemporalAccessor} temporal - the temporal object to convert, not null\n * @return {ZonedDateTime} the zoned date-time, not null\n * @throws DateTimeException if unable to convert to an {@link ZonedDateTime}\n */\n static from(temporal) {\n requireNonNull(temporal, 'temporal');\n if (temporal instanceof ZonedDateTime) {\n return temporal;\n }\n const zone = ZoneId.from(temporal);\n if (temporal.isSupported(ChronoField.INSTANT_SECONDS)) {\n const zdt = ZonedDateTime._from(temporal, zone);\n if(zdt != null) return zdt;\n }\n const ldt = LocalDateTime.from(temporal);\n return ZonedDateTime.of2(ldt, zone);\n }\n\n static _from(temporal, zone){\n try {\n return ZonedDateTime.__from(temporal, zone);\n } catch (ex) {\n if(!(ex instanceof DateTimeException)) throw ex;\n // ignore\n }\n }\n\n static __from(temporal, zone){\n const epochSecond = temporal.getLong(ChronoField.INSTANT_SECONDS);\n const nanoOfSecond = temporal.get(ChronoField.NANO_OF_SECOND);\n return ZonedDateTime._create(epochSecond, nanoOfSecond, zone);\n }\n\n //-----------------------------------------------------------------------\n /**\n * Obtains an instance of {@link ZonedDateTime} from a text string such as\n * `2007-12-03T10:15:30+01:00[Europe/Paris]`.\n *\n * The string must represent a valid date-time and is parsed using\n * {@link org.threeten.bp.format.DateTimeFormatter#ISO_ZONED_DATE_TIME}.\n *\n * @param {!string} text - the text to parse such as '2007-12-03T10:15:30+01:00[Europe/Paris]', not null\n * @param {!DateTimeFormatter} [formatter=DateTimeFormatter.ISO_ZONED_DATE_TIME] - the formatter to use\n * @return {ZonedDateTime} the parsed zoned date-time, not null\n * @throws DateTimeParseException if the text cannot be parsed\n */\n static parse(text, formatter = DateTimeFormatter.ISO_ZONED_DATE_TIME) {\n requireNonNull(formatter, '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, offset)) {\n return new ZonedDateTime(this._dateTime, offset, this._zone);\n }\n return this;\n }\n\n //-----------------------------------------------------------------------\n /**\n * Checks if the specified field is supported.\n *\n * This checks if this date-time can be queried for the specified field.\n * If false, then calling {@link range} and {@link get} will throw an exception.\n *\n * If the field is a {@link ChronoField} then the query is implemented here.\n * The supported fields are:\n *\n * * {@link NANO_OF_SECOND}\n * * {@link NANO_OF_DAY}\n * * {@link MICRO_OF_SECOND}\n * * {@link MICRO_OF_DAY}\n * * {@link MILLI_OF_SECOND}\n * * {@link MILLI_OF_DAY}\n * * {@link SECOND_OF_MINUTE}\n * * {@link SECOND_OF_DAY}\n * * {@link MINUTE_OF_HOUR}\n * * {@link MINUTE_OF_DAY}\n * * {@link HOUR_OF_AMPM}\n * * {@link CLOCK_HOUR_OF_AMPM}\n * * {@link HOUR_OF_DAY}\n * * {@link CLOCK_HOUR_OF_DAY}\n * * {@link AMPM_OF_DAY}\n * * {@link DAY_OF_WEEK}\n * * {@link ALIGNED_DAY_OF_WEEK_IN_MONTH}\n * * {@link ALIGNED_DAY_OF_WEEK_IN_YEAR}\n * * {@link DAY_OF_MONTH}\n * * {@link DAY_OF_YEAR}\n * * {@link EPOCH_DAY}\n * * {@link ALIGNED_WEEK_OF_MONTH}\n * * {@link ALIGNED_WEEK_OF_YEAR}\n * * {@link MONTH_OF_YEAR}\n * * {@link EPOCH_MONTH}\n * * {@link YEAR_OF_ERA}\n * * {@link YEAR}\n * * {@link ERA}\n * * {@link INSTANT_SECONDS}\n * * {@link OFFSET_SECONDS}\n *\n * All other {@link ChronoField} instances will return false.\n *\n * If the field is not a {@link ChronoField}, then the result of this method\n * is obtained by invoking {@link TemporalField.isSupportedBy}\n * passing `this` as the argument.\n * Whether the field is supported is determined by the field.\n *\n * @param {TemporalField|TemporalUnit} fieldOrUnit - the field to check, null returns false\n * @return {boolean} true if the field is supported on this date-time, false if not\n */\n isSupported(fieldOrUnit) {\n if(fieldOrUnit instanceof ChronoField){\n return true;\n } else if (fieldOrUnit instanceof ChronoUnit) {\n return fieldOrUnit.isDateBased() || fieldOrUnit.isTimeBased();\n }\n return (fieldOrUnit != null && fieldOrUnit.isSupportedBy(this));\n }\n\n\n /**\n * Gets the range of valid values for the specified field.\n *\n * The range object expresses the minimum and maximum valid values for a field.\n * This date-time is used to enhance the accuracy of the returned range.\n * If it is not possible to return the range, because the field is not supported\n * or for some other reason, an exception is thrown.\n *\n * If the field is a {@link ChronoField} then the query is implemented here.\n * The supported fields (see {@link isSupported}) will return\n * appropriate range instances.\n * All other {@link ChronoField} instances will throw a {@link DateTimeException}.\n *\n * If the field is not a {@link ChronoField}, then the result of this method\n * is obtained by invoking {@link TemporalField.rangeRefinedBy}\n * passing `this` as the argument.\n * Whether the range can be obtained is determined by the field.\n *\n * @param {TemporalField} field - the field to query the range for, not null\n * @return {ValueRange} the range of valid values for the field, not null\n * @throws DateTimeException if the range for the field cannot be obtained\n */\n range(field) {\n if (field instanceof ChronoField) {\n if (field === ChronoField.INSTANT_SECONDS || field === ChronoField.OFFSET_SECONDS) {\n return field.range();\n }\n return this._dateTime.range(field);\n }\n return field.rangeRefinedBy(this);\n }\n\n /**\n * Gets the value of the specified field from this date-time as an `int`.\n *\n * This queries this date-time for the value for the specified field.\n * The returned value will always be within the valid range of values for the field.\n * If it is not possible to return the value, because the field is not supported\n * or for some other reason, an exception is thrown.\n *\n * If the field is a {@link ChronoField} then the query is implemented here.\n * The supported fields (see {@link isSupported}) will return valid\n * values based on this date-time, except {@link NANO_OF_DAY}, {@link MICRO_OF_DAY},\n * {@link EPOCH_DAY}, {@link EPOCH_MONTH} and {@link INSTANT_SECONDS} which are too\n * large to fit in an `int` and throw a {@link DateTimeException}.\n * All other {@link ChronoField} instances will throw a {@link DateTimeException}.\n *\n * If the field is not a {@link ChronoField}, then the result of this method\n * is obtained by invoking {@link TemporalField.getFrom}\n * passing `this` as the argument. Whether the value can be obtained,\n * and what the value represents, is determined by the field.\n *\n * @param {!TemporalField} field - the field to get, not null\n * @return {number} the value for the field\n * @throws DateTimeException if a value for the field cannot be obtained\n * @throws ArithmeticException if numeric overflow occurs\n */\n get(field) {\n return this.getLong(field);\n }\n\n /**\n * Gets the value of the specified field from this date-time as a `long`.\n *\n * This queries this date-time for the value for the specified field.\n * If it is not possible to return the value, because the field is not supported\n * or for some other reason, an exception is thrown.\n *\n * If the field is a {@link ChronoField} then the query is implemented here.\n * The supported fields (see {@link isSupported}) will return valid\n * values based on this date-time.\n * All other {@link ChronoField} instances will throw a {@link DateTimeException}.\n *\n * If the field is not a {@link ChronoField}, then the result of this method\n * is obtained by invoking {@link TemporalField.getFrom}\n * passing `this` as the argument. Whether the value can be obtained,\n * and what the value represents, is determined by the field.\n *\n * @param {!TemporalField} field the field to get, not null\n * @return {number} the value for the field\n * @throws DateTimeException if a value for the field cannot be obtained\n * @throws ArithmeticException if numeric overflow occurs\n */\n getLong(field) {\n if (field instanceof ChronoField) {\n switch (field) {\n case ChronoField.INSTANT_SECONDS: return this.toEpochSecond();\n case ChronoField.OFFSET_SECONDS: return this._offset.totalSeconds();\n }\n return this._dateTime.getLong(field);\n }\n requireNonNull(field, 'field');\n return field.getFrom(this);\n }\n\n //-----------------------------------------------------------------------\n /**\n * Gets the zone offset, such as '+01:00'.\n *\n * This is the offset of the local date-time from UTC/Greenwich.\n *\n * @return {ZoneOffset}the zone offset, not null\n */\n offset() {\n return this._offset;\n }\n\n /**\n * Returns a copy of this date-time changing the zone offset to the\n * earlier of the two valid offsets at a local time-line overlap.\n *\n * This method only has any effect when the local time-line overlaps, such as\n * at an autumn daylight savings cutover. In this scenario, there are two\n * valid offsets for the local date-time. Calling this method will return\n * a zoned date-time with the earlier of the two selected.\n *\n * If this method is called when it is not an overlap, `this`\n * is returned.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @return {ZonedDateTime} a {@link ZonedDateTime} based on this date-time with the earlier offset, not null\n */\n withEarlierOffsetAtOverlap() {\n const trans = this._zone.rules().transition(this._dateTime);\n if (trans != null && trans.isOverlap()) {\n const earlierOffset = trans.offsetBefore();\n if (earlierOffset.equals(this._offset) === false) {\n return new ZonedDateTime(this._dateTime, earlierOffset, this._zone);\n }\n }\n return this;\n }\n\n /**\n * Returns a copy of this date-time changing the zone offset to the\n * later of the two valid offsets at a local time-line overlap.\n *\n * This method only has any effect when the local time-line overlaps, such as\n * at an autumn daylight savings cutover. In this scenario, there are two\n * valid offsets for the local date-time. Calling this method will return\n * a zoned date-time with the later of the two selected.\n *\n * If this method is called when it is not an overlap, `this`\n * is returned.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @return {ZonedDateTime} a {@link ZonedDateTime} based on this date-time with the later offset, not null\n */\n withLaterOffsetAtOverlap() {\n const trans = this._zone.rules().transition(this.toLocalDateTime());\n if (trans != null) {\n const laterOffset = trans.offsetAfter();\n if (laterOffset.equals(this._offset) === false) {\n return new ZonedDateTime(this._dateTime, laterOffset, this._zone);\n }\n }\n return this;\n }\n\n //-----------------------------------------------------------------------\n /**\n * Gets the time-zone, such as 'Europe/Paris'.\n *\n * This returns the zone ID. This identifies the time-zone {@link ZoneRules}\n * that determine when and how the offset from UTC/Greenwich changes.\n *\n * The zone ID may be same as the offset (see {@link getOffset}).\n * If this is true, then any future calculations, such as addition or subtraction,\n * have no complex edge cases due to time-zone rules.\n * See also {@link withFixedOffsetZone}.\n *\n * @return {ZoneId} the time-zone, not null\n */\n zone() {\n return this._zone;\n }\n\n /**\n * Returns a copy of this date-time with a different time-zone,\n * retaining the local date-time if possible.\n *\n * This method changes the time-zone and retains the local date-time.\n * The local date-time is only changed if it is invalid for the new zone,\n * determined using the same approach as\n * {@link ofLocal}.\n *\n * To change the zone and adjust the local date-time,\n * use {@link withZoneSameInstant}.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {ZoneId} zone - the time-zone to change to, not null\n * @return {ZonedDateTime} a {@link ZonedDateTime} based on this date-time with the requested zone, not null\n */\n withZoneSameLocal(zone) {\n requireNonNull(zone, 'zone');\n return this._zone.equals(zone) ? this : ZonedDateTime.ofLocal(this._dateTime, zone, this._offset);\n }\n\n /**\n * Returns a copy of this date-time with a different time-zone,\n * retaining the instant.\n *\n * This method changes the time-zone and retains the instant.\n * This normally results in a change to the local date-time.\n *\n * This method is based on retaining the same instant, thus gaps and overlaps\n * in the local time-line have no effect on the result.\n *\n * To change the offset while keeping the local time,\n * use {@link withZoneSameLocal}.\n *\n * @param {ZoneId} zone - the time-zone to change to, not null\n * @return {ZonedDateTime} a {@link ZonedDateTime} based on this date-time with the requested zone, not null\n * @throws DateTimeException if the result exceeds the supported date range\n */\n withZoneSameInstant(zone) {\n requireNonNull(zone, 'zone');\n return this._zone.equals(zone) ? this :\n ZonedDateTime._create(this._dateTime.toEpochSecond(this._offset), this._dateTime.nano(), zone);\n }\n\n /**\n * Returns a copy of this date-time with the zone ID set to the offset.\n *\n * This returns a zoned date-time where the zone ID is the same as {@link getOffset}.\n * The local date-time, offset and instant of the result will be the same as in this date-time.\n *\n * Setting the date-time to a fixed single offset means that any future\n * calculations, such as addition or subtraction, have no complex edge cases\n * due to time-zone rules.\n * This might also be useful when sending a zoned date-time across a network,\n * as most protocols, such as ISO-8601, only handle offsets,\n * and not region-based zone IDs.\n *\n * This is equivalent to {@link ZonedDateTime.of}.\n *\n * @return {ZonedDateTime} a {@link ZonedDateTime} with the zone ID set to the offset, not null\n */\n withFixedOffsetZone() {\n return this._zone.equals(this._offset) ? this : new ZonedDateTime(this._dateTime, this._offset, this._offset);\n }\n\n //-----------------------------------------------------------------------\n /**\n * Gets the year field.\n *\n * This method returns the primitive `int` value for the year.\n *\n * The year returned by this method is proleptic as per {@link get}.\n * To obtain the year-of-era, use `get(YEAR_OF_ERA)`.\n *\n * @return {number} the year, from MIN_YEAR to MAX_YEAR\n */\n year() {\n return this._dateTime.year();\n }\n\n /**\n * Gets the month-of-year field from 1 to 12.\n *\n * This method returns the month as an `int` from 1 to 12.\n * Application code is frequently clearer if the enum {@link Month}\n * is used by calling {@link getMonth}.\n *\n * @return {number} the month-of-year, from 1 to 12\n * @see #month()\n */\n monthValue() {\n return this._dateTime.monthValue();\n }\n\n /**\n * Gets the month-of-year field using the {@link Month} enum.\n *\n * This method returns the enum {@link Month} for the month.\n * This avoids confusion as to what `int` values mean.\n * If you need access to the primitive `int` value, use {@link Month#getValue}.\n *\n * @return {Month} the month-of-year, not null\n * @see #getMonthValue()\n */\n month() {\n return this._dateTime.month();\n }\n\n /**\n * Gets the day-of-month field.\n *\n * This method returns the primitive `int` value for the day-of-month.\n *\n * @return {number} the day-of-month, from 1 to 31\n */\n dayOfMonth() {\n return this._dateTime.dayOfMonth();\n }\n\n /**\n * Gets the day-of-year field.\n *\n * This method returns the primitive `int` value for the day-of-year.\n *\n * @return {number} the day-of-year, from 1 to 365, or 366 in a leap year\n */\n dayOfYear() {\n return this._dateTime.dayOfYear();\n }\n\n /**\n * Gets the day-of-week field, which is an enum {@link DayOfWeek}.\n *\n * This method returns the enum {@link DayOfWeek} for the day-of-week.\n * This avoids confusion as to what `int` values mean.\n * If you need access to the primitive `int` value, use {@link DayOfWeek#getValue}.\n *\n * Additional information can be obtained from the {@link DayOfWeek}.\n * This includes textual names of the values.\n *\n * @return {DayOfWeek} the day-of-week, not null\n */\n dayOfWeek() {\n return this._dateTime.dayOfWeek();\n }\n\n //-----------------------------------------------------------------------\n /**\n * Gets the hour-of-day field.\n *\n * @return {number} the hour-of-day, from 0 to 23\n */\n hour() {\n return this._dateTime.hour();\n }\n\n /**\n * Gets the minute-of-hour field.\n *\n * @return {number} the minute-of-hour, from 0 to 59\n */\n minute() {\n return this._dateTime.minute();\n }\n\n /**\n * Gets the second-of-minute field.\n *\n * @return {number} the second-of-minute, from 0 to 59\n */\n second() {\n return this._dateTime.second();\n }\n\n /**\n * Gets the nano-of-second field.\n *\n * @return {number} the nano-of-second, from 0 to 999,999,999\n */\n nano() {\n return this._dateTime.nano();\n }\n\n //-----------------------------------------------------------------------\n /**\n * 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 {@link ZonedDateTime}, based on this one, with the date-time adjusted.\n * The adjustment takes place using the specified adjuster strategy object.\n * Read the documentation of the adjuster to understand what adjustment will be made.\n *\n * A simple adjuster might simply set the one of the fields, such as the year field.\n * A more complex adjuster might set the date to the last day of the month.\n * A selection of common adjustments is provided in {@link TemporalAdjusters}.\n * These include finding the 'last day of the month' and 'next Wednesday'.\n * Key date-time classes also implement the {@link TemporalAdjuster} interface,\n * such as {@link Month} and {@link MonthDay}.\n * The adjuster is responsible for handling special cases, such as the varying\n * lengths of month and leap years.\n *\n * For example this code returns a date on the last day of July:\n *
\n * import static org.threeten.bp.Month.*;\n * import static org.threeten.bp.temporal.Adjusters.*;\n *\n * result = zonedDateTime.with(JULY).with(lastDayOfMonth());\n *\n *\n * The classes {@link LocalDate} and {@link LocalTime} implement {@link TemporalAdjuster},\n * thus this method can be used to change the date, time or offset:\n *
\n * result = zonedDateTime.with(date);\n * result = zonedDateTime.with(time);\n *\n *\n * {@link ZoneOffset} also implements {@link TemporalAdjuster} however it is less likely\n * that setting the offset will have the effect you expect. When an offset is passed in,\n * the local date-time is combined with the new offset to form an {@link Instant}.\n * The instant and original zone are then used to create the result.\n * This algorithm means that it is quite likely that the output has a different offset\n * to the specified offset. It will however work correctly when passing in the offset\n * applicable for the instant of the zoned date-time, and will work correctly if passing\n * one of the two valid offsets during a daylight savings overlap when the same local time\n * occurs twice.\n *\n * The result of this method is obtained by invoking the\n * {@link TemporalAdjuster#adjustInto} method on the\n * specified adjuster passing `this` as the argument.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {TemporalAdjuster} adjuster - the adjuster to use, not null\n * @return {ZonedDateTime} a {@link ZonedDateTime} based on `this` with the adjustment made, not null\n * @throws DateTimeException if the adjustment cannot be made\n * @throws ArithmeticException if numeric overflow occurs\n */\n 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 const instant = adjuster;\n return ZonedDateTime._create(instant.epochSecond(), instant.nano(), this._zone);\n } else if (adjuster instanceof ZoneOffset) {\n return this._resolveOffset(adjuster);\n }\n 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 {@link ZonedDateTime}, based on this one, with the value\n * for the specified field changed.\n * This can be used to change any supported field, such as the year, month or day-of-month.\n * If it is not possible to set the value, because the field is not supported or for\n * some other reason, an exception is thrown.\n *\n * In some cases, changing the specified field can cause the resulting date-time to become invalid,\n * such as changing the month from 31st January to February would make the day-of-month invalid.\n * In cases like this, the field is responsible for resolving the date. Typically it will choose\n * the previous valid date, which would be the last valid day of February in this example.\n *\n * If the field is a {@link ChronoField} then the adjustment is implemented here.\n *\n * The {@link INSTANT_SECONDS} field will return a date-time with the specified instant.\n * The zone and nano-of-second are unchanged.\n * The result will have an offset derived from the new instant and original zone.\n * If the new instant value is outside the valid range then a {@link DateTimeException} will be thrown.\n *\n * The {@link OFFSET_SECONDS} field will typically be ignored.\n * The offset of a {@link ZonedDateTime} is controlled primarily by the time-zone.\n * As such, changing the offset does not generally make sense, because there is only\n * one valid offset for the local date-time and zone.\n * If the zoned date-time is in a daylight savings overlap, then the offset is used\n * to switch between the two valid offsets. In all other cases, the offset is ignored.\n * If the new offset value is outside the valid range then a {@link DateTimeException} will be thrown.\n *\n * The other supported fields (see {@link isSupported}) will behave as in {@link LocalDateTime#with}.\n * The zone is not part of the calculation and will be unchanged.\n * When converting back to {@link ZonedDateTime}, if the local date-time is in an overlap,\n * then the offset will be retained if possible, otherwise the earlier offset will be used.\n * If in a gap, the local date-time will be adjusted forward by the length of the gap.\n *\n * All other {@link ChronoField} instances will throw an {@link UnsupportedTemporalTypeException}.\n *\n * If the field is not a {@link ChronoField}, then the result of this method\n * is obtained by invoking {@link TemporalField.adjustInto}\n * passing `this` as the argument. In this case, the field determines\n * whether and how to adjust the instant.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {TemporalField} field - the field to set in the result, not null\n * @param {number} newValue - the new value of the field in the result\n * @return {ZonedDateTime} a {@link ZonedDateTime} based on `this` with the specified field set, not null\n * @throws DateTimeException if the field cannot be set\n * @throws UnsupportedTemporalTypeException if the field is not supported\n * @throws ArithmeticException if numeric overflow occurs\n */\n 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 const offset = ZoneOffset.ofTotalSeconds(field.checkValidIntValue(newValue));\n return this._resolveOffset(offset);\n }\n }\n return this._resolveLocal(this._dateTime.with(field, newValue));\n }\n return field.adjustInto(this, newValue);\n }\n\n //-----------------------------------------------------------------------\n /**\n * Returns a copy of this {@link ZonedDateTime} with the year value altered.\n *\n * This operates on the local time-line,\n * changing the year (see {@link LocalDateTime#withYear}) of the local date-time.\n * This is then converted back to a {@link ZonedDateTime}, using the zone ID\n * to obtain the offset.\n *\n * When converting back to {@link ZonedDateTime}, if the local date-time is in an overlap,\n * then the offset will be retained if possible, otherwise the earlier offset will be used.\n * If in a gap, the local date-time will be adjusted forward by the length of the gap.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {number} year - the year to set in the result, from MIN_YEAR to MAX_YEAR\n * @return {ZonedDateTime} a {@link ZonedDateTime} based on this date-time with the requested year, not null\n * @throws DateTimeException if the year value is invalid\n */\n withYear(year) {\n return this._resolveLocal(this._dateTime.withYear(year));\n }\n\n /**\n * Returns a copy of this {@link ZonedDateTime} with the month-of-year value altered.\n *\n * This operates on the local time-line,\n * changing the month (see {@link LocalDateTime#withMonth}) of the local date-time.\n * This is then converted back to a {@link ZonedDateTime}, using the zone ID\n * to obtain the offset.\n *\n * When converting back to {@link ZonedDateTime}, if the local date-time is in an overlap,\n * then the offset will be retained if possible, otherwise the earlier offset will be used.\n * If in a gap, the local date-time will be adjusted forward by the length of the gap.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {number} month - the month-of-year to set in the result, from 1 (January) to 12 (December)\n * @return {ZonedDateTime} a {@link ZonedDateTime} based on this date-time with the requested month, not null\n * @throws DateTimeException if the month-of-year value is invalid\n */\n withMonth(month) {\n return this._resolveLocal(this._dateTime.withMonth(month));\n }\n\n /**\n * Returns a copy of this {@link ZonedDateTime} with the day-of-month value altered.\n *\n * This operates on the local time-line,\n * changing the day-of-month (see {@link LocalDateTime#withDayOfMonth}) of the local date-time.\n * This is then converted back to a {@link ZonedDateTime}, using the zone ID\n * to obtain the offset.\n *\n * When converting back to {@link ZonedDateTime}, if the local date-time is in an overlap,\n * then the offset will be retained if possible, otherwise the earlier offset will be used.\n * If in a gap, the local date-time will be adjusted forward by the length of the gap.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {number} dayOfMonth - the day-of-month to set in the result, from 1 to 28-31\n * @return {ZonedDateTime} a {@link ZonedDateTime} based on this date-time with the requested day, not null\n * @throws DateTimeException if the day-of-month value is invalid\n * @throws DateTimeException if the day-of-month is invalid for the month-year\n */\n withDayOfMonth(dayOfMonth) {\n return this._resolveLocal(this._dateTime.withDayOfMonth(dayOfMonth));\n }\n\n /**\n * Returns a copy of this {@link ZonedDateTime} with the day-of-year altered.\n *\n * This operates on the local time-line,\n * changing the day-of-year (see {@link LocalDateTime#withDayOfYear}) of the local date-time.\n * This is then converted back to a {@link ZonedDateTime}, using the zone ID\n * to obtain the offset.\n *\n * When converting back to {@link ZonedDateTime}, if the local date-time is in an overlap,\n * then the offset will be retained if possible, otherwise the earlier offset will be used.\n * If in a gap, the local date-time will be adjusted forward by the length of the gap.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {number} dayOfYear - the day-of-year to set in the result, from 1 to 365-366\n * @return {ZonedDateTime} a {@link ZonedDateTime} based on this date with the requested day, not null\n * @throws DateTimeException if the day-of-year value is invalid\n * @throws DateTimeException if the day-of-year is invalid for the year\n */\n withDayOfYear(dayOfYear) {\n return this._resolveLocal(this._dateTime.withDayOfYear(dayOfYear));\n }\n\n //-----------------------------------------------------------------------\n /**\n * Returns a copy of this {@link ZonedDateTime} with the hour-of-day value altered.\n *\n * This operates on the local time-line,\n * changing the time (see {@link LocalDateTime#withHour}) of the local date-time.\n * This is then converted back to a {@link ZonedDateTime}, using the zone ID\n * to obtain the offset.\n *\n * When converting back to {@link ZonedDateTime}, if the local date-time is in an overlap,\n * then the offset will be retained if possible, otherwise the earlier offset will be used.\n * If in a gap, the local date-time will be adjusted forward by the length of the gap.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {number} hour - the hour-of-day to set in the result, from 0 to 23\n * @return {ZonedDateTime} a {@link ZonedDateTime} based on this date-time with the requested hour, not null\n * @throws DateTimeException if the hour value is invalid\n */\n withHour(hour) {\n return this._resolveLocal(this._dateTime.withHour(hour));\n }\n\n /**\n * Returns a copy of this {@link ZonedDateTime} with the minute-of-hour value altered.\n *\n * This operates on the local time-line,\n * changing the time (see {@link LocalDateTime#withMinute}) of the local date-time.\n * This is then converted back to a {@link ZonedDateTime}, using the zone ID\n * to obtain the offset.\n *\n * When converting back to {@link ZonedDateTime}, if the local date-time is in an overlap,\n * then the offset will be retained if possible, otherwise the earlier offset will be used.\n * If in a gap, the local date-time will be adjusted forward by the length of the gap.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {number} minute - the minute-of-hour to set in the result, from 0 to 59\n * @return {ZonedDateTime} a {@link ZonedDateTime} based on this date-time with the requested minute, not null\n * @throws DateTimeException if the minute value is invalid\n */\n withMinute(minute) {\n return this._resolveLocal(this._dateTime.withMinute(minute));\n }\n\n /**\n * Returns a copy of this {@link ZonedDateTime} with the second-of-minute value altered.\n *\n * This operates on the local time-line,\n * changing the time (see {@link LocalDateTime#withSecond}) of the local date-time.\n * This is then converted back to a {@link ZonedDateTime}, using the zone ID\n * to obtain the offset.\n *\n * When converting back to {@link ZonedDateTime}, if the local date-time is in an overlap,\n * then the offset will be retained if possible, otherwise the earlier offset will be used.\n * If in a gap, the local date-time will be adjusted forward by the length of the gap.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {number} second - the second-of-minute to set in the result, from 0 to 59\n * @return {ZonedDateTime} a {@link ZonedDateTime} based on this date-time with the requested second, not null\n * @throws DateTimeException if the second value is invalid\n */\n withSecond(second) {\n return this._resolveLocal(this._dateTime.withSecond(second));\n }\n\n /**\n * Returns a copy of this {@link ZonedDateTime} with the nano-of-second value altered.\n *\n * This operates on the local time-line,\n * changing the time (see {@link LocalDateTime#withNano}) of the local date-time.\n * This is then converted back to a {@link ZonedDateTime}, using the zone ID\n * to obtain the offset.\n *\n * When converting back to {@link ZonedDateTime}, if the local date-time is in an overlap,\n * then the offset will be retained if possible, otherwise the earlier offset will be used.\n * If in a gap, the local date-time will be adjusted forward by the length of the gap.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {number} nanoOfSecond - the nano-of-second to set in the result, from 0 to 999,999,999\n * @return {ZonedDateTime} a {@link ZonedDateTime} based on this date-time with the requested nanosecond, not null\n * @throws DateTimeException if the nano value is invalid\n */\n withNano(nanoOfSecond) {\n return this._resolveLocal(this._dateTime.withNano(nanoOfSecond));\n }\n\n //-----------------------------------------------------------------------\n /**\n * Returns a copy of this {@link ZonedDateTime} with the time truncated.\n *\n * Truncation returns a copy of the original date-time with fields\n * smaller than the specified unit set to zero.\n * For example, truncating with {@link ChronoUnit#MINUTES}\n * will set the second-of-minute and nano-of-second field to zero.\n *\n * The unit must have a duration (see {@link TemporalUnit#getDuration})\n * that divides into the length of a standard day without remainder.\n * This includes all supplied time units on {@link ChronoUnit} and\n * {@link ChronoUnit#DAYS}. Other units throw an exception.\n *\n * This operates on the local time-line, truncating the underlying local date-time.\n * This is then converted back to a {@link ZonedDateTime}, using the zone ID to obtain the offset.\n *\n * When converting back to {@link ZonedDateTime}, if the local date-time is in an overlap,\n * then the offset will be retained if possible, otherwise the earlier offset will be used.\n * If in a gap, the local date-time will be adjusted forward by the length of the gap.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {TemporalUnit} unit - the unit to truncate to, not null\n * @return {ZonedDateTime} a {@link ZonedDateTime} based on this date-time with the time truncated, not null\n * @throws DateTimeException if unable to truncate\n */\n truncatedTo(unit) {\n return this._resolveLocal(this._dateTime.truncatedTo(unit));\n }\n\n //-----------------------------------------------------------------------\n /**\n * 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}.\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 {@link 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}\n * with the offset before the addition.\n *\n * Time units operate on the instant time-line.\n * The period is first added to the local date-time, then converted back to\n * a zoned date-time using the zone ID.\n * The conversion uses {@link ofInstant}\n * with the offset before the addition.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {number} amountToAdd - the amount of the unit to add to the result, may be negative\n * @param {TemporalUnit} unit - the unit of the period to add, not null\n * @return {ZonedDateTime} a {@link ZonedDateTime} based on this date-time with the specified period added, not null\n * @throws DateTimeException if the unit cannot be added to this type\n */\n 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 {@link ZonedDateTime} with the specified period in years added.\n *\n * This operates on the local time-line, adding years to the local date-time.\n * This is then converted back to a {@link ZonedDateTime}, using the zone ID\n * to obtain the offset.\n *\n * When converting back to {@link ZonedDateTime}, if the local date-time is in an overlap,\n * then the offset will be retained if possible, otherwise the earlier offset will be used.\n * If in a gap, the local date-time will be adjusted forward by the length of the gap.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {number} years - the years to add, may be negative\n * @return {ZonedDateTime} a {@link ZonedDateTime} based on this date-time with the years added, not null\n * @throws DateTimeException if the result exceeds the supported date range\n */\n plusYears(years) {\n return this._resolveLocal(this._dateTime.plusYears(years));\n }\n\n /**\n * Returns a copy of this {@link ZonedDateTime} with the specified period in months added.\n *\n * This operates on the local time-line, adding months to the local date-time.\n * This is then converted back to a {@link ZonedDateTime}, using the zone ID\n * to obtain the offset.\n *\n * When converting back to {@link ZonedDateTime}, if the local date-time is in an overlap,\n * then the offset will be retained if possible, otherwise the earlier offset will be used.\n * If in a gap, the local date-time will be adjusted forward by the length of the gap.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {number} months - the months to add, may be negative\n * @return {ZonedDateTime} a {@link ZonedDateTime} based on this date-time with the months added, not null\n * @throws DateTimeException if the result exceeds the supported date range\n */\n plusMonths(months) {\n return this._resolveLocal(this._dateTime.plusMonths(months));\n }\n\n /**\n * Returns a copy of this {@link ZonedDateTime} with the specified period in weeks added.\n *\n * This operates on the local time-line, adding weeks to the local date-time.\n * This is then converted back to a {@link ZonedDateTime}, using the zone ID\n * to obtain the offset.\n *\n * When converting back to {@link ZonedDateTime}, if the local date-time is in an overlap,\n * then the offset will be retained if possible, otherwise the earlier offset will be used.\n * If in a gap, the local date-time will be adjusted forward by the length of the gap.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {number} weeks - the weeks to add, may be negative\n * @return {ZonedDateTime}a {@link ZonedDateTime} based on this date-time with the weeks added, not null\n * @throws DateTimeException if the result exceeds the supported date range\n */\n plusWeeks(weeks) {\n return this._resolveLocal(this._dateTime.plusWeeks(weeks));\n }\n\n /**\n * Returns a copy of this {@link ZonedDateTime} with the specified period in days added.\n *\n * This operates on the local time-line, adding days to the local date-time.\n * This is then converted back to a {@link ZonedDateTime}, using the zone ID\n * to obtain the offset.\n *\n * When converting back to {@link ZonedDateTime}, if the local date-time is in an overlap,\n * then the offset will be retained if possible, otherwise the earlier offset will be used.\n * If in a gap, the local date-time will be adjusted forward by the length of the gap.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {number} days - the days to add, may be negative\n * @return {ZonedDateTime}a {@link ZonedDateTime} based on this date-time with the days added, not null\n * @throws DateTimeException if the result exceeds the supported date range\n */\n plusDays(days) {\n return this._resolveLocal(this._dateTime.plusDays(days));\n }\n\n //-----------------------------------------------------------------------\n /**\n * Returns a copy of this {@link ZonedDateTime} with the specified period in hours added.\n *\n * This operates on the instant time-line, such that adding one hour will\n * always be a duration of one hour later.\n * This may cause the local date-time to change by an amount other than one hour.\n * Note that this is a different approach to that used by days, months and years,\n * thus adding one day is not the same as adding 24 hours.\n *\n * For example, consider a time-zone where the spring DST cutover means that the\n * local times 01:00 to 01:59 occur twice changing from offset +02:00 to +01:00.\n *\n * * Adding one hour to 00:30+02:00 will result in 01:30+02:00\n * * Adding one hour to 01:30+02:00 will result in 01:30+01:00\n * * Adding one hour to 01:30+01:00 will result in 02:30+01:00\n * * Adding three hours to 00:30+02:00 will result in 02:30+01:00\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {number} hours - the hours to add, may be negative\n * @return {ZonedDateTime} a {@link ZonedDateTime} based on this date-time with the hours added, not null\n * @throws DateTimeException if the result exceeds the supported date range\n */\n plusHours(hours) {\n return this._resolveInstant(this._dateTime.plusHours(hours));\n }\n\n /**\n * Returns a copy of this {@link ZonedDateTime} with the specified period in minutes added.\n *\n * This operates on the instant time-line, such that adding one minute will\n * always be a duration of one minute later.\n * This may cause the local date-time to change by an amount other than one minute.\n * Note that this is a different approach to that used by days, months and years.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {number} minutes - the minutes to add, may be negative\n * @return {ZonedDateTime} a {@link ZonedDateTime} based on this date-time with the minutes added, not null\n * @throws DateTimeException if the result exceeds the supported date range\n */\n plusMinutes(minutes) {\n return this._resolveInstant(this._dateTime.plusMinutes(minutes));\n }\n\n /**\n * Returns a copy of this {@link ZonedDateTime} with the specified period in seconds added.\n *\n * This operates on the instant time-line, such that adding one second will\n * always be a duration of one second later.\n * This may cause the local date-time to change by an amount other than one second.\n * Note that this is a different approach to that used by days, months and years.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {number} seconds - the seconds to add, may be negative\n * @return {ZonedDateTime} a {@link ZonedDateTime} based on this date-time with the seconds added, not null\n * @throws DateTimeException if the result exceeds the supported date range\n */\n plusSeconds(seconds) {\n return this._resolveInstant(this._dateTime.plusSeconds(seconds));\n }\n\n /**\n * Returns a copy of this {@link ZonedDateTime} with the specified period in nanoseconds added.\n *\n * This operates on the instant time-line, such that adding one nano will\n * always be a duration of one nano later.\n * This may cause the local date-time to change by an amount other than one nano.\n * Note that this is a different approach to that used by days, months and years.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {number} nanos - the nanos to add, may be negative\n * @return {ZonedDateTime} a {@link ZonedDateTime} based on this date-time with the nanoseconds added, not null\n * @throws DateTimeException if the result exceeds the supported date range\n */\n plusNanos(nanos) {\n return this._resolveInstant(this._dateTime.plusNanos(nanos));\n }\n\n //-----------------------------------------------------------------------\n /**\n * 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}.\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 {@link 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}\n * with the offset before the subtraction.\n *\n * Time units operate on the instant time-line.\n * The period is first subtracted from the local date-time, then converted back to\n * a zoned date-time using the zone ID.\n * The conversion uses {@link ofInstant}\n * with the offset before the subtraction.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {number} amountToSubtract - the amount of the unit to subtract from the result, may be negative\n * @param {TemporalUnit} unit - the unit of the period to subtract, not null\n * @return {ZonedDateTime} a {@link ZonedDateTime} based on this date-time with the specified period subtracted, not null\n * @throws DateTimeException if the unit cannot be added to this type\n */\n minus2(amountToSubtract, unit) {\n return this.plus2(-1 * amountToSubtract, unit);\n }\n\n //-----------------------------------------------------------------------\n /**\n * Returns a copy of this {@link ZonedDateTime} with the specified period in years subtracted.\n *\n * This operates on the local time-line, subtracting years from the local date-time.\n * This is then converted back to a {@link ZonedDateTime}, using the zone ID\n * to obtain the offset.\n *\n * When converting back to {@link ZonedDateTime}, if the local date-time is in an overlap,\n * then the offset will be retained if possible, otherwise the earlier offset will be used.\n * If in a gap, the local date-time will be adjusted forward by the length of the gap.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {number} years - the years to subtract, may be negative\n * @return {ZonedDateTime} a {@link ZonedDateTime} based on this date-time with the years subtracted, not null\n * @throws DateTimeException if the result exceeds the supported date range\n */\n minusYears(years) {\n return this.plusYears(-1 * years);\n }\n\n /**\n * Returns a copy of this {@link ZonedDateTime} with the specified period in months subtracted.\n *\n * This operates on the local time-line, subtracting months from the local date-time.\n * This is then converted back to a {@link ZonedDateTime}, using the zone ID\n * to obtain the offset.\n *\n * When converting back to {@link ZonedDateTime}, if the local date-time is in an overlap,\n * then the offset will be retained if possible, otherwise the earlier offset will be used.\n * If in a gap, the local date-time will be adjusted forward by the length of the gap.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {number} months - the months to subtract, may be negative\n * @return {ZonedDateTime} a {@link ZonedDateTime} based on this date-time with the months subtracted, not null\n * @throws DateTimeException if the result exceeds the supported date range\n */\n minusMonths(months) {\n return this.plusMonths(-1 * months);\n }\n\n /**\n * Returns a copy of this {@link ZonedDateTime} with the specified period in weeks subtracted.\n *\n * This operates on the local time-line, subtracting weeks from the local date-time.\n * This is then converted back to a {@link ZonedDateTime}, using the zone ID\n * to obtain the offset.\n *\n * When converting back to {@link ZonedDateTime}, if the local date-time is in an overlap,\n * then the offset will be retained if possible, otherwise the earlier offset will be used.\n * If in a gap, the local date-time will be adjusted forward by the length of the gap.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {number} weeks - the weeks to subtract, may be negative\n * @return {ZonedDateTime} a {@link ZonedDateTime} based on this date-time with the weeks subtracted, not null\n * @throws DateTimeException if the result exceeds the supported date range\n */\n minusWeeks(weeks) {\n return this.plusWeeks(-1 * weeks);\n }\n\n /**\n * Returns a copy of this {@link ZonedDateTime} with the specified period in days subtracted.\n *\n * This operates on the local time-line, subtracting days from the local date-time.\n * This is then converted back to a {@link ZonedDateTime}, using the zone ID\n * to obtain the offset.\n *\n * When converting back to {@link ZonedDateTime}, if the local date-time is in an overlap,\n * then the offset will be retained if possible, otherwise the earlier offset will be used.\n * If in a gap, the local date-time will be adjusted forward by the length of the gap.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {number} days - the days to subtract, may be negative\n * @return {ZonedDateTime} a {@link ZonedDateTime} based on this date-time with the days subtracted, not null\n * @throws DateTimeException if the result exceeds the supported date range\n */\n minusDays(days) {\n return this.plusDays(-1 * days);\n }\n\n //-----------------------------------------------------------------------\n /**\n * Returns a copy of this {@link ZonedDateTime} with the specified period in hours subtracted.\n *\n * This operates on the instant time-line, such that subtracting one hour will\n * always be a duration of one hour earlier.\n * This may cause the local date-time to change by an amount other than one hour.\n * Note that this is a different approach to that used by days, months and years,\n * thus subtracting one day is not the same as adding 24 hours.\n *\n * For example, consider a time-zone where the spring DST cutover means that the\n * local times 01:00 to 01:59 occur twice changing from offset +02:00 to +01:00.\n *\n * * Subtracting one hour from 02:30+01:00 will result in 01:30+02:00\n * * Subtracting one hour from 01:30+01:00 will result in 01:30+02:00\n * * Subtracting one hour from 01:30+02:00 will result in 00:30+01:00\n * * Subtracting three hours from 02:30+01:00 will result in 00:30+02:00\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {number} hours - the hours to subtract, may be negative\n * @return {ZonedDateTime} a {@link ZonedDateTime} based on this date-time with the hours subtracted, not null\n * @throws DateTimeException if the result exceeds the supported date range\n */\n minusHours(hours) {\n return this.plusHours(-1 * hours);\n }\n\n /**\n * Returns a copy of this {@link ZonedDateTime} with the specified period in minutes subtracted.\n *\n * This operates on the instant time-line, such that subtracting one minute will\n * always be a duration of one minute earlier.\n * This may cause the local date-time to change by an amount other than one minute.\n * Note that this is a different approach to that used by days, months and years.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {number} minutes - the minutes to subtract, may be negative\n * @return {ZonedDateTime} a {@link ZonedDateTime} based on this date-time with the minutes subtracted, not null\n * @throws DateTimeException if the result exceeds the supported date range\n */\n minusMinutes(minutes) {\n return this.plusMinutes(-1 * minutes);\n }\n\n /**\n * Returns a copy of this {@link ZonedDateTime} with the specified period in seconds subtracted.\n *\n * This operates on the instant time-line, such that subtracting one second will\n * always be a duration of one second earlier.\n * This may cause the local date-time to change by an amount other than one second.\n * Note that this is a different approach to that used by days, months and years.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {number} seconds - the seconds to subtract, may be negative\n * @return {ZonedDateTime} a {@link ZonedDateTime} based on this date-time with the seconds subtracted, not null\n * @throws DateTimeException if the result exceeds the supported date range\n */\n minusSeconds(seconds) {\n return this.plusSeconds(-1 * seconds);\n }\n\n /**\n * Returns a copy of this {@link ZonedDateTime} with the specified period in nanoseconds subtracted.\n *\n * This operates on the instant time-line, such that subtracting one nano will\n * always be a duration of one nano earlier.\n * This may cause the local date-time to change by an amount other than one nano.\n * Note that this is a different approach to that used by days, months and years.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {number} nanos - the nanos to subtract, may be negative\n * @return {ZonedDateTime} a {@link ZonedDateTime} based on this date-time with the nanoseconds subtracted, not null\n * @throws DateTimeException if the result exceeds the supported date range\n */\n minusNanos(nanos) {\n return this.plusNanos(-1 * nanos);\n }\n\n //-----------------------------------------------------------------------\n /**\n * Queries this date-time using the specified query.\n *\n * This queries this date-time using the specified query strategy object.\n * The {@link TemporalQuery} object defines the logic to be used to\n * obtain the result. Read the documentation of the query to understand\n * what the result of this method will be.\n *\n * The result of this method is obtained by invoking the\n * {@link TemporalQuery#queryFrom} method on the\n * specified query passing `this` as the argument.\n *\n * @param {TemporalQuery} query - the query to invoke, not null\n * @return {*} the query result, null may be returned (defined by the query)\n * @throws DateTimeException if unable to query (defined by the query)\n * @throws ArithmeticException if numeric overflow occurs (defined by the query)\n */\n query(query) {\n if (query === TemporalQueries.localDate()) {\n return this.toLocalDate();\n }\n requireNonNull(query, 'query');\n return super.query(query);\n }\n\n /**\n * Calculates the period between this date-time and another date-time in\n * terms of the specified unit.\n *\n * This calculates the period between two date-times in terms of a single unit.\n * The start and end points are `this` and the specified date-time.\n * The result will be negative if the end is before the start.\n * For example, the period in days between two date-times can be calculated\n * using {@link startDateTime.until}.\n *\n * The {@link Temporal} passed to this method must be a {@link ZonedDateTime}.\n * If the time-zone differs between the two zoned date-times, the specified\n * end date-time is normalized to have the same zone as this date-time.\n *\n * The calculation returns a whole number, representing the number of\n * complete units between the two date-times.\n * For example, the period in months between 2012-06-15T00:00Z and 2012-08-14T23:59Z\n * will only be one month as it is one minute short of two months.\n *\n * This method operates in association with {@link TemporalUnit#between}.\n * The result of this method is a `long` representing the amount of\n * the specified unit. By contrast, the result of {@link between} is an\n * object that can be used directly in addition/subtraction:\n *
\n * long period = start.until(end, MONTHS); // this method\n * dateTime.plus(MONTHS.between(start, end)); // use in plus/minus\n *\n *\n * The calculation is implemented in this method for {@link ChronoUnit}.\n * The units {@link NANOS}, {@link MICROS}, {@link MILLIS}, {@link SECONDS},\n * {@link MINUTES}, {@link HOURS} and {@link HALF_DAYS}, {@link DAYS},\n * {@link WEEKS}, {@link MONTHS}, {@link YEARS}, {@link DECADES},\n * {@link CENTURIES}, {@link MILLENNIA} and {@link ERAS} are supported.\n * Other {@link ChronoUnit} values will throw an exception.\n *\n * The calculation for date and time units differ.\n *\n * Date units operate on the local time-line, using the local date-time.\n * For example, the period from noon on day 1 to noon the following day\n * in days will always be counted as exactly one day, irrespective of whether\n * there was a daylight savings change or not.\n *\n * Time units operate on the instant time-line.\n * The calculation effectively converts both zoned date-times to instants\n * and then calculates the period between the instants.\n * For example, the period from noon on day 1 to noon the following day\n * in hours may be 23, 24 or 25 hours (or some other amount) depending on\n * whether there was a daylight savings change or not.\n *\n * If the unit is not a {@link ChronoUnit}, then the result of this method\n * is obtained by invoking {@link TemporalUnit.between}\n * passing `this` as the first argument and the input temporal as\n * the second argument.\n *\n * This instance is immutable and unaffected by this method call.\n *\n * @param {Temporal} endExclusive the end date-time, which is converted to a {@link ZonedDateTime}, not null\n * @param {TemporalUnit} unit the unit to measure the period in, not null\n * @return {number} the amount of the period between this date-time and the end date-time\n * @throws DateTimeException if the period cannot be calculated\n * @throws ArithmeticException if numeric overflow occurs\n */\n until(endExclusive, unit) {\n let end = ZonedDateTime.from(endExclusive);\n if (unit instanceof ChronoUnit) {\n end = end.withZoneSameInstant(this._zone);\n if (unit.isDateBased()) {\n return this._dateTime.until(end._dateTime, unit);\n } else {\n let difference = this._offset.totalSeconds() - end._offset.totalSeconds();\n let adjustedEnd = end._dateTime.plusSeconds(difference);\n return this._dateTime.until(adjustedEnd, unit);\n }\n }\n return unit.between(this, end);\n }\n\n //-----------------------------------------------------------------------\n /**\n * Gets the {@link LocalDateTime} part of this date-time.\n *\n * This returns a {@link LocalDateTime} with the same year, month, day and time\n * as this date-time.\n *\n * @return {LocalDateTime} the local date-time part of this date-time, not null\n */\n toLocalDateTime() {\n return this._dateTime;\n }\n\n /**\n * Gets the {@link LocalDate} part of this date-time.\n *\n * This returns a {@link LocalDate} with the same year, month and day\n * as this date-time.\n *\n * @return {LocalDate} the date part of this date-time, not null\n */\n toLocalDate() {\n return this._dateTime.toLocalDate();\n }\n\n /**\n * Gets the {@link LocalTime} part of this date-time.\n *\n * This returns a {@link LocalTime} with the same hour, minute, second and\n * nanosecond as this date-time.\n *\n * @return {LocalTime} the time part of this date-time, not null\n */\n toLocalTime() {\n return this._dateTime.toLocalTime();\n }\n\n /**\n * Converts this date-time to an {@link OffsetDateTime}.\n *\n * This creates an offset date-time using the local date-time and offset.\n * The zone ID is ignored.\n *\n * @return {OffsetDateTime} an offset date-time representing the same local date-time and offset, not null\n */\n /**\n * we will not support OffsetDateTime in the near future\n toOffsetDateTime() {\n return OffsetDateTime.of(this._dateTime, this._offset);\n }\n */\n\n //-----------------------------------------------------------------------\n /**\n * Checks if this date-time is equal to another date-time.\n *\n * The comparison is based on the offset date-time and the zone.\n * Only objects of type {@link ZonedDateTime} are compared, other types return false.\n *\n * @param {*} other the object to check, null returns false\n * @return 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 let 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 string, such as\n * `2007-12-03T10:15:30+01:00[Europe/Paris]`.\n *\n * The format consists of the {@link LocalDateTime} followed by the {@link ZoneOffset}.\n * If the {@link ZoneId} is not the same as the offset, then the ID is output.\n * The output is compatible with ISO-8601 if the offset and ID are the same.\n *\n * @return {string} a string representation of this date-time, not null\n */\n toString() {\n let str = this._dateTime.toString() + this._offset.toString();\n if (this._offset !== this._zone) {\n str += '[' + this._zone.toString() + ']';\n }\n return str;\n }\n\n /**\n *\n * @return {string} same as {@link ZonedDateTime.toString}\n */\n toJSON() {\n return this.toString();\n }\n\n /**\n * Outputs this date-time as a string using the formatter.\n *\n * @param {DateTimeFormatter} formatter the formatter to use, not null\n * @return {string} the formatted date-time string, not null\n * @throws DateTimeException if an error occurs during printing\n */\n format(formatter) {\n return super.format(formatter);\n }\n\n}\n\nexport function _init(){\n ZonedDateTime.FROM = createTemporalQuery('ZonedDateTime.FROM', (temporal) => {\n return ZonedDateTime.from(temporal);\n });\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/ZonedDateTime.js","/*\n * @copyright (c) 2016, Philipp Thürwächter & Pattrick Hüper\n * @copyright (c) 2007-present, Stephen Colebourne & Michael Nascimento Santos\n * @license BSD-3-Clause (see LICENSE in the root directory of this source tree)\n */\n\nimport {requireNonNull} from '../assert';\nimport {Instant} from '../Instant';\nimport {LocalDate} from '../LocalDate';\nimport {MathUtil} from '../MathUtil';\n\nimport {ChronoUnit} from '../temporal/ChronoUnit';\nimport {Temporal} from '../temporal/Temporal';\nimport {TemporalQueries} from '../temporal/TemporalQueries';\n\nexport class ChronoZonedDateTime extends Temporal {\n query(query) {\n if (query === TemporalQueries.zoneId() || query === TemporalQueries.zone()) {\n return this.zone();\n } else if (query === TemporalQueries.chronology()) {\n return this.toLocalDate().chronology();\n } else if (query === TemporalQueries.precision()) {\n return ChronoUnit.NANOS;\n } else if (query === TemporalQueries.offset()) {\n return this.offset();\n } else if (query === TemporalQueries.localDate()) {\n return LocalDate.ofEpochDay(this.toLocalDate().toEpochDay());\n } else if (query === TemporalQueries.localTime()) {\n return this.toLocalTime();\n }\n return super.query(query);\n }\n\n /**\n * Outputs this date-time as a string using the formatter.\n *\n * @param {DateTimeFormatter} formatter - the formatter to use, not null\n * @return {string} the formatted date-time string, not null\n * @throws DateTimeException if an error occurs during printing\n */\n format(formatter) {\n requireNonNull(formatter, 'formatter');\n return formatter.format(this);\n }\n\n /**\n * Converts this date-time to an {@link Instant}.\n *\n * This returns an {@link Instant} representing the same point on the\n * time-line as this date-time. The calculation combines the\n * local date-time (see {@link toLocalDateTime}) and\n * offset (see {@link getOffset}).\n *\n * @return {Instant} an {@link Instant} representing the same instant, not null\n */\n toInstant() {\n return Instant.ofEpochSecond(this.toEpochSecond(), this.toLocalTime().nano());\n }\n\n /**\n * Converts this date-time to the number of seconds from the epoch\n * of 1970-01-01T00:00:00Z.\n *\n * This uses the local date-time (see {@link toLocalDateTime}) and\n * offset (see {@link getOffset}) to calculate the epoch-second value,\n * which is the number of elapsed seconds from 1970-01-01T00:00:00Z.\n * Instants on the time-line after the epoch are positive, earlier are negative.\n *\n * @return {number} the number of seconds from the epoch of 1970-01-01T00:00:00Z\n */\n toEpochSecond() {\n const epochDay = this.toLocalDate().toEpochDay();\n let secs = epochDay * 86400 + this.toLocalTime().toSecondOfDay();\n secs -= this.offset().totalSeconds();\n return secs;\n }\n\n /**\n * Compares this date-time to another date-time, including the chronology.\n *\n * The comparison is based first on the instant, then on the local date-time,\n * then on the zone ID, then on the chronology.\n * It is \"consistent with equals\", as defined by {@link Comparable}.\n *\n * If all the date-time objects being compared are in the same chronology, then the\n * additional chronology stage is not required.\n *\n * @param {ChronoZonedDateTime} other - the other date-time to compare to, not null\n * @return {number} the comparator value, negative if less, positive if greater\n */\n compareTo(other) {\n requireNonNull(other, 'other');\n let cmp = MathUtil.compareNumbers(this.toEpochSecond(), other.toEpochSecond());\n if (cmp === 0) {\n cmp = this.toLocalTime().nano() - other.toLocalTime().nano();\n if (cmp === 0) {\n cmp = this.toLocalDateTime().compareTo(other.toLocalDateTime());\n if (cmp === 0) {\n cmp = strcmp(this.zone().id(), other.zone().id());\n // we only support iso for now\n //if (cmp === 0) {\n // cmp = toLocalDate().getChronology().compareTo(other.toLocalDate().getChronology());\n //}\n }\n }\n }\n return cmp;\n }\n\n //-----------------------------------------------------------------------\n /**\n * Checks if the instant of this date-time is after that of the specified date-time.\n *\n * This method differs from the comparison in {@link compareTo} in that it\n * only compares the instant of the date-time. This is equivalent to using\n * `dateTime1.toInstant().isAfter(dateTime2.toInstant())`.\n *\n * @param {!ChronoZonedDateTime} other - the other date-time to compare to, not null\n * @return {boolean} true if this is after the specified date-time\n */\n isAfter(other) {\n requireNonNull(other, 'other');\n const thisEpochSec = this.toEpochSecond();\n const otherEpochSec = other.toEpochSecond();\n return thisEpochSec > otherEpochSec ||\n (thisEpochSec === otherEpochSec && this.toLocalTime().nano() > other.toLocalTime().nano());\n }\n\n /**\n * Checks if the instant of this date-time is before that of the specified date-time.\n *\n * This method differs from the comparison in {@link compareTo} in that it\n * only compares the instant of the date-time. This is equivalent to using\n * `dateTime1.toInstant().isBefore(dateTime2.toInstant())`.\n *\n * @param {!ChronoZonedDateTime} other - the other date-time to compare to, not null\n * @return {boolean} true if this point is before the specified date-time\n */\n isBefore(other) {\n requireNonNull(other, 'other');\n const thisEpochSec = this.toEpochSecond();\n const otherEpochSec = other.toEpochSecond();\n return thisEpochSec < otherEpochSec ||\n (thisEpochSec === otherEpochSec && this.toLocalTime().nano() < other.toLocalTime().nano());\n }\n\n /**\n * Checks if the instant of this date-time is equal to that of the specified date-time.\n *\n * This method differs from the comparison in {@link compareTo} and {@link equals}\n * in that it only compares the instant of the date-time. This is equivalent to using\n * `dateTime1.toInstant().equals(dateTime2.toInstant())`.\n *\n * @param {!ChronoZonedDateTime} other - the other date-time to compare to, not null\n * @return {boolean} true if the instant equals the instant of the specified date-time\n */\n isEqual(other) {\n requireNonNull(other, 'other');\n return this.toEpochSecond() === other.toEpochSecond() &&\n this.toLocalTime().nano() === other.toLocalTime().nano();\n }\n\n //-----------------------------------------------------------------------\n /**\n * Checks if this date-time is equal to another date-time.\n *\n * The comparison is based on the offset date-time and the zone.\n * To compare for the same instant on the time-line, use {@link compareTo}.\n * Only objects of type {@link ChronoZoneDateTime} are compared, other types return false.\n *\n * @param {*} other the object to check, null returns false\n * @return {boolean} true if this is equal to the other date-time\n */\n equals(other) {\n if (this === other) {\n return true;\n }\n if (other instanceof ChronoZonedDateTime) {\n return this.compareTo(other) === 0;\n }\n return false;\n }\n\n}\n\nfunction strcmp(a, b){\n if (a < b) {\n return -1;\n }\n if (a > b) {\n return 1;\n }\n return 0;\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/chrono/ChronoZonedDateTime.js","/*\n * @copyright (c) 2016, Philipp Thürwächter & Pattrick Hüper\n * @copyright (c) 2007-present, Stephen Colebourne & Michael Nascimento Santos\n * @license BSD-3-Clause (see LICENSE in the root directory of this source tree)\n */\n\nimport {requireNonNull, requireInstance} from '../assert';\nimport {MathUtil} from '../MathUtil';\n\nimport {LocalDate} from '../LocalDate';\nimport {Instant} from '../Instant';\nimport {ZoneOffset} from '../ZoneOffset';\nimport {ChronoUnit} from '../temporal/ChronoUnit';\nimport {ChronoField} from '../temporal/ChronoField';\nimport {Temporal} from '../temporal/Temporal';\nimport {TemporalQueries} from '../temporal/TemporalQueries';\n\n/**\n * A date-time without a time-zone in an arbitrary chronology, intended\n * for advanced globalization use cases.\n *\n * **Most applications should declare method signatures, fields and variables\n * as {@link LocalDateTime}, not this interface.**\n *\n * A {@link ChronoLocalDateTime} is the abstract representation of a local date-time\n * where the {@link Chronology}, or calendar system, is pluggable.\n * The date-time is defined in terms of fields expressed by {@link TemporalField},\n * where most common implementations are defined in {@link ChronoField}.\n * The chronology defines how the calendar system operates and the meaning of\n * the standard fields.\n *\n * #### When to use this interface\n *\n * The design of the API encourages the use of {@link LocalDateTime} rather than this\n * interface, even in the case where the application needs to deal with multiple\n * calendar systems. The rationale for this is explored in detail in {@link ChronoLocalDate}.\n *\n * Ensure that the discussion in {@link ChronoLocalDate} has been read and understood\n * before using this interface.\n *\n * ### Specification for implementors\n *\n * This interface must be implemented with care to ensure other classes operate correctly.\n * All implementations that can be instantiated must be final, immutable and thread-safe.\n * Subclasses should be Serializable wherever possible.\n *\n * In JDK 8, this is an interface with default methods.\n * Since there are no default methods in JDK 7, an abstract class is used.\n *\n * @param D the date type\n */\nexport class ChronoLocalDateTime extends Temporal {\n /*