1.7.1 • Published 2 years ago

@jgoizueta/timerange v1.7.1

Weekly downloads
11
License
BSD-3-Clause
Repository
github
Last release
2 years ago

TimeRange

A class to represent time ranges (interval of time between to instants).

const { TimeRange } = require('@jgoizueta/timerange');

const t = TimeRange.fromText('2018-03');
console.log(t.next().text);
console.log(t.startValue, t.endValue);

Output:

2018-04
1519862400000 1522540800000
for (let t = TimeRange.fromText('2018-Q2'); t.precedes(TimeRange.fromText('2019-Q2')); t = t.next()) {
    console.log(t.text);
}

Output:

2018-Q2
2018-Q3
2018-Q4
2019-Q1
1.7.1

2 years ago

1.7.0

4 years ago

1.6.1

4 years ago

1.6.0

4 years ago

1.4.0

5 years ago

1.3.0

5 years ago

1.2.0

5 years ago

1.1.2

5 years ago

1.1.1

5 years ago

1.1.0

5 years ago

1.0.0

5 years ago