diff options
author | Li Haoyi <haoyi@dropbox.com> | 2014-11-02 16:46:59 -0800 |
---|---|---|
committer | Li Haoyi <haoyi@dropbox.com> | 2014-11-02 16:46:59 -0800 |
commit | 78f7ed0303ea42fca8f4e1535ea800d12d2a80eb (patch) | |
tree | 0bded0822fcba8fdea5d6f318603ae324b70dac4 /examples/crossBuilds/simple/jvm | |
parent | a33254276bd211bf33be86eeb871ddbfe36fdb47 (diff) | |
download | hands-on-scala-js-78f7ed0303ea42fca8f4e1535ea800d12d2a80eb.tar.gz hands-on-scala-js-78f7ed0303ea42fca8f4e1535ea800d12d2a80eb.tar.bz2 hands-on-scala-js-78f7ed0303ea42fca8f4e1535ea800d12d2a80eb.zip |
tweaked cross-build example
Diffstat (limited to 'examples/crossBuilds/simple/jvm')
-rw-r--r-- | examples/crossBuilds/simple/jvm/src/main/scala/simple/Platform.scala | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/examples/crossBuilds/simple/jvm/src/main/scala/simple/Platform.scala b/examples/crossBuilds/simple/jvm/src/main/scala/simple/Platform.scala index af70429..e8e7a65 100644 --- a/examples/crossBuilds/simple/jvm/src/main/scala/simple/Platform.scala +++ b/examples/crossBuilds/simple/jvm/src/main/scala/simple/Platform.scala @@ -1,23 +1,21 @@ -/*jvm/src/main/scala/simple/Platform.scala*/ +//jvm/src/main/scala/simple/Platform.scala package simple import java.text.SimpleDateFormat object Platform{ def format(ts: Long) = { - // http://docs.oracle.com/javase/7/ - // docs/api/java/text/SimpleDateFormat.html - val fmt = "MMMM d, yyyy h:mm:ss aaa z" + val fmt = + "MMMM d, yyyy h:mm:ss aaa z" new SimpleDateFormat(fmt).format( new java.util.Date(ts) ) } def main(args: Array[String]) = { - println("simple.jvm") val times = Seq( System.currentTimeMillis(), - System.currentTimeMillis() + 1000, - System.currentTimeMillis() + 2000 + System.currentTimeMillis() + 1000 ) - println(Simple.formatTimestamps(times)) + println("Running on JVM! " + 1.0d) + println(Simple.formatTimes(times)) } }
\ No newline at end of file |