https://github.com/scalajs-io/moment-timezone
Parse and display moments in any timezone.
https://github.com/scalajs-io/moment-timezone
moment moment-js momentjs node node-js nodejs npm npm-module npm-package scala scalajs timezone
Last synced: 4 months ago
JSON representation
Parse and display moments in any timezone.
- Host: GitHub
- URL: https://github.com/scalajs-io/moment-timezone
- Owner: scalajs-io
- License: apache-2.0
- Created: 2017-02-15T02:29:11.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2019-06-17T23:10:02.000Z (about 6 years ago)
- Last Synced: 2025-01-17T22:42:29.662Z (5 months ago)
- Topics: moment, moment-js, momentjs, node, node-js, nodejs, npm, npm-module, npm-package, scala, scalajs, timezone
- Language: Scala
- Size: 14.6 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
MomentTimezone API for Scala.js
=======================
[moment-timezone](https://www.npmjs.com/package/moment-timezone) - Parse and display moments in any timezone.### Description
Parse and display [moment](https://github.com/scalajs-io/moment)s in any timezone.
### 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._
import io.scalajs.npm.moment.timezone._MomentTimezone // load the moment-timezone module
val moment = Moment("2014-06-01T12:00:00Z")
val output = moment.tz("America/Los_Angeles").format("ha z")
println(output) // 5am PDT
```### Artifacts and Resolvers
To add the `MomentTimezone` binding to your project, add the following to your build.sbt:
```sbt
libraryDependencies += "io.scalajs.npm" %%% "moment-timezone" % "0.5.0"
```Optionally, you may add the Sonatype Repository resolver:
```sbt
resolvers += Resolver.sonatypeRepo("releases")
```