@statengine/shiftly
Version:
Calculate common public safety shift schedules.
1,253 lines (1,249 loc) • 33.2 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.AdamsCountyCO = AdamsCountyCO;
exports.AlbuquerqueNM = AlbuquerqueNM;
exports.AlexandriaVA = AlexandriaVA;
exports.AnneArundelMD = AnneArundelMD;
exports.ArvadaCO = ArvadaCO;
exports.AshevilleNC = AshevilleNC;
exports.BeavercreekOH = BeavercreekOH;
exports.BellevueWA = BellevueWA;
exports.BostonMA = BostonMA;
exports.BothellWA = BothellWA;
exports.BrowardFL = BrowardFL;
exports.CapeCoralFL = CapeCoralFL;
exports.CarmelIN = CarmelIN;
exports.CasaGrandeAZ = CasaGrandeAZ;
exports.CedarRapidsIA = CedarRapidsIA;
exports.ChesapeakeVA = ChesapeakeVA;
exports.CiceroIN = CiceroIN;
exports.ClarkCountyNV = ClarkCountyNV;
exports.ColumbusOH = ColumbusOH;
exports.CoralGablesFL = CoralGablesFL;
exports.CosumnesCA = CosumnesCA;
exports.DelawareOH = DelawareOH;
exports.DelrayBeachFL = DelrayBeachFL;
exports.DerryNH = DerryNH;
exports.EastPierceWA = EastPierceWA;
exports.FairmountCO = FairmountCO;
exports.FirecaresLookup = void 0;
exports.FishersIN = FishersIN;
exports.FtMyersFL = FtMyersFL;
exports.GolderRanchAZ = GolderRanchAZ;
exports.GoodyearAZ = GoodyearAZ;
exports.GreenvilleNC = GreenvilleNC;
exports.HallCountyGA = HallCountyGA;
exports.HarrisonburgVA = HarrisonburgVA;
exports.HiltonHeadSC = HiltonHeadSC;
exports.IndianapolisIN = IndianapolisIN;
exports.IonaMcGregorFL = IonaMcGregorFL;
exports.JacksonCountyOR = JacksonCountyOR;
exports.JacksonTownshipIN = JacksonTownshipIN;
exports.JerseyCityNJ = JerseyCityNJ;
exports.KansasCityMO = KansasCityMO;
exports.KingstonON = KingstonON;
exports.LACountyCA = LACountyCA;
exports.LexingtonKy = LexingtonKy;
exports.LoudounVA = LoudounVA;
exports.LouisvilleKY = LouisvilleKY;
exports.MadisonWI = MadisonWI;
exports.ManchesterCT = ManchesterCT;
exports.MemphisTN = MemphisTN;
exports.MesaAZ = MesaAZ;
exports.MiamiDadeFL = MiamiDadeFL;
exports.MilwaukeeWI = MilwaukeeWI;
exports.NewRochelleNY = NewRochelleNY;
exports.NewportNewsVA = NewportNewsVA;
exports.NoblesvilleIN = NoblesvilleIN;
exports.NorthPortFL = NorthPortFL;
exports.NorthwestAZ = NorthwestAZ;
exports.OlatheKS = OlatheKS;
exports.OntarioCA = OntarioCA;
exports.OrangeCountyFL = OrangeCountyFL;
exports.OrlandoFL = OrlandoFL;
exports.OxnardCA = OxnardCA;
exports.PalmBeachCountyFL = PalmBeachCountyFL;
exports.PascoWA = PascoWA;
exports.PflugervilleTX = PflugervilleTX;
exports.PhoenixAZ = PhoenixAZ;
exports.PlainfieldIL = PlainfieldIL;
exports.PolkCountyFL = PolkCountyFL;
exports.PrinceWilliamVA = PrinceWilliamVA;
exports.RichlandWA = RichlandWA;
exports.RinconValleyAZ = RinconValleyAZ;
exports.RivieraBeachFL = RivieraBeachFL;
exports.RogersAR = RogersAR;
exports.RosevilleCA = RosevilleCA;
exports.SacramentoMetroCA = SacramentoMetroCA;
exports.SaintLucieFL = SaintLucieFL;
exports.SanFranciscoCA = SanFranciscoCA;
exports.SanLuisAZ = SanLuisAZ;
exports.SeminoleCountyFL = SeminoleCountyFL;
exports.SheridanIN = SheridanIN;
exports.ShiftConfiguration = void 0;
exports.SnoqualmieWA = SnoqualmieWA;
exports.SomertonCocopahAZ = SomertonCocopahAZ;
exports.SouthMetroCO = SouthMetroCO;
exports.SouthernPlatteMO = SouthernPlatteMO;
exports.SpokaneValleyWA = SpokaneValleyWA;
exports.StLouisPark = StLouisPark;
exports.StPaulMN = StPaulMN;
exports.TheVillagesFL = TheVillagesFL;
exports.TimberMesaAZ = TimberMesaAZ;
exports.TorringtonCT = TorringtonCT;
exports.TucsonAZ = TucsonAZ;
exports.UpperProvidencePA = UpperProvidencePA;
exports.WashoeCountyNV = WashoeCountyNV;
exports.WayneTownshipIN = WayneTownshipIN;
exports.WestMetroCO = WestMetroCO;
exports.WestPalmBeachFL = WestPalmBeachFL;
exports.WestfieldIN = WestfieldIN;
exports.fairfaxVA = fairfaxVA;
exports.richmondVA = richmondVA;
exports.washingtonDC = washingtonDC;
var _momentTimezone = _interopRequireDefault(require("moment-timezone"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
var ShiftInformation = /*#__PURE__*/function () {
/**
* Individual shift information and pattern for ShiftConfiguration
* @param {string} pattern - The department's shift pattern.
* @param {string} timeZone - The department's timezone.
* @param {string} shiftStart - The start time of the department's shift.
* @param {string} firstDay - The first day of the pattern (assumed to be in local tz).
* @param {number} shiftDuration - Number of hours per shift.
*/
function ShiftInformation() {
var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
pattern = _ref.pattern,
_ref$timeZone = _ref.timeZone,
timeZone = _ref$timeZone === void 0 ? 'US/Eastern' : _ref$timeZone,
_ref$shiftStart = _ref.shiftStart,
shiftStart = _ref$shiftStart === void 0 ? '0800' : _ref$shiftStart,
_ref$firstDay = _ref.firstDay,
firstDay = _ref$firstDay === void 0 ? '2016-10-30' : _ref$firstDay,
_ref$shiftDuration = _ref.shiftDuration,
shiftDuration = _ref$shiftDuration === void 0 ? 24 : _ref$shiftDuration;
_classCallCheck(this, ShiftInformation);
this.pattern = pattern;
this.timeZone = timeZone;
this.shiftStart = shiftStart;
this.firstDay = firstDay;
this.shiftDuration = shiftDuration;
this.shiftStartDate = _momentTimezone["default"].tz(this.shiftStart, 'hmm', this.timeZone);
this.patternStart = _momentTimezone["default"].tz("".concat(this.firstDay, " ").concat(this.shiftStart.slice(0, 2), ":").concat(this.shiftStart.slice(2)), this.timeZone).startOf('hour');
}
return _createClass(ShiftInformation, [{
key: "normalize",
value: function normalize(incomingDate) {
return _momentTimezone["default"].tz(incomingDate, this.timeZone);
}
}, {
key: "reversePattern",
value: function reversePattern() {
var isPatternString = typeof this.pattern === 'string';
// create shallow copy of the array
var pattern = Array.from(isPatternString ? this.pattern.split('') : this.pattern);
pattern = pattern.reverse();
return isPatternString ? pattern.join('') : pattern;
}
}, {
key: "afterShiftStartDate",
value: function afterShiftStartDate(date) {
var incomingDate = this.normalize(date);
return this.minutesFromPatternStart(incomingDate) >= 0;
}
}, {
key: "beforeShiftChange",
value: function beforeShiftChange(date) {
var startDate = this.shiftStartDate;
return date.hours() < startDate.hours() || date.hours() === startDate.hours() && date.minutes() < startDate.minutes();
}
}, {
key: "minutesFromPatternStart",
value: function minutesFromPatternStart(start) {
return start.diff(this.patternStart, 'minutes');
}
}, {
key: "hoursFromPatternStart",
value: function hoursFromPatternStart(start) {
return start.diff(this.patternStart, 'hours');
}
}, {
key: "calculateShift",
value: function calculateShift(date) {
var _ref2 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
_ref2$dateOnly = _ref2.dateOnly,
dateOnly = _ref2$dateOnly === void 0 ? false : _ref2$dateOnly;
var momentDate = this.normalize(date);
if (dateOnly) {
momentDate.add(this.shiftStartDate.hour(), 'hours');
}
var hoursFromStart = this.hoursFromPatternStart(momentDate);
// Adjust for time spans covering DST transition :(
if (this.patternStart.isDST() !== momentDate.isDST()) {
hoursFromStart += momentDate.isDST() ? 1 : -1;
}
if (this.beforeShiftChange(momentDate)) {
hoursFromStart -= 1;
}
var pattern = hoursFromStart < 0 ? this.reversePattern() : this.pattern;
var index = Math.floor(Math.abs(hoursFromStart) / this.shiftDuration) % pattern.length;
var shift = pattern[index];
// Returns an undefined shift if the index is not found
if (typeof shift !== 'undefined') {
shift = shift.toUpperCase();
}
return shift;
}
}, {
key: "shiftTimeFrame",
value: function shiftTimeFrame(date) {
/**
* Returns the start and end time of the shift for the day.
* @param {string} date - The date of the shift as an ISO-8601 compliant string (ie YYYY-MM-DD).
*/
var momentDate = this.normalize(date);
if (this.beforeShiftChange(momentDate)) {
momentDate = momentDate.subtract(1, 'days');
}
var start = momentDate.hours(this.shiftStartDate.hours()).minutes(this.shiftStartDate.minutes()).startOf('minute');
return {
start: start.format(),
end: start.add(this.shiftDuration, 'hours').format()
};
}
}]);
}();
var ShiftConfiguration = exports.ShiftConfiguration = /*#__PURE__*/function () {
// eslint-disable-line import/prefer-default-export
/**
* Create a ShiftConfiguration.
* @param shifts
*/
function ShiftConfiguration() {
var shifts = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {
timeZone: 'US/Eastern',
shiftStart: '0800',
firstDay: '2016-10-30'
};
_classCallCheck(this, ShiftConfiguration);
if (Array.isArray(shifts)) {
this.shifts = shifts.map(function (shiftInfo) {
return new ShiftInformation(shiftInfo);
});
} else {
this.shifts = [new ShiftInformation(shifts)];
}
this.shifts = this.shifts.sort(function (a, b) {
return a.hoursFromPatternStart(b.patternStart);
});
}
return _createClass(ShiftConfiguration, [{
key: "determineShiftPattern",
value: function determineShiftPattern(date) {
var i;
for (i = 0; i < this.shifts.length; i += 1) {
if (this.shifts[i].afterShiftStartDate(date)) {
return this.shifts[i];
}
}
// Return newest known shift if none found for date
return this.shifts[0];
}
}, {
key: "normalize",
value: function normalize(incomingDate) {
var shiftPattern = this.determineShiftPattern(incomingDate);
return shiftPattern.normalize(incomingDate);
}
}, {
key: "calculateShift",
value: function calculateShift(date) {
var _ref3 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
_ref3$dateOnly = _ref3.dateOnly,
dateOnly = _ref3$dateOnly === void 0 ? false : _ref3$dateOnly;
var shiftPattern = this.determineShiftPattern(date);
return shiftPattern.calculateShift(date, {
dateOnly: dateOnly
});
}
}, {
key: "shiftTimeFrame",
value: function shiftTimeFrame(date) {
var shiftPattern = this.determineShiftPattern(date);
return shiftPattern.shiftTimeFrame(date);
}
}, {
key: "beforeShiftChange",
value: function beforeShiftChange(date) {
var shiftPattern = this.determineShiftPattern(date);
return shiftPattern.beforeShiftChange(date);
}
}, {
key: "reversePattern",
value: function reversePattern() {
var shiftIndex = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
return this.shifts[shiftIndex].reversePattern();
}
}]);
}();
function washingtonDC() {
return new ShiftConfiguration({
firstDay: '2017-09-01',
pattern: '1234',
shiftStart: '0700',
timeZone: 'US/Eastern'
});
}
function richmondVA() {
return new ShiftConfiguration({
firstDay: '2016-10-18',
pattern: 'acababacbcacacbabcbcb',
shiftStart: '0800',
timeZone: 'US/Eastern'
});
}
function fairfaxVA() {
return new ShiftConfiguration({
firstDay: '2016-10-14',
pattern: 'acababcbc',
shiftStart: '0700',
timeZone: 'US/Eastern'
});
}
function PrinceWilliamVA() {
return new ShiftConfiguration({
firstDay: '2017-07-10',
pattern: 'abc',
shiftStart: '0600',
timeZone: 'US/Eastern'
});
}
function OxnardCA() {
return new ShiftConfiguration({
firstDay: '2017-01-04',
pattern: 'acacababcbcbcacabababcbc',
shiftStart: '0800',
timeZone: 'US/Pacific'
});
}
function TucsonAZ() {
return new ShiftConfiguration([{
firstDay: '2017-01-01',
pattern: 'acbcbcbababacac',
shiftStart: '0800',
timeZone: 'US/Arizona'
},
// transition to new schedule starts
{
firstDay: '2021-03-31',
pattern: 'AC',
shiftDuration: 12,
shiftStart: '0800',
timeZone: 'US/Arizona'
}, {
firstDay: '2021-04-01',
pattern: 'BACACAC',
shiftStart: '0800',
timeZone: 'US/Arizona'
},
// transition to new schedule completes on 04/08/2021
{
firstDay: '2021-04-08',
pattern: 'BABCBCACA',
shiftStart: '0800',
timeZone: 'US/Arizona'
}]);
}
function ClarkCountyNV() {
return new ShiftConfiguration({
firstDay: '2017-01-06',
pattern: 'cbcbcacacababab',
shiftStart: '0800',
timeZone: 'US/Pacific'
});
}
function RogersAR() {
return new ShiftConfiguration({
firstDay: '2018-01-17',
pattern: 'aabbcc',
shiftStart: '0700',
timeZone: 'US/Central'
});
}
function BostonMA() {
return new ShiftConfiguration({
firstDay: '2018-01-01',
pattern: '13243142',
shiftStart: '0800',
timeZone: 'US/Eastern'
});
}
function FairmountCO() {
return new ShiftConfiguration({
firstDay: '2018-01-01',
pattern: 'BBAACC',
shiftStart: '0700',
timeZone: 'US/Mountain'
});
}
function KingstonON() {
return new ShiftConfiguration({
firstDay: '2018-01-01',
pattern: 'DBCDACABCABDADCADCBDBADBACBC',
shiftStart: '0800',
timeZone: 'US/Eastern'
});
}
function GreenvilleNC() {
return new ShiftConfiguration({
firstDay: '2018-04-30',
pattern: '123',
shiftStart: '0800',
timeZone: 'US/Eastern'
});
}
function CosumnesCA() {
return new ShiftConfiguration({
firstDay: '2018-01-05',
pattern: 'AABBCC',
shiftStart: '0700',
timeZone: 'US/Pacific'
});
}
function StLouisPark() {
return new ShiftConfiguration({
firstDay: '2018-01-01',
pattern: 'ACABCBCBABCACACBCABAB',
shiftStart: '0730',
timeZone: 'US/Central'
});
}
function HiltonHeadSC() {
return new ShiftConfiguration({
firstDay: '2018-01-01',
pattern: 'ABC',
shiftStart: '0800',
timeZone: 'US/Eastern'
});
}
function PolkCountyFL() {
return new ShiftConfiguration({
firstDay: '2018-05-08',
pattern: 'ABC',
shiftStart: '0800',
timeZone: 'US/Eastern'
});
}
function FtMyersFL() {
return new ShiftConfiguration({
firstDay: '2018-01-02',
pattern: 'ABC',
shiftStart: '0700',
timeZone: 'US/Eastern'
});
}
function OrangeCountyFL() {
return new ShiftConfiguration({
firstDay: '2018-05-01',
pattern: 'ABC',
shiftStart: '0730',
timeZone: 'US/Eastern'
});
}
function StPaulMN() {
return new ShiftConfiguration({
firstDay: '2018-01-01',
pattern: 'BABCBCBCACABABABCBCACACA',
shiftStart: '0800',
timeZone: 'US/Central'
});
}
function WestMetroCO() {
return new ShiftConfiguration({
firstDay: '2018-01-01',
pattern: 'BBAACC',
shiftStart: '0700',
timeZone: 'US/Mountain'
});
}
function BellevueWA() {
return new ShiftConfiguration({
firstDay: '2018-01-01',
pattern: 'BABACACBC',
shiftStart: '0800',
timeZone: 'US/Pacific'
});
}
function BothellWA() {
return new ShiftConfiguration({
firstDay: '2022-08-07',
pattern: 'ABABCDCD',
shiftStart: '0800',
timeZone: 'US/Pacific'
});
}
function DelrayBeachFL() {
return new ShiftConfiguration({
firstDay: '2018-01-01',
pattern: 'CABCAB',
shiftStart: '0800',
timeZone: 'US/Eastern'
});
}
function NewRochelleNY() {
return new ShiftConfiguration({
firstDay: '2018-09-03',
pattern: '12341234',
shiftStart: '0800',
timeZone: 'US/Eastern'
});
}
function MiamiDadeFL() {
return new ShiftConfiguration({
firstDay: '2017-12-03',
pattern: 'abcabc',
shiftStart: '0700',
timeZone: 'US/Eastern'
});
}
function SouthernPlatteMO() {
return new ShiftConfiguration({
firstDay: '2018-01-01',
pattern: 'BABCBCACABABCBCACA',
shiftStart: '0800',
timeZone: 'US/Central'
});
}
function AdamsCountyCO() {
return new ShiftConfiguration({
firstDay: '2019-01-02',
pattern: 'BBAACCBBAACC',
shiftStart: '0700',
timeZone: 'US/Mountain'
});
}
function FishersIN() {
return new ShiftConfiguration({
firstDay: '2018-12-01',
pattern: 'CAB',
shiftStart: '0700',
timeZone: 'US/Eastern'
});
}
function WestfieldIN() {
return new ShiftConfiguration({
firstDay: '2019-01-01',
pattern: 'ABC',
shiftStart: '0800',
timeZone: 'US/Eastern'
});
}
function CiceroIN() {
return new ShiftConfiguration({
firstDay: '2019-01-01',
pattern: 'acababcbc',
shiftStart: '0700',
timeZone: 'US/Eastern'
});
}
function SheridanIN() {
return new ShiftConfiguration({
firstDay: '2019-01-01',
pattern: 'acababcbc',
shiftStart: '0700',
timeZone: 'US/Eastern'
});
}
function CarmelIN() {
return new ShiftConfiguration([{
firstDay: '2019-01-01',
pattern: 'acababcbc',
shiftStart: '0700',
timeZone: 'US/Eastern'
}, {
firstDay: '2018-01-01',
pattern: 'abcbcacab',
shiftStart: '0700',
timeZone: 'US/Eastern'
}]);
}
function NoblesvilleIN() {
return new ShiftConfiguration({
firstDay: '2019-01-02',
pattern: 'BABCBCACA',
shiftStart: '0730',
timeZone: 'US/Eastern'
});
}
function MesaAZ() {
return new ShiftConfiguration({
firstDay: '2018-01-07',
pattern: 'ABCBCACAB',
shiftStart: '0700',
timeZone: 'US/Arizona'
});
}
function RivieraBeachFL() {
return new ShiftConfiguration({
firstDay: '2019-01-03',
pattern: 'ABC',
shiftStart: '0800',
timeZone: 'US/Eastern'
});
}
function WayneTownshipIN() {
return new ShiftConfiguration({
firstDay: '2019-02-01',
pattern: 'cab',
shiftStart: '0800',
timeZone: 'US/Eastern'
});
}
function WestPalmBeachFL() {
return new ShiftConfiguration({
firstDay: '2019-01-01',
pattern: '123',
shiftStart: '0800',
timeZone: 'US/Eastern'
});
}
function SacramentoMetroCA() {
return new ShiftConfiguration({
firstDay: '2019-01-01',
pattern: 'abbcca',
shiftStart: '0800',
timeZone: 'US/Pacific'
});
}
function WashoeCountyNV() {
return new ShiftConfiguration({
firstDay: '2019-01-01',
pattern: 'caabbc',
shiftStart: '0800',
timeZone: 'US/Pacific'
});
}
function JacksonTownshipIN() {
return new ShiftConfiguration({
firstDay: '2019-01-01',
pattern: 'acababcbc',
shiftStart: '0700',
timeZone: 'US/Eastern'
});
}
function JerseyCityNJ() {
return new ShiftConfiguration({
firstDay: '2020-01-04',
pattern: 'ABCD',
shiftStart: '0800',
timeZone: 'US/Eastern'
});
}
function DelawareOH() {
return new ShiftConfiguration([{
firstDay: '2019-03-21',
pattern: 'abcabc',
shiftStart: '0800',
timeZone: 'US/Eastern'
}, {
firstDay: '2020-02-29',
pattern: 'cba',
shiftDuration: 8,
shiftStart: '0800',
timeZone: 'US/Eastern'
}, {
firstDay: '2020-03-01',
pattern: 'abcabc',
shiftStart: '0800',
timeZone: 'US/Eastern'
}]);
}
function AnneArundelMD() {
return new ShiftConfiguration({
firstDay: '2019-05-02',
pattern: 'ABCD',
shiftStart: '0700'
});
}
function RosevilleCA() {
return new ShiftConfiguration({
firstDay: '2019-01-06',
pattern: 'aabbcc',
shiftStart: '0700',
timeZone: 'US/Pacific'
});
}
function TorringtonCT() {
return new ShiftConfiguration({
firstDay: '2019-06-25',
pattern: '1234',
shiftStart: '0800',
timeZone: 'US/Eastern'
});
}
function MemphisTN() {
return new ShiftConfiguration({
firstDay: '2019-01-01',
pattern: 'ababcbcac',
shiftStart: '0700',
timeZone: 'US/Central'
});
}
function JacksonCountyOR() {
return new ShiftConfiguration({
firstDay: '2019-07-05',
pattern: 'aabbcc',
shiftStart: '0800',
timeZone: 'US/Pacific'
});
}
function LexingtonKy() {
return new ShiftConfiguration({
firstDay: '2019-07-12',
pattern: '123',
shiftStart: '0700',
timeZone: 'US/Eastern'
});
}
function MilwaukeeWI() {
return new ShiftConfiguration({
firstDay: '2022-02-16',
pattern: 'RGB',
shiftStart: '0800',
timeZone: 'US/Central'
});
}
function PlainfieldIL() {
return new ShiftConfiguration({
firstDay: '2019-01-01',
pattern: 'RGB',
shiftStart: '0700',
timeZone: 'US/Central'
});
}
function ManchesterCT() {
return new ShiftConfiguration({
firstDay: '2019-01-08',
pattern: '13243142',
shiftStart: '0800',
timeZone: 'US/Eastern'
});
}
function PalmBeachCountyFL() {
return new ShiftConfiguration({
firstDay: '2019-12-02',
pattern: 'ABC',
shiftStart: '0730',
timeZone: 'US/Eastern'
});
}
function CedarRapidsIA() {
return new ShiftConfiguration({
firstDay: '2020-01-01',
pattern: 'ABC',
shiftStart: '0700',
timeZone: 'US/Central'
});
}
function AlexandriaVA() {
return new ShiftConfiguration({
firstDay: '2020-01-08',
pattern: 'ABABCBCAC',
shiftStart: '0700',
timeZone: 'US/Eastern'
});
}
function PascoWA() {
return new ShiftConfiguration({
firstDay: '2020-01-06',
pattern: 'AABBCC',
shiftStart: '0800',
timeZone: 'US/Pacific'
});
}
function RichlandWA() {
return new ShiftConfiguration({
firstDay: '2020-01-06',
pattern: 'AABBCC',
shiftStart: '0800',
timeZone: 'US/Pacific'
});
}
function RinconValleyAZ() {
return new ShiftConfiguration([{
firstDay: '2017-01-01',
pattern: 'acbcbcbababacac',
shiftStart: '0700',
timeZone: 'US/Arizona'
}, {
firstDay: '2023-07-09',
pattern: 'AABBCC',
shiftStart: '0700',
timeZone: 'US/Arizona'
}]);
}
function EastPierceWA() {
return new ShiftConfiguration({
firstDay: '2020-01-02',
pattern: 'ACABABCBC',
shiftStart: '0800',
timeZone: 'US/Pacific'
});
}
function CapeCoralFL() {
return new ShiftConfiguration({
firstDay: '2020-01-01',
pattern: 'BCA',
shiftStart: '0800',
timeZone: 'US/Eastern'
});
}
function NorthwestAZ() {
return new ShiftConfiguration({
firstDay: '2020-01-02',
pattern: 'ACABABCBC',
shiftStart: '0800',
timeZone: 'US/Arizona'
});
}
function GolderRanchAZ() {
return new ShiftConfiguration({
firstDay: '2020-04-01',
pattern: 'ACABABCBC',
shiftStart: '0800',
timeZone: 'US/Arizona'
});
}
function TheVillagesFL() {
return new ShiftConfiguration({
firstDay: '2020-05-01',
pattern: 'ABC',
shiftStart: '0800',
timeZone: 'US/Eastern'
});
}
function MadisonWI() {
return new ShiftConfiguration({
firstDay: '2020-01-05',
pattern: 'ababcbcac',
shiftStart: '0700',
timeZone: 'US/Central'
});
}
function HallCountyGA() {
return new ShiftConfiguration({
firstDay: '2020-06-01',
pattern: 'ABC',
shiftStart: '0800',
timeZone: 'US/Eastern'
});
}
function CoralGablesFL() {
return new ShiftConfiguration({
firstDay: '2020-06-11',
pattern: 'ABC',
shiftStart: '0700',
timeZone: 'US/Eastern'
});
}
function OntarioCA() {
return new ShiftConfiguration({
firstDay: '2020-01-01',
pattern: 'cabababcbcacacababcbcbca',
shiftStart: '0700',
timeZone: 'US/Pacific'
});
}
// Demo SF Data
function SanFranciscoCA() {
return new ShiftConfiguration({
firstDay: '2016-10-18',
pattern: 'acababacbcacacbabcbcb',
shiftStart: '0800',
timeZone: 'US/Eastern'
});
}
function CasaGrandeAZ() {
return new ShiftConfiguration({
firstDay: '2020-08-12',
pattern: 'AABBCC',
shiftStart: '0800',
timeZone: 'US/Arizona'
});
}
function PhoenixAZ() {
return new ShiftConfiguration({
firstDay: '2020-02-10',
pattern: 'ABC',
shiftStart: '0800',
timeZone: 'US/Arizona'
});
}
function GoodyearAZ() {
return new ShiftConfiguration({
firstDay: '2020-10-15',
pattern: 'CCBBAA',
shiftStart: '0700',
timeZone: 'US/Arizona'
});
}
function TimberMesaAZ() {
return new ShiftConfiguration({
firstDay: '2023-03-27',
pattern: 'CCAABB',
shiftStart: '0800',
timeZone: 'US/Arizona'
});
}
function LACountyCA() {
return new ShiftConfiguration({
firstDay: '2020-01-23',
pattern: 'BABCACABCBCABABCACABCBCA',
shiftStart: '0800',
timeZone: 'US/Pacific'
});
}
function OrlandoFL() {
return new ShiftConfiguration({
firstDay: '2019-11-13',
pattern: 'abc',
shiftStart: '0800',
timeZone: 'US/Eastern'
});
}
function SaintLucieFL() {
return new ShiftConfiguration({
firstDay: '2016-10-18',
pattern: 'abc',
shiftStart: '0730',
timeZone: 'US/Eastern'
});
}
function SomertonCocopahAZ() {
return new ShiftConfiguration({
firstDay: '2020-01-05',
pattern: 'ababcbcac',
shiftStart: '0800',
timeZone: 'US/Arizona'
});
}
function UpperProvidencePA() {
return new ShiftConfiguration({
firstDay: '2020-09-28',
pattern: 'AE,ADE,ADE,ABCD,BCD,C,C,BE,ABE,ABE,ACDE,ACD,D,D,BC,BCE,BCE,ABDE,ADE,A,A,CD,BCD,BCD,ABCE,ABE,E,E,AD,ACD,ACD,BCDE,BCE,B,B'.split(','),
shiftStart: '0600',
timeZone: 'US/Eastern'
});
}
function OlatheKS() {
return new ShiftConfiguration({
firstDay: '2020-01-01',
pattern: 'CBCBABACA',
shiftStart: '0800',
timeZone: 'US/Central'
});
}
function IonaMcGregorFL() {
return new ShiftConfiguration({
firstDay: '2020-11-19',
pattern: 'ABC',
shiftStart: '0700',
timeZone: 'US/Eastern'
});
}
function AshevilleNC() {
return new ShiftConfiguration({
firstDay: '2021-01-08',
pattern: 'ABABCACABCBC',
shiftStart: '0800',
timeZone: 'US/Eastern'
});
}
function LoudounVA() {
return new ShiftConfiguration({
firstDay: '2021-01-04',
pattern: 'ABC',
shiftStart: '0600',
timeZone: 'US/Eastern'
});
}
function BrowardFL() {
return new ShiftConfiguration({
firstDay: '2021-03-04',
pattern: 'ABC',
shiftStart: '0800'
});
}
function AlbuquerqueNM() {
return new ShiftConfiguration({
firstDay: '2020-08-17',
pattern: 'AACCBB',
shiftStart: '0800'
});
}
function NewportNewsVA() {
return new ShiftConfiguration({
firstDay: '2021-01-19',
pattern: 'ABABCBCACABABCBCACABABCBCAC',
shiftStart: '0800'
});
}
function SanLuisAZ() {
return new ShiftConfiguration({
firstDay: '2021-01-16',
pattern: 'CABABCBCA',
shiftStart: '0800'
});
}
function BeavercreekOH() {
return new ShiftConfiguration([{
firstDay: '2020-02-28',
pattern: 'ABC',
shiftStart: '0700'
}, {
firstDay: '2020-02-29',
pattern: 'ACB',
shiftStart: '0700',
shiftDuration: 8
}, {
firstDay: '2020-03-01',
pattern: 'BCA',
shiftStart: '0700'
}]);
}
function SpokaneValleyWA() {
return new ShiftConfiguration({
firstDay: '2021-10-09',
pattern: 'ABC',
shiftStart: '0800',
timeZone: 'US/Pacific'
});
}
function SeminoleCountyFL() {
return new ShiftConfiguration({
firstDay: '2021-09-23',
pattern: 'ABC',
shiftStart: '0800',
timeZone: 'US/Eastern'
});
}
function SnoqualmieWA() {
return new ShiftConfiguration({
firstDay: '2022-08-07',
pattern: 'CCAABB',
shiftStart: '0800',
timeZone: 'US/Pacific'
});
}
function LouisvilleKY() {
return new ShiftConfiguration({
firstDay: '2022-02-03',
pattern: '123',
shiftStart: '0800',
timeZone: 'US/Eastern'
});
}
function IndianapolisIN() {
return new ShiftConfiguration({
firstDay: '2022-03-01',
pattern: 'ABC',
shiftStart: '0800',
timeZone: 'US/Eastern'
});
}
function SouthMetroCO() {
return new ShiftConfiguration({
firstDay: '2022-01-02',
pattern: 'CCBBAA',
shiftStart: '0700',
timeZone: 'US/Mountain'
});
}
function NorthPortFL() {
return new ShiftConfiguration({
firstDay: '2022-07-18',
pattern: 'ABC',
shiftStart: '0800',
timeZone: 'US/Eastern'
});
}
function ArvadaCO() {
return new ShiftConfiguration({
firstDay: '2023-01-01',
pattern: 'AACCBB',
shiftStart: '0700',
timeZone: 'US/Mountain'
});
}
function ChesapeakeVA() {
return new ShiftConfiguration({
firstDay: '2023-01-01',
pattern: 'CABCBABABCACBCBCABACA',
shiftStart: '0800',
timeZone: 'US/Eastern'
});
}
function KansasCityMO() {
return new ShiftConfiguration({
firstDay: '2022-01-01',
pattern: 'BCA',
shiftStart: '0700',
timeZone: 'US/Central'
});
}
function HarrisonburgVA() {
return new ShiftConfiguration({
firstDay: '2021-12-14',
pattern: 'ABC',
shiftStart: '0800',
timeZone: 'US/Eastern'
});
}
function ColumbusOH() {
return new ShiftConfiguration([{
firstDay: '2019-05-02',
pattern: '123',
shiftStart: '0800'
}, {
firstDay: '2020-03-01',
pattern: '123',
shiftStart: '0800'
}, {
firstDay: '2024-02-29',
pattern: '2213',
shiftStart: '0000',
shiftDuration: '8'
}, {
firstDay: '2024-03-01',
pattern: '312',
shiftStart: '0800'
}]);
}
function DerryNH() {
return new ShiftConfiguration({
firstDay: '2024-04-04',
pattern: '1234',
shiftStart: '0745',
timeZone: 'US/Eastern'
});
}
function PflugervilleTX() {
return new ShiftConfiguration({
firstDay: '2024-05-03',
pattern: 'ABC',
shiftStart: '0700',
timeZone: 'US/Central'
});
}
var FirecaresLookup = exports.FirecaresLookup = {
98606: washingtonDC,
93345: richmondVA,
81147: fairfaxVA,
81154: fairfaxVA,
92724: PrinceWilliamVA,
77818: OxnardCA,
97477: TucsonAZ,
77989: ClarkCountyNV,
93717: RogersAR,
75500: BostonMA,
81205: FairmountCO,
100262: KingstonON,
83175: GreenvilleNC,
78827: CosumnesCA,
95940: StLouisPark,
96833: HiltonHeadSC,
'05102': PolkCountyFL,
77656: FtMyersFL,
91106: OrangeCountyFL,
77863: StPaulMN,
99082: WestMetroCO,
74731: BellevueWA,
77571: BothellWA,
79592: DelrayBeachFL,
88539: MiamiDadeFL,
95671: SouthernPlatteMO,
90552: AdamsCountyCO,
95402: AdamsCountyCO,
81508: FishersIN,
77934: WestfieldIN,
77482: CiceroIN,
94967: SheridanIN,
76662: CarmelIN,
90227: NoblesvilleIN,
88490: MesaAZ,
93535: RivieraBeachFL,
98751: WayneTownshipIN,
99102: WestPalmBeachFL,
94264: SanFranciscoCA,
90011: NewRochelleNY,
94043: SacramentoMetroCA,
97450: WashoeCountyNV,
85090: JacksonTownshipIN,
79555: DelawareOH,
73693: AnneArundelMD,
77855: RosevilleCA,
97104: TorringtonCT,
88403: MemphisTN,
85063: JacksonCountyOR,
86743: LexingtonKy,
92216: PlainfieldIL,
97175: ManchesterCT,
91407: PalmBeachCountyFL,
76927: CedarRapidsIA,
73375: AlexandriaVA,
91576: PascoWA,
85300: JerseyCityNJ,
93429: RinconValleyAZ,
80336: EastPierceWA,
76590: CapeCoralFL,
82670: GolderRanchAZ,
90649: NorthwestAZ,
98151: TheVillagesFL,
87545: MadisonWI,
83412: HallCountyGA,
78725: CoralGablesFL,
91073: OntarioCA,
77594: CasaGrandeAZ,
91934: PhoenixAZ,
82740: GoodyearAZ,
87255: LACountyCA,
91165: OrlandoFL,
95982: SaintLucieFL,
93317: RichlandWA,
95377: SomertonCocopahAZ,
100278: UpperProvidencePA,
90962: OlatheKS,
84946: IonaMcGregorFL,
73930: AshevilleNC,
87281: LoudounVA,
75928: BrowardFL,
73343: AlbuquerqueNM,
90123: NewportNewsVA,
94279: SanLuisAZ,
74600: BeavercreekOH,
95805: SpokaneValleyWA,
88821: MilwaukeeWI,
94718: SeminoleCountyFL,
77883: SnoqualmieWA,
87291: LouisvilleKY,
84888: IndianapolisIN,
95528: SouthMetroCO,
90490: NorthPortFL,
73905: ArvadaCO,
96985: TimberMesaAZ,
77326: ChesapeakeVA,
85484: KansasCityMO,
83708: HarrisonburgVA,
78503: ColumbusOH,
79666: DerryNH,
97301: PflugervilleTX
};