diff options
Diffstat (limited to 'examples/crossBuilds/simple/js/src/main')
-rw-r--r-- | examples/crossBuilds/simple/js/src/main/scala/simple/Platform.scala | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/examples/crossBuilds/simple/js/src/main/scala/simple/Platform.scala b/examples/crossBuilds/simple/js/src/main/scala/simple/Platform.scala new file mode 100644 index 0000000..40f65f4 --- /dev/null +++ b/examples/crossBuilds/simple/js/src/main/scala/simple/Platform.scala @@ -0,0 +1,18 @@ +/*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() = { + println("simple.js") + val times = Seq( + System.currentTimeMillis(), + System.currentTimeMillis() + 1000, + System.currentTimeMillis() + 2000 + ) + println(Simple.formatTimestamps(times)) + } +}
\ No newline at end of file |