/moment

Parse, validate, manipulate, and display dates

Primary LanguageScalaApache License 2.0Apache-2.0

Moment API for Scala.js

moment - Parse, validate, manipulate, and display dates

Description

Parse, validate, manipulate, and display dates.

Build Dependencies

Build/publish the SDK locally

$ sbt clean publish-local

Run the tests

$ sbt test

Examples

import io.scalajs.npm.moment._

val moment = Moment("9/01/2016 6:17a", "M/DD/YYYY h:mma")
println(moment.toString) //=> Thu Sep 01 2016 06:17:00 GMT-0700

Artifacts and Resolvers

To add the Moment binding to your project, add the following to your build.sbt:

libraryDependencies += "io.scalajs.npm" %%% "moment" % "0.5.0"

Optionally, you may add the Sonatype Repository resolver:

resolvers += Resolver.sonatypeRepo("releases")