Open kler opened 5 years ago
Actually the underlaying problem is that all calls to datespanCtor()
in the README are wrong.
The functions is defined as:
function dateSpanFunc(inBegin,
inEnd=null,
inDurationMins=0,
inDurationSecs=0,
inDurationMs=0) {
But throughout the README the inEnd
param is omitted.
I propose that documentation is updated, and that a check is provided, not allowing inEnd
to be anything else than a Date
or null
(integer
is not accepted).
I will provide a PR for this.
Observed Behaviour
When executing th example code for the
intersectDateSpans()
, there is an error:Expected Behaviour
Steps to Reproduce
From https://github.com/mickmcc/node-caltime#intersectdatespans
System Configuration
caltime version: 1.4.5 Node.js version: v12.10.0 NPM version:6.10.3 lodash version: 4.17.15 moment-timezone version: 0.5.26