moment-range
Advanced tools
Changelog
[4.0.2]
add
methodmoment.range()
without argumentsdiff
& duration
from rounded
to precise
to reflect the underlying moment methodmoment.range()
& DateRange
constructor
types to allow mixed Date
& Moment
parametersinterval
/unit
flow parameter types in the by
, diff
, duration
, reverseBy
& snapTo
to include all strings allowed by moment3.3.3333
2.24.0
2
add
and intersect
to DateRange | null
as opposed to DateRange | undefined
toDate()
method return type from an array of Date
s to a Date
tupleextendMoment()
typescript declaration to give access to moment namespace variables, e.g. moment.duration()
, moment.HTML5_FMT
Changelog
[4.0.0]
exclusive
option of contains()
method in favour of new
excludeStart
and excludeEnd
optionsexclusive
option of by()
method in favour of new excludeEnd
optionsexclusive
option of byRange()
method in favour of new excludeEnd
optionsexclusive
option of reverseBy()
method in favour of new excludeStart
optionsexclusive
option of reverseByRange()
method in favour of new excludeStart
optionsparseZoneRange
in favour of rangeFromISOString
check
, typescript-test
npm scriptexcludeStart
and excludeEnd
to contains()
methodexcludeEnd
to by()
methodexcludeEnd
to byRange()
methodexcludeStart
to reverseBy()
methodexcludeStart
to reverseByRange()
methodrangeFromISOString
, changed name from parseZoneRange
snapTo()
methodbuild
script to use webpack's production settings for a more
optimized buildprepublish
script to prepublishOnly
so the task isn't run on
install
prepublishOnly
and version
scripts to use &&
instead of ;
prepublish
, preversion
, version
scripts to support typescript definitionsparseZoneRange
to rangeFromISOString
to follow naming conventions. Deprecated parseZoneRange
._test.js
→ .test.js
)./lib/
→ ./lib/tests/
)flow
→ check:flow
typescript-test
→ check:typescript
./declarations/
→ ./lib/
)intersect
not creating a new DateRange instance in all caseslib/
from package.json filesChangelog
[3.1.0]
isRange
as a simple and clear way to check if a variable is a DateRangeparseZoneRange
to preserve timezone of start/end dates in a new rangerangeFromInterval
to create a range between a date and a specified intervaladd
function: now has an option for adding adjacent rangesadd
Changelog
[3.0.3]
Changelog
[3.0.2]
lib
is now included in npm release to allow packagers to repackage the libraryChangelog
[3.0.1]
Symbol
window['moment-range']
)expect.js
from dependencies to development dependenciesChangelog
[3.0.0]
by
, reverseBy
, byRange
, reverseByRange
(#68)
isEqual
as alias of isSame
adjacent
method and option to overlaps
(#92 #112)duration
as an alias of diff
(#64)diff
(#104)Iterator
dist/
is only included in the npm release nowtoArray
moment#within
and moment-timezone (#127)