@js-joda/extra 0.10.1 → 0.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
- //! @version @js-joda/extra - 0.10.1
1
+ //! @version @js-joda/extra - 0.11.0
2
2
  //! @copyright (c) 2015-present, Philipp Thürwächter, Pattrick Hüper & js-joda contributors
3
3
  //! @copyright (c) 2007-present, Stephen Colebourne & Michael Nascimento Santos
4
4
  //! @license BSD-3-Clause (see LICENSE in the root directory of this source tree)
5
- var JSJodaExtra=function(t,e){"use strict";function n(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,r(t,e)}function r(t,e){return r=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},r(t,e)}function o(t,n){if(null==t)throw new e.NullPointerException(n+" must not be null");return t}function i(t,n,r){if(!(t instanceof n))throw new e.IllegalArgumentException(r+" must be an instance of "+(n.name?n.name:n)+(t&&t.constructor&&t.constructor.name?", but is "+t.constructor.name:""));return t}var a=e._.MathUtil,s=function(t){function r(e){var n;return(n=t.call(this)||this)._day=a.safeToInt(e),n}n(r,t),r.now=function(t){switch(arguments.length){case 0:return r._now0();case 1:if(o(t,"clockOrZone"),t instanceof e.ZoneId)return r._nowZoneId(t);if(t instanceof e.Clock)return r._nowClock(t);throw new e.IllegalArgumentException("zoneIdOrClock must be an instance of ZoneId or Clock, but is "+t.constructor.name);default:throw new e.IllegalArgumentException("Invalid number of arguments: "+arguments.length)}},r._now0=function(){return this.now(e.Clock.systemDefaultZone())},r._nowZoneId=function(t){return this.now(e.Clock.system(t))},r._nowClock=function(t){var n=e.LocalDate.now(t);return r.of(n.dayOfMonth())},r.of=function(t){if(1<=t&&t<=31)return r.VALUES[t-1];throw new e.DateTimeException("Invalid value for DayOfMonth: "+t)},r.from=function(t){if(t instanceof r)return t;o(t,"temporal");try{return r.of(t.get(e.ChronoField.DAY_OF_MONTH))}catch(n){throw new e.DateTimeException("Unable to obtain DayOfMonth from TemporalAccessor: "+t+" of type "+t.constructor.name,n)}};var s=r.prototype;return s.value=function(){return this._day},s.isSupported=function(t){return t instanceof e.ChronoField?t===e.ChronoField.DAY_OF_MONTH:null!=t&&t.isSupportedBy(this)},s.range=function(n){return o(n,"field"),n===e.ChronoField.DAY_OF_MONTH?n.range():t.prototype.range.call(this,n)},s.get=function(t){return this.range(t).checkValidIntValue(this.getLong(t),t)},s.getLong=function(t){if(o(t,"field"),t===e.ChronoField.DAY_OF_MONTH)return this._day;if(t instanceof e.ChronoField)throw new e.UnsupportedTemporalTypeException("Unsupported field: "+t);return t.getFrom(this)},s.isValidYearMonth=function(t){return null!=t&&t.isValidDay(this._day)},s.query=function(n){return o(n,"query"),i(n,e.TemporalQuery,"query"),n===e.TemporalQueries.chronology()?e.IsoChronology.INSTANCE:t.prototype.query.call(this,n)},s.adjustInto=function(t){return o(t,"temporal"),t.with(e.ChronoField.DAY_OF_MONTH,this._day)},s.atMonth=function(t){return o(t,"month"),t instanceof e.Month?e.MonthDay.of(t,Math.min(this._day,t.maxLength())):e.MonthDay.of(t,Math.min(this._day,e.Month.of(t).maxLength()))},s.atYearMonth=function(t){return o(t,"yearMonth"),t.atDay(Math.min(this._day,t.lengthOfMonth()))},s.compareTo=function(t){return o(t,"other"),i(t,r,"other"),this._day-t._day},s.equals=function(t){return this===t||t instanceof r&&this._day===t._day},s.hashCode=function(){return this._day},s.toString=function(){return"DayOfMonth:"+this._day},r}(e.TemporalAccessor);var u=e._.MathUtil,c=function(t){function r(e){var n;return(n=t.call(this)||this)._day=u.safeToInt(e),n}n(r,t),r.now=function(t){switch(arguments.length){case 0:return r._now0();case 1:if(o(t,"clockOrZone"),t instanceof e.ZoneId)return r._nowZoneId(t);if(t instanceof e.Clock)return r._nowClock(t);throw new e.IllegalArgumentException("zoneIdOrClock must be an instance of ZoneId or Clock, but is "+t.constructor.name);default:throw new e.IllegalArgumentException("Invalid number of arguments: "+arguments.length)}},r._now0=function(){return r.now(e.Clock.systemDefaultZone())},r._nowZoneId=function(t){return r.now(e.Clock.system(t))},r._nowClock=function(t){var n=e.LocalDate.now(t);return r.of(n.dayOfYear())},r.of=function(t){if(1<=t&&t<=366)return r.VALUES[t-1];throw new e.DateTimeException("Invalid value for DayOfYear: "+t)},r.from=function(t){if(o(t,"temporal"),i(t,e.TemporalAccessor,"temporal"),t instanceof r)return t;try{return r.of(t.get(e.ChronoField.DAY_OF_YEAR))}catch(n){throw new e.DateTimeException("Unable to obtain DayOfYear from TemporalAccessor: "+t+" of type "+t.constructor.name,n)}};var a=r.prototype;return a.value=function(){return this._day},a.isSupported=function(t){return t instanceof e.ChronoField?t===e.ChronoField.DAY_OF_YEAR:null!=t&&t.isSupportedBy(this)},a.range=function(n){return o(n,"field"),n===e.ChronoField.DAY_OF_YEAR?n.range():t.prototype.range.call(this,n)},a.get=function(t){return this.range(t).checkValidIntValue(this.getLong(t),t)},a.getLong=function(t){if(o(t,"field"),t===e.ChronoField.DAY_OF_YEAR)return this._day;if(t instanceof e.ChronoField)throw new e.UnsupportedTemporalTypeException("Unsupported field: "+t);return t.getFrom(this)},a.isValidYear=function(t){return this._day<366||e.Year.isLeap(t)},a.query=function(n){return o(n,"query"),i(n,e.TemporalQuery,"query"),n===e.TemporalQueries.chronology()?e.IsoChronology.INSTANCE:t.prototype.query.call(this,n)},a.adjustInto=function(t){return o(t,"temporal"),t.with(e.ChronoField.DAY_OF_YEAR,this._day)},a.atYear=function(t){return o(t,"year"),t instanceof e.Year?t.atDay(this._day):e.LocalDate.ofYearDay(t,this._day)},a.compareTo=function(t){return o(t,"other"),i(t,r,"other"),this._day-t._day},a.equals=function(t){return this===t||t instanceof r&&this._day===t._day},a.hashCode=function(){return this._day},a.toString=function(){return"DayOfYear:"+this._day},r}(e.TemporalAccessor);var f=function(){function t(t,e){this._start=t,this._end=e}t.of=function(n,r){return r instanceof e.Duration?t.ofInstantDuration(n,r):t.ofInstantInstant(n,r)},t.ofInstantInstant=function(n,r){if(o(n,"startInclusive"),o(r,"endExclusive"),i(n,e.Instant,"startInclusive"),i(r,e.Instant,"endExclusive"),r.isBefore(n))throw new e.DateTimeException("End instant must on or after start instant");return new t(n,r)},t.ofInstantDuration=function(n,r){if(o(n,"startInclusive"),o(r,"duration"),i(n,e.Instant,"startInclusive"),i(r,e.Duration,"duration"),r.isNegative())throw new e.DateTimeException("Duration must not be zero or negative");return new t(n,n.plus(r))},t.parse=function(n){if(o(n,"text"),"string"!=typeof n)throw new e.IllegalArgumentException("text must be a string, but is "+n.constructor.name);for(var r=0;r<n.length;r+=1)if("/"===n.charAt(r)){var i=n.charAt(0);if("P"===i||"p"===i){var a=e.Duration.parse(n.substring(0,r)),s=e.ZonedDateTime.parse(n.substring(r+1,n.length)).toInstant();return t.of(s.minus(a),s)}var u=e.ZonedDateTime.parse(n.substring(0,r)).toInstant();if(r+1<n.length){var c=n.charAt(r+1);if("P"===c||"p"===c){var f=e.Duration.parse(n.substring(r+1,n.length));return t.of(u,u.plus(f))}}var h=e.ZonedDateTime.parse(n.substring(r+1,n.length)).toInstant();return t.of(u,h)}throw new e.DateTimeParseException("Interval cannot be parsed, no forward slash found",n,0)};var n=t.prototype;return n.start=function(){return this._start},n.end=function(){return this._end},n.isEmpty=function(){return this._start.equals(this._end)},n.isUnboundedStart=function(){return this._start.equals(e.Instant.MIN)},n.isUnboundedEnd=function(){return this._end.equals(e.Instant.MAX)},n.withStart=function(e){return t.of(e,this._end)},n.withEnd=function(e){return t.of(this._start,e)},n.contains=function(t){return o(t,"instant"),i(t,e.Instant,"instant"),this._start.compareTo(t)<=0&&(t.compareTo(this._end)<0||this.isUnboundedEnd())},n.encloses=function(e){return o(e,"other"),i(e,t,"other"),this._start.compareTo(e.start())<=0&&e.end().compareTo(this._end)<=0},n.abuts=function(e){return o(e,"other"),i(e,t,"other"),!this._end.equals(e.start())!=!this._start.equals(e.end())},n.isConnected=function(e){return o(e,"other"),i(e,t,"other"),this.equals(e)||this._start.compareTo(e.end())<=0&&e.start().compareTo(this._end)<=0},n.overlaps=function(e){return o(e,"other"),i(e,t,"other"),e.equals(this)||this._start.compareTo(e.end())<0&&e.start().compareTo(this._end)<0},n.intersection=function(n){if(o(n,"other"),i(n,t,"other"),!1===this.isConnected(n))throw new e.DateTimeException("Intervals do not connect: "+this+" and "+n);var r=this._start.compareTo(n.start()),a=this._end.compareTo(n.end());if(r>=0&&a<=0)return this;if(r<=0&&a>=0)return n;var s=r>=0?this._start:n.start(),u=a<=0?this._end:n.end();return t.of(s,u)},n.union=function(n){if(o(n,"other"),i(n,t,"other"),!1===this.isConnected(n))throw new e.DateTimeException("Intervals do not connect: "+this+" and "+n);var r=this._start.compareTo(n.start()),a=this._end.compareTo(n.end());if(r>=0&&a<=0)return n;if(r<=0&&a>=0)return this;var s=r>=0?n.start():this._start,u=a<=0?n.end():this._end;return t.of(s,u)},n.span=function(e){o(e,"other"),i(e,t,"other");var n=this._start.compareTo(e.start()),r=this._end.compareTo(e.end()),a=n>=0?e.start():this._start,s=r<=0?e.end():this._end;return t.of(a,s)},n.isAfter=function(t){return t instanceof e.Instant?this.isAfterInstant(t):this.isAfterInterval(t)},n.isBefore=function(t){return t instanceof e.Instant?this.isBeforeInstant(t):this.isBeforeInterval(t)},n.isAfterInstant=function(t){return this._start.compareTo(t)>0},n.isBeforeInstant=function(t){return this._end.compareTo(t)<=0&&this._start.compareTo(t)<0},n.isAfterInterval=function(t){return this._start.compareTo(t.end())>=0&&!t.equals(this)},n.isBeforeInterval=function(t){return this._end.compareTo(t.start())<=0&&!t.equals(this)},n.toDuration=function(){return e.Duration.between(this._start,this._end)},n.equals=function(e){return this===e||e instanceof t&&(this._start.equals(e.start())&&this._end.equals(e.end()))},n.hashCode=function(){return this._start.hashCode()^this._end.hashCode()},n.toString=function(){return this._start.toString()+"/"+this._end.toString()},t}();var h=e.LocalDate.MIN.plusDays(1),l=e.LocalDate.MAX.minusDays(1),d=function(){function t(t,n){if(o(t,"startInclusive"),o(n,"endExclusive"),i(t,e.LocalDate,"startInclusive"),i(n,e.LocalDate,"endExclusive"),n.isBefore(t))throw new e.DateTimeException("End date must be on or after start date");if(t.equals(l))throw new e.DateTimeException("Range must not start at LocalDate.MAX.minusDays(1)");if(n.equals(h))throw new e.DateTimeException("Range must not end at LocalDate.MIN.plusDays(1)");if(n.equals(e.LocalDate.MIN)||t.equals(e.LocalDate.MAX))throw new e.DateTimeException("Empty range must not be at LocalDate.MIN or LocalDate.MAX");this._start=t,this._end=n}t.of=function(n,r){if(n instanceof e.LocalDate&&r instanceof e.LocalDate)return t._ofLocalDateLocalDate(n,r);if(n instanceof e.LocalDate&&r instanceof e.Period)return t._ofLocalDatePeriod(n,r);var o=[];throw n instanceof e.LocalDate||o.push("startInclusive must be an instance of LocalDate but is "+n.constructor.name),r instanceof e.LocalDate||r instanceof e.Period||o.push("endExclusiveOrPeriod must be an instance of LocalDate or Period but is "+r.constructor.name),new e.IllegalArgumentException(o.join(" and "))},t._ofLocalDateLocalDate=function(n,r){return o(n,"startInclusive"),o(r,"endExclusive"),i(n,e.LocalDate,"startInclusive"),i(r,e.LocalDate,"endExclusive"),new t(n,r)},t._ofLocalDatePeriod=function(n,r){if(o(n,"startInclusive"),o(r,"period"),i(n,e.LocalDate,"startInclusive"),i(r,e.Period,"period"),r.isNegative())throw new e.DateTimeException("Period must not be zero or negative");return new t(n,n.plus(r))},t.ofClosed=function(n,r){if(o(n,"startInclusive"),o(r,"endInclusive"),i(n,e.LocalDate,"startInclusive"),i(r,e.LocalDate,"endInclusive"),r.isBefore(n))throw new e.DateTimeException("Start date must be on or before end date");return new t(n,r.equals(e.LocalDate.MAX)?e.LocalDate.MAX:r.plusDays(1))},t.ofEmpty=function(n){return o(n,"date"),i(n,e.LocalDate,"date"),new t(n,n)},t.ofUnbounded=function(){return t.ALL},t.ofUnboundedStart=function(n){return o(n,"endExclusive"),i(n,e.LocalDate,"endExclusive"),t.of(e.LocalDate.MIN,n)},t.ofUnboundedEnd=function(n){return t.of(n,e.LocalDate.MAX)},t.parse=function(n){o(n,"text");for(var r=0;r<n.length;r++)if("/"===n[r]){var i=n.charAt(0);if("P"===i||"p"===i){var a=e.Period.parse(n.slice(0,r)),s=e.LocalDate.parse(n.slice(r+1,n.length));return t.of(s.minus(a),s)}var u=e.LocalDate.parse(n.slice(0,r));if(r+1<n.length){var c=n[r+1];if("P"===c||"p"===c){var f=e.Period.parse(n.slice(r+1,n.length));return t.of(u,u.plus(f))}}var h=e.LocalDate.parse(n.slice(r+1,n.length));return t.of(u,h)}throw new e.DateTimeParseException("LocalDateRange cannot be parsed, no forward slash found",n,0)};var n=t.prototype;return n.start=function(){return this._start},n.end=function(){return this._end},n.endInclusive=function(){return this.isUnboundedEnd()?e.LocalDate.MAX:this._end.minusDays(1)},n.isEmpty=function(){return this._start.equals(this._end)},n.isUnboundedStart=function(){return this._start.equals(e.LocalDate.MIN)},n.isUnboundedEnd=function(){return this._end.equals(e.LocalDate.MAX)},n.withStart=function(e){return t.of(this._start.with(e),this._end)},n.withEnd=function(e){return t.of(this._start,this._end.with(e))},n.contains=function(t){return o(t,"date"),this._start.compareTo(t)<=0&&(t.compareTo(this._end)<0||this.isUnboundedEnd())},n.encloses=function(t){return o(t,"other"),this._start.compareTo(t._start)<=0&&t._end.compareTo(this._end)<=0},n.abuts=function(t){return o(t,"other"),this._end.equals(t._start)!==this._start.equals(t._end)},n.isConnected=function(t){return o(t,"other"),this.equals(t)||this._start.compareTo(t._end)<=0&&t._start.compareTo(this._end)<=0},n.overlaps=function(t){return o(t,"other"),t.equals(this)||this._start.compareTo(t._end)<0&&t._start.compareTo(this._end)<0},n.intersection=function(n){if(o(n,"other"),!1===this.isConnected(n))throw new e.DateTimeException("Ranges do not connect: "+this+" and "+n);var r=this._start.compareTo(n._start),i=this._end.compareTo(n._end);if(r>=0&&i<=0)return this;if(r<=0&&i>=0)return n;var a=r>=0?this._start:n._start,s=i<=0?this._end:n._end;return t.of(a,s)},n.union=function(n){if(o(n,"other"),!1===this.isConnected(n))throw new e.DateTimeException("Ranges do not connect: "+this+" and "+n);var r=this._start.compareTo(n._start),i=this._end.compareTo(n._end);if(r>=0&&i<=0)return n;if(r<=0&&i>=0)return this;var a=r>=0?n._start:this._start,s=i<=0?n._end:this._end;return t.of(a,s)},n.span=function(e){o(e,"other");var n=this._start.compareTo(e._start),r=this._end.compareTo(e._end),i=n>=0?e._start:this._start,a=r<=0?e._end:this._end;return t.of(i,a)},n.isAfter=function(n){if(n instanceof e.LocalDate)return this._isAfterLocalDate(n);if(n instanceof t)return this._isAfterLocalDateRange(n);throw new e.IllegalArgumentException("localDateOrLocalDateRange must be an instance of LocalDate or LocalDateRange but is "+n.constructor.name)},n.isBefore=function(n){if(n instanceof e.LocalDate)return this._isBeforeLocalDate(n);if(n instanceof t)return this._isBeforeLocalDateRange(n);throw new e.IllegalArgumentException("localDateOrLocalDateRange must be an instance of LocalDate or LocalDateRange but is "+n.constructor.name)},n._isAfterLocalDate=function(t){return this._start.compareTo(t)>0},n._isBeforeLocalDate=function(t){return this._end.compareTo(t)<=0&&this._start.compareTo(t)<0},n._isAfterLocalDateRange=function(t){return this._start.compareTo(t._end)>=0&&!t.equals(this)},n._isBeforeLocalDateRange=function(t){return this._end.compareTo(t._start)<=0&&!t.equals(this)},n.lengthInDays=function(){return this.isUnboundedStart()||this.isUnboundedEnd()?Number.POSITIVE_INFINITY:this._end.toEpochDay()-this._start.toEpochDay()},n.toPeriod=function(){if(this.isUnboundedStart()||this.isUnboundedEnd())throw new e.ArithmeticException("Unbounded range cannot be converted to a Period");return e.Period.between(this._start,this._end)},n.equals=function(e){if(this===e)return!0;if(e instanceof t){var n=e;return this._start.equals(n._start)&&this._end.equals(n._end)}return!1},n.hashCode=function(){return this._start.hashCode()^this._end.hashCode()},n.toString=function(){return this._start.toString()+"/"+this._end.toString()},t}();var _=e._.MathUtil,p=86400,E=function(t){function r(e,n){var r;return(r=t.call(this)||this)._date=o(e,"date"),r._offset=o(n,"offset"),r}n(r,t),r.now=function(t){return 0===arguments.length?r._now0():1===arguments.length&&t instanceof e.ZoneId?r._nowZoneId(t):r._nowClock(t)},r._now0=function(){return r.now(e.Clock.systemDefaultZone())},r._nowZoneId=function(t){return r.now(e.Clock.system(t))},r._nowClock=function(t){o(t,"clock");var e=t.instant();return r.ofInstant(e,t.zone().rules().offset(e))},r.of=function(){switch(arguments.length){case 2:return r._ofLocalDateZoneOffset.apply(r,arguments);case 4:return r._ofIntIntIntZoneOffset.apply(r,arguments);default:throw new e.IllegalArgumentException("Illegal number of arguments")}},r._ofLocalDateZoneOffset=function(t,e){return new r(t,e)},r._ofIntIntIntZoneOffset=function(t,n,o,i){return new r(e.LocalDate.of(t,n,o),i)},r.ofInstant=function(t,n){o(t,"instant"),o(n,"zone");var i=n.rules().offset(t),a=t.epochSecond()+i.totalSeconds(),s=_.floorDiv(a,p);return new r(e.LocalDate.ofEpochDay(s),i)},r.from=function(t){if(t instanceof r)return t;o(t,"temporal");try{return new r(e.LocalDate.from(t),e.ZoneOffset.from(t))}catch(n){throw new e.DateTimeException("Unable to obtain OffsetDate from TemporalAccessor: "+t.constructor.name,n)}},r.parse=function(t,n){return void 0===n&&(n=e.DateTimeFormatter.ISO_OFFSET_DATE),o(n,"formatter"),n.parse(t,r.FROM)};var a=r.prototype;return a._with=function(t,e){return this._date===t&&this._offset.equals(e)?this:new r(t,e)},a.isSupported=function(t){if(t instanceof e.TemporalField)return this._isSupportedField(t);if(t instanceof e.TemporalUnit)return this._isSupportedUnit(t);if(null==t)return!1;throw new e.IllegalArgumentException("fieldOrUnit must be an instance of TemporalField or TemporalUnit, but is "+t.constructor.name)},a._isSupportedField=function(t){return t instanceof e.ChronoField?t.isDateBased()||t===e.ChronoField.OFFSET_SECONDS:null!=t&&t.isSupportedBy(this)},a._isSupportedUnit=function(t){return t instanceof e.ChronoUnit?t.isDateBased():null!=t&&t.isSupportedBy(this)},a.range=function(t){return o(t,"field"),i(t,e.TemporalField,"field"),t instanceof e.ChronoField?t===e.ChronoField.OFFSET_SECONDS?t.range():this._date.range(t):t.rangeRefinedBy(this)},a.get=function(t){return o(t,"field"),i(t,e.TemporalField,"field"),this.range(t).checkValidIntValue(this.getLong(t),t)},a.getLong=function(t){return o(t,"field"),i(t,e.TemporalField,"field"),t instanceof e.ChronoField?t===e.ChronoField.OFFSET_SECONDS?this.offset().totalSeconds():this._date.getLong(t):t.getFrom(this)},a.offset=function(){return this._offset},a.withOffsetSameLocal=function(t){return o(t,"offset"),this._with(this._date,t)},a.toLocalDate=function(){return this._date},a.year=function(){return this._date.year()},a.monthValue=function(){return this._date.monthValue()},a.month=function(){return this._date.month()},a.dayOfMonth=function(){return this._date.dayOfMonth()},a.dayOfYear=function(){return this._date.dayOfYear()},a.dayOfWeek=function(){return this._date.dayOfWeek()},a._withAdjuster=function(n){return n instanceof e.LocalDate?this._with(n,this._offset):n instanceof e.ZoneOffset?this._with(this._date,n):n instanceof r?n:t.prototype._withAdjuster.call(this,n)},a._withField=function(t,n){if(o(t,"field"),i(t,e.TemporalField,"field"),t instanceof e.ChronoField){if(t===e.ChronoField.OFFSET_SECONDS){var r=t;return this._with(this._date,e.ZoneOffset.ofTotalSeconds(r.checkValidIntValue(n)))}return this._with(this._date.with(t,n),this._offset)}return t.adjustInto(this,n)},a.withYear=function(t){return this._with(this._date.withYear(t),this._offset)},a.withMonth=function(t){return this._with(this._date.withMonth(t),this._offset)},a.withDayOfMonth=function(t){return this._with(this._date.withDayOfMonth(t),this._offset)},a.withDayOfYear=function(t){return this._with(this._date.withDayOfYear(t),this._offset)},a._plusUnit=function(t,n){return n instanceof e.ChronoUnit?this._with(this._date.plus(t,n),this._offset):n.addTo(this,t)},a.plusYears=function(t){return this._with(this._date.plusYears(t),this._offset)},a.plusMonths=function(t){return this._with(this._date.plusMonths(t),this._offset)},a.plusWeeks=function(t){return this._with(this._date.plusWeeks(t),this._offset)},a.plusDays=function(t){return this._with(this._date.plusDays(t),this._offset)},a.minusYears=function(t){return this._with(this._date.minusYears(t),this._offset)},a.minusMonths=function(t){return this._with(this._date.minusMonths(t),this._offset)},a.minusWeeks=function(t){return this._with(this._date.minusWeeks(t),this._offset)},a.minusDays=function(t){return this._with(this._date.minusDays(t),this._offset)},a.query=function(n){return o(n,"query"),i(n,e.TemporalQuery,"query"),n===e.TemporalQueries.chronology()?e.IsoChronology.INSTANCE:n===e.TemporalQueries.precision()?e.ChronoUnit.DAYS:n===e.TemporalQueries.offset()||n===e.TemporalQueries.zone()?this.offset():t.prototype.query.call(this,n)},a.adjustInto=function(t){return t.with(e.ChronoField.OFFSET_SECONDS,this.offset().totalSeconds()).with(e.ChronoField.EPOCH_DAY,this.toLocalDate().toEpochDay())},a.until=function(t,n){var o=r.from(t);if(n instanceof e.ChronoUnit){var i=o._offset.totalSeconds()-this._offset.totalSeconds(),a=o._date.plusDays(_.intDiv(-i,p));return this._date.until(a,n)}return n.between(this,o)},a.format=function(t){return o(t,"formatter"),t.format(this)},a.atTime=function(t){return e.OffsetDateTime.of(this._date,t,this._offset)},a._toEpochSecond=function(){return this._date.toEpochDay()*p-this._offset.totalSeconds()},a.toEpochSecond=function(t){return o(t,"time"),this._toEpochSecond()+t.toSecondOfDay()},a.compareTo=function(t){if(o(t,"other"),i(t,r,"other"),this._offset.equals(t._offset))return this._date.compareTo(t._date);var e=this._toEpochSecond()-t._toEpochSecond();return 0===e&&(e=this._date.compareTo(t._date)),e},a.isAfter=function(t){return o(t,"other"),i(t,r,"other"),this._toEpochSecond()>t._toEpochSecond()},a.isBefore=function(t){return o(t,"other"),i(t,r,"other"),this._toEpochSecond()<t._toEpochSecond()},a.isEqual=function(t){return o(t,"other"),i(t,r,"other"),this._toEpochSecond()===t._toEpochSecond()},a.equals=function(t){if(this===t)return!0;if(t instanceof r){var e=t;return this._date.equals(e._date)&&this._offset.equals(e._offset)}return!1},a.hashCode=function(){return this._date.hashCode()^this._offset.hashCode()},a.toString=function(){return this._date.toString()+this._offset.toString()},r}(e.Temporal);function m(){var t,r,o;E.MIN=E.of(e.LocalDate.MIN,e.ZoneOffset.MAX),E.MAX=E.of(e.LocalDate.MAX,e.ZoneOffset.MIN),E.FROM=(t="OffsetDate.FROM",r=function(t){return E.from(t)},o=function(t){function e(){return t.apply(this,arguments)||this}return n(e,t),e}(e.TemporalQuery),o.prototype.queryFrom=r,new o(t))}var w,y=e._.MathUtil,A=function(t){function r(e,n){var r;return(r=t.call(this)||this)._value=y.safeToInt(e),r._name=n,r}n(r,t),r.valueOf=function(t){switch(o(t,"name"),t){case"Q1":return r.Q1;case"Q2":return r.Q2;case"Q3":return r.Q3;case"Q4":return r.Q4}throw new e.IllegalArgumentException("No enum constant Quarter."+t)},r.values=function(){return w.slice()},r.of=function(t){switch(o(t,"quarterOfYear"),t){case 1:return r.Q1;case 2:return r.Q2;case 3:return r.Q3;case 4:return r.Q4;default:throw new e.DateTimeException("Invalid value for Quarter: "+t)}},r.ofMonth=function(t){return o(t,"monthOfYear"),e.ChronoField.MONTH_OF_YEAR.range().checkValidValue(t,e.ChronoField.MONTH_OF_YEAR),r.of(y.intDiv(t-1,3)+1)},r.from=function(t){if(t instanceof r)return t;if(t instanceof e.Month){var n=t;return r.of(y.intDiv(n.ordinal(),3)+1)}try{var o=y.safeToInt(t.getLong(e.IsoFields.QUARTER_OF_YEAR));return r.of(o)}catch(n){throw new e.DateTimeException("Unable to obtain Quarter from TemporalAccessor: "+t+" of type "+t.constructor.name,n)}};var a=r.prototype;return a.value=function(){return this._value},a.displayName=function(t,n){throw new e.IllegalArgumentException("Pattern using (localized) text not implemented yet!")},a.isSupported=function(t){return t===e.IsoFields.QUARTER_OF_YEAR||!(t instanceof e.ChronoField)&&(null!=t&&t.isSupportedBy(this))},a.range=function(n){if(o(n,"field"),n===e.IsoFields.QUARTER_OF_YEAR)return n.range();if(n instanceof e.ChronoField)throw new e.UnsupportedTemporalTypeException("Unsupported field: "+n);return t.prototype.range.call(this,n)},a.get=function(t){return o(t,"field"),i(t,e.TemporalField,"field"),this.range(t).checkValidIntValue(this.getLong(t),t)},a.getLong=function(t){if(o(t,"field"),t===e.IsoFields.QUARTER_OF_YEAR)return this.value();if(t instanceof e.ChronoField)throw new e.UnsupportedTemporalTypeException("Unsupported field: "+t);return t.getFrom(this)},a.plus=function(t){var e=y.intMod(t,4);return w[(this.ordinal()+e+4)%4]},a.minus=function(t){return this.plus(-y.intMod(t,4))},a.length=function(t){switch(this){case r.Q1:return t?91:90;case r.Q2:return 91;default:return 92}},a.firstMonth=function(){switch(this){case r.Q1:return e.Month.JANUARY;case r.Q2:return e.Month.APRIL;case r.Q3:return e.Month.JULY;case r.Q4:return e.Month.OCTOBER;default:throw new e.IllegalStateException("Unreachable")}},a.query=function(n){return o(n,"query"),i(n,e.TemporalQuery,"query"),n===e.TemporalQueries.chronology()?e.IsoChronology.INSTANCE:n===e.TemporalQueries.precision()?e.IsoFields.QUARTER_YEARS:t.prototype.query.call(this,n)},a.adjustInto=function(t){return o(t,"temporal"),t.with(e.IsoFields.QUARTER_OF_YEAR,this.value())},a.ordinal=function(){return this._value-1},a.name=function(){return this._name},a.compareTo=function(t){return o(t,"other"),i(t,r,"other"),this._value-t._value},a.toString=function(){return this.name()},a.equals=function(t){return this===t},a.hashCode=function(){return this._value},r}(e.TemporalAccessor);function D(){var t,r,o;A.Q1=new A(1,"Q1"),A.Q2=new A(2,"Q2"),A.Q3=new A(3,"Q3"),A.Q4=new A(4,"Q4"),A.FROM=(t="Quarter.FROM",r=function(t){return A.from(t)},o=function(t){function e(){return t.apply(this,arguments)||this}return n(e,t),e}(e.TemporalQuery),o.prototype.queryFrom=r,new o(t)),w=[A.Q1,A.Q2,A.Q3,A.Q4]}var I=e._.MathUtil,g=function(t){function r(e,n){var r;return(r=t.call(this)||this)._year=I.safeToInt(e),r._quarter=i(n,A,"Quarter"),r}n(r,t),r.now=function(t){return 0===arguments.length?r._now0():1===arguments.length&&t instanceof e.ZoneId?r._nowZoneId(t):r._nowClock(t)},r._now0=function(){return r.now(e.Clock.systemDefaultZone())},r._nowZoneId=function(t){return r.now(e.Clock.system(t))},r._nowClock=function(t){var n=e.LocalDate.now(t);return r.of(n.getYear(),A.from(n.getMonth()))},r.of=function(t,n){if(t instanceof e.Year&&n instanceof A)return r._ofYearQuarter(t,n);if(t instanceof e.Year&&"number"==typeof n)return r._ofYearInt(t,n);if("number"==typeof t&&n instanceof A)return r._ofIntQuarter(t,n);if("number"==typeof t&&"number"==typeof n)return r._ofIntInt(t,n);var o="year must be an instance of Year or number but is "+t.constructor.name,i="quarter must be an instance of Quarter or number but is "+n.constructor.name;throw new e.IllegalArgumentException(o+" and "+i)},r._ofYearQuarter=function(t,e){return r.of(t.value(),e)},r._ofYearInt=function(t,e){return r.of(t.value(),A.of(e))},r._ofIntQuarter=function(t,n){return e.ChronoField.YEAR.checkValidValue(t),o(n,"quarter"),new r(t,n)},r._ofIntInt=function(t,n){return e.ChronoField.YEAR.checkValidValue(t),new r(t,A.of(n))},r.from=function(t){if(t instanceof r)return t;o(t,"temporal");try{var n=I.safeToInt(t.getLong(e.ChronoField.YEAR)),i=I.safeToInt(t.getLong(e.IsoFields.QUARTER_OF_YEAR));return r.of(n,i)}catch(n){throw new e.DateTimeException("Unable to obtain YearQuarter from TemporalAccessor: "+t+" of type "+t.constructor.name,n)}},r.parse=function(t,n){return void 0===n&&(n=r.PARSER),o(n,"formatter"),i(n,e.DateTimeFormatter,"formatter"),n.parse(t,r.FROM)};var a=r.prototype;return a._with=function(t,e){return this._year===t&&this._quarter===e?this:new r(t,e)},a.isSupported=function(t){if(t instanceof e.TemporalField)return this._isSupportedField(t);if(t instanceof e.TemporalUnit)return this._isSupportedUnit(t);if(null==t)return!1;throw new e.IllegalArgumentException("fieldOrUnit must be an instance of TemporalField or TemporalUnit, but is "+t.constructor.name)},a._isSupportedField=function(t){return t===e.IsoFields.QUARTER_OF_YEAR||(t instanceof e.ChronoField?t===e.ChronoField.YEAR||t===e.ChronoField.YEAR_OF_ERA||t===e.ChronoField.ERA:null!=t&&t.isSupportedBy(this))},a._isSupportedUnit=function(t){return t===e.IsoFields.QUARTER_YEARS||(t instanceof e.ChronoUnit?t===e.ChronoUnit.YEARS||t===e.ChronoUnit.DECADES||t===e.ChronoUnit.CENTURIES||t===e.ChronoUnit.MILLENNIA||t===e.ChronoUnit.ERAS:null!=t&&t.isSupportedBy(this))},a.range=function(n){return o(n,"field"),i(n,e.TemporalField,"field"),n===e.IsoFields.QUARTER_OF_YEAR?e.IsoFields.QUARTER_OF_YEAR.range():n===e.ChronoField.YEAR_OF_ERA?this.year()<=0?e.ValueRange.of(1,e.Year.MAX_VALUE+1):e.ValueRange.of(1,e.Year.MAX_VALUE):t.prototype.range.call(this,n)},a.get=function(t){return o(t,"field"),i(t,e.TemporalField,"field"),this.range(t).checkValidIntValue(this.getLong(t),t)},a.getLong=function(n){if(o(n,"field"),i(n,e.TemporalField,"field"),n===e.IsoFields.QUARTER_OF_YEAR)return this._quarter.value();if(n instanceof e.ChronoField)switch(n){case e.ChronoField.YEAR_OF_ERA:return this._year<1?1-this._year:this._year;case e.ChronoField.YEAR:return this._year;case e.ChronoField.ERA:return this._year<1?0:1;default:throw new e.UnsupportedTemporalTypeException("Unsupported field: "+n)}return t.prototype.get.call(this,n)},a._prolepticQuarter=function(){return 4*this._year+(this._quarter.value()-1)},a.year=function(){return this._year},a.quarterValue=function(){return this._quarter.value()},a.quarter=function(){return this._quarter},a.isLeapYear=function(){return e.IsoChronology.isLeapYear(this._year)},a.isValidDay=function(t){return t>=1&&t<=this.lengthOfQuarter()},a.lengthOfQuarter=function(){return this._quarter.length(this.isLeapYear())},a.lengthOfYear=function(){return this.isLeapYear()?366:365},a._withAdjuster=function(e){return e instanceof r?e:t.prototype._withAdjuster.call(this,e)},a._withField=function(t,n){if(o(t,"field"),i(t,e.TemporalField,"field"),t===e.IsoFields.QUARTER_OF_YEAR)return this.withQuarter(e.IsoFields.QUARTER_OF_YEAR.range().checkValidIntValue(n,e.IsoFields.QUARTER_OF_YEAR));if(t instanceof e.ChronoField)switch(t.checkValidValue(n),t){case e.ChronoField.YEAR_OF_ERA:return this.withYear(this._year<1?1-n:n);case e.ChronoField.YEAR:return this.withYear(n);case e.ChronoField.ERA:return this.getLong(e.ChronoField.ERA)===n?this:this.withYear(1-this._year);default:throw new e.UnsupportedTemporalTypeException("Unsupported field: "+t)}return t.adjustInto(this,n)},a.withYear=function(t){return e.ChronoField.YEAR.checkValidValue(t),this._with(t,this._quarter)},a.withQuarter=function(t){return e.IsoFields.QUARTER_OF_YEAR.range().checkValidValue(t,e.IsoFields.QUARTER_OF_YEAR),this._with(this._year,A.of(t))},a._plusUnit=function(t,n){if(n===e.IsoFields.QUARTER_YEARS)return this.plusQuarters(t);if(n instanceof e.ChronoUnit)switch(n){case e.ChronoUnit.YEARS:return this.plusYears(t);case e.ChronoUnit.DECADES:return this.plusYears(I.safeMultiply(t,10));case e.ChronoUnit.CENTURIES:return this.plusYears(I.safeMultiply(t,100));case e.ChronoUnit.MILLENNIA:return this.plusYears(I.safeMultiply(t,1e3));case e.ChronoUnit.ERAS:return this.with(e.ChronoField.ERA,I.safeAdd(this.getLong(e.ChronoField.ERA),t));default:throw new e.UnsupportedTemporalTypeException("Unsupported unit: "+n)}return n.addTo(this,t)},a.plusYears=function(t){if(0===t)return this;var n=e.ChronoField.YEAR.checkValidIntValue(this._year+t);return this._with(n,this._quarter)},a.plusQuarters=function(t){if(0===t)return this;var n=4*this._year+(this._quarter.value()-1)+t,r=e.ChronoField.YEAR.checkValidIntValue(I.intDiv(n,4)),o=I.floorMod(n,4)+1;return this._with(r,A.of(o))},a.minusYears=function(t){return t===I.MIN_SAFE_INTEGER?this.plusYears(I.MIN_SAFE_INTEGER).plusYears(1):this.plusYears(-t)},a.minusQuarters=function(t){return t===I.MIN_SAFE_INTEGER?this.plusQuarters(I.MIN_SAFE_INTEGER).plusQuarters(1):this.plusQuarters(-t)},a.query=function(n){return n===e.TemporalQueries.chronology()?e.IsoChronology.INSTANCE:n===e.TemporalQueries.precision()?e.IsoFields.QUARTER_YEARS:t.prototype.query.call(this,n)},a.adjustInto=function(t){var n=this._prolepticQuarter(),r=4*t.get(e.ChronoField.YEAR)+(t.get(e.IsoFields.QUARTER_OF_YEAR)-1);return t.plus(n-r,e.IsoFields.QUARTER_YEARS)},a.until=function(t,n){o(t,"endExclusive"),o(n,"unit"),i(t,e.Temporal,"endExclusive"),i(n,e.TemporalUnit,"unit");var a=r.from(t),s=a._prolepticQuarter()-this._prolepticQuarter();if(n===e.IsoFields.QUARTER_YEARS)return s;if(n instanceof e.ChronoUnit)switch(n){case e.ChronoUnit.YEARS:return I.intDiv(s,4);case e.ChronoUnit.DECADES:return I.intDiv(s,40);case e.ChronoUnit.CENTURIES:return I.intDiv(s,400);case e.ChronoUnit.MILLENNIA:return I.intDiv(s,4e3);case e.ChronoUnit.ERAS:return a.getLong(e.ChronoField.ERA)-this.getLong(e.ChronoField.ERA);default:throw new e.UnsupportedTemporalTypeException("Unsupported unit: "+n)}return n.between(this,a)},a.format=function(t){return o(t,"formatter"),t.format(this)},a.atDay=function(t){e.ValueRange.of(1,this.lengthOfQuarter()).checkValidValue(t,e.IsoFields.DAY_OF_QUARTER);for(var n=e.Year.isLeap(this._year),r=this._quarter.firstMonth();t>r.length(n);)t-=r.length(n),r=r.plus(1);return e.LocalDate.of(this._year,r,t)},a.atEndOfQuarter=function(){var t=this._quarter.firstMonth().plus(2);return e.LocalDate.of(this._year,t,t.maxLength())},a.compareTo=function(t){o(t,"other"),i(t,r,"other");var e=this._year-t._year;return 0===e&&(e=this._quarter.compareTo(t._quarter)),e},a.isAfter=function(t){return this.compareTo(t)>0},a.isBefore=function(t){return this.compareTo(t)<0},a.equals=function(t){if(this===t)return!0;if(t instanceof r){var e=t;return this._year===e._year&&this._quarter===e._quarter}return!1},a.hashCode=function(){return this._year^this._quarter.value()<<27},a.toString=function(){var t=this._year;return(Math.abs(t)<1e3?t<0?"-"+(""+(t-1e4)).slice(-4):(""+(t+1e4)).slice(-4):t>9999?"+"+t:""+t).concat("-").concat(this._quarter)},r}(e.Temporal);function T(){var t,r,o;g.PARSER=(new e.DateTimeFormatterBuilder).parseCaseInsensitive().appendValue(e.ChronoField.YEAR,4,10,e.SignStyle.EXCEEDS_PAD).appendLiteral("-").appendLiteral("Q").appendValue(e.IsoFields.QUARTER_OF_YEAR,1).toFormatter(),g.FROM=(t="YearQuarter.FROM",r=function(t){return g.from(t)},o=function(t){function e(){return t.apply(this,arguments)||this}return n(e,t),e}(e.TemporalQuery),o.prototype.queryFrom=r,new o(t))}var F=e._.MathUtil,R=function(t){function r(e,n){var r;return(r=t.call(this)||this)._year=e,r._week=n,r}n(r,t),r.now=function(t){switch(arguments.length){case 0:return r._now0();case 1:if(o(t,"clockOrZone"),t instanceof e.ZoneId)return r._nowZoneId(t);if(t instanceof e.Clock)return r._nowClock(t);throw new e.IllegalArgumentException("zoneIdOrClock must be an instance of ZoneId or Clock, but is "+t.constructor.name);default:throw new e.IllegalArgumentException("Invalid number of arguments: "+arguments.length)}},r._now0=function(){return r.now(e.Clock.systemDefaultZone())},r._nowZoneId=function(t){return r.now(e.Clock.system(t))},r._nowClock=function(t){var n=e.LocalDate.now(t);return r.of(n.get(e.IsoFields.WEEK_BASED_YEAR),n.get(e.IsoFields.WEEK_OF_WEEK_BASED_YEAR))},r.of=function(t,n){return F.verifyInt(n),t instanceof e.Year?this._ofYearWeek(t,n):(F.verifyInt(t),this._ofWeekBasedYear(t,n))},r._ofYearWeek=function(t,e){var n=t.value();return this._ofWeekBasedYear(n,e)},r._ofWeekBasedYear=function(t,n){return e.IsoFields.WEEK_BASED_YEAR.range().checkValidValue(t,e.IsoFields.WEEK_BASED_YEAR),e.IsoFields.WEEK_OF_WEEK_BASED_YEAR.range().checkValidValue(n,e.IsoFields.WEEK_OF_WEEK_BASED_YEAR),53===n&&r._weekRange(t)<53&&(n=1,t++,e.IsoFields.WEEK_BASED_YEAR.range().checkValidValue(t,e.IsoFields.WEEK_BASED_YEAR)),new r(t,n)},r._weekRange=function(t){var n=e.LocalDate.of(t,1,1);return n.dayOfWeek()===e.DayOfWeek.THURSDAY||n.dayOfWeek()===e.DayOfWeek.WEDNESDAY&&n.isLeapYear()?53:52},r.from=function(t){if(t instanceof r)return t;o(t,"temporal");try{var n=F.safeToInt(t.getLong(e.IsoFields.WEEK_BASED_YEAR)),i=F.safeToInt(t.getLong(e.IsoFields.WEEK_OF_WEEK_BASED_YEAR));return r.of(n,i)}catch(n){throw new e.DateTimeException("Unable to obtain YearWeek from TemporalAccessor: "+t.constructor.name,n)}},r.parse=function(t,n){return void 0===n&&(n=r.PARSER),function(t,e,n){if(!t)throw n?new n(e):new Error(e)}(null!=n,"formatter",e.NullPointerException),n.parse(t,r.FROM)};var a=r.prototype;return a.isSupported=function(t){if(t instanceof e.TemporalField)return this._isSupportedField(t);if(t instanceof e.TemporalUnit)return this._isSupportedUnit(t);if(null==t)return!1;throw new e.IllegalArgumentException("fieldOrUnit must be an instance of TemporalField or TemporalUnit, but is "+t.constructor.name)},a._isSupportedField=function(t){return t===e.IsoFields.WEEK_OF_WEEK_BASED_YEAR||t===e.IsoFields.WEEK_BASED_YEAR||!(t instanceof e.ChronoField)&&(null!=t&&t.isSupportedBy(this))},a._isSupportedUnit=function(t){return t===e.ChronoUnit.WEEKS||t===e.IsoFields.WEEK_BASED_YEARS||!(t instanceof e.ChronoUnit)&&(null!=t&&t.isSupportedBy(this))},a.range=function(n){return o(n,"field"),n===e.IsoFields.WEEK_BASED_YEAR?e.IsoFields.WEEK_BASED_YEAR.range():n===e.IsoFields.WEEK_OF_WEEK_BASED_YEAR?e.ValueRange.of(1,r._weekRange(this._year)):t.prototype.range.call(this,n)},a.get=function(t){return this.range(t).checkValidIntValue(this.getLong(t),t)},a.getLong=function(t){if(o(t,"field"),t===e.IsoFields.WEEK_BASED_YEAR)return this._year;if(t===e.IsoFields.WEEK_OF_WEEK_BASED_YEAR)return this._week;if(t instanceof e.ChronoField)throw new e.UnsupportedTemporalTypeException("Unsupported field: "+t);return t.getFrom(this)},a.year=function(){return this._year},a.week=function(){return this._week},a.is53WeekYear=function(){return 53===r._weekRange(this._year)},a.lengthOfYear=function(){return this.is53WeekYear()?371:364},a._withAdjuster=function(e){return e instanceof r?e:t.prototype._withAdjuster.call(this,e)},a._withField=function(t,n){if(t===e.IsoFields.WEEK_OF_WEEK_BASED_YEAR)return this.withWeek(e.IsoFields.WEEK_OF_WEEK_BASED_YEAR.range().checkValidIntValue(n,e.IsoFields.WEEK_OF_WEEK_BASED_YEAR));if(t===e.IsoFields.WEEK_BASED_YEAR)return this.withYear(e.IsoFields.WEEK_BASED_YEAR.range().checkValidIntValue(n,e.IsoFields.WEEK_BASED_YEAR));if(t instanceof e.ChronoField)throw new e.UnsupportedTemporalTypeException("Unsupported field: "+t);return t.adjustInto(this,n)},a.withYear=function(t){return 53===this._week&&r._weekRange(t)<53?r.of(t,52):r.of(t,this._week)},a.withWeek=function(t){return r.of(this._year,t)},a._plusUnit=function(t,n){if(n===e.ChronoUnit.WEEKS)return this.plusWeeks(t);if(n===e.IsoFields.WEEK_BASED_YEARS)return this.plusYears(t);if(n instanceof e.ChronoUnit)throw new e.UnsupportedTemporalTypeException("Unsupported unit: "+n);return n.addTo(this,t)},a.plusYears=function(t){if(0===t)return this;var e=F.safeToInt(F.safeAdd(this._year,t));return this.withYear(e)},a.plusWeeks=function(t){if(0===t)return this;var n=this.atDay(e.DayOfWeek.MONDAY).plusWeeks(t);return r.from(n)},a._minusUnit=function(t,e){return o(t,"amountToSubtract"),o(e,"unit"),this._plusUnit(-t,e)},a.minusYears=function(t){if(0===t)return this;var e=F.safeToInt(F.safeSubtract(this._year,t));return this.withYear(e)},a.minusWeeks=function(t){if(0===t)return this;var n=this.atDay(e.DayOfWeek.MONDAY).minusWeeks(t);return r.from(n)},a.query=function(n){return o(n,"query"),i(n,e.TemporalQuery,"query"),n===e.TemporalQueries.chronology()?e.IsoChronology.INSTANCE:t.prototype.query.call(this,n)},a.adjustInto=function(t){return t.with(e.IsoFields.WEEK_BASED_YEAR,this._year).with(e.IsoFields.WEEK_OF_WEEK_BASED_YEAR,this._week)},a.until=function(t,n){var o=r.from(t);if(n===e.ChronoUnit.WEEKS)return this._daysUntil(o);if(n===e.IsoFields.WEEK_BASED_YEARS)return this._yearsUntil(o);if(n instanceof e.ChronoUnit)throw new e.UnsupportedTemporalTypeException("Unsupported unit: "+n);return n.between(this,o)},a._daysUntil=function(t){var n=this.atDay(e.DayOfWeek.MONDAY),r=t.atDay(e.DayOfWeek.MONDAY).toEpochDay()-n.toEpochDay();return F.intDiv(r,7)},a._yearsUntil=function(t){var e=t._year-this._year;return e>0&&t._week<this._week?e-1:e<0&&t._week>this._week?e+1:e},a.format=function(t){return o(t,"formatter"),t.format(this)},a.atDay=function(t){o(t,"dayOfWeek");var n=e.LocalDate.of(this._year,1,4).dayOfWeek().value()+3,r=7*this._week+t.value()-n,i=e.Year.isLeap(this._year)?366:365;if(r>i)return e.LocalDate.ofYearDay(this._year+1,r-i);if(r>0)return e.LocalDate.ofYearDay(this._year,r);var a=e.Year.isLeap(this._year-1)?366:365;return e.LocalDate.ofYearDay(this._year-1,a+r)},a.compareTo=function(t){o(t,"other"),i(t,r,"other");var e=this._year-t._year;return 0===e&&(e=this._week-t._week),e},a.isAfter=function(t){return this.compareTo(t)>0},a.isBefore=function(t){return this.compareTo(t)<0},a.equals=function(t){return this===t||t instanceof r&&(this._year===t._year&&this._week===t._week)},a.hashCode=function(){return this._year^this._week<<25},a.toString=function(){var t=this._year;return(Math.abs(t)<1e3?t<0?"-"+(""+(t-1e4)).slice(-4):(""+(t+1e4)).slice(-4):t>9999?"+"+t:""+t).concat(this._week<10?"-W0":"-W").concat(this._week)},r}(e.Temporal);function v(){var t,r,o;R.PARSER=(new e.DateTimeFormatterBuilder).parseCaseInsensitive().appendValue(e.IsoFields.WEEK_BASED_YEAR,4,10,e.SignStyle.EXCEEDS_PAD).appendLiteral("-W").appendValue(e.IsoFields.WEEK_OF_WEEK_BASED_YEAR,2).toFormatter(),R.FROM=(t="YearWeek.FROM",r=function(t){return R.from(t)},o=function(t){function e(){return t.apply(this,arguments)||this}return n(e,t),e}(e.TemporalQuery),o.prototype.queryFrom=r,new o(t))}var Y=!1;return Y||(Y=!0,function(){s.VALUES=new Array(31);for(var t=0;t<31;t++)s.VALUES[t]=new s(t+1)}(),function(){c.VALUES=new Array(366);for(var t=0;t<366;t++)c.VALUES[t]=new c(t+1)}(),f.ALL=f.of(e.Instant.MIN,e.Instant.MAX),d.ALL=new d(e.LocalDate.MIN,e.LocalDate.MAX),m(),D(),T(),v()),e.use((function(){})),t.DayOfMonth=s,t.DayOfYear=c,t.Interval=f,t.LocalDateRange=d,t.OffsetDate=E,t.Quarter=A,t.YearQuarter=g,t.YearWeek=R,Object.defineProperty(t,"__esModule",{value:!0}),t}({},JSJoda);
5
+ var JSJodaExtra=function(t,e){"use strict";function n(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,r(t,e)}function r(t,e){return r=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},r(t,e)}function o(t,n){if(null==t)throw new e.NullPointerException(n+" must not be null");return t}function i(t,n,r){if(!(t instanceof n))throw new e.IllegalArgumentException(r+" must be an instance of "+(n.name?n.name:n)+(t&&t.constructor&&t.constructor.name?", but is "+t.constructor.name:""));return t}var a=e._.MathUtil,s=function(t){function r(e){var n;return(n=t.call(this)||this)._day=a.safeToInt(e),n}n(r,t),r.now=function(t){switch(arguments.length){case 0:return r._now0();case 1:if(o(t,"clockOrZone"),t instanceof e.ZoneId)return r._nowZoneId(t);if(t instanceof e.Clock)return r._nowClock(t);throw new e.IllegalArgumentException("zoneIdOrClock must be an instance of ZoneId or Clock, but is "+t.constructor.name);default:throw new e.IllegalArgumentException("Invalid number of arguments: "+arguments.length)}},r._now0=function(){return this.now(e.Clock.systemDefaultZone())},r._nowZoneId=function(t){return this.now(e.Clock.system(t))},r._nowClock=function(t){var n=e.LocalDate.now(t);return r.of(n.dayOfMonth())},r.of=function(t){if(1<=t&&t<=31)return r.VALUES[t-1];throw new e.DateTimeException("Invalid value for DayOfMonth: "+t)},r.from=function(t){if(t instanceof r)return t;o(t,"temporal");try{return r.of(t.get(e.ChronoField.DAY_OF_MONTH))}catch(n){throw new e.DateTimeException("Unable to obtain DayOfMonth from TemporalAccessor: "+t+" of type "+t.constructor.name,n)}};var s=r.prototype;return s.value=function(){return this._day},s.isSupported=function(t){return t instanceof e.ChronoField?t===e.ChronoField.DAY_OF_MONTH:null!=t&&t.isSupportedBy(this)},s.range=function(n){return o(n,"field"),n===e.ChronoField.DAY_OF_MONTH?n.range():t.prototype.range.call(this,n)},s.get=function(t){return this.range(t).checkValidIntValue(this.getLong(t),t)},s.getLong=function(t){if(o(t,"field"),t===e.ChronoField.DAY_OF_MONTH)return this._day;if(t instanceof e.ChronoField)throw new e.UnsupportedTemporalTypeException("Unsupported field: "+t);return t.getFrom(this)},s.isValidYearMonth=function(t){return null!=t&&t.isValidDay(this._day)},s.query=function(n){return o(n,"query"),i(n,e.TemporalQuery,"query"),n===e.TemporalQueries.chronology()?e.IsoChronology.INSTANCE:t.prototype.query.call(this,n)},s.adjustInto=function(t){return o(t,"temporal"),t.with(e.ChronoField.DAY_OF_MONTH,this._day)},s.atMonth=function(t){return o(t,"month"),t instanceof e.Month?e.MonthDay.of(t,Math.min(this._day,t.maxLength())):e.MonthDay.of(t,Math.min(this._day,e.Month.of(t).maxLength()))},s.atYearMonth=function(t){return o(t,"yearMonth"),t.atDay(Math.min(this._day,t.lengthOfMonth()))},s.compareTo=function(t){return o(t,"other"),i(t,r,"other"),this._day-t._day},s.equals=function(t){return this===t||t instanceof r&&this._day===t._day},s.hashCode=function(){return this._day},s.toString=function(){return"DayOfMonth:"+this._day},r}(e.TemporalAccessor);var u=e._.MathUtil,c=function(t){function r(e){var n;return(n=t.call(this)||this)._day=u.safeToInt(e),n}n(r,t),r.now=function(t){switch(arguments.length){case 0:return r._now0();case 1:if(o(t,"clockOrZone"),t instanceof e.ZoneId)return r._nowZoneId(t);if(t instanceof e.Clock)return r._nowClock(t);throw new e.IllegalArgumentException("zoneIdOrClock must be an instance of ZoneId or Clock, but is "+t.constructor.name);default:throw new e.IllegalArgumentException("Invalid number of arguments: "+arguments.length)}},r._now0=function(){return r.now(e.Clock.systemDefaultZone())},r._nowZoneId=function(t){return r.now(e.Clock.system(t))},r._nowClock=function(t){var n=e.LocalDate.now(t);return r.of(n.dayOfYear())},r.of=function(t){if(1<=t&&t<=366)return r.VALUES[t-1];throw new e.DateTimeException("Invalid value for DayOfYear: "+t)},r.from=function(t){if(o(t,"temporal"),i(t,e.TemporalAccessor,"temporal"),t instanceof r)return t;try{return r.of(t.get(e.ChronoField.DAY_OF_YEAR))}catch(n){throw new e.DateTimeException("Unable to obtain DayOfYear from TemporalAccessor: "+t+" of type "+t.constructor.name,n)}};var a=r.prototype;return a.value=function(){return this._day},a.isSupported=function(t){return t instanceof e.ChronoField?t===e.ChronoField.DAY_OF_YEAR:null!=t&&t.isSupportedBy(this)},a.range=function(n){return o(n,"field"),n===e.ChronoField.DAY_OF_YEAR?n.range():t.prototype.range.call(this,n)},a.get=function(t){return this.range(t).checkValidIntValue(this.getLong(t),t)},a.getLong=function(t){if(o(t,"field"),t===e.ChronoField.DAY_OF_YEAR)return this._day;if(t instanceof e.ChronoField)throw new e.UnsupportedTemporalTypeException("Unsupported field: "+t);return t.getFrom(this)},a.isValidYear=function(t){return this._day<366||e.Year.isLeap(t)},a.query=function(n){return o(n,"query"),i(n,e.TemporalQuery,"query"),n===e.TemporalQueries.chronology()?e.IsoChronology.INSTANCE:t.prototype.query.call(this,n)},a.adjustInto=function(t){return o(t,"temporal"),t.with(e.ChronoField.DAY_OF_YEAR,this._day)},a.atYear=function(t){return o(t,"year"),t instanceof e.Year?t.atDay(this._day):e.LocalDate.ofYearDay(t,this._day)},a.compareTo=function(t){return o(t,"other"),i(t,r,"other"),this._day-t._day},a.equals=function(t){return this===t||t instanceof r&&this._day===t._day},a.hashCode=function(){return this._day},a.toString=function(){return"DayOfYear:"+this._day},r}(e.TemporalAccessor);var f=function(){function t(t,e){this._start=t,this._end=e}t.of=function(n,r){return r instanceof e.Duration?t.ofInstantDuration(n,r):t.ofInstantInstant(n,r)},t.ofInstantInstant=function(n,r){if(o(n,"startInclusive"),o(r,"endExclusive"),i(n,e.Instant,"startInclusive"),i(r,e.Instant,"endExclusive"),r.isBefore(n))throw new e.DateTimeException("End instant must on or after start instant");return new t(n,r)},t.ofInstantDuration=function(n,r){if(o(n,"startInclusive"),o(r,"duration"),i(n,e.Instant,"startInclusive"),i(r,e.Duration,"duration"),r.isNegative())throw new e.DateTimeException("Duration must not be zero or negative");return new t(n,n.plus(r))},t.parse=function(n){if(o(n,"text"),"string"!=typeof n)throw new e.IllegalArgumentException("text must be a string, but is "+n.constructor.name);for(var r=0;r<n.length;r+=1)if("/"===n.charAt(r)){var i=n.charAt(0);if("P"===i||"p"===i){var a=e.Duration.parse(n.substring(0,r)),s=e.ZonedDateTime.parse(n.substring(r+1,n.length)).toInstant();return t.of(s.minus(a),s)}var u=e.ZonedDateTime.parse(n.substring(0,r)).toInstant();if(r+1<n.length){var c=n.charAt(r+1);if("P"===c||"p"===c){var f=e.Duration.parse(n.substring(r+1,n.length));return t.of(u,u.plus(f))}}var h=e.ZonedDateTime.parse(n.substring(r+1,n.length)).toInstant();return t.of(u,h)}throw new e.DateTimeParseException("Interval cannot be parsed, no forward slash found",n,0)};var n=t.prototype;return n.start=function(){return this._start},n.end=function(){return this._end},n.isEmpty=function(){return this._start.equals(this._end)},n.isUnboundedStart=function(){return this._start.equals(e.Instant.MIN)},n.isUnboundedEnd=function(){return this._end.equals(e.Instant.MAX)},n.withStart=function(e){return t.of(e,this._end)},n.withEnd=function(e){return t.of(this._start,e)},n.contains=function(t){return o(t,"instant"),i(t,e.Instant,"instant"),this._start.compareTo(t)<=0&&(t.compareTo(this._end)<0||this.isUnboundedEnd())},n.encloses=function(e){return o(e,"other"),i(e,t,"other"),this._start.compareTo(e.start())<=0&&e.end().compareTo(this._end)<=0},n.abuts=function(e){return o(e,"other"),i(e,t,"other"),!this._end.equals(e.start())!=!this._start.equals(e.end())},n.isConnected=function(e){return o(e,"other"),i(e,t,"other"),this.equals(e)||this._start.compareTo(e.end())<=0&&e.start().compareTo(this._end)<=0},n.overlaps=function(e){return o(e,"other"),i(e,t,"other"),e.equals(this)||this._start.compareTo(e.end())<0&&e.start().compareTo(this._end)<0},n.intersection=function(n){if(o(n,"other"),i(n,t,"other"),!1===this.isConnected(n))throw new e.DateTimeException("Intervals do not connect: "+this+" and "+n);var r=this._start.compareTo(n.start()),a=this._end.compareTo(n.end());if(r>=0&&a<=0)return this;if(r<=0&&a>=0)return n;var s=r>=0?this._start:n.start(),u=a<=0?this._end:n.end();return t.of(s,u)},n.union=function(n){if(o(n,"other"),i(n,t,"other"),!1===this.isConnected(n))throw new e.DateTimeException("Intervals do not connect: "+this+" and "+n);var r=this._start.compareTo(n.start()),a=this._end.compareTo(n.end());if(r>=0&&a<=0)return n;if(r<=0&&a>=0)return this;var s=r>=0?n.start():this._start,u=a<=0?n.end():this._end;return t.of(s,u)},n.span=function(e){o(e,"other"),i(e,t,"other");var n=this._start.compareTo(e.start()),r=this._end.compareTo(e.end()),a=n>=0?e.start():this._start,s=r<=0?e.end():this._end;return t.of(a,s)},n.isAfter=function(t){return t instanceof e.Instant?this.isAfterInstant(t):this.isAfterInterval(t)},n.isBefore=function(t){return t instanceof e.Instant?this.isBeforeInstant(t):this.isBeforeInterval(t)},n.isAfterInstant=function(t){return this._start.compareTo(t)>0},n.isBeforeInstant=function(t){return this._end.compareTo(t)<=0&&this._start.compareTo(t)<0},n.isAfterInterval=function(t){return this._start.compareTo(t.end())>=0&&!t.equals(this)},n.isBeforeInterval=function(t){return this._end.compareTo(t.start())<=0&&!t.equals(this)},n.toDuration=function(){return e.Duration.between(this._start,this._end)},n.equals=function(e){return this===e||e instanceof t&&(this._start.equals(e.start())&&this._end.equals(e.end()))},n.hashCode=function(){return this._start.hashCode()^this._end.hashCode()},n.toString=function(){return this._start.toString()+"/"+this._end.toString()},t}();var h=e.LocalDate.MIN.plusDays(1),l=e.LocalDate.MAX.minusDays(1),d=function(){function t(t,n){if(o(t,"startInclusive"),o(n,"endExclusive"),i(t,e.LocalDate,"startInclusive"),i(n,e.LocalDate,"endExclusive"),n.isBefore(t))throw new e.DateTimeException("End date must be on or after start date");if(t.equals(l))throw new e.DateTimeException("Range must not start at LocalDate.MAX.minusDays(1)");if(n.equals(h))throw new e.DateTimeException("Range must not end at LocalDate.MIN.plusDays(1)");if(n.equals(e.LocalDate.MIN)||t.equals(e.LocalDate.MAX))throw new e.DateTimeException("Empty range must not be at LocalDate.MIN or LocalDate.MAX");this._start=t,this._end=n}t.of=function(n,r){if(n instanceof e.LocalDate&&r instanceof e.LocalDate)return t._ofLocalDateLocalDate(n,r);if(n instanceof e.LocalDate&&r instanceof e.Period)return t._ofLocalDatePeriod(n,r);var o=[];throw n instanceof e.LocalDate||o.push("startInclusive must be an instance of LocalDate but is "+n.constructor.name),r instanceof e.LocalDate||r instanceof e.Period||o.push("endExclusiveOrPeriod must be an instance of LocalDate or Period but is "+r.constructor.name),new e.IllegalArgumentException(o.join(" and "))},t._ofLocalDateLocalDate=function(n,r){return o(n,"startInclusive"),o(r,"endExclusive"),i(n,e.LocalDate,"startInclusive"),i(r,e.LocalDate,"endExclusive"),new t(n,r)},t._ofLocalDatePeriod=function(n,r){if(o(n,"startInclusive"),o(r,"period"),i(n,e.LocalDate,"startInclusive"),i(r,e.Period,"period"),r.isNegative())throw new e.DateTimeException("Period must not be zero or negative");return new t(n,n.plus(r))},t.ofClosed=function(n,r){if(o(n,"startInclusive"),o(r,"endInclusive"),i(n,e.LocalDate,"startInclusive"),i(r,e.LocalDate,"endInclusive"),r.isBefore(n))throw new e.DateTimeException("Start date must be on or before end date");return new t(n,r.equals(e.LocalDate.MAX)?e.LocalDate.MAX:r.plusDays(1))},t.ofEmpty=function(n){return o(n,"date"),i(n,e.LocalDate,"date"),new t(n,n)},t.ofUnbounded=function(){return t.ALL},t.ofUnboundedStart=function(n){return o(n,"endExclusive"),i(n,e.LocalDate,"endExclusive"),t.of(e.LocalDate.MIN,n)},t.ofUnboundedEnd=function(n){return t.of(n,e.LocalDate.MAX)},t.parse=function(n){o(n,"text");for(var r=0;r<n.length;r++)if("/"===n[r]){var i=n.charAt(0);if("P"===i||"p"===i){var a=e.Period.parse(n.slice(0,r)),s=e.LocalDate.parse(n.slice(r+1,n.length));return t.of(s.minus(a),s)}var u=e.LocalDate.parse(n.slice(0,r));if(r+1<n.length){var c=n[r+1];if("P"===c||"p"===c){var f=e.Period.parse(n.slice(r+1,n.length));return t.of(u,u.plus(f))}}var h=e.LocalDate.parse(n.slice(r+1,n.length));return t.of(u,h)}throw new e.DateTimeParseException("LocalDateRange cannot be parsed, no forward slash found",n,0)};var n=t.prototype;return n.start=function(){return this._start},n.end=function(){return this._end},n.endInclusive=function(){return this.isUnboundedEnd()?e.LocalDate.MAX:this._end.minusDays(1)},n.isEmpty=function(){return this._start.equals(this._end)},n.isUnboundedStart=function(){return this._start.equals(e.LocalDate.MIN)},n.isUnboundedEnd=function(){return this._end.equals(e.LocalDate.MAX)},n.withStart=function(e){return t.of(this._start.with(e),this._end)},n.withEnd=function(e){return t.of(this._start,this._end.with(e))},n.contains=function(t){return o(t,"date"),this._start.compareTo(t)<=0&&(t.compareTo(this._end)<0||this.isUnboundedEnd())},n.encloses=function(t){return o(t,"other"),this._start.compareTo(t._start)<=0&&t._end.compareTo(this._end)<=0},n.abuts=function(t){return o(t,"other"),this._end.equals(t._start)!==this._start.equals(t._end)},n.isConnected=function(t){return o(t,"other"),this.equals(t)||this._start.compareTo(t._end)<=0&&t._start.compareTo(this._end)<=0},n.overlaps=function(t){return o(t,"other"),t.equals(this)||this._start.compareTo(t._end)<0&&t._start.compareTo(this._end)<0},n.intersection=function(n){if(o(n,"other"),!1===this.isConnected(n))throw new e.DateTimeException("Ranges do not connect: "+this+" and "+n);var r=this._start.compareTo(n._start),i=this._end.compareTo(n._end);if(r>=0&&i<=0)return this;if(r<=0&&i>=0)return n;var a=r>=0?this._start:n._start,s=i<=0?this._end:n._end;return t.of(a,s)},n.union=function(n){if(o(n,"other"),!1===this.isConnected(n))throw new e.DateTimeException("Ranges do not connect: "+this+" and "+n);var r=this._start.compareTo(n._start),i=this._end.compareTo(n._end);if(r>=0&&i<=0)return n;if(r<=0&&i>=0)return this;var a=r>=0?n._start:this._start,s=i<=0?n._end:this._end;return t.of(a,s)},n.span=function(e){o(e,"other");var n=this._start.compareTo(e._start),r=this._end.compareTo(e._end),i=n>=0?e._start:this._start,a=r<=0?e._end:this._end;return t.of(i,a)},n.isAfter=function(n){if(n instanceof e.LocalDate)return this._isAfterLocalDate(n);if(n instanceof t)return this._isAfterLocalDateRange(n);throw new e.IllegalArgumentException("localDateOrLocalDateRange must be an instance of LocalDate or LocalDateRange but is "+n.constructor.name)},n.isBefore=function(n){if(n instanceof e.LocalDate)return this._isBeforeLocalDate(n);if(n instanceof t)return this._isBeforeLocalDateRange(n);throw new e.IllegalArgumentException("localDateOrLocalDateRange must be an instance of LocalDate or LocalDateRange but is "+n.constructor.name)},n._isAfterLocalDate=function(t){return this._start.compareTo(t)>0},n._isBeforeLocalDate=function(t){return this._end.compareTo(t)<=0&&this._start.compareTo(t)<0},n._isAfterLocalDateRange=function(t){return this._start.compareTo(t._end)>=0&&!t.equals(this)},n._isBeforeLocalDateRange=function(t){return this._end.compareTo(t._start)<=0&&!t.equals(this)},n.lengthInDays=function(){return this.isUnboundedStart()||this.isUnboundedEnd()?Number.POSITIVE_INFINITY:this._end.toEpochDay()-this._start.toEpochDay()},n.toPeriod=function(){if(this.isUnboundedStart()||this.isUnboundedEnd())throw new e.ArithmeticException("Unbounded range cannot be converted to a Period");return e.Period.between(this._start,this._end)},n.equals=function(e){if(this===e)return!0;if(e instanceof t){var n=e;return this._start.equals(n._start)&&this._end.equals(n._end)}return!1},n.hashCode=function(){return this._start.hashCode()^this._end.hashCode()},n.toString=function(){return this._start.toString()+"/"+this._end.toString()},t}();var _=e._.MathUtil,p=86400,E=function(t){function r(e,n){var r;return(r=t.call(this)||this)._date=o(e,"date"),r._offset=o(n,"offset"),r}n(r,t),r.now=function(t){return 0===arguments.length?r._now0():1===arguments.length&&t instanceof e.ZoneId?r._nowZoneId(t):r._nowClock(t)},r._now0=function(){return r.now(e.Clock.systemDefaultZone())},r._nowZoneId=function(t){return r.now(e.Clock.system(t))},r._nowClock=function(t){o(t,"clock");var e=t.instant();return r.ofInstant(e,t.zone().rules().offset(e))},r.of=function(){switch(arguments.length){case 2:return r._ofLocalDateZoneOffset.apply(r,arguments);case 4:return r._ofIntIntIntZoneOffset.apply(r,arguments);default:throw new e.IllegalArgumentException("Illegal number of arguments")}},r._ofLocalDateZoneOffset=function(t,e){return new r(t,e)},r._ofIntIntIntZoneOffset=function(t,n,o,i){return new r(e.LocalDate.of(t,n,o),i)},r.ofInstant=function(t,n){o(t,"instant"),o(n,"zone");var i=n.rules().offset(t),a=t.epochSecond()+i.totalSeconds(),s=_.floorDiv(a,p);return new r(e.LocalDate.ofEpochDay(s),i)},r.from=function(t){if(t instanceof r)return t;o(t,"temporal");try{return new r(e.LocalDate.from(t),e.ZoneOffset.from(t))}catch(n){throw new e.DateTimeException("Unable to obtain OffsetDate from TemporalAccessor: "+t.constructor.name,n)}},r.parse=function(t,n){return void 0===n&&(n=e.DateTimeFormatter.ISO_OFFSET_DATE),o(n,"formatter"),n.parse(t,r.FROM)};var a=r.prototype;return a._with=function(t,e){return this._date===t&&this._offset.equals(e)?this:new r(t,e)},a.isSupported=function(t){if(t instanceof e.TemporalField)return this._isSupportedField(t);if(t instanceof e.TemporalUnit)return this._isSupportedUnit(t);if(null==t)return!1;throw new e.IllegalArgumentException("fieldOrUnit must be an instance of TemporalField or TemporalUnit, but is "+t.constructor.name)},a._isSupportedField=function(t){return t instanceof e.ChronoField?t.isDateBased()||t===e.ChronoField.OFFSET_SECONDS:null!=t&&t.isSupportedBy(this)},a._isSupportedUnit=function(t){return t instanceof e.ChronoUnit?t.isDateBased():null!=t&&t.isSupportedBy(this)},a.range=function(t){return o(t,"field"),i(t,e.TemporalField,"field"),t instanceof e.ChronoField?t===e.ChronoField.OFFSET_SECONDS?t.range():this._date.range(t):t.rangeRefinedBy(this)},a.get=function(t){return o(t,"field"),i(t,e.TemporalField,"field"),this.range(t).checkValidIntValue(this.getLong(t),t)},a.getLong=function(t){return o(t,"field"),i(t,e.TemporalField,"field"),t instanceof e.ChronoField?t===e.ChronoField.OFFSET_SECONDS?this.offset().totalSeconds():this._date.getLong(t):t.getFrom(this)},a.offset=function(){return this._offset},a.withOffsetSameLocal=function(t){return o(t,"offset"),this._with(this._date,t)},a.toLocalDate=function(){return this._date},a.year=function(){return this._date.year()},a.monthValue=function(){return this._date.monthValue()},a.month=function(){return this._date.month()},a.dayOfMonth=function(){return this._date.dayOfMonth()},a.dayOfYear=function(){return this._date.dayOfYear()},a.dayOfWeek=function(){return this._date.dayOfWeek()},a._withAdjuster=function(n){return n instanceof e.LocalDate?this._with(n,this._offset):n instanceof e.ZoneOffset?this._with(this._date,n):n instanceof r?n:t.prototype._withAdjuster.call(this,n)},a._withField=function(t,n){if(o(t,"field"),i(t,e.TemporalField,"field"),t instanceof e.ChronoField){if(t===e.ChronoField.OFFSET_SECONDS){var r=t;return this._with(this._date,e.ZoneOffset.ofTotalSeconds(r.checkValidIntValue(n)))}return this._with(this._date.with(t,n),this._offset)}return t.adjustInto(this,n)},a.withYear=function(t){return this._with(this._date.withYear(t),this._offset)},a.withMonth=function(t){return this._with(this._date.withMonth(t),this._offset)},a.withDayOfMonth=function(t){return this._with(this._date.withDayOfMonth(t),this._offset)},a.withDayOfYear=function(t){return this._with(this._date.withDayOfYear(t),this._offset)},a._plusUnit=function(t,n){return n instanceof e.ChronoUnit?this._with(this._date.plus(t,n),this._offset):n.addTo(this,t)},a.plusYears=function(t){return this._with(this._date.plusYears(t),this._offset)},a.plusMonths=function(t){return this._with(this._date.plusMonths(t),this._offset)},a.plusWeeks=function(t){return this._with(this._date.plusWeeks(t),this._offset)},a.plusDays=function(t){return this._with(this._date.plusDays(t),this._offset)},a.minusYears=function(t){return this._with(this._date.minusYears(t),this._offset)},a.minusMonths=function(t){return this._with(this._date.minusMonths(t),this._offset)},a.minusWeeks=function(t){return this._with(this._date.minusWeeks(t),this._offset)},a.minusDays=function(t){return this._with(this._date.minusDays(t),this._offset)},a.query=function(n){return o(n,"query"),i(n,e.TemporalQuery,"query"),n===e.TemporalQueries.chronology()?e.IsoChronology.INSTANCE:n===e.TemporalQueries.precision()?e.ChronoUnit.DAYS:n===e.TemporalQueries.offset()||n===e.TemporalQueries.zone()?this.offset():t.prototype.query.call(this,n)},a.adjustInto=function(t){return t.with(e.ChronoField.OFFSET_SECONDS,this.offset().totalSeconds()).with(e.ChronoField.EPOCH_DAY,this.toLocalDate().toEpochDay())},a.until=function(t,n){var o=r.from(t);if(n instanceof e.ChronoUnit){var i=o._offset.totalSeconds()-this._offset.totalSeconds(),a=o._date.plusDays(_.intDiv(-i,p));return this._date.until(a,n)}return n.between(this,o)},a.format=function(t){return o(t,"formatter"),t.format(this)},a.atTime=function(t){return e.OffsetDateTime.of(this._date,t,this._offset)},a._toEpochSecond=function(){return this._date.toEpochDay()*p-this._offset.totalSeconds()},a.toEpochSecond=function(t){return o(t,"time"),this._toEpochSecond()+t.toSecondOfDay()},a.compareTo=function(t){if(o(t,"other"),i(t,r,"other"),this._offset.equals(t._offset))return this._date.compareTo(t._date);var e=this._toEpochSecond()-t._toEpochSecond();return 0===e&&(e=this._date.compareTo(t._date)),e},a.isAfter=function(t){return o(t,"other"),i(t,r,"other"),this._toEpochSecond()>t._toEpochSecond()},a.isBefore=function(t){return o(t,"other"),i(t,r,"other"),this._toEpochSecond()<t._toEpochSecond()},a.isEqual=function(t){return o(t,"other"),i(t,r,"other"),this._toEpochSecond()===t._toEpochSecond()},a.equals=function(t){if(this===t)return!0;if(t instanceof r){var e=t;return this._date.equals(e._date)&&this._offset.equals(e._offset)}return!1},a.hashCode=function(){return this._date.hashCode()^this._offset.hashCode()},a.toString=function(){return this._date.toString()+this._offset.toString()},r}(e.Temporal);function m(){var t,r,o;E.MIN=E.of(e.LocalDate.MIN,e.ZoneOffset.MAX),E.MAX=E.of(e.LocalDate.MAX,e.ZoneOffset.MIN),E.FROM=(t="OffsetDate.FROM",r=function(t){return E.from(t)},o=function(t){function e(){return t.apply(this,arguments)||this}return n(e,t),e}(e.TemporalQuery),o.prototype.queryFrom=r,new o(t))}var w,y=e._.MathUtil,A=function(t){function r(e,n){var r;return(r=t.call(this)||this)._value=y.safeToInt(e),r._name=n,r}n(r,t),r.valueOf=function(t){switch(o(t,"name"),t){case"Q1":return r.Q1;case"Q2":return r.Q2;case"Q3":return r.Q3;case"Q4":return r.Q4}throw new e.IllegalArgumentException("No enum constant Quarter."+t)},r.values=function(){return w.slice()},r.of=function(t){switch(o(t,"quarterOfYear"),t){case 1:return r.Q1;case 2:return r.Q2;case 3:return r.Q3;case 4:return r.Q4;default:throw new e.DateTimeException("Invalid value for Quarter: "+t)}},r.ofMonth=function(t){return o(t,"monthOfYear"),e.ChronoField.MONTH_OF_YEAR.range().checkValidValue(t,e.ChronoField.MONTH_OF_YEAR),r.of(y.intDiv(t-1,3)+1)},r.from=function(t){if(t instanceof r)return t;if(t instanceof e.Month){var n=t;return r.of(y.intDiv(n.ordinal(),3)+1)}try{var o=y.safeToInt(t.getLong(e.IsoFields.QUARTER_OF_YEAR));return r.of(o)}catch(n){throw new e.DateTimeException("Unable to obtain Quarter from TemporalAccessor: "+t+" of type "+t.constructor.name,n)}};var a=r.prototype;return a.value=function(){return this._value},a.displayName=function(t,n){throw new e.IllegalArgumentException("Pattern using (localized) text not implemented yet!")},a.isSupported=function(t){return t===e.IsoFields.QUARTER_OF_YEAR||!(t instanceof e.ChronoField)&&(null!=t&&t.isSupportedBy(this))},a.range=function(n){if(o(n,"field"),n===e.IsoFields.QUARTER_OF_YEAR)return n.range();if(n instanceof e.ChronoField)throw new e.UnsupportedTemporalTypeException("Unsupported field: "+n);return t.prototype.range.call(this,n)},a.get=function(t){return o(t,"field"),i(t,e.TemporalField,"field"),this.range(t).checkValidIntValue(this.getLong(t),t)},a.getLong=function(t){if(o(t,"field"),t===e.IsoFields.QUARTER_OF_YEAR)return this.value();if(t instanceof e.ChronoField)throw new e.UnsupportedTemporalTypeException("Unsupported field: "+t);return t.getFrom(this)},a.plus=function(t){var e=y.intMod(t,4);return w[(this.ordinal()+e+4)%4]},a.minus=function(t){return this.plus(-y.intMod(t,4))},a.length=function(t){switch(this){case r.Q1:return t?91:90;case r.Q2:return 91;default:return 92}},a.firstMonth=function(){switch(this){case r.Q1:return e.Month.JANUARY;case r.Q2:return e.Month.APRIL;case r.Q3:return e.Month.JULY;case r.Q4:return e.Month.OCTOBER;default:throw new e.IllegalStateException("Unreachable")}},a.query=function(n){return o(n,"query"),i(n,e.TemporalQuery,"query"),n===e.TemporalQueries.chronology()?e.IsoChronology.INSTANCE:n===e.TemporalQueries.precision()?e.IsoFields.QUARTER_YEARS:t.prototype.query.call(this,n)},a.adjustInto=function(t){return o(t,"temporal"),t.with(e.IsoFields.QUARTER_OF_YEAR,this.value())},a.ordinal=function(){return this._value-1},a.name=function(){return this._name},a.compareTo=function(t){return o(t,"other"),i(t,r,"other"),this._value-t._value},a.toString=function(){return this.name()},a.equals=function(t){return this===t},a.hashCode=function(){return this._value},r}(e.TemporalAccessor);function D(){var t,r,o;A.Q1=new A(1,"Q1"),A.Q2=new A(2,"Q2"),A.Q3=new A(3,"Q3"),A.Q4=new A(4,"Q4"),A.FROM=(t="Quarter.FROM",r=function(t){return A.from(t)},o=function(t){function e(){return t.apply(this,arguments)||this}return n(e,t),e}(e.TemporalQuery),o.prototype.queryFrom=r,new o(t)),w=[A.Q1,A.Q2,A.Q3,A.Q4]}var I=e._.MathUtil,T=function(){function t(){}return t.nextWorkingDay=function(){return g.NEXT_WORKING},t.nextWorkingDayOrSame=function(){return g.NEXT_WORKING_OR_SAME},t.previousWorkingDay=function(){return g.PREVIOUS_WORKING},t.previousWorkingDayOrSame=function(){return g.PREVIOUS_WORKING_OR_SAME},t.parseFirstMatching=function(t,n){o(t,"text"),o(n,"query");for(var r=arguments.length,i=new Array(r>2?r-2:0),a=2;a<r;a++)i[a-2]=arguments[a];if(o(i,"formatters"),0===i.length)throw new e.DateTimeParseException("No formatters specified",t,0);if(1===i.length)return i[0].parse(t,n);for(var s=0,u=i;s<u.length;s++){var c=u[s];try{var f=new e.ParsePosition(0);c.parseUnresolved(t,f);var h=t.length;if(-1===f.getErrorIndex()&&f.getIndex()===h)return c.parse(t,n)}catch(t){}}throw new e.DateTimeParseException("Text '"+t+"' could not be parsed",t,0)},t.convertAmount=function(e,n,r){if(o(n,"fromUnit"),o(r,"toUnit"),t._validateUnit(n),t._validateUnit(r),n===r)return[e,0];if(t._isPrecise(n)&&t._isPrecise(r)){var i=n.duration().toNanos(),a=r.duration().toNanos();if(i>a){var s=I.intDiv(i,a);return[I.safeMultiply(e,s),0]}var u=I.intDiv(a,i);return[I.intDiv(e,u),I.intMod(e,u)]}var c=t._monthMonthFactor(n,n,r),f=t._monthMonthFactor(r,n,r);if(c>f){var h=I.intDiv(c,f);return[I.safeMultiply(e,h),0]}var l=I.intDiv(f,c);return[I.intDiv(e,l),I.intMod(e,l)]},t._validateUnit=function(t){if(t instanceof e.ChronoUnit){if(t===e.ChronoUnit.ERAS||t===e.ChronoUnit.FOREVER)throw new e.UnsupportedTemporalTypeException("Unsupported TemporalUnit: "+t)}else if(t!==e.IsoFields.QUARTER_YEARS)throw new e.UnsupportedTemporalTypeException("Unsupported TemporalUnit: "+t)},t._isPrecise=function(t){return t instanceof e.ChronoUnit&&t.compareTo(e.ChronoUnit.WEEKS)<=0},t._monthMonthFactor=function(t,n,r){if(t instanceof e.ChronoUnit)switch(t){case e.ChronoUnit.MONTHS:return 1;case e.ChronoUnit.YEARS:return 12;case e.ChronoUnit.DECADES:return 120;case e.ChronoUnit.CENTURIES:return 1200;case e.ChronoUnit.MILLENNIA:return 12e3;default:throw new e.DateTimeException("Unable to convert between units: "+n+" to "+r)}return 3},t}(),g={};var F=e._.MathUtil,R=function(t){function r(e,n){var r;return(r=t.call(this)||this)._year=F.safeToInt(e),r._quarter=i(n,A,"Quarter"),r}n(r,t),r.now=function(t){return 0===arguments.length?r._now0():1===arguments.length&&t instanceof e.ZoneId?r._nowZoneId(t):r._nowClock(t)},r._now0=function(){return r.now(e.Clock.systemDefaultZone())},r._nowZoneId=function(t){return r.now(e.Clock.system(t))},r._nowClock=function(t){var n=e.LocalDate.now(t);return r.of(n.getYear(),A.from(n.getMonth()))},r.of=function(t,n){if(t instanceof e.Year&&n instanceof A)return r._ofYearQuarter(t,n);if(t instanceof e.Year&&"number"==typeof n)return r._ofYearInt(t,n);if("number"==typeof t&&n instanceof A)return r._ofIntQuarter(t,n);if("number"==typeof t&&"number"==typeof n)return r._ofIntInt(t,n);var o="year must be an instance of Year or number but is "+t.constructor.name,i="quarter must be an instance of Quarter or number but is "+n.constructor.name;throw new e.IllegalArgumentException(o+" and "+i)},r._ofYearQuarter=function(t,e){return r.of(t.value(),e)},r._ofYearInt=function(t,e){return r.of(t.value(),A.of(e))},r._ofIntQuarter=function(t,n){return e.ChronoField.YEAR.checkValidValue(t),o(n,"quarter"),new r(t,n)},r._ofIntInt=function(t,n){return e.ChronoField.YEAR.checkValidValue(t),new r(t,A.of(n))},r.from=function(t){if(t instanceof r)return t;o(t,"temporal");try{var n=F.safeToInt(t.getLong(e.ChronoField.YEAR)),i=F.safeToInt(t.getLong(e.IsoFields.QUARTER_OF_YEAR));return r.of(n,i)}catch(n){throw new e.DateTimeException("Unable to obtain YearQuarter from TemporalAccessor: "+t+" of type "+t.constructor.name,n)}},r.parse=function(t,n){return void 0===n&&(n=r.PARSER),o(n,"formatter"),i(n,e.DateTimeFormatter,"formatter"),n.parse(t,r.FROM)};var a=r.prototype;return a._with=function(t,e){return this._year===t&&this._quarter===e?this:new r(t,e)},a.isSupported=function(t){if(t instanceof e.TemporalField)return this._isSupportedField(t);if(t instanceof e.TemporalUnit)return this._isSupportedUnit(t);if(null==t)return!1;throw new e.IllegalArgumentException("fieldOrUnit must be an instance of TemporalField or TemporalUnit, but is "+t.constructor.name)},a._isSupportedField=function(t){return t===e.IsoFields.QUARTER_OF_YEAR||(t instanceof e.ChronoField?t===e.ChronoField.YEAR||t===e.ChronoField.YEAR_OF_ERA||t===e.ChronoField.ERA:null!=t&&t.isSupportedBy(this))},a._isSupportedUnit=function(t){return t===e.IsoFields.QUARTER_YEARS||(t instanceof e.ChronoUnit?t===e.ChronoUnit.YEARS||t===e.ChronoUnit.DECADES||t===e.ChronoUnit.CENTURIES||t===e.ChronoUnit.MILLENNIA||t===e.ChronoUnit.ERAS:null!=t&&t.isSupportedBy(this))},a.range=function(n){return o(n,"field"),i(n,e.TemporalField,"field"),n===e.IsoFields.QUARTER_OF_YEAR?e.IsoFields.QUARTER_OF_YEAR.range():n===e.ChronoField.YEAR_OF_ERA?this.year()<=0?e.ValueRange.of(1,e.Year.MAX_VALUE+1):e.ValueRange.of(1,e.Year.MAX_VALUE):t.prototype.range.call(this,n)},a.get=function(t){return o(t,"field"),i(t,e.TemporalField,"field"),this.range(t).checkValidIntValue(this.getLong(t),t)},a.getLong=function(n){if(o(n,"field"),i(n,e.TemporalField,"field"),n===e.IsoFields.QUARTER_OF_YEAR)return this._quarter.value();if(n instanceof e.ChronoField)switch(n){case e.ChronoField.YEAR_OF_ERA:return this._year<1?1-this._year:this._year;case e.ChronoField.YEAR:return this._year;case e.ChronoField.ERA:return this._year<1?0:1;default:throw new e.UnsupportedTemporalTypeException("Unsupported field: "+n)}return t.prototype.get.call(this,n)},a._prolepticQuarter=function(){return 4*this._year+(this._quarter.value()-1)},a.year=function(){return this._year},a.quarterValue=function(){return this._quarter.value()},a.quarter=function(){return this._quarter},a.isLeapYear=function(){return e.IsoChronology.isLeapYear(this._year)},a.isValidDay=function(t){return t>=1&&t<=this.lengthOfQuarter()},a.lengthOfQuarter=function(){return this._quarter.length(this.isLeapYear())},a.lengthOfYear=function(){return this.isLeapYear()?366:365},a._withAdjuster=function(e){return e instanceof r?e:t.prototype._withAdjuster.call(this,e)},a._withField=function(t,n){if(o(t,"field"),i(t,e.TemporalField,"field"),t===e.IsoFields.QUARTER_OF_YEAR)return this.withQuarter(e.IsoFields.QUARTER_OF_YEAR.range().checkValidIntValue(n,e.IsoFields.QUARTER_OF_YEAR));if(t instanceof e.ChronoField)switch(t.checkValidValue(n),t){case e.ChronoField.YEAR_OF_ERA:return this.withYear(this._year<1?1-n:n);case e.ChronoField.YEAR:return this.withYear(n);case e.ChronoField.ERA:return this.getLong(e.ChronoField.ERA)===n?this:this.withYear(1-this._year);default:throw new e.UnsupportedTemporalTypeException("Unsupported field: "+t)}return t.adjustInto(this,n)},a.withYear=function(t){return e.ChronoField.YEAR.checkValidValue(t),this._with(t,this._quarter)},a.withQuarter=function(t){return e.IsoFields.QUARTER_OF_YEAR.range().checkValidValue(t,e.IsoFields.QUARTER_OF_YEAR),this._with(this._year,A.of(t))},a._plusUnit=function(t,n){if(n===e.IsoFields.QUARTER_YEARS)return this.plusQuarters(t);if(n instanceof e.ChronoUnit)switch(n){case e.ChronoUnit.YEARS:return this.plusYears(t);case e.ChronoUnit.DECADES:return this.plusYears(F.safeMultiply(t,10));case e.ChronoUnit.CENTURIES:return this.plusYears(F.safeMultiply(t,100));case e.ChronoUnit.MILLENNIA:return this.plusYears(F.safeMultiply(t,1e3));case e.ChronoUnit.ERAS:return this.with(e.ChronoField.ERA,F.safeAdd(this.getLong(e.ChronoField.ERA),t));default:throw new e.UnsupportedTemporalTypeException("Unsupported unit: "+n)}return n.addTo(this,t)},a.plusYears=function(t){if(0===t)return this;var n=e.ChronoField.YEAR.checkValidIntValue(this._year+t);return this._with(n,this._quarter)},a.plusQuarters=function(t){if(0===t)return this;var n=4*this._year+(this._quarter.value()-1)+t,r=e.ChronoField.YEAR.checkValidIntValue(F.intDiv(n,4)),o=F.floorMod(n,4)+1;return this._with(r,A.of(o))},a.minusYears=function(t){return t===F.MIN_SAFE_INTEGER?this.plusYears(F.MIN_SAFE_INTEGER).plusYears(1):this.plusYears(-t)},a.minusQuarters=function(t){return t===F.MIN_SAFE_INTEGER?this.plusQuarters(F.MIN_SAFE_INTEGER).plusQuarters(1):this.plusQuarters(-t)},a.query=function(n){return n===e.TemporalQueries.chronology()?e.IsoChronology.INSTANCE:n===e.TemporalQueries.precision()?e.IsoFields.QUARTER_YEARS:t.prototype.query.call(this,n)},a.adjustInto=function(t){var n=this._prolepticQuarter(),r=4*t.get(e.ChronoField.YEAR)+(t.get(e.IsoFields.QUARTER_OF_YEAR)-1);return t.plus(n-r,e.IsoFields.QUARTER_YEARS)},a.until=function(t,n){o(t,"endExclusive"),o(n,"unit"),i(t,e.Temporal,"endExclusive"),i(n,e.TemporalUnit,"unit");var a=r.from(t),s=a._prolepticQuarter()-this._prolepticQuarter();if(n===e.IsoFields.QUARTER_YEARS)return s;if(n instanceof e.ChronoUnit)switch(n){case e.ChronoUnit.YEARS:return F.intDiv(s,4);case e.ChronoUnit.DECADES:return F.intDiv(s,40);case e.ChronoUnit.CENTURIES:return F.intDiv(s,400);case e.ChronoUnit.MILLENNIA:return F.intDiv(s,4e3);case e.ChronoUnit.ERAS:return a.getLong(e.ChronoField.ERA)-this.getLong(e.ChronoField.ERA);default:throw new e.UnsupportedTemporalTypeException("Unsupported unit: "+n)}return n.between(this,a)},a.format=function(t){return o(t,"formatter"),t.format(this)},a.atDay=function(t){e.ValueRange.of(1,this.lengthOfQuarter()).checkValidValue(t,e.IsoFields.DAY_OF_QUARTER);for(var n=e.Year.isLeap(this._year),r=this._quarter.firstMonth();t>r.length(n);)t-=r.length(n),r=r.plus(1);return e.LocalDate.of(this._year,r,t)},a.atEndOfQuarter=function(){var t=this._quarter.firstMonth().plus(2);return e.LocalDate.of(this._year,t,t.maxLength())},a.compareTo=function(t){o(t,"other"),i(t,r,"other");var e=this._year-t._year;return 0===e&&(e=this._quarter.compareTo(t._quarter)),e},a.isAfter=function(t){return this.compareTo(t)>0},a.isBefore=function(t){return this.compareTo(t)<0},a.equals=function(t){if(this===t)return!0;if(t instanceof r){var e=t;return this._year===e._year&&this._quarter===e._quarter}return!1},a.hashCode=function(){return this._year^this._quarter.value()<<27},a.toString=function(){var t=this._year;return(Math.abs(t)<1e3?t<0?"-"+(""+(t-1e4)).slice(-4):(""+(t+1e4)).slice(-4):t>9999?"+"+t:""+t).concat("-").concat(this._quarter)},r}(e.Temporal);function v(){var t,r,o;R.PARSER=(new e.DateTimeFormatterBuilder).parseCaseInsensitive().appendValue(e.ChronoField.YEAR,4,10,e.SignStyle.EXCEEDS_PAD).appendLiteral("-").appendLiteral("Q").appendValue(e.IsoFields.QUARTER_OF_YEAR,1).toFormatter(),R.FROM=(t="YearQuarter.FROM",r=function(t){return R.from(t)},o=function(t){function e(){return t.apply(this,arguments)||this}return n(e,t),e}(e.TemporalQuery),o.prototype.queryFrom=r,new o(t))}var S=e._.MathUtil,Y=function(t){function r(e,n){var r;return(r=t.call(this)||this)._year=e,r._week=n,r}n(r,t),r.now=function(t){switch(arguments.length){case 0:return r._now0();case 1:if(o(t,"clockOrZone"),t instanceof e.ZoneId)return r._nowZoneId(t);if(t instanceof e.Clock)return r._nowClock(t);throw new e.IllegalArgumentException("zoneIdOrClock must be an instance of ZoneId or Clock, but is "+t.constructor.name);default:throw new e.IllegalArgumentException("Invalid number of arguments: "+arguments.length)}},r._now0=function(){return r.now(e.Clock.systemDefaultZone())},r._nowZoneId=function(t){return r.now(e.Clock.system(t))},r._nowClock=function(t){var n=e.LocalDate.now(t);return r.of(n.get(e.IsoFields.WEEK_BASED_YEAR),n.get(e.IsoFields.WEEK_OF_WEEK_BASED_YEAR))},r.of=function(t,n){return S.verifyInt(n),t instanceof e.Year?this._ofYearWeek(t,n):(S.verifyInt(t),this._ofWeekBasedYear(t,n))},r._ofYearWeek=function(t,e){var n=t.value();return this._ofWeekBasedYear(n,e)},r._ofWeekBasedYear=function(t,n){return e.IsoFields.WEEK_BASED_YEAR.range().checkValidValue(t,e.IsoFields.WEEK_BASED_YEAR),e.IsoFields.WEEK_OF_WEEK_BASED_YEAR.range().checkValidValue(n,e.IsoFields.WEEK_OF_WEEK_BASED_YEAR),53===n&&r._weekRange(t)<53&&(n=1,t++,e.IsoFields.WEEK_BASED_YEAR.range().checkValidValue(t,e.IsoFields.WEEK_BASED_YEAR)),new r(t,n)},r._weekRange=function(t){var n=e.LocalDate.of(t,1,1);return n.dayOfWeek()===e.DayOfWeek.THURSDAY||n.dayOfWeek()===e.DayOfWeek.WEDNESDAY&&n.isLeapYear()?53:52},r.from=function(t){if(t instanceof r)return t;o(t,"temporal");try{var n=S.safeToInt(t.getLong(e.IsoFields.WEEK_BASED_YEAR)),i=S.safeToInt(t.getLong(e.IsoFields.WEEK_OF_WEEK_BASED_YEAR));return r.of(n,i)}catch(n){throw new e.DateTimeException("Unable to obtain YearWeek from TemporalAccessor: "+t.constructor.name,n)}},r.parse=function(t,n){return void 0===n&&(n=r.PARSER),function(t,e,n){if(!t)throw n?new n(e):new Error(e)}(null!=n,"formatter",e.NullPointerException),n.parse(t,r.FROM)};var a=r.prototype;return a.isSupported=function(t){if(t instanceof e.TemporalField)return this._isSupportedField(t);if(t instanceof e.TemporalUnit)return this._isSupportedUnit(t);if(null==t)return!1;throw new e.IllegalArgumentException("fieldOrUnit must be an instance of TemporalField or TemporalUnit, but is "+t.constructor.name)},a._isSupportedField=function(t){return t===e.IsoFields.WEEK_OF_WEEK_BASED_YEAR||t===e.IsoFields.WEEK_BASED_YEAR||!(t instanceof e.ChronoField)&&(null!=t&&t.isSupportedBy(this))},a._isSupportedUnit=function(t){return t===e.ChronoUnit.WEEKS||t===e.IsoFields.WEEK_BASED_YEARS||!(t instanceof e.ChronoUnit)&&(null!=t&&t.isSupportedBy(this))},a.range=function(n){return o(n,"field"),n===e.IsoFields.WEEK_BASED_YEAR?e.IsoFields.WEEK_BASED_YEAR.range():n===e.IsoFields.WEEK_OF_WEEK_BASED_YEAR?e.ValueRange.of(1,r._weekRange(this._year)):t.prototype.range.call(this,n)},a.get=function(t){return this.range(t).checkValidIntValue(this.getLong(t),t)},a.getLong=function(t){if(o(t,"field"),t===e.IsoFields.WEEK_BASED_YEAR)return this._year;if(t===e.IsoFields.WEEK_OF_WEEK_BASED_YEAR)return this._week;if(t instanceof e.ChronoField)throw new e.UnsupportedTemporalTypeException("Unsupported field: "+t);return t.getFrom(this)},a.year=function(){return this._year},a.week=function(){return this._week},a.is53WeekYear=function(){return 53===r._weekRange(this._year)},a.lengthOfYear=function(){return this.is53WeekYear()?371:364},a._withAdjuster=function(e){return e instanceof r?e:t.prototype._withAdjuster.call(this,e)},a._withField=function(t,n){if(t===e.IsoFields.WEEK_OF_WEEK_BASED_YEAR)return this.withWeek(e.IsoFields.WEEK_OF_WEEK_BASED_YEAR.range().checkValidIntValue(n,e.IsoFields.WEEK_OF_WEEK_BASED_YEAR));if(t===e.IsoFields.WEEK_BASED_YEAR)return this.withYear(e.IsoFields.WEEK_BASED_YEAR.range().checkValidIntValue(n,e.IsoFields.WEEK_BASED_YEAR));if(t instanceof e.ChronoField)throw new e.UnsupportedTemporalTypeException("Unsupported field: "+t);return t.adjustInto(this,n)},a.withYear=function(t){return 53===this._week&&r._weekRange(t)<53?r.of(t,52):r.of(t,this._week)},a.withWeek=function(t){return r.of(this._year,t)},a._plusUnit=function(t,n){if(n===e.ChronoUnit.WEEKS)return this.plusWeeks(t);if(n===e.IsoFields.WEEK_BASED_YEARS)return this.plusYears(t);if(n instanceof e.ChronoUnit)throw new e.UnsupportedTemporalTypeException("Unsupported unit: "+n);return n.addTo(this,t)},a.plusYears=function(t){if(0===t)return this;var e=S.safeToInt(S.safeAdd(this._year,t));return this.withYear(e)},a.plusWeeks=function(t){if(0===t)return this;var n=this.atDay(e.DayOfWeek.MONDAY).plusWeeks(t);return r.from(n)},a._minusUnit=function(t,e){return o(t,"amountToSubtract"),o(e,"unit"),this._plusUnit(-t,e)},a.minusYears=function(t){if(0===t)return this;var e=S.safeToInt(S.safeSubtract(this._year,t));return this.withYear(e)},a.minusWeeks=function(t){if(0===t)return this;var n=this.atDay(e.DayOfWeek.MONDAY).minusWeeks(t);return r.from(n)},a.query=function(n){return o(n,"query"),i(n,e.TemporalQuery,"query"),n===e.TemporalQueries.chronology()?e.IsoChronology.INSTANCE:t.prototype.query.call(this,n)},a.adjustInto=function(t){return t.with(e.IsoFields.WEEK_BASED_YEAR,this._year).with(e.IsoFields.WEEK_OF_WEEK_BASED_YEAR,this._week)},a.until=function(t,n){var o=r.from(t);if(n===e.ChronoUnit.WEEKS)return this._daysUntil(o);if(n===e.IsoFields.WEEK_BASED_YEARS)return this._yearsUntil(o);if(n instanceof e.ChronoUnit)throw new e.UnsupportedTemporalTypeException("Unsupported unit: "+n);return n.between(this,o)},a._daysUntil=function(t){var n=this.atDay(e.DayOfWeek.MONDAY),r=t.atDay(e.DayOfWeek.MONDAY).toEpochDay()-n.toEpochDay();return S.intDiv(r,7)},a._yearsUntil=function(t){var e=t._year-this._year;return e>0&&t._week<this._week?e-1:e<0&&t._week>this._week?e+1:e},a.format=function(t){return o(t,"formatter"),t.format(this)},a.atDay=function(t){o(t,"dayOfWeek");var n=e.LocalDate.of(this._year,1,4).dayOfWeek().value()+3,r=7*this._week+t.value()-n,i=e.Year.isLeap(this._year)?366:365;if(r>i)return e.LocalDate.ofYearDay(this._year+1,r-i);if(r>0)return e.LocalDate.ofYearDay(this._year,r);var a=e.Year.isLeap(this._year-1)?366:365;return e.LocalDate.ofYearDay(this._year-1,a+r)},a.compareTo=function(t){o(t,"other"),i(t,r,"other");var e=this._year-t._year;return 0===e&&(e=this._week-t._week),e},a.isAfter=function(t){return this.compareTo(t)>0},a.isBefore=function(t){return this.compareTo(t)<0},a.equals=function(t){return this===t||t instanceof r&&(this._year===t._year&&this._week===t._week)},a.hashCode=function(){return this._year^this._week<<25},a.toString=function(){var t=this._year;return(Math.abs(t)<1e3?t<0?"-"+(""+(t-1e4)).slice(-4):(""+(t+1e4)).slice(-4):t>9999?"+"+t:""+t).concat(this._week<10?"-W0":"-W").concat(this._week)},r}(e.Temporal);function C(){var t,r,o;Y.PARSER=(new e.DateTimeFormatterBuilder).parseCaseInsensitive().appendValue(e.IsoFields.WEEK_BASED_YEAR,4,10,e.SignStyle.EXCEEDS_PAD).appendLiteral("-W").appendValue(e.IsoFields.WEEK_OF_WEEK_BASED_YEAR,2).toFormatter(),Y.FROM=(t="YearWeek.FROM",r=function(t){return Y.from(t)},o=function(t){function e(){return t.apply(this,arguments)||this}return n(e,t),e}(e.TemporalQuery),o.prototype.queryFrom=r,new o(t))}var U=!1;return U||(U=!0,function(){s.VALUES=new Array(31);for(var t=0;t<31;t++)s.VALUES[t]=new s(t+1)}(),function(){c.VALUES=new Array(366);for(var t=0;t<366;t++)c.VALUES[t]=new c(t+1)}(),f.ALL=f.of(e.Instant.MIN,e.Instant.MAX),d.ALL=new d(e.LocalDate.MIN,e.LocalDate.MAX),m(),D(),g.NEXT_WORKING=new(function(t){function r(){return t.apply(this,arguments)||this}return n(r,t),r.prototype.adjustInto=function(t){switch(t.get(e.ChronoField.DAY_OF_WEEK)){case 6:return t.plus(2,e.ChronoUnit.DAYS);case 5:return t.plus(3,e.ChronoUnit.DAYS);default:return t.plus(1,e.ChronoUnit.DAYS)}},r}(e.TemporalAdjuster)),g.PREVIOUS_WORKING=new(function(t){function r(){return t.apply(this,arguments)||this}return n(r,t),r.prototype.adjustInto=function(t){switch(t.get(e.ChronoField.DAY_OF_WEEK)){case 1:return t.minus(3,e.ChronoUnit.DAYS);case 7:return t.minus(2,e.ChronoUnit.DAYS);default:return t.minus(1,e.ChronoUnit.DAYS)}},r}(e.TemporalAdjuster)),g.NEXT_WORKING_OR_SAME=new(function(t){function r(){return t.apply(this,arguments)||this}return n(r,t),r.prototype.adjustInto=function(t){switch(t.get(e.ChronoField.DAY_OF_WEEK)){case 6:return t.plus(2,e.ChronoUnit.DAYS);case 7:return t.plus(1,e.ChronoUnit.DAYS);default:return t}},r}(e.TemporalAdjuster)),g.PREVIOUS_WORKING_OR_SAME=new(function(t){function r(){return t.apply(this,arguments)||this}return n(r,t),r.prototype.adjustInto=function(t){switch(t.get(e.ChronoField.DAY_OF_WEEK)){case 6:return t.minus(1,e.ChronoUnit.DAYS);case 7:return t.minus(2,e.ChronoUnit.DAYS);default:return t}},r}(e.TemporalAdjuster)),v(),C()),e.use((function(){})),t.DayOfMonth=s,t.DayOfYear=c,t.Interval=f,t.LocalDateRange=d,t.OffsetDate=E,t.Quarter=A,t.Temporals=T,t.YearQuarter=R,t.YearWeek=Y,t}({},JSJoda);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@js-joda/extra",
3
- "version": "0.10.1",
3
+ "version": "0.11.0",
4
4
  "description": "additional date-time classes that complement those in js-joda",
5
5
  "repository": {
6
6
  "type": "git",
@@ -32,7 +32,7 @@
32
32
  "test-browser": "npx karma start --reporters=dots --single-run",
33
33
  "test-saucelabs": "npx karma start --reporters=\"dots,saucelabs\" --browsers=\"sl_chrome,sl_ie,sl_firefox\" --single-run=true",
34
34
  "test-ci": "npm run build-dist && npm run test && npm run test-browser && npm run test-coverage && npm run test-ts-definitions",
35
- "test-ts-definitions": "npx tsc --noImplicitAny --strict --noEmit --pretty test/typescript_definitions/js-joda-extra-tests.ts",
35
+ "test-ts-definitions": "TS_NODE_PROJECT='../../shared/ts-test-config.json' NODE_ENV=test mocha --timeout 5000 --require ts-node/register ./test/typescript_definitions/*.ts",
36
36
  "build-dist": "npx rollup -c rollup.config.js",
37
37
  "lint": "npx eslint ."
38
38
  },
@@ -49,6 +49,7 @@
49
49
  "@js-joda/core": ">=1.11.0"
50
50
  },
51
51
  "devDependencies": {
52
- "@js-joda/core": "^5.4.1"
53
- }
52
+ "@js-joda/core": "^5.5.0"
53
+ },
54
+ "gitHead": "7388db45c1ac3aee66730d764075ede1429c38db"
54
55
  }
@@ -0,0 +1,296 @@
1
+ /**
2
+ * @copyright (c) 2015-present, Philipp Thürwächter & Pattrick Hüper & Michał Sobkiewicz
3
+ * @copyright (c) 2007-present, Stephen Colebourne & Michael Nascimento Santos
4
+ * @license BSD-3-Clause (see LICENSE in the root directory of this source tree)
5
+ */
6
+
7
+ import { requireNonNull } from './assert';
8
+ import { ChronoField, ChronoUnit, DateTimeException, DateTimeParseException, IsoFields, ParsePosition, TemporalAdjuster, UnsupportedTemporalTypeException } from '@js-joda/core';
9
+
10
+ import { _ as jodaInternal } from '@js-joda/core';
11
+
12
+ const MathUtil = jodaInternal.MathUtil;
13
+
14
+ /**
15
+ * Additional utilities for working with temporal classes.
16
+ *
17
+ * This includes:
18
+ * - adjusters that ignore Saturday/Sunday weekends
19
+ * - conversion between `TimeUnit` and `ChronoUnit`
20
+ * - converting an amount to another unit
21
+ *
22
+ */
23
+ export class Temporals {
24
+ //-------------------------------------------------------------------------
25
+ /**
26
+ * Returns an adjuster that returns the next working day, ignoring Saturday and Sunday.
27
+ *
28
+ * Some territories have weekends that do not consist of Saturday and Sunday.
29
+ * No implementation is supplied to support this, however an adjuster
30
+ * can be easily written to do so.
31
+ *
32
+ * @return {TemporalAdjuster} the next working day adjuster, not null
33
+ */
34
+ static nextWorkingDay() {
35
+ return Adjuster.NEXT_WORKING;
36
+ }
37
+
38
+ /**
39
+ * Returns an adjuster that returns the next working day or same day if already working day, ignoring Saturday and Sunday.
40
+ *
41
+ * Some territories have weekends that do not consist of Saturday and Sunday.
42
+ * No implementation is supplied to support this, however an adjuster
43
+ * can be easily written to do so.
44
+ *
45
+ * @return {TemporalAdjuster} the next working day or same adjuster, not null
46
+ */
47
+ static nextWorkingDayOrSame() {
48
+ return Adjuster.NEXT_WORKING_OR_SAME;
49
+ }
50
+
51
+ /**
52
+ * Returns an adjuster that returns the previous working day, ignoring Saturday and Sunday.
53
+ *
54
+ * Some territories have weekends that do not consist of Saturday and Sunday.
55
+ * No implementation is supplied to support this, however an adjuster
56
+ * can be easily written to do so.
57
+ *
58
+ * @return {TemporalAdjuster} the previous working day adjuster, not null
59
+ */
60
+ static previousWorkingDay() {
61
+ return Adjuster.PREVIOUS_WORKING;
62
+ }
63
+
64
+ /**
65
+ * Returns an adjuster that returns the previous working day or same day if already working day, ignoring Saturday and Sunday.
66
+ *
67
+ * Some territories have weekends that do not consist of Saturday and Sunday.
68
+ * No implementation is supplied to support this, however an adjuster
69
+ * can be easily written to do so.
70
+ *
71
+ * @return {TemporalAdjuster} the previous working day or same adjuster, not null
72
+ */
73
+ static previousWorkingDayOrSame() {
74
+ return Adjuster.PREVIOUS_WORKING_OR_SAME;
75
+ }
76
+
77
+ //-------------------------------------------------------------------------
78
+ /**
79
+ * Parses the text using one of the formatters.
80
+ *
81
+ * This will try each formatter in turn, attempting to fully parse the specified text.
82
+ * The temporal query is typically a method reference to a `from(TemporalAccessor)` method.
83
+ * For example:
84
+ * ```
85
+ * LocalDateTime dt = Temporals.parseFirstMatching(str, LocalDateTime.FROM, fm1, fm2, fm3);
86
+ * ```
87
+ * If the parse completes without reading the entire length of the text,
88
+ * or a problem occurs during parsing or merging, then an exception is thrown.
89
+ *
90
+ * @param {string} text the text to parse, not null
91
+ * @param {TemporalQuery} query the query defining the type to parse to, not null
92
+ * @param {DateTimeFormatter[]} formatters the formatters to try, not null
93
+ * @return {*} the parsed date-time, not null
94
+ * @throws {DateTimeParseException} if unable to parse the requested result
95
+ */
96
+ static parseFirstMatching(text, query, ...formatters) {
97
+ requireNonNull(text, 'text');
98
+ requireNonNull(query, 'query');
99
+ requireNonNull(formatters, 'formatters');
100
+ if (formatters.length === 0) {
101
+ throw new DateTimeParseException('No formatters specified', text, 0);
102
+ }
103
+ if (formatters.length === 1) {
104
+ return formatters[0].parse(text, query);
105
+ }
106
+ for (const formatter of formatters) {
107
+ try {
108
+ const pp = new ParsePosition(0);
109
+ formatter.parseUnresolved(text, pp);
110
+ const len = text.length;
111
+ if (pp.getErrorIndex() === -1 && pp.getIndex() === len) {
112
+ return formatter.parse(text, query);
113
+ }
114
+ } catch (ignored) {
115
+ // should not happen, but ignore if it does
116
+ }
117
+ }
118
+ throw new DateTimeParseException(`Text '${text}' could not be parsed`, text, 0);
119
+ }
120
+
121
+ //-------------------------------------------------------------------------
122
+ /**
123
+ * Converts an amount from one unit to another.
124
+ *
125
+ * This works on the units in `ChronoUnit` and `IsoFields`.
126
+ * The `DAYS` and `WEEKS` units are handled as exact multiple of 24 hours.
127
+ * The `ERAS` and `FOREVER` units are not supported.
128
+ *
129
+ * @param {long} amount the input amount in terms of the `fromUnit`
130
+ * @param {TemporalUnit} fromUnit the unit to convert from, not null
131
+ * @param {TemporalUnit} toUnit the unit to convert to, not null
132
+ * @return {long[]} the conversion array,
133
+ * element 0 is the signed whole number,
134
+ * element 1 is the signed remainder in terms of the input unit,
135
+ * not null
136
+ * @throws DateTimeException if the units cannot be converted
137
+ * @throws UnsupportedTemporalTypeException if the units are not supported
138
+ * @throws ArithmeticException if numeric overflow occurs
139
+ */
140
+ static convertAmount(amount, fromUnit, toUnit) {
141
+ requireNonNull(fromUnit, 'fromUnit');
142
+ requireNonNull(toUnit, 'toUnit');
143
+ Temporals._validateUnit(fromUnit);
144
+ Temporals._validateUnit(toUnit);
145
+ if (fromUnit === toUnit) {
146
+ return [amount, 0];
147
+ }
148
+ // precise-based
149
+ if (Temporals._isPrecise(fromUnit) && Temporals._isPrecise(toUnit)) {
150
+ const fromNanos = fromUnit.duration().toNanos();
151
+ const toNanos = toUnit.duration().toNanos();
152
+ if (fromNanos > toNanos) {
153
+ const multiple = MathUtil.intDiv(fromNanos, toNanos);
154
+ return [MathUtil.safeMultiply(amount, multiple), 0];
155
+ } else {
156
+ const multiple = MathUtil.intDiv(toNanos, fromNanos);
157
+ return [MathUtil.intDiv(amount, multiple), MathUtil.intMod(amount, multiple)];
158
+ }
159
+ }
160
+ // month-based
161
+ const fromMonthFactor = Temporals._monthMonthFactor(fromUnit, fromUnit, toUnit);
162
+ const toMonthFactor = Temporals._monthMonthFactor(toUnit, fromUnit, toUnit);
163
+ if (fromMonthFactor > toMonthFactor) {
164
+ const multiple = MathUtil.intDiv(fromMonthFactor, toMonthFactor);
165
+ return [MathUtil.safeMultiply(amount, multiple), 0];
166
+ } else {
167
+ const multiple = MathUtil.intDiv(toMonthFactor, fromMonthFactor);
168
+ return [MathUtil.intDiv(amount, multiple), MathUtil.intMod(amount, multiple)];
169
+ }
170
+ }
171
+
172
+ /**
173
+ *
174
+ * @param {TemporalUnit} unit
175
+ * @private
176
+ */
177
+ static _validateUnit(unit) {
178
+ if (unit instanceof ChronoUnit) {
179
+ if (unit === ChronoUnit.ERAS || unit === ChronoUnit.FOREVER) {
180
+ throw new UnsupportedTemporalTypeException(`Unsupported TemporalUnit: ${unit}`);
181
+ }
182
+ } else if (unit !== IsoFields.QUARTER_YEARS) {
183
+ throw new UnsupportedTemporalTypeException(`Unsupported TemporalUnit: ${unit}`);
184
+ }
185
+ }
186
+
187
+ /**
188
+ *
189
+ * @param {TemporalUnit} unit
190
+ * @return {boolean}
191
+ * @private
192
+ */
193
+ static _isPrecise(unit) {
194
+ return unit instanceof ChronoUnit && unit.compareTo(ChronoUnit.WEEKS) <= 0;
195
+ }
196
+
197
+ /**
198
+ *
199
+ * @param {TemporalUnit} unit
200
+ * @param {TemporalUnit} fromUnit
201
+ * @param {TemporalUnit} toUnit
202
+ * @return {int}
203
+ * @private
204
+ */
205
+ static _monthMonthFactor(unit, fromUnit, toUnit) {
206
+ if (unit instanceof ChronoUnit) {
207
+ switch (unit) {
208
+ case ChronoUnit.MONTHS:
209
+ return 1;
210
+ case ChronoUnit.YEARS:
211
+ return 12;
212
+ case ChronoUnit.DECADES:
213
+ return 120;
214
+ case ChronoUnit.CENTURIES:
215
+ return 1200;
216
+ case ChronoUnit.MILLENNIA:
217
+ return 12000;
218
+ default:
219
+ throw new DateTimeException(`Unable to convert between units: ${fromUnit} to ${toUnit}`);
220
+ }
221
+ }
222
+ return 3; // quarters
223
+ }
224
+
225
+ /**
226
+ * Restricted constructor.
227
+ *
228
+ * @private
229
+ */
230
+ constructor() {
231
+ }
232
+ }
233
+
234
+ const Adjuster = {};
235
+
236
+ export function _init() {
237
+ /** Next working day adjuster. */
238
+ Adjuster.NEXT_WORKING = new class extends TemporalAdjuster {
239
+ adjustInto(temporal) {
240
+ const dow = temporal.get(ChronoField.DAY_OF_WEEK);
241
+ switch (dow) {
242
+ case 6: // Saturday
243
+ return temporal.plus(2, ChronoUnit.DAYS);
244
+ case 5: // Friday
245
+ return temporal.plus(3, ChronoUnit.DAYS);
246
+ default:
247
+ return temporal.plus(1, ChronoUnit.DAYS);
248
+ }
249
+ }
250
+ };
251
+
252
+ /** Previous working day adjuster. */
253
+ Adjuster.PREVIOUS_WORKING = new class extends TemporalAdjuster {
254
+ adjustInto(temporal) {
255
+ const dow = temporal.get(ChronoField.DAY_OF_WEEK);
256
+ switch (dow) {
257
+ case 1: // Monday
258
+ return temporal.minus(3, ChronoUnit.DAYS);
259
+ case 7: // Sunday
260
+ return temporal.minus(2, ChronoUnit.DAYS);
261
+ default:
262
+ return temporal.minus(1, ChronoUnit.DAYS);
263
+ }
264
+ }
265
+ };
266
+
267
+ /** Next working day or same adjuster. */
268
+ Adjuster.NEXT_WORKING_OR_SAME = new class extends TemporalAdjuster {
269
+ adjustInto(temporal) {
270
+ const dow = temporal.get(ChronoField.DAY_OF_WEEK);
271
+ switch (dow) {
272
+ case 6: // Saturday
273
+ return temporal.plus(2, ChronoUnit.DAYS);
274
+ case 7: // Sunday
275
+ return temporal.plus(1, ChronoUnit.DAYS);
276
+ default:
277
+ return temporal;
278
+ }
279
+ }
280
+ };
281
+
282
+ /** Previous working day or same adjuster. */
283
+ Adjuster.PREVIOUS_WORKING_OR_SAME = new class extends TemporalAdjuster {
284
+ adjustInto(temporal) {
285
+ const dow = temporal.get(ChronoField.DAY_OF_WEEK);
286
+ switch (dow) {
287
+ case 6: //Saturday
288
+ return temporal.minus(1, ChronoUnit.DAYS);
289
+ case 7: // Sunday
290
+ return temporal.minus(2, ChronoUnit.DAYS);
291
+ default:
292
+ return temporal;
293
+ }
294
+ }
295
+ };
296
+ }
package/src/_init.js CHANGED
@@ -9,6 +9,7 @@ import { _init as intervalInit } from './Interval';
9
9
  import { _init as localDateRangeInit } from './LocalDateRange';
10
10
  import { _init as offsetDateInit } from './OffsetDate';
11
11
  import { _init as quarterInit } from './Quarter';
12
+ import { _init as temporalsInit } from './Temporals';
12
13
  import { _init as yearQuarterInit } from './YearQuarter';
13
14
  import { _init as yearWeekInit } from './YearWeek';
14
15
 
@@ -27,6 +28,7 @@ function init() {
27
28
  localDateRangeInit();
28
29
  offsetDateInit();
29
30
  quarterInit();
31
+ temporalsInit();
30
32
  yearQuarterInit();
31
33
  yearWeekInit();
32
34
  }
@@ -11,6 +11,7 @@ import { Interval } from './Interval';
11
11
  import { LocalDateRange } from './LocalDateRange';
12
12
  import { OffsetDate } from './OffsetDate';
13
13
  import { Quarter } from './Quarter';
14
+ import { Temporals } from './Temporals';
14
15
  import { YearQuarter } from './YearQuarter';
15
16
  import { YearWeek } from './YearWeek';
16
17
  import plug from './plug';
@@ -24,6 +25,7 @@ export {
24
25
  LocalDateRange,
25
26
  OffsetDate,
26
27
  Quarter,
28
+ Temporals,
27
29
  YearQuarter,
28
30
  YearWeek,
29
31
  };
package/src/plug.js CHANGED
@@ -9,6 +9,7 @@
9
9
  // import { LocalDateRange } from './LocalDateRange';
10
10
  // import { OffsetDate } from './OffsetDate';
11
11
  // import { Quarter } from './Quarter';
12
+ // import { Temporals } from './Temporals';
12
13
  // import { YearQuarter } from './YearQuarter';
13
14
  // import { YearWeek } from './YearWeek';
14
15
 
@@ -27,6 +28,7 @@ export default function (/* jsJoda */) {
27
28
  // jsJoda.LocalDateRange = LocalDateRange;
28
29
  // jsJoda.OffsetDate = OffsetDate;
29
30
  // jsJoda.Quarter = Quarter;
31
+ // jsJoda.Temporals = Temporals;
30
32
  // jsJoda.YearQuarter = YearQuarter;
31
33
  // jsJoda.YearWeek = YearWeek;
32
34
  }
@@ -46,8 +46,7 @@ export class DayOfYear extends TemporalAccessor {
46
46
  }
47
47
 
48
48
  export class Interval {
49
- static of(startInclusive: Instant, endExclusive: Instant): Interval;
50
- static of(startInclusive: Instant, duration: Duration): Interval;
49
+ static of(startInclusive: Instant, endExclusiveInstantOrDuration: Instant | Duration): Interval;
51
50
  static parse(text: string): Interval;
52
51
 
53
52
  private constructor(startInclusive: Instant, endExclusive: Instant);
@@ -211,6 +210,17 @@ export class Quarter extends TemporalAccessor implements TemporalAdjuster {
211
210
  value(): number;
212
211
  }
213
212
 
213
+ export class Temporals {
214
+ static nextWorkingDay(): TemporalAdjuster;
215
+ static nextWorkingDayOrSame(): TemporalAdjuster;
216
+ static previousWorkingDay(): TemporalAdjuster;
217
+ static previousWorkingDayOrSame(): TemporalAdjuster;
218
+ static parseFirstMatching<T>(text: string, query: TemporalQuery<T>, ...formatters: DateTimeFormatter[]): T;
219
+ static convertAmount(amount: number, fromUnit: TemporalUnit, toUnit: TemporalUnit): number[];
220
+
221
+ private constructor();
222
+ }
223
+
214
224
  export class YearQuarter extends Temporal {
215
225
  static from(temporal: TemporalAccessor): YearQuarter;
216
226
  static now(zoneIdOrClock?: ZoneId | Clock): YearQuarter;