Top "Java-time" questions

The java.

How to check if string matches date pattern using time API?

My program is parsing an input string to a LocalDate object. For most of the time the string looks like 30.03.2014, …

java java-8 datetime-format datetime-parsing java-time
Getting the date from a ResultSet for use with java.time classes

Is there anyway to get a java.time (new in Java 8) compatible time class out of a ResultSet? I am …

java-8 resultset getdate java-time
How to get full name of month from date in Java 8 while formatting

Using new Java 8 java.time API, I need to convert LocalDate and get full name of month and day. Like …

java localization date-formatting java-time
ZonedDateTime toString compatability with ISO 8601

I am trying to ensure that calling toString() on my ZonedDateTime Object will comply with ISO-8601 format. The documentation for …

java time java-time zoneddatetime
Jackson: parse custom offset date time

I have a model which has a timestamp property: class Model { @JsonProperty("timestamp") private OffsetDateTime timestamp; } The format of the …

java datetime jackson java-time datetime-parsing
Java DateTimeFormatter for time zone with an optional colon separator?

I'm trying to build a DateTimeFormatter that can accepts offset with colon or offset without colon. Is there a way …

java datetime java-time
Check if date is older than 10 years and newer than 20 years

I am trying to check in Java 8 if a date is older than 10 years and newer than 20 years. I am …

java date java-8 java-time
How to format in Kotlin date in string or timestamp to my preferred format?

I'm getting date data from weather API in two versions. The first one is just string like this: 2019-08-07 09:00:00 …

android kotlin android-date java-time
Convert java.util.Date to what “java.time” type?

I have a java.util.Date object, or a java.util.Calendar object. How do I convert that to the …

java date datetime java-time
Is Joda Time deprecated with java 8 Date and Time API? (java.time)

Is there any reason to use Joda Time if I can use Java 8 Date and Time API (java.time)? Should …

java-8 jodatime deprecated java-time