Skip to Main Content
Modern Java in Action
book

Modern Java in Action

by Raoul-Gabriel Urma, Mario Fusco, Alan Mycroft
October 2018
Intermediate to advanced content levelIntermediate to advanced
592 pages
19h 49m
English
Manning Publications
Content preview from Modern Java in Action

Chapter 12. New Date and Time API

This chapter covers

  • Why we needed a new date and time library, introduced in Java 8
  • Representing date and time for both humans and machines
  • Defining an amount of time
  • Manipulating, formatting, and parsing dates
  • Dealing with different time zones and calendars

The Java API includes many useful components to help you build complex applications. Unfortunately, the Java API isn’t always perfect. We believe that the majority of experienced Java developers will agree that date and time support before Java 8 was far from ideal. Don’t worry, though; Java 8 introduces a brand-new Date and Time API to tackle this issue.

In Java 1.0, the only support for date and time was the java.util.Date class. Despite its name, ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Java 8 in Action

Java 8 in Action

Mario Fusco, Alan Mycroft, Raoul-Gabriel Urma
The Well-Grounded Java Developer, Second Edition

The Well-Grounded Java Developer, Second Edition

Benjamin Evans, Martijn Verburg, Jason Clark

Publisher Resources

ISBN: 9781617293566Supplemental ContentPublisher SupportOtherPublisher WebsiteSupplemental ContentPurchase Link