diff options
author | Li Haoyi <haoyi@dropbox.com> | 2015-02-04 09:03:02 -0800 |
---|---|---|
committer | Li Haoyi <haoyi@dropbox.com> | 2015-02-04 09:03:02 -0800 |
commit | fd2f23fbfb8ce6501fff20ea1c305d00249fb465 (patch) | |
tree | 87ae6a5e66096e988dbfb0bfad0f59b32bc84ce4 /examples/crossBuilds/simple/library/jvm/src/main/scala/simple/Platform.scala | |
parent | 3e92267b4f030f7bc7f0040fef50bd07e4709b21 (diff) | |
download | hands-on-scala-js-fd2f23fbfb8ce6501fff20ea1c305d00249fb465.tar.gz hands-on-scala-js-fd2f23fbfb8ce6501fff20ea1c305d00249fb465.tar.bz2 hands-on-scala-js-fd2f23fbfb8ce6501fff20ea1c305d00249fb465.zip |
Updated cross-publishing-libraries section
Diffstat (limited to 'examples/crossBuilds/simple/library/jvm/src/main/scala/simple/Platform.scala')
-rw-r--r-- | examples/crossBuilds/simple/library/jvm/src/main/scala/simple/Platform.scala | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/examples/crossBuilds/simple/library/jvm/src/main/scala/simple/Platform.scala b/examples/crossBuilds/simple/library/jvm/src/main/scala/simple/Platform.scala new file mode 100644 index 0000000..473e233 --- /dev/null +++ b/examples/crossBuilds/simple/library/jvm/src/main/scala/simple/Platform.scala @@ -0,0 +1,14 @@ +// library/jvm/src/main/scala/simple/Platform.scala +package simple +import java.text.SimpleDateFormat +import java.util.TimeZone + +object Platform{ + def format(ts: Long) = { + val fmt = new SimpleDateFormat( + "yyyy-MM-dd'T'HH:mm:ss.sss'Z'" + ) + fmt.setTimeZone(TimeZone.getTimeZone("UTC")) + fmt.format(new java.util.Date(ts)) + } +}
\ No newline at end of file |