summaryrefslogtreecommitdiff
path: root/examples/crossBuilds/simple2/jvm
diff options
context:
space:
mode:
authorLi Haoyi <haoyi@dropbox.com>2014-11-09 10:08:47 -0800
committerLi Haoyi <haoyi@dropbox.com>2014-11-09 10:08:47 -0800
commit978a138c02c07822ef71f31f71e552a9659a0a53 (patch)
tree9771e4d4620af7e6f5ff54cb4c711e04cffb4e30 /examples/crossBuilds/simple2/jvm
parent795c0eb5de003b22c3874762557ae2b34ae64de0 (diff)
downloadhands-on-scala-js-978a138c02c07822ef71f31f71e552a9659a0a53.tar.gz
hands-on-scala-js-978a138c02c07822ef71f31f71e552a9659a0a53.tar.bz2
hands-on-scala-js-978a138c02c07822ef71f31f71e552a9659a0a53.zip
wip
Diffstat (limited to 'examples/crossBuilds/simple2/jvm')
l---------examples/crossBuilds/simple2/jvm/shared1
-rw-r--r--examples/crossBuilds/simple2/jvm/src/main/scala/simple/Platform.scala13
2 files changed, 14 insertions, 0 deletions
diff --git a/examples/crossBuilds/simple2/jvm/shared b/examples/crossBuilds/simple2/jvm/shared
new file mode 120000
index 0000000..a12df7d
--- /dev/null
+++ b/examples/crossBuilds/simple2/jvm/shared
@@ -0,0 +1 @@
+../js/shared \ No newline at end of file
diff --git a/examples/crossBuilds/simple2/jvm/src/main/scala/simple/Platform.scala b/examples/crossBuilds/simple2/jvm/src/main/scala/simple/Platform.scala
new file mode 100644
index 0000000..1b7be56
--- /dev/null
+++ b/examples/crossBuilds/simple2/jvm/src/main/scala/simple/Platform.scala
@@ -0,0 +1,13 @@
+//jvm/src/main/scala/simple/Platform.scala
+package simple
+import java.text.SimpleDateFormat
+
+object Platform{
+ def format(ts: Long) = {
+ val fmt =
+ "MMMM d, yyyy h:mm:ss aaa z"
+ new SimpleDateFormat(fmt).format(
+ new java.util.Date(ts)
+ )
+ }
+} \ No newline at end of file