https://github.com/scalajs-io/moment
Parse, validate, manipulate, and display dates
https://github.com/scalajs-io/moment
moment moment-js momentjs node nodejs npm npm-package scala scalajs
Last synced: 4 months ago
JSON representation
Parse, validate, manipulate, and display dates
- Host: GitHub
- URL: https://github.com/scalajs-io/moment
- Owner: scalajs-io
- License: apache-2.0
- Created: 2017-02-05T05:38:27.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2019-06-17T23:09:51.000Z (about 6 years ago)
- Last Synced: 2025-01-17T22:42:31.511Z (5 months ago)
- Topics: moment, moment-js, momentjs, node, nodejs, npm, npm-package, scala, scalajs
- Language: Scala
- Size: 17.6 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Moment API for Scala.js
=======================
[moment](https://www.npmjs.com/package/moment) - Parse, validate, manipulate, and display dates### Description
Parse, validate, manipulate, and display dates.
### Build Dependencies
* [SBT v1.2.x](http://www.scala-sbt.org/download.html)x
### Build/publish the SDK locally
```bash
$ sbt clean publish-local
```#### Run the tests
```bash
$ sbt test
```### Examples
```scala
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:
```sbt
libraryDependencies += "io.scalajs.npm" %%% "moment" % "0.5.0"
```Optionally, you may add the Sonatype Repository resolver:
```sbt
resolvers += Resolver.sonatypeRepo("releases")
```