@js-joda/extra
Version:
additional date-time classes that complement those in js-joda
1,328 lines (1,316 loc) • 84.9 kB
JavaScript
//! @version @js-joda/extra - 0.13.1
//! @copyright (c) 2015-present, Philipp Thürwächter, Pattrick Hüper & js-joda contributors
//! @copyright (c) 2007-present, Stephen Colebourne & Michael Nascimento Santos
//! @license BSD-3-Clause (see LICENSE in the root directory of this source tree)
import { NullPointerException, IllegalArgumentException, _, ChronoField, UnsupportedTemporalTypeException, TemporalQueries, IsoChronology, Month, MonthDay, TemporalAccessor, ZoneId, Clock, LocalDate, DateTimeException, TemporalQuery, Year, Duration, Instant, ZonedDateTime, DateTimeParseException, Period, ArithmeticException, TemporalField, TemporalUnit, ChronoUnit, ZoneOffset, OffsetDateTime, Temporal, DateTimeFormatter, IsoFields, IllegalStateException, ParsePosition, TemporalAdjuster, ValueRange, DateTimeFormatterBuilder, SignStyle, DayOfWeek, use } from '@js-joda/core';
function _inheritsLoose(t, o) {
t.prototype = Object.create(o.prototype), t.prototype.constructor = t, _setPrototypeOf(t, o);
}
function _setPrototypeOf(t, e) {
return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) {
return t.__proto__ = e, t;
}, _setPrototypeOf(t, e);
}
/**
* @copyright (c) 2016, Philipp Thürwächter & Pattrick Hüper
* @license BSD-3-Clause (see LICENSE in the root directory of this source tree)
*/
function assert(assertion, msg, error) {
if (!assertion) {
if (error) {
throw new error(msg);
} else {
throw new Error(msg);
}
}
}
function requireNonNull(value, parameterName) {
if (value == null) {
throw new NullPointerException(parameterName + " must not be null");
}
return value;
}
function requireInstance(value, _class, parameterName) {
if (!(value instanceof _class)) {
throw new IllegalArgumentException(parameterName + " must be an instance of " + (_class.name ? _class.name : _class) + (value && value.constructor && value.constructor.name ? ", but is " + value.constructor.name : ''));
}
return value;
}
var MathUtil$6 = _.MathUtil;
var DayOfMonth = function (_TemporalAccessor) {
function DayOfMonth(dayOfMonth) {
var _this;
_this = _TemporalAccessor.call(this) || this;
_this._day = MathUtil$6.safeToInt(dayOfMonth);
return _this;
}
_inheritsLoose(DayOfMonth, _TemporalAccessor);
DayOfMonth.now = function now(zoneIdOrClock) {
switch (arguments.length) {
case 0:
return DayOfMonth._now0();
case 1:
requireNonNull(zoneIdOrClock, 'clockOrZone');
if (zoneIdOrClock instanceof ZoneId) {
return DayOfMonth._nowZoneId(zoneIdOrClock);
}
if (zoneIdOrClock instanceof Clock) {
return DayOfMonth._nowClock(zoneIdOrClock);
}
throw new IllegalArgumentException("zoneIdOrClock must be an instance of ZoneId or Clock, but is " + zoneIdOrClock.constructor.name);
default:
throw new IllegalArgumentException("Invalid number of arguments: " + arguments.length);
}
};
DayOfMonth._now0 = function _now0() {
return this.now(Clock.systemDefaultZone());
};
DayOfMonth._nowZoneId = function _nowZoneId(zone) {
return this.now(Clock.system(zone));
};
DayOfMonth._nowClock = function _nowClock(clock) {
var now = LocalDate.now(clock);
return DayOfMonth.of(now.dayOfMonth());
};
DayOfMonth.of = function of(dayOfMonth) {
if (1 <= dayOfMonth && dayOfMonth <= 31) {
return DayOfMonth.VALUES[dayOfMonth - 1];
} else {
throw new DateTimeException("Invalid value for DayOfMonth: " + dayOfMonth);
}
};
DayOfMonth.from = function from(temporal) {
if (temporal instanceof DayOfMonth) {
return temporal;
}
requireNonNull(temporal, 'temporal');
try {
return DayOfMonth.of(temporal.get(ChronoField.DAY_OF_MONTH));
} catch (ex) {
throw new DateTimeException("Unable to obtain DayOfMonth from TemporalAccessor: " + temporal + " of type " + temporal.constructor.name, ex);
}
};
var _proto = DayOfMonth.prototype;
_proto.value = function value() {
return this._day;
};
_proto.isSupported = function isSupported(field) {
if (field instanceof ChronoField) {
return field === ChronoField.DAY_OF_MONTH;
}
return field != null && field.isSupportedBy(this);
};
_proto.range = function range(field) {
requireNonNull(field, 'field');
if (field === ChronoField.DAY_OF_MONTH) {
return field.range();
}
return _TemporalAccessor.prototype.range.call(this, field);
};
_proto.get = function get(field) {
return this.range(field).checkValidIntValue(this.getLong(field), field);
};
_proto.getLong = function getLong(field) {
requireNonNull(field, 'field');
if (field === ChronoField.DAY_OF_MONTH) {
return this._day;
} else if (field instanceof ChronoField) {
throw new UnsupportedTemporalTypeException("Unsupported field: " + field);
}
return field.getFrom(this);
};
_proto.isValidYearMonth = function isValidYearMonth(yearMonth) {
return yearMonth != null && yearMonth.isValidDay(this._day);
};
_proto.query = function query(_query) {
requireNonNull(_query, 'query');
requireInstance(_query, TemporalQuery, 'query');
if (_query === TemporalQueries.chronology()) {
return IsoChronology.INSTANCE;
}
return _TemporalAccessor.prototype.query.call(this, _query);
};
_proto.adjustInto = function adjustInto(temporal) {
requireNonNull(temporal, 'temporal');
return temporal.with(ChronoField.DAY_OF_MONTH, this._day);
};
_proto.atMonth = function atMonth(month) {
requireNonNull(month, 'month');
if (month instanceof Month) {
return MonthDay.of(month, Math.min(this._day, month.maxLength()));
} else {
return MonthDay.of(month, Math.min(this._day, Month.of(month).maxLength()));
}
};
_proto.atYearMonth = function atYearMonth(yearMonth) {
requireNonNull(yearMonth, 'yearMonth');
return yearMonth.atDay(Math.min(this._day, yearMonth.lengthOfMonth()));
};
_proto.compareTo = function compareTo(other) {
requireNonNull(other, 'other');
requireInstance(other, DayOfMonth, 'other');
return this._day - other._day;
};
_proto.equals = function equals(obj) {
if (this === obj) {
return true;
}
if (obj instanceof DayOfMonth) {
return this._day === obj._day;
}
return false;
};
_proto.hashCode = function hashCode() {
return this._day;
};
_proto.toString = function toString() {
return "DayOfMonth:" + this._day;
};
return DayOfMonth;
}(TemporalAccessor);
function _init$8() {
DayOfMonth.VALUES = new Array(31);
for (var i = 0; i < 31; i++) {
DayOfMonth.VALUES[i] = new DayOfMonth(i + 1);
}
}
var MathUtil$5 = _.MathUtil;
var DayOfYear = function (_TemporalAccessor) {
function DayOfYear(dayOfYear) {
var _this;
_this = _TemporalAccessor.call(this) || this;
_this._day = MathUtil$5.safeToInt(dayOfYear);
return _this;
}
_inheritsLoose(DayOfYear, _TemporalAccessor);
DayOfYear.now = function now(zoneIdOrClock) {
switch (arguments.length) {
case 0:
return DayOfYear._now0();
case 1:
requireNonNull(zoneIdOrClock, 'clockOrZone');
if (zoneIdOrClock instanceof ZoneId) {
return DayOfYear._nowZoneId(zoneIdOrClock);
}
if (zoneIdOrClock instanceof Clock) {
return DayOfYear._nowClock(zoneIdOrClock);
}
throw new IllegalArgumentException("zoneIdOrClock must be an instance of ZoneId or Clock, but is " + zoneIdOrClock.constructor.name);
default:
throw new IllegalArgumentException("Invalid number of arguments: " + arguments.length);
}
};
DayOfYear._now0 = function _now0() {
return DayOfYear.now(Clock.systemDefaultZone());
};
DayOfYear._nowZoneId = function _nowZoneId(zone) {
return DayOfYear.now(Clock.system(zone));
};
DayOfYear._nowClock = function _nowClock(clock) {
var now = LocalDate.now(clock);
return DayOfYear.of(now.dayOfYear());
};
DayOfYear.of = function of(dayOfYear) {
if (1 <= dayOfYear && dayOfYear <= 366) {
return DayOfYear.VALUES[dayOfYear - 1];
} else {
throw new DateTimeException("Invalid value for DayOfYear: " + dayOfYear);
}
};
DayOfYear.from = function from(temporal) {
requireNonNull(temporal, 'temporal');
requireInstance(temporal, TemporalAccessor, 'temporal');
if (temporal instanceof DayOfYear) {
return temporal;
}
try {
return DayOfYear.of(temporal.get(ChronoField.DAY_OF_YEAR));
} catch (ex) {
throw new DateTimeException("Unable to obtain DayOfYear from TemporalAccessor: " + temporal + " of type " + temporal.constructor.name, ex);
}
};
var _proto = DayOfYear.prototype;
_proto.value = function value() {
return this._day;
};
_proto.isSupported = function isSupported(field) {
if (field instanceof ChronoField) {
return field === ChronoField.DAY_OF_YEAR;
}
return field != null && field.isSupportedBy(this);
};
_proto.range = function range(field) {
requireNonNull(field, 'field');
if (field === ChronoField.DAY_OF_YEAR) {
return field.range();
}
return _TemporalAccessor.prototype.range.call(this, field);
};
_proto.get = function get(field) {
return this.range(field).checkValidIntValue(this.getLong(field), field);
};
_proto.getLong = function getLong(field) {
requireNonNull(field, 'field');
if (field === ChronoField.DAY_OF_YEAR) {
return this._day;
} else if (field instanceof ChronoField) {
throw new UnsupportedTemporalTypeException("Unsupported field: " + field);
}
return field.getFrom(this);
};
_proto.isValidYear = function isValidYear(year) {
return this._day < 366 || Year.isLeap(year);
};
_proto.query = function query(_query) {
requireNonNull(_query, 'query');
requireInstance(_query, TemporalQuery, 'query');
if (_query === TemporalQueries.chronology()) {
return IsoChronology.INSTANCE;
}
return _TemporalAccessor.prototype.query.call(this, _query);
};
_proto.adjustInto = function adjustInto(temporal) {
requireNonNull(temporal, 'temporal');
return temporal.with(ChronoField.DAY_OF_YEAR, this._day);
};
_proto.atYear = function atYear(year) {
requireNonNull(year, 'year');
if (year instanceof Year) {
return year.atDay(this._day);
} else {
return LocalDate.ofYearDay(year, this._day);
}
};
_proto.compareTo = function compareTo(other) {
requireNonNull(other, 'other');
requireInstance(other, DayOfYear, 'other');
return this._day - other._day;
};
_proto.equals = function equals(obj) {
if (this === obj) {
return true;
}
if (obj instanceof DayOfYear) {
return this._day === obj._day;
}
return false;
};
_proto.hashCode = function hashCode() {
return this._day;
};
_proto.toString = function toString() {
return "DayOfYear:" + this._day;
};
return DayOfYear;
}(TemporalAccessor);
function _init$7() {
DayOfYear.VALUES = new Array(366);
for (var i = 0; i < 366; i++) {
DayOfYear.VALUES[i] = new DayOfYear(i + 1);
}
}
/*
* @copyright (c) 2016, Philipp Thürwächter & Pattrick Hüper
* @copyright (c) 2007-present, Stephen Colebourne & Michael Nascimento Santos
* @license BSD-3-Clause (see LICENSE in the root directory of this source tree)
*/
var Interval = function () {
function Interval(startInclusive, endExclusive) {
this._start = startInclusive;
this._end = endExclusive;
}
Interval.of = function of(startInstant, endInstantOrDuration) {
if (endInstantOrDuration instanceof Duration) {
return Interval.ofInstantDuration(startInstant, endInstantOrDuration);
} else {
return Interval.ofInstantInstant(startInstant, endInstantOrDuration);
}
};
Interval.ofInstantInstant = function ofInstantInstant(startInclusive, endExclusive) {
requireNonNull(startInclusive, 'startInclusive');
requireNonNull(endExclusive, 'endExclusive');
requireInstance(startInclusive, Instant, 'startInclusive');
requireInstance(endExclusive, Instant, 'endExclusive');
if (endExclusive.isBefore(startInclusive)) {
throw new DateTimeException('End instant must on or after start instant');
}
return new Interval(startInclusive, endExclusive);
};
Interval.ofInstantDuration = function ofInstantDuration(startInclusive, duration) {
requireNonNull(startInclusive, 'startInclusive');
requireNonNull(duration, 'duration');
requireInstance(startInclusive, Instant, 'startInclusive');
requireInstance(duration, Duration, 'duration');
if (duration.isNegative()) {
throw new DateTimeException('Duration must not be zero or negative');
}
return new Interval(startInclusive, startInclusive.plus(duration));
};
Interval.parse = function parse(text) {
requireNonNull(text, 'text');
if (!(typeof text === 'string')) {
throw new IllegalArgumentException("text must be a string, but is " + text.constructor.name);
}
for (var i = 0; i < text.length; i += 1) {
if (text.charAt(i) === '/') {
var firstChar = text.charAt(0);
if (firstChar === 'P' || firstChar === 'p') {
var duration = Duration.parse(text.substring(0, i));
var end = ZonedDateTime.parse(text.substring(i + 1, text.length)).toInstant();
return Interval.of(end.minus(duration), end);
} else {
var start = ZonedDateTime.parse(text.substring(0, i)).toInstant();
if (i + 1 < text.length) {
var c = text.charAt(i + 1);
if (c === 'P' || c === 'p') {
var _duration = Duration.parse(text.substring(i + 1, text.length));
return Interval.of(start, start.plus(_duration));
}
}
var _end = ZonedDateTime.parse(text.substring(i + 1, text.length)).toInstant();
return Interval.of(start, _end);
}
}
}
throw new DateTimeParseException('Interval cannot be parsed, no forward slash found', text, 0);
};
var _proto = Interval.prototype;
_proto.start = function start() {
return this._start;
};
_proto.end = function end() {
return this._end;
};
_proto.isEmpty = function isEmpty() {
return this._start.equals(this._end);
};
_proto.isUnboundedStart = function isUnboundedStart() {
return this._start.equals(Instant.MIN);
};
_proto.isUnboundedEnd = function isUnboundedEnd() {
return this._end.equals(Instant.MAX);
};
_proto.withStart = function withStart(start) {
return Interval.of(start, this._end);
};
_proto.withEnd = function withEnd(end) {
return Interval.of(this._start, end);
};
_proto.contains = function contains(instant) {
requireNonNull(instant, 'instant');
requireInstance(instant, Instant, 'instant');
return this._start.compareTo(instant) <= 0 && (instant.compareTo(this._end) < 0 || this.isUnboundedEnd());
};
_proto.encloses = function encloses(other) {
requireNonNull(other, 'other');
requireInstance(other, Interval, 'other');
return this._start.compareTo(other.start()) <= 0 && other.end().compareTo(this._end) <= 0;
};
_proto.abuts = function abuts(other) {
requireNonNull(other, 'other');
requireInstance(other, Interval, 'other');
return !this._end.equals(other.start()) !== !this._start.equals(other.end());
};
_proto.isConnected = function isConnected(other) {
requireNonNull(other, 'other');
requireInstance(other, Interval, 'other');
return this.equals(other) || this._start.compareTo(other.end()) <= 0 && other.start().compareTo(this._end) <= 0;
};
_proto.overlaps = function overlaps(other) {
requireNonNull(other, 'other');
requireInstance(other, Interval, 'other');
return other.equals(this) || this._start.compareTo(other.end()) < 0 && other.start().compareTo(this._end) < 0;
};
_proto.intersection = function intersection(other) {
requireNonNull(other, 'other');
requireInstance(other, Interval, 'other');
if (this.isConnected(other) === false) {
throw new DateTimeException("Intervals do not connect: " + this + " and " + other);
}
var cmpStart = this._start.compareTo(other.start());
var cmpEnd = this._end.compareTo(other.end());
if (cmpStart >= 0 && cmpEnd <= 0) {
return this;
} else if (cmpStart <= 0 && cmpEnd >= 0) {
return other;
} else {
var newStart = cmpStart >= 0 ? this._start : other.start();
var newEnd = cmpEnd <= 0 ? this._end : other.end();
return Interval.of(newStart, newEnd);
}
};
_proto.union = function union(other) {
requireNonNull(other, 'other');
requireInstance(other, Interval, 'other');
if (this.isConnected(other) === false) {
throw new DateTimeException("Intervals do not connect: " + this + " and " + other);
}
var cmpStart = this._start.compareTo(other.start());
var cmpEnd = this._end.compareTo(other.end());
if (cmpStart >= 0 && cmpEnd <= 0) {
return other;
} else if (cmpStart <= 0 && cmpEnd >= 0) {
return this;
} else {
var newStart = cmpStart >= 0 ? other.start() : this._start;
var newEnd = cmpEnd <= 0 ? other.end() : this._end;
return Interval.of(newStart, newEnd);
}
};
_proto.span = function span(other) {
requireNonNull(other, 'other');
requireInstance(other, Interval, 'other');
var cmpStart = this._start.compareTo(other.start());
var cmpEnd = this._end.compareTo(other.end());
var newStart = cmpStart >= 0 ? other.start() : this._start;
var newEnd = cmpEnd <= 0 ? other.end() : this._end;
return Interval.of(newStart, newEnd);
};
_proto.isAfter = function isAfter(instantOrInterval) {
if (instantOrInterval instanceof Instant) {
return this.isAfterInstant(instantOrInterval);
} else {
return this.isAfterInterval(instantOrInterval);
}
};
_proto.isBefore = function isBefore(instantOrInterval) {
if (instantOrInterval instanceof Instant) {
return this.isBeforeInstant(instantOrInterval);
} else {
return this.isBeforeInterval(instantOrInterval);
}
};
_proto.isAfterInstant = function isAfterInstant(instant) {
return this._start.compareTo(instant) > 0;
};
_proto.isBeforeInstant = function isBeforeInstant(instant) {
return this._end.compareTo(instant) <= 0 && this._start.compareTo(instant) < 0;
};
_proto.isAfterInterval = function isAfterInterval(interval) {
return this._start.compareTo(interval.end()) >= 0 && !interval.equals(this);
};
_proto.isBeforeInterval = function isBeforeInterval(interval) {
return this._end.compareTo(interval.start()) <= 0 && !interval.equals(this);
};
_proto.toDuration = function toDuration() {
return Duration.between(this._start, this._end);
};
_proto.equals = function equals(obj) {
if (this === obj) {
return true;
}
if (obj instanceof Interval) {
return this._start.equals(obj.start()) && this._end.equals(obj.end());
}
return false;
};
_proto.hashCode = function hashCode() {
return this._start.hashCode() ^ this._end.hashCode();
};
_proto.toString = function toString() {
return this._start.toString() + "/" + this._end.toString();
};
return Interval;
}();
function _init$6() {
Interval.ALL = Interval.of(Instant.MIN, Instant.MAX);
}
/**
* @copyright (c) 2016, Philipp Thürwächter & Pattrick Hüper & Michał Sobkiewicz
* @copyright (c) 2007-present, Stephen Colebourne & Michael Nascimento Santos
* @license BSD-3-Clause (see LICENSE in the root directory of this source tree)
*/
var MINP1 = LocalDate.MIN.plusDays(1);
var MAXM1 = LocalDate.MAX.minusDays(1);
var LocalDateRange = function () {
function LocalDateRange(startInclusive, endExclusive) {
requireNonNull(startInclusive, 'startInclusive');
requireNonNull(endExclusive, 'endExclusive');
requireInstance(startInclusive, LocalDate, 'startInclusive');
requireInstance(endExclusive, LocalDate, 'endExclusive');
if (endExclusive.isBefore(startInclusive)) {
throw new DateTimeException('End date must be on or after start date');
}
if (startInclusive.equals(MAXM1)) {
throw new DateTimeException('Range must not start at LocalDate.MAX.minusDays(1)');
}
if (endExclusive.equals(MINP1)) {
throw new DateTimeException('Range must not end at LocalDate.MIN.plusDays(1)');
}
if (endExclusive.equals(LocalDate.MIN) || startInclusive.equals(LocalDate.MAX)) {
throw new DateTimeException('Empty range must not be at LocalDate.MIN or LocalDate.MAX');
}
this._start = startInclusive;
this._end = endExclusive;
}
LocalDateRange.of = function of(startInclusive, endExclusiveOrPeriod) {
if (startInclusive instanceof LocalDate && endExclusiveOrPeriod instanceof LocalDate) {
return LocalDateRange._ofLocalDateLocalDate(startInclusive, endExclusiveOrPeriod);
}
if (startInclusive instanceof LocalDate && endExclusiveOrPeriod instanceof Period) {
return LocalDateRange._ofLocalDatePeriod(startInclusive, endExclusiveOrPeriod);
}
var messageParts = [];
if (!(startInclusive instanceof LocalDate)) {
messageParts.push("startInclusive must be an instance of LocalDate but is " + startInclusive.constructor.name);
}
if (!(endExclusiveOrPeriod instanceof LocalDate || endExclusiveOrPeriod instanceof Period)) {
messageParts.push("endExclusiveOrPeriod must be an instance of LocalDate or Period but is " + endExclusiveOrPeriod.constructor.name);
}
throw new IllegalArgumentException(messageParts.join(' and '));
};
LocalDateRange._ofLocalDateLocalDate = function _ofLocalDateLocalDate(startInclusive, endExclusive) {
requireNonNull(startInclusive, 'startInclusive');
requireNonNull(endExclusive, 'endExclusive');
requireInstance(startInclusive, LocalDate, 'startInclusive');
requireInstance(endExclusive, LocalDate, 'endExclusive');
return new LocalDateRange(startInclusive, endExclusive);
};
LocalDateRange._ofLocalDatePeriod = function _ofLocalDatePeriod(startInclusive, period) {
requireNonNull(startInclusive, 'startInclusive');
requireNonNull(period, 'period');
requireInstance(startInclusive, LocalDate, 'startInclusive');
requireInstance(period, Period, 'period');
if (period.isNegative()) {
throw new DateTimeException('Period must not be zero or negative');
}
return new LocalDateRange(startInclusive, startInclusive.plus(period));
};
LocalDateRange.ofClosed = function ofClosed(startInclusive, endInclusive) {
requireNonNull(startInclusive, 'startInclusive');
requireNonNull(endInclusive, 'endInclusive');
requireInstance(startInclusive, LocalDate, 'startInclusive');
requireInstance(endInclusive, LocalDate, 'endInclusive');
if (endInclusive.isBefore(startInclusive)) {
throw new DateTimeException('Start date must be on or before end date');
}
var end = endInclusive.equals(LocalDate.MAX) ? LocalDate.MAX : endInclusive.plusDays(1);
return new LocalDateRange(startInclusive, end);
};
LocalDateRange.ofEmpty = function ofEmpty(date) {
requireNonNull(date, 'date');
requireInstance(date, LocalDate, 'date');
return new LocalDateRange(date, date);
};
LocalDateRange.ofUnbounded = function ofUnbounded() {
return LocalDateRange.ALL;
};
LocalDateRange.ofUnboundedStart = function ofUnboundedStart(endExclusive) {
requireNonNull(endExclusive, 'endExclusive');
requireInstance(endExclusive, LocalDate, 'endExclusive');
return LocalDateRange.of(LocalDate.MIN, endExclusive);
};
LocalDateRange.ofUnboundedEnd = function ofUnboundedEnd(startInclusive) {
return LocalDateRange.of(startInclusive, LocalDate.MAX);
};
LocalDateRange.parse = function parse(text) {
requireNonNull(text, 'text');
for (var i = 0; i < text.length; i++) {
if (text[i] === '/') {
var firstChar = text.charAt(0);
if (firstChar === 'P' || firstChar === 'p') {
var duration = Period.parse(text.slice(0, i));
var end = LocalDate.parse(text.slice(i + 1, text.length));
return LocalDateRange.of(end.minus(duration), end);
} else {
var start = LocalDate.parse(text.slice(0, i));
if (i + 1 < text.length) {
var c = text[i + 1];
if (c === 'P' || c === 'p') {
var _duration = Period.parse(text.slice(i + 1, text.length));
return LocalDateRange.of(start, start.plus(_duration));
}
}
var _end = LocalDate.parse(text.slice(i + 1, text.length));
return LocalDateRange.of(start, _end);
}
}
}
throw new DateTimeParseException('LocalDateRange cannot be parsed, no forward slash found', text, 0);
};
var _proto = LocalDateRange.prototype;
_proto.start = function start() {
return this._start;
};
_proto.end = function end() {
return this._end;
};
_proto.endInclusive = function endInclusive() {
if (this.isUnboundedEnd()) {
return LocalDate.MAX;
}
return this._end.minusDays(1);
};
_proto.isEmpty = function isEmpty() {
return this._start.equals(this._end);
};
_proto.isUnboundedStart = function isUnboundedStart() {
return this._start.equals(LocalDate.MIN);
};
_proto.isUnboundedEnd = function isUnboundedEnd() {
return this._end.equals(LocalDate.MAX);
};
_proto.withStart = function withStart(adjuster) {
return LocalDateRange.of(this._start.with(adjuster), this._end);
};
_proto.withEnd = function withEnd(adjuster) {
return LocalDateRange.of(this._start, this._end.with(adjuster));
};
_proto.contains = function contains(date) {
requireNonNull(date, 'date');
return this._start.compareTo(date) <= 0 && (date.compareTo(this._end) < 0 || this.isUnboundedEnd());
};
_proto.encloses = function encloses(other) {
requireNonNull(other, 'other');
return this._start.compareTo(other._start) <= 0 && other._end.compareTo(this._end) <= 0;
};
_proto.abuts = function abuts(other) {
requireNonNull(other, 'other');
return this._end.equals(other._start) !== this._start.equals(other._end);
};
_proto.isConnected = function isConnected(other) {
requireNonNull(other, 'other');
return this.equals(other) || this._start.compareTo(other._end) <= 0 && other._start.compareTo(this._end) <= 0;
};
_proto.overlaps = function overlaps(other) {
requireNonNull(other, 'other');
return other.equals(this) || this._start.compareTo(other._end) < 0 && other._start.compareTo(this._end) < 0;
};
_proto.intersection = function intersection(other) {
requireNonNull(other, 'other');
if (this.isConnected(other) === false) {
throw new DateTimeException("Ranges do not connect: " + this + " and " + other);
}
var cmpStart = this._start.compareTo(other._start);
var cmpEnd = this._end.compareTo(other._end);
if (cmpStart >= 0 && cmpEnd <= 0) {
return this;
} else if (cmpStart <= 0 && cmpEnd >= 0) {
return other;
} else {
var newStart = cmpStart >= 0 ? this._start : other._start;
var newEnd = cmpEnd <= 0 ? this._end : other._end;
return LocalDateRange.of(newStart, newEnd);
}
};
_proto.union = function union(other) {
requireNonNull(other, 'other');
if (this.isConnected(other) === false) {
throw new DateTimeException("Ranges do not connect: " + this + " and " + other);
}
var cmpStart = this._start.compareTo(other._start);
var cmpEnd = this._end.compareTo(other._end);
if (cmpStart >= 0 && cmpEnd <= 0) {
return other;
} else if (cmpStart <= 0 && cmpEnd >= 0) {
return this;
} else {
var newStart = cmpStart >= 0 ? other._start : this._start;
var newEnd = cmpEnd <= 0 ? other._end : this._end;
return LocalDateRange.of(newStart, newEnd);
}
};
_proto.span = function span(other) {
requireNonNull(other, 'other');
var cmpStart = this._start.compareTo(other._start);
var cmpEnd = this._end.compareTo(other._end);
var newStart = cmpStart >= 0 ? other._start : this._start;
var newEnd = cmpEnd <= 0 ? other._end : this._end;
return LocalDateRange.of(newStart, newEnd);
};
_proto.isAfter = function isAfter(localDateOrLocalDateRange) {
if (localDateOrLocalDateRange instanceof LocalDate) {
return this._isAfterLocalDate(localDateOrLocalDateRange);
}
if (localDateOrLocalDateRange instanceof LocalDateRange) {
return this._isAfterLocalDateRange(localDateOrLocalDateRange);
}
throw new IllegalArgumentException("localDateOrLocalDateRange must be an instance of LocalDate or LocalDateRange but is " + localDateOrLocalDateRange.constructor.name);
};
_proto.isBefore = function isBefore(localDateOrLocalDateRange) {
if (localDateOrLocalDateRange instanceof LocalDate) {
return this._isBeforeLocalDate(localDateOrLocalDateRange);
}
if (localDateOrLocalDateRange instanceof LocalDateRange) {
return this._isBeforeLocalDateRange(localDateOrLocalDateRange);
}
throw new IllegalArgumentException("localDateOrLocalDateRange must be an instance of LocalDate or LocalDateRange but is " + localDateOrLocalDateRange.constructor.name);
};
_proto._isAfterLocalDate = function _isAfterLocalDate(date) {
return this._start.compareTo(date) > 0;
};
_proto._isBeforeLocalDate = function _isBeforeLocalDate(date) {
return this._end.compareTo(date) <= 0 && this._start.compareTo(date) < 0;
};
_proto._isAfterLocalDateRange = function _isAfterLocalDateRange(other) {
return this._start.compareTo(other._end) >= 0 && !other.equals(this);
};
_proto._isBeforeLocalDateRange = function _isBeforeLocalDateRange(range) {
return this._end.compareTo(range._start) <= 0 && !range.equals(this);
};
_proto.lengthInDays = function lengthInDays() {
if (this.isUnboundedStart() || this.isUnboundedEnd()) {
return Number.POSITIVE_INFINITY;
}
return this._end.toEpochDay() - this._start.toEpochDay();
};
_proto.toPeriod = function toPeriod() {
if (this.isUnboundedStart() || this.isUnboundedEnd()) {
throw new ArithmeticException('Unbounded range cannot be converted to a Period');
}
return Period.between(this._start, this._end);
};
_proto.equals = function equals(obj) {
if (this === obj) {
return true;
}
if (obj instanceof LocalDateRange) {
var other = obj;
return this._start.equals(other._start) && this._end.equals(other._end);
}
return false;
};
_proto.hashCode = function hashCode() {
return this._start.hashCode() ^ this._end.hashCode();
};
_proto.toString = function toString() {
return this._start.toString() + "/" + this._end.toString();
};
return LocalDateRange;
}();
function _init$5() {
LocalDateRange.ALL = new LocalDateRange(LocalDate.MIN, LocalDate.MAX);
}
var MathUtil$4 = _.MathUtil;
var SECONDS_PER_DAY = 86400;
var OffsetDate = function (_Temporal) {
function OffsetDate(date, offset) {
var _this;
_this = _Temporal.call(this) || this;
_this._date = requireNonNull(date, 'date');
_this._offset = requireNonNull(offset, 'offset');
return _this;
}
_inheritsLoose(OffsetDate, _Temporal);
OffsetDate.now = function now(zoneIdOrClock) {
if (arguments.length === 0) {
return OffsetDate._now0();
} else if (arguments.length === 1 && zoneIdOrClock instanceof ZoneId) {
return OffsetDate._nowZoneId(zoneIdOrClock);
} else {
return OffsetDate._nowClock(zoneIdOrClock);
}
};
OffsetDate._now0 = function _now0() {
return OffsetDate.now(Clock.systemDefaultZone());
};
OffsetDate._nowZoneId = function _nowZoneId(zone) {
return OffsetDate.now(Clock.system(zone));
};
OffsetDate._nowClock = function _nowClock(clock) {
requireNonNull(clock, 'clock');
var now = clock.instant();
return OffsetDate.ofInstant(now, clock.zone().rules().offset(now));
};
OffsetDate.of = function of() {
switch (arguments.length) {
case 2:
return OffsetDate._ofLocalDateZoneOffset.apply(OffsetDate, arguments);
case 4:
return OffsetDate._ofIntIntIntZoneOffset.apply(OffsetDate, arguments);
default:
throw new IllegalArgumentException('Illegal number of arguments');
}
};
OffsetDate._ofLocalDateZoneOffset = function _ofLocalDateZoneOffset(date, offset) {
return new OffsetDate(date, offset);
};
OffsetDate._ofIntIntIntZoneOffset = function _ofIntIntIntZoneOffset(year, month, dayOfMonth, offset) {
var d = LocalDate.of(year, month, dayOfMonth);
return new OffsetDate(d, offset);
};
OffsetDate.ofInstant = function ofInstant(instant, zone) {
requireNonNull(instant, 'instant');
requireNonNull(zone, 'zone');
var rules = zone.rules();
var offset = rules.offset(instant);
var epochSec = instant.epochSecond() + offset.totalSeconds();
var epochDay = MathUtil$4.floorDiv(epochSec, SECONDS_PER_DAY);
var date = LocalDate.ofEpochDay(epochDay);
return new OffsetDate(date, offset);
};
OffsetDate.from = function from(temporal) {
if (temporal instanceof OffsetDate) {
return temporal;
}
requireNonNull(temporal, 'temporal');
try {
var date = LocalDate.from(temporal);
var offset = ZoneOffset.from(temporal);
return new OffsetDate(date, offset);
} catch (ex) {
throw new DateTimeException("Unable to obtain OffsetDate from TemporalAccessor: " + temporal.constructor.name, ex);
}
};
OffsetDate.parse = function parse(text, formatter) {
if (formatter === void 0) {
formatter = DateTimeFormatter.ISO_OFFSET_DATE;
}
requireNonNull(formatter, 'formatter');
return formatter.parse(text, OffsetDate.FROM);
};
var _proto = OffsetDate.prototype;
_proto._with = function _with(date, offset) {
if (this._date === date && this._offset.equals(offset)) {
return this;
}
return new OffsetDate(date, offset);
};
_proto.isSupported = function isSupported(fieldOrUnit) {
if (fieldOrUnit instanceof TemporalField) {
return this._isSupportedField(fieldOrUnit);
}
if (fieldOrUnit instanceof TemporalUnit) {
return this._isSupportedUnit(fieldOrUnit);
}
if (fieldOrUnit == null) {
return false;
}
throw new IllegalArgumentException("fieldOrUnit must be an instance of TemporalField or TemporalUnit, but is " + fieldOrUnit.constructor.name);
};
_proto._isSupportedField = function _isSupportedField(field) {
if (field instanceof ChronoField) {
return field.isDateBased() || field === ChronoField.OFFSET_SECONDS;
}
return field != null && field.isSupportedBy(this);
};
_proto._isSupportedUnit = function _isSupportedUnit(unit) {
if (unit instanceof ChronoUnit) {
return unit.isDateBased();
}
return unit != null && unit.isSupportedBy(this);
};
_proto.range = function range(field) {
requireNonNull(field, 'field');
requireInstance(field, TemporalField, 'field');
if (field instanceof ChronoField) {
if (field === ChronoField.OFFSET_SECONDS) {
return field.range();
}
return this._date.range(field);
}
return field.rangeRefinedBy(this);
};
_proto.get = function get(field) {
requireNonNull(field, 'field');
requireInstance(field, TemporalField, 'field');
return this.range(field).checkValidIntValue(this.getLong(field), field);
};
_proto.getLong = function getLong(field) {
requireNonNull(field, 'field');
requireInstance(field, TemporalField, 'field');
if (field instanceof ChronoField) {
if (field === ChronoField.OFFSET_SECONDS) {
return this.offset().totalSeconds();
}
return this._date.getLong(field);
}
return field.getFrom(this);
};
_proto.offset = function offset() {
return this._offset;
};
_proto.withOffsetSameLocal = function withOffsetSameLocal(offset) {
requireNonNull(offset, 'offset');
return this._with(this._date, offset);
};
_proto.toLocalDate = function toLocalDate() {
return this._date;
};
_proto.year = function year() {
return this._date.year();
};
_proto.monthValue = function monthValue() {
return this._date.monthValue();
};
_proto.month = function month() {
return this._date.month();
};
_proto.dayOfMonth = function dayOfMonth() {
return this._date.dayOfMonth();
};
_proto.dayOfYear = function dayOfYear() {
return this._date.dayOfYear();
};
_proto.dayOfWeek = function dayOfWeek() {
return this._date.dayOfWeek();
};
_proto._withAdjuster = function _withAdjuster(adjuster) {
if (adjuster instanceof LocalDate) {
return this._with(adjuster, this._offset);
} else if (adjuster instanceof ZoneOffset) {
return this._with(this._date, adjuster);
} else if (adjuster instanceof OffsetDate) {
return adjuster;
}
return _Temporal.prototype._withAdjuster.call(this, adjuster);
};
_proto._withField = function _withField(field, newValue) {
requireNonNull(field, 'field');
requireInstance(field, TemporalField, 'field');
if (field instanceof ChronoField) {
if (field === ChronoField.OFFSET_SECONDS) {
var f = field;
return this._with(this._date, ZoneOffset.ofTotalSeconds(f.checkValidIntValue(newValue)));
}
return this._with(this._date.with(field, newValue), this._offset);
}
return field.adjustInto(this, newValue);
};
_proto.withYear = function withYear(year) {
return this._with(this._date.withYear(year), this._offset);
};
_proto.withMonth = function withMonth(month) {
return this._with(this._date.withMonth(month), this._offset);
};
_proto.withDayOfMonth = function withDayOfMonth(dayOfMonth) {
return this._with(this._date.withDayOfMonth(dayOfMonth), this._offset);
};
_proto.withDayOfYear = function withDayOfYear(dayOfYear) {
return this._with(this._date.withDayOfYear(dayOfYear), this._offset);
};
_proto._plusUnit = function _plusUnit(amountToAdd, unit) {
if (unit instanceof ChronoUnit) {
return this._with(this._date.plus(amountToAdd, unit), this._offset);
}
return unit.addTo(this, amountToAdd);
};
_proto.plusYears = function plusYears(years) {
return this._with(this._date.plusYears(years), this._offset);
};
_proto.plusMonths = function plusMonths(months) {
return this._with(this._date.plusMonths(months), this._offset);
};
_proto.plusWeeks = function plusWeeks(weeks) {
return this._with(this._date.plusWeeks(weeks), this._offset);
};
_proto.plusDays = function plusDays(days) {
return this._with(this._date.plusDays(days), this._offset);
};
_proto.minusYears = function minusYears(years) {
return this._with(this._date.minusYears(years), this._offset);
};
_proto.minusMonths = function minusMonths(months) {
return this._with(this._date.minusMonths(months), this._offset);
};
_proto.minusWeeks = function minusWeeks(weeks) {
return this._with(this._date.minusWeeks(weeks), this._offset);
};
_proto.minusDays = function minusDays(days) {
return this._with(this._date.minusDays(days), this._offset);
};
_proto.query = function query(_query) {
requireNonNull(_query, 'query');
requireInstance(_query, TemporalQuery, 'query');
if (_query === TemporalQueries.chronology()) {
return IsoChronology.INSTANCE;
} else if (_query === TemporalQueries.precision()) {
return ChronoUnit.DAYS;
} else if (_query === TemporalQueries.offset() || _query === TemporalQueries.zone()) {
return this.offset();
}
return _Temporal.prototype.query.call(this, _query);
};
_proto.adjustInto = function adjustInto(temporal) {
return temporal.with(ChronoField.OFFSET_SECONDS, this.offset().totalSeconds()).with(ChronoField.EPOCH_DAY, this.toLocalDate().toEpochDay());
};
_proto.until = function until(endExclusive, unit) {
var end = OffsetDate.from(endExclusive);
if (unit instanceof ChronoUnit) {
var offsetDiff = end._offset.totalSeconds() - this._offset.totalSeconds();
var endLocal = end._date.plusDays(MathUtil$4.intDiv(-offsetDiff, SECONDS_PER_DAY));
return this._date.until(endLocal, unit);
}
return unit.between(this, end);
};
_proto.format = function format(formatter) {
requireNonNull(formatter, 'formatter');
return formatter.format(this);
};
_proto.atTime = function atTime(time) {
return OffsetDateTime.of(this._date, time, this._offset);
};
_proto._toEpochSecond = function _toEpochSecond() {
var epochDay = this._date.toEpochDay();
var secs = epochDay * SECONDS_PER_DAY;
return secs - this._offset.totalSeconds();
};
_proto.toEpochSecond = function toEpochSecond(time) {
requireNonNull(time, 'time');
return this._toEpochSecond() + time.toSecondOfDay();
};
_proto.compareTo = function compareTo(other) {
requireNonNull(other, 'other');
requireInstance(other, OffsetDate, 'other');
if (this._offset.equals(other._offset)) {
return this._date.compareTo(other._date);
}
var compare = this._toEpochSecond() - other._toEpochSecond();
if (compare === 0) {
compare = this._date.compareTo(other._date);
}
return compare;
};
_proto.isAfter = function isAfter(other) {
requireNonNull(other, 'other');
requireInstance(other, OffsetDate, 'other');
return this._toEpochSecond() > other._toEpochSecond();
};
_proto.isBefore = function isBefore(other) {
requireNonNull(other, 'other');
requireInstance(other, OffsetDate, 'other');
return this._toEpochSecond() < other._toEpochSecond();
};
_proto.isEqual = function isEqual(other) {
requireNonNull(other, 'other');
requireInstance(other, OffsetDate, 'other');
return this._toEpochSecond() === other._toEpochSecond();
};
_proto.equals = function equals(obj) {
if (this === obj) {
return true;
}
if (obj instanceof OffsetDate) {
var other = obj;
return this._date.equals(other._date) && this._offset.equals(other._offset);
}
return false;
};
_proto.hashCode = function hashCode() {
return this._date.hashCode() ^ this._offset.hashCode();
};
_proto.toString = function toString() {
return this._date.toString() + this._offset.toString();
};
return OffsetDate;
}(Temporal);
function _init$4() {
OffsetDate.MIN = OffsetDate.of(LocalDate.MIN, ZoneOffset.MAX);
OffsetDate.MAX = OffsetDate.of(LocalDate.MAX, ZoneOffset.MIN);
OffsetDate.FROM = createTemporalQuery$3('OffsetDate.FROM', function (temporal) {
return OffsetDate.from(temporal);
});
}
function createTemporalQuery$3(name, queryFromFunction) {
var ExtendedTemporalQuery = function (_TemporalQuery) {
function ExtendedTemporalQuery() {
return _TemporalQuery.apply(this, arguments) || this;
}
_inheritsLoose(ExtendedTemporalQuery, _TemporalQuery);
return ExtendedTemporalQuery;
}(TemporalQuery);
ExtendedTemporalQuery.prototype.queryFrom = queryFromFunction;
return new ExtendedTemporalQuery(name);
}
var MathUtil$3 = _.MathUtil;
var Quarter = function (_TemporalAccessor) {
function Quarter(value, name) {
var _this;
_this = _TemporalAccessor.call(this) || this;
_this._value = MathUtil$3.safeToInt(value);
_this._name = name;
return _this;
}
_inheritsLoose(Quarter, _TemporalAccessor);
Quarter.valueOf = function valueOf(name) {
requireNonNull(name, 'name');
switch (name) {
case 'Q1':
return Quarter.Q1;
case 'Q2':
return Quarter.Q2;
case 'Q3':
return Quarter.Q3;
case 'Q4':
return Quarter.Q4;
}
throw new IllegalArgumentException("No enum constant Quarter." + name);
};
Quarter.values = function values() {
return QUARTERS.slice();
};
Quarter.of = function of(quarterOfYear) {
requireNonNull(quarterOfYear, 'quarterOfYear');
switch (quarterOfYear) {
case 1:
return Quarter.Q1;
case 2:
return Quarter.Q2;
case 3:
return Quarter.Q3;
case 4:
return Quarter.Q4;
default:
throw new DateTimeException("Invalid value for Quarter: " + quarterOfYear);
}
};
Quarter.ofMonth = function ofMonth(monthOfYear) {
requireNonNull(monthOfYear, 'monthOfYear');
ChronoField.MONTH_OF_YEAR.range().checkValidValue(monthOfYear, ChronoField.MONTH_OF_YEAR);
return Quarter.of(MathUtil$3.intDiv(monthOfYear - 1, 3) + 1);
};
Quarter.from = function from(temporal) {
if (temporal instanceof Quarter) {
return temporal;
} else if (temporal instanceof Month) {
var month = temporal;
return Quarter.of(MathUtil$3.intDiv(month.ordinal(), 3) + 1);
}
try {
var qoy = MathUtil$3.safeToInt(temporal.getLong(IsoFields.QUARTER_OF_YEAR));
return Quarter.of(qoy);
} catch (ex) {
throw new DateTimeException("Unable to obtain Quarter from TemporalAccessor: '" + temporal + "' of type '" + (temporal && temporal.constructor.name) + "'", ex);
}
};
var _proto = Quarter.prototype;
_proto.value = function value() {
return this._value;
};
_proto.displayName = function displayName(style, locale) {
throw new IllegalArgumentException('Pattern using (localized) text not implemented yet!');
};
_proto.isSupported = function isSupported(field) {
if (field === IsoFields.QUARTER_OF_YEAR) {
return true;
} else if (field instanceof ChronoField) {
return false;
}
return field != null && field.isSupportedBy(this);
};
_proto.range = function range(field) {
requireNonNull(field, 'field');
if (field === IsoFields.QUARTER_OF_YEAR) {
return field.range();
} else if (field instanceof ChronoField) {
throw new UnsupportedTemporalTypeException("Unsupported field: " + field);
}
return _TemporalAccessor.prototype.range.call(this, field);
};
_proto.get = function get(field) {
requireNonNull(field, 'field');
requireInstance(field, TemporalField, 'field');
return this.range(field).checkValidIntValue(this.getLong(field), field);
};
_proto.getLong = function getLong(field) {
requireNonNull(field, 'field');
if (field === IsoFields.QUARTER_OF_YEAR) {
return this.value();
} else if (field instanceof ChronoField) {
throw new UnsupportedTemporalTypeException("Unsupported field: " + field);
}
return field.getFrom(this);
};
_proto.plus = function plus(quarters) {
var amount = MathUtil$3.intMod(quarters, 4);
return QUARTERS[(this.ordinal() + amount + 4) % 4];
};
_proto.minus = function minus(quarters) {
return this.plus(-MathUtil$3.intMod(quarters, 4));
};
_proto.length = function length(leapYear) {
switch (this) {
case Quarter.Q1:
return leapYear ? 91 : 90;
case Quarter.Q2:
return 91;
default:
return 92;
}
};
_proto.firstMonth = function firstMonth() {
switch (this) {
case Quarter.Q1:
return Month.JANUARY;
case Quarter.Q2:
return Month.APRIL;
case Quarter.Q3:
return Month.JULY;
case Quarter.Q4:
return Month.OCTOBER;
default:
throw new IllegalStateException('Unreachable');
}
};
_proto.query = function query(_query) {
requireNonNull(_query, 'query');
requireInstance(_query, TemporalQuery, 'query');
if (_query === TemporalQueries.chronology()) {
return IsoChronology.INSTANCE;
} else if (_query === TemporalQueries.precision()) {
return IsoFields.QUARTER_YEARS;
}
return _TemporalAccessor.prototype.query.call(this, _query);
};
_proto.adjustInto = function adjustInto(temporal) {
requireNonNull(temporal, 'temporal');
return temporal.with(IsoFields.QUARTER_OF_YEAR, this.value());
};
_proto.ordinal = function ordinal() {
return this._value - 1;
};
_proto.name = function name() {
return this._name;
};
_proto.compareTo = function compareTo(other) {
requireNonNull(other, 'other');
requireInstance(other, Quarter, 'other');
return this._value - other._value;
};
_proto.toString = function toString() {
return this.name();
};
_proto.equals = function equals(other) {
return this === other;
};
_proto.hashCode = function hashCode() {
return this._value;
};
return Quarter;
}(TemporalAccessor);
var QUARTERS;
function _init$3() {
Quarter.Q1 = new Quarter(1, 'Q1');
Quarter.Q2 = new Quarter(2, 'Q2');
Quarter.Q3 = new Quarter(3, 'Q3');
Quarter.Q4 = new Quarter(4, 'Q4');
Quarter.FROM = createTemporalQuery$2('Quarter.FROM', function (temporal) {
return Quarter.from(temporal);
});
QUARTERS = [Quarter.Q1, Quarter.Q2, Quarter.Q3, Quarter.Q4];
}
function createTemporalQuery$2(name, queryFromFunction) {
var ExtendedTemporalQuery = function (_TemporalQuery) {
function ExtendedTemporalQuery() {
return _TemporalQuery.apply(this, arguments) || this;
}
_inheritsLoose(ExtendedTemporalQuery, _TemporalQuery);
return ExtendedTemporalQuery;
}(TemporalQuery);
ExtendedTemporalQuery.prototype.queryFrom = queryFromFunction;
return new ExtendedTemporalQuery(name);
}
var MathUtil$2 = _.MathUtil;
var Temporals = function () {
function Temporals() {}
Temporals.nextWorkingDay = function nextWorkingDay() {
return Adjuster.NEXT_WORKING;
};
Temporals.nextWorkingDayOrSame = function nextWorkingDayOrSame() {
return Adjuster.NEXT_WORKING_OR_SAME;
};
Temporals.previousWorkingDay = function previousWorkingDay() {
return Adjuster.PREVIOUS_WORKING;
};
Temporals.previousWorkingDayOrSame = function previousWorkingDayOrSame() {
return Adjuster.PREVIOUS_WORKING_