Your SlideShare is downloading. ×
0
Java Date and Time - Past and Future
Java Date and Time - Past and Future
Java Date and Time - Past and Future
Java Date and Time - Past and Future
Java Date and Time - Past and Future
Java Date and Time - Past and Future
Java Date and Time - Past and Future
Java Date and Time - Past and Future
Java Date and Time - Past and Future
Java Date and Time - Past and Future
Java Date and Time - Past and Future
Java Date and Time - Past and Future
Java Date and Time - Past and Future
Java Date and Time - Past and Future
Java Date and Time - Past and Future
Java Date and Time - Past and Future
Java Date and Time - Past and Future
Java Date and Time - Past and Future
Java Date and Time - Past and Future
Java Date and Time - Past and Future
Java Date and Time - Past and Future
Java Date and Time - Past and Future
Java Date and Time - Past and Future
Java Date and Time - Past and Future
Java Date and Time - Past and Future
Java Date and Time - Past and Future
Java Date and Time - Past and Future
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Java Date and Time - Past and Future

954

Published on

Reasoning correctly about dates and times seems easy but is not. Designing a good date/time API is even harder. We will be looking at how Java got it wrong so far, and how things will change with the …

Reasoning correctly about dates and times seems easy but is not. Designing a good date/time API is even harder. We will be looking at how Java got it wrong so far, and how things will change with the upcoming JDK 8.

Presentation for the Iasi JUG, 18 September 2013

Published in: Technology, News & Politics
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
954
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
6
Comments
0
Likes
0
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide
  • Wed 18 Sep 2013 18:30:00 EEST
  • Transcript

    • 1. Java Date and Time Past and Future Iulian Dogariu Ness Technologies Iași Java User Group 1379518200000
    • 2. APIs that make me happy
    • 3. Timestamp
    • 4. “System.currentTimeMillis() should be enough for anybody” -- Bill Gates, after seeing the JDK 1.0 Javadocs (well, not really)
    • 5. java.util.Date
    • 6. java.util.Calendar
    • 7. POLA !
    • 8. java.util.Calendar, as of JDK 7 • Missing abstractions • Full of bad surprises – Unsound design – violates Liskov – Violates POLA – Getter methods with side effects! – Not thread safe – Untestable
    • 9. Instants
    • 10. Instants 1379518200000 1379518274000 2013-09-18T15:30Z 2013-09-18T15:31:14Z 2013-09-18T18:30+03:00 2013-09-18T18:31:14+03:00
    • 11. Civil time
    • 12. Instants ↔ Civil time
    • 13. Let’s Practice !
    • 14. Java 8 Time vs Joda Time
    • 15. We love .NET too http://nodatime.org/
    • 16. Java 8 Time – Recap • Instants • Civil time (Days, Months, Weeks) • Zones and Offsets • Choose your abstractions well, and the rest is simple
    • 17. Instants 1379518200000 1379518274000 2013-09-18T15:30Z 2013-09-18T18:30+03:00 java.time.Instant java.time.ZonedDateTime java.time.OffsetDateTime
    • 18. Civil time java.time.LocalDateTime java.time.Period
    • 19. Q, and, hopefully, A ?
    • 20. Links • Java 8 EA https://jdk8.java.net/download.html – Current version: b106 • Javadocs: http://download.java.net/jdk8/docs/api/ • ISO 8601: http://en.wikipedia.org/wiki/ISO_8601 • Olson TZ aka Zoneinfo – http://www.iana.org/time-zones – http://en.wikipedia.org/wiki/Tz_database • Stephen Colebourne - author of Joda Time
    • 21. Thank you!

    ×