moment-range - Fancy date ranges for Moment.js.
Fancy date ranges for Moment.js.
$ sbt clean publish-localBefore running the tests the first time, you must ensure the npm packages are installed:
$ npm installThen you can run the tests:
$ sbt testimport io.scalajs.npm.moment._
import io.scalajs.npm.moment.range._
import scala.scalajs.js
val moment = MomentRange.extendMoment(Moment)
val start = new js.Date(2012, 4, 1)
val end = new js.Date(2012, 4, 23)
val lol = new js.Date(2012, 4, 15)
val wat = new js.Date(2012, 4, 27)
val range = moment.range(start, end)
val range2 = moment.range(lol, wat)
range.contains(lol) // true
range.contains(wat) // falseTo add the moment-range binding to your project, add the following to your build.sbt:
libraryDependencies += "io.scalajs.npm" %%% "moment-range" % "0.5.0"Optionally, you may add the Sonatype Repository resolver:
resolvers += Resolver.sonatypeRepo("releases")