Skip to content

scalajs-io/moment-timezone

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MomentTimezone API for Scala.js

moment-timezone - Parse and display moments in any timezone.

Description

Parse and display moments in any timezone.

Build Dependencies

Build/publish the SDK locally

$ sbt clean publish-local

Run the tests

$ sbt test

Examples

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:

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

Optionally, you may add the Sonatype Repository resolver:

resolvers += Resolver.sonatypeRepo("releases")