summaryrefslogtreecommitdiff
path: root/examples/crossBuilds/simple/js/src/main/scala/simple/Platform.scala
blob: d726ec11571cc8d9376a5b29da2cbdfeb52ba663 (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 scalajs.js

object Platform extends js.JSApp{
  def format(ts: Long) = {
    new js.Date(ts).toISOString()
  }
  def main() = {
    val times = Seq(
      0L,
      1L << 32
    )
    println("Running on JS! " + 1.0d)
    println(Simple.formatTimes(times))
  }
}