Tag Archives: Date API

Part 2: Whats New in Java 8 – Date API


via Whats New in Java 8 – Date API Part II – Random Thoughts on Coding.

This post is continues our review of the Date API that came with the release of Java 8. We are going to continue our concentration on classes that make working with dates/times very easy. Working with date objects in previous releases of Java was very challenging with respect to adding time or getting the difference between dates. Hopefully after looking at the classes we present here, your opinion of working with dates and times in Java will change. Specifically, we are going to take a look at the following classes:

  • Other classes to represent dates/times ZonedDateTime and OffsetDateTime
  • Getting the current snapshot in time with Instant
  • Using the Clock class to get system time but specify different time zones
  • Represent arbitrary number of days with the Period class
  • Represent arbitrary amount of hours with the Duration class

Utilizing the Java 8 Date-Time API with JSF and Java EE 7


via Josh’s Dev Blog – Java, Java EE, Jython, Oracle, and More…: Utilizing the Java 8 Date-Time API with JSF and Java EE 7.

If you are using Java 8 with Java EE 7, then there may be some quirks that you run into when trying to utilize some of the Java 8 new features.  One such quirk is that the new Date-Time API does not work with many of the Java EE 7 APIs by default since they are built to work with java.util.Date and/or the older Date APIs.  However, this is not a road block, as there are many ways to work around such issues.  In this post, I will demonstrate how you can tweak your JSF application to allow use of the Java 8 Date-Time APIs along with JPA and date converters.

Java 8 Tutorial


Java 8 Tutorial

Welcome to my introduction to Java 8. This tutorial guides you step by step through all new language features. Backed by short and simple code samples you’ll learn how to use default interface methods, lambda expressions, method references and repeatable annotations. At the end of the article you’ll be familiar with the most recent API changes like streams, functional interfaces, map extensions and the new Date API.

No walls of text – just a bunch of commented code snippets. Enjoy!