CHAPTER 12

image

Dates and Times

In this chapter, you will learn

  • What the new Date-Time API is
  • About the design principles behind the Date-Time API
  • About the evolution of timekeeping, time zones, and Daylight Saving Time
  • About the ISO-8601 standard for date, time, and date-time keeping
  • How to represent date, time, and date-time using the Date-Time API classes and how to query, adjust, format, and parse them
  • How to use the legacy Date-Time API
  • How to interoperate between the legacy and new Date-Time APIs

The Date-Time API

Java 8 introduced a new Date-Time API to work with date and time. In this chapter, I will refer to the date- and time-related classes ...

Get Beginning Java 8 Fundamentals: Language Syntax, Arrays, Data Types, Objects, and Regular Expressions now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.