Tagged articles
LocalDate
14 articles · Page 1 of 1
The article explains how JDK 17’s java.time.LocalDate follows the Single Responsibility Principle by separating date data from formatting, contrasts this design with the older mutable java.util.Date, and shows how to spot classes that take on too many responsibilities.
API DesignDateTimeFormatterImmutable Objects
0 likes · 6 min read

A real‑world bug caused by incorrect year‑week calculation is explained, then the ISO‑8601 week‑based year definition and Java's LocalDate/WeekFields APIs are introduced to reliably compute the correct year and week for any date.
BackendISO 8601Java
0 likes · 6 min read

This article provides a thorough walkthrough of Java 8's date‑time API, covering formatting patterns, obtaining current dates and times, extracting components, creating specific dates, comparing dates, handling periodic events, timezone offsets, timestamps, custom parsing, common pitfalls, and thread‑safety considerations, all illustrated with clear code examples.
DATETIMEDateTimeFormatterJava
0 likes · 24 min read

This article demonstrates how to use Java 8’s java.time package to obtain the current date and time, extract components, create specific dates, compare dates, handle periodic dates, compute future and past dates, retrieve timestamps, check leap years, calculate differences, and format/parse date strings, with concrete code examples.
DATETIMEINSTANTJava
0 likes · 10 min read

This article presents 18 practical techniques for using Java 8’s new date‑time API, demonstrating how to obtain, manipulate, compare, format, and calculate dates and times with immutable, thread‑safe classes such as LocalDate, LocalTime, ZonedDateTime, and Instant, while providing full code examples for each use case.
DATETIMEJavaJava8
0 likes · 11 min read

This article introduces Java 8's new date‑time API, explains its advantages over the old java.util.Date and SimpleDateFormat, lists the essential classes such as Instant, LocalDate, LocalTime, ZonedDateTime, and provides step‑by‑step code examples for common operations like getting the current date, manipulating specific dates, handling time zones, and formatting.
INSTANTJavaJava 8
0 likes · 20 min read

This article introduces Java 8's new date‑time API, explains its immutable and thread‑safe design, lists the key classes such as Instant, LocalDate, LocalTime, ZonedDateTime, and provides step‑by‑step code examples for obtaining current dates, manipulating specific dates, handling time zones, calculating intervals, and formatting dates.
APIJavaJava8
0 likes · 23 min read

This article introduces Java 8's modern date‑time API, explains why the old java.util.Date and SimpleDateFormat are problematic, and provides a series of concise, runnable examples that demonstrate how to obtain the current date, extract year/month/day, work with specific dates, compare dates, handle time zones, calculate periods, format and parse strings, and more.
APIDATETIMEJava
0 likes · 15 min read

This article demonstrates a common mistake when parsing a date string without a year in Java, shows the resulting DateTimeParseException, and provides a correct solution using DateTimeFormatterBuilder to supply a default year, complete with code examples and expected output.
Date ParsingDateTimeFormatterDateTimeFormatterBuilder
0 likes · 4 min read

This tutorial introduces Java 8's new date‑time API, explains why the old java.util.Date and SimpleDateFormat were problematic, and demonstrates immutable, thread‑safe classes like LocalDate, LocalTime, LocalDateTime, ZoneId, YearMonth, and Instant through clear, runnable code snippets.
APIDATETIMEJava
0 likes · 15 min read

This tutorial demonstrates how Java 8's new immutable, thread‑safe date‑time API (java.time) can be used to obtain the current date, extract year/month/day, create specific dates, compare dates, handle time zones, format and parse strings, and perform common date‑time calculations with clear code examples.
APIDATETIMEJava
0 likes · 14 min read

This tutorial explains why the old java.util.Date and Calendar APIs were problematic, introduces the immutable, thread‑safe Java 8 Date‑Time classes such as LocalDate, LocalTime, LocalDateTime, ZonedDateTime, Period and Duration, shows practical code examples for creation, manipulation, formatting, conversion and compatibility, and lists alternative libraries like ThreeTen‑BP and Joda‑Time.
DurationJavaLocalDate
0 likes · 13 min read

This article explains the shortcomings of java.util.Date, introduces the immutable java.time classes LocalDate, LocalTime, and LocalDateTime introduced in Java 8, and provides detailed code examples for obtaining, comparing, adding/subtracting, and converting dates and times.
JavaJava8LocalDate
0 likes · 8 min read

When a Spring Cloud Feign client sends a request containing Java 8 date/time types like LocalDate, LocalTime, or LocalDateTime, the response may trigger JSON parse errors because Spring MVC serializes them as arrays, but Feign expects a proper object, which can be resolved by adding Jackson's JSR‑310 module and configuring the ObjectMapper.
FeignJSONJackson
0 likes · 6 min read
