问题
I notice that a snapshot of the Java 7 API has been up on java.sun.com for some time, but I only just had a look through it just now, looking specifically for the promised JodaTime-inspired Date/Time API. Alas, I can find no mention of it in the published docs.
Is this because it simply hasn't been done yet, and this published API is an early, incomplete snapshot, or because the idea has been quietly dropped?
回答1:
Alex Miller is running a very informative website about jdk7 features.
JSR 310 is still not confirmed according to this page.
回答2:
Last I heard, JSR 310 was running behind and might not get into Java 7. And yes, that's a huge shame - although at least we've got Joda Time as a stopgap until then.
回答3:
FYI a preliminary datetime API from this JSR is available here. This snapshot is dated the end of January, so I have no idea how up-to-date it is :(
回答4:
It is possible it will be added as a module and not tightly integrated into the jdk (like jaxb for example). It would not be nice. In the meantime you can check the january javadoc, but a lot has changed.
来源:https://stackoverflow.com/questions/1287297/java-7-date-time-api