Skip to content

v4.0.2

Latest
Compare
Choose a tag to compare
@beaumontjonathan beaumontjonathan released this 25 Feb 11:58
· 1 commit to master since this release
9c7108c

[4.0.2]

Added

  • Added TypeScript & flow types missing options argument for add method
  • Added overloaded TypeScript declarations allowing for calling moment.range() without arguments

Changed

  • Changed second parameter of diff & duration from rounded to precise to reflect the underlying moment method
  • Changed the moment.range() & DateRange constructor types to allow mixed Date & Moment parameters
  • Changed the interval/unit flow parameter types in the by, diff, duration, reverseBy & snapTo to include all strings allowed by moment
  • Changed internal TypeScript version to 3.3.3333
  • Changed internal moment version to 2.24.0
  • Changed CircleCI to version 2

Fixed

  • Fixed the return type of add and intersect to DateRange | null as opposed to DateRange | undefined
  • Fixed the flow toDate() method return type from an array of Dates to a Date tuple
  • Fixed extendMoment() typescript declaration to give access to moment namespace variables, e.g. moment.duration(), moment.HTML5_FMT