0.0.127 • Published 23 days ago

@statengine/shiftly v0.0.127

Weekly downloads
95
License
GPL-3.0
Repository
github
Last release
23 days ago

Shiftly Build Status

Utility for calculating common public safety shift schedules.

Installation

Node version: 10.x.x

Using npm:

npm install @statengine/shiftly

In Node.js:

const shiftly = require('@statengine/shiftly');

const fairfax = shiftly.fairfaxVA();
fairfax.calculateShift('2017-01-18T09:00:30-0400')
// returns 'C'

Tests

To run the test suite, first install the dependencies, then run npm test:

npm install
npm test

Classes

ShiftInformation

Responsible for calculating individual shift information. The constructor takes an object with the following properties:

pattern: A string where each character represents a distinct shift in the pattern. The pattern repeats indefinitely. For example, ABC would indicate shift A, followed by B, followed by C, and repeat. The pattern is set individually by each department and varies widely in terms of complexity. For example, Los Angeles County FD uses the pattern BABCACABCBCABABCACABCBCA. pattern may also be a comma-delimited string with characters indicating shifts where each collection of characters represents a distinct shift pattern.

firstDay: String represenation of YYYY-MM-DD for the first day corresponding to the provided pattern.

shiftStart: String representation of HHMM for the commencement time of the provided pattern.

timeZone: String indicating the tz database timezone name.

shiftDuration: Number of hours for each shift in the pattern. Default is 24 hour shifts, but may be different under special circumstances such as a Leap Day.

0.0.127

23 days ago

0.0.126

1 month ago

0.0.125

2 months ago

0.0.124

2 months ago

0.0.123

2 months ago

0.0.119

9 months ago

0.0.120

9 months ago

0.0.122

7 months ago

0.0.121

9 months ago

0.0.118

1 year ago

0.0.117

1 year ago

0.0.116

1 year ago

0.0.115

1 year ago

0.0.114

2 years ago

0.0.113

2 years ago

0.0.112

2 years ago

0.0.109

2 years ago

0.0.111

2 years ago

0.0.110

2 years ago

0.0.108

2 years ago

0.0.107

2 years ago

0.0.106

2 years ago

0.0.105

2 years ago

0.0.104

3 years ago

0.0.103

3 years ago

0.0.102

3 years ago

0.0.101

3 years ago

0.0.100

3 years ago

0.0.99

3 years ago

0.0.98

3 years ago

0.0.97

3 years ago

0.0.96

3 years ago

0.0.95

3 years ago

0.0.94

3 years ago

0.0.93

3 years ago

0.0.92

3 years ago

0.0.91

3 years ago

0.0.90

3 years ago

0.0.89

4 years ago

0.0.88

4 years ago

0.0.87

4 years ago

0.0.86

4 years ago

0.0.85

4 years ago

0.0.84

4 years ago

0.0.83

4 years ago

0.0.82

4 years ago

0.0.80

4 years ago

0.0.81

4 years ago

0.0.79

4 years ago

0.0.78

4 years ago

0.0.77

4 years ago

0.0.76

4 years ago

0.0.75

4 years ago

0.0.74

4 years ago

0.0.73

4 years ago

0.0.72

4 years ago

0.0.71

4 years ago

0.0.70

4 years ago

0.0.69

4 years ago

0.0.68

4 years ago

0.0.67

4 years ago

0.0.64

4 years ago

0.0.62

4 years ago

0.0.61

4 years ago

0.0.59

5 years ago

0.0.58

5 years ago

0.0.56

5 years ago

0.0.54

5 years ago

0.0.52

5 years ago

0.0.51

5 years ago

0.0.50

5 years ago

0.0.49

5 years ago

0.0.48

5 years ago

0.0.47

5 years ago

0.0.46

5 years ago

0.0.45

5 years ago

0.0.44

5 years ago

0.0.43

5 years ago

0.0.42

5 years ago

0.0.41

5 years ago

0.0.40

5 years ago

0.0.39

5 years ago

0.0.38

5 years ago

0.0.37

5 years ago

0.0.36

5 years ago

0.0.35

5 years ago

0.0.33

5 years ago

0.0.32

5 years ago

0.0.29

5 years ago

0.0.28

5 years ago

0.0.27

5 years ago

0.0.26

5 years ago

0.0.24

5 years ago

0.0.23

5 years ago

0.0.22

5 years ago

0.0.21

6 years ago

0.0.20

6 years ago

0.0.19

6 years ago

0.0.18

6 years ago

0.0.17

6 years ago

0.0.16

6 years ago

0.0.15

6 years ago

0.0.14

6 years ago

0.0.13

6 years ago

0.0.12

6 years ago

0.0.11

6 years ago

0.0.10

6 years ago

0.0.9

6 years ago

0.0.8

6 years ago

0.0.7

6 years ago

0.0.6

6 years ago

0.0.5

6 years ago

0.0.4

7 years ago

0.0.3

7 years ago