nscala-time / nscala-time

A new Scala wrapper for Joda Time based on scala-time
https://javadoc.io/doc/com.github.nscala-time/nscala-time_3/latest/api/com/github/nscala_time/time.html
Apache License 2.0
869 stars 79 forks source link

scalaJS support #82

Open antonkulaga opened 9 years ago

antonkulaga commented 9 years ago

At the moment ScalaJS allows to use either javascript Date class or java.util.Date classes. That is why for cross scala-scalajs libraries one has to use only terrible default java.util.Date class :-(

kmizu commented 9 years ago

I think so, too. However, since nscala-time heavily depends on joda-time, unless joda-time for JavaScript (:- is provided, We cannot support scalaJS.

wookietreiber commented 9 years ago

Is there a label for maybe in the future or depends on external stuff? I would attach this to this issue.

kmizu commented 9 years ago

Hmmm. Certainly, there should be such label.

kmizu commented 9 years ago

@wookietreiber A little while ago, I created a label maybe_in_the_future and I attached it to this issue and I reopened this issue. Are you satisfied with this?

wookietreiber commented 9 years ago

Yeah, sure, looks good.

wookietreiber commented 9 years ago

I don't know much about how scala-js works, but just as a thought: Will scala-js support come easier if #85 gets implemented? I.e. is it possible with scala-js to make use of the std java stuff?

xuwei-k commented 9 years ago

Will scala-js support come easier if #85 gets implemented? I.e. is it possible with scala-js to make use of the std java stuff?

I don't think so. scala-js does not support Java8 datetime API yet. see https://github.com/scala-js/scala-js/tree/v0.6.4/javalib/src/main/scala/java

mdedetrich commented 9 years ago

Just letting you guys know, that I am creating a port of jodatime to Scala/Scala.js. Currently in very alpha stage (got it to compile!), but that may be another avenue to get nscala-time to work on Scala.js

bchazalet commented 9 years ago

@mdedetrich do you have anything to share at this stage? I'm curious

mdedetrich commented 9 years ago

@bchazalet As per what was said on gitter, the project is currently compiling, but some parts need to be rewritten (some business logic that used break/continue/continue to label is broken).

When this is done, I will upload it onto github, but more modifications will need to be done to actually get it to work with Scala.js.

Thankfully its at a stage where a lot of the grunt work has been done. Expect a push in probably a week

mdedetrich commented 9 years ago

Hey guys (and @bchazalet ), just letting you know that i have done an early release of Soda-Time, which is the port of Joda-Time to Scala/Scala.js. Its still in alpha stage, but since so many people were asking for it, I released it early

https://github.com/mdedetrich/soda-time

bchazalet commented 9 years ago

@mdedetrich that's great news, I will definitely have a look !

xuwei-k commented 8 years ago

I don't think so. scala-js does not support Java8 datetime API yet. see https://github.com/scala-js/scala-js/tree/v0.6.4/javalib/src/main/scala/java

scala-js will support Java8 time https://github.com/scala-js/scala-js/tree/6a6b4f72b/javalib/src/main/scala/java/time

xuwei-k commented 8 years ago

https://github.com/scala-js/scala-js-java-time

xuwei-k commented 8 years ago

https://github.com/soc/scala-java-time

xuwei-k commented 8 years ago

https://github.com/opt-tech/chronoscala/pull/5

nafg commented 7 years ago

@kmizu haven't you seen js-joda?