summaryrefslogtreecommitdiff
path: root/examples/crossBuilds/simple/js/src/main/scala/simple/Platform.scala
blob: ee2f5daae76d55377b2842cce1c6befc4de36e26 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
//js/src/main/scala/simple/Platform.scala
package simple
import scala.scalajs.js

object Platform extends js.JSApp{
  def format(ts: Long) = {
    new js.Date(ts).toLocaleString()
  }
  def main() = {
    val times = Seq(
      System.currentTimeMillis(),
      System.currentTimeMillis() + 1000
    )
    println("Running on JS! " + 1.0d)
    println(Simple.formatTimes(times))
  }
}