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?
New date-time API is introduced in Java 8 to overcome the following drawbacks of old date-time API : Not thread safe : Unlike old java. util. Date which is not thread safe the new date-time API is immutable and doesn't have setter methods.
time. LocalDateTime: It handles both date and time, without a time zone. It is a combination of LocalDate with LocalTime.
getTime. Returns the number of milliseconds since January 1, 1970, 00:00:00 GMT represented by this Date object.
Alex Miller is running a very informative website about jdk7 features.
JSR 310 is still not confirmed according to this page.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With