Tagged articles
13 articles
Page 1 of 1
Selected Java Interview Questions
Selected Java Interview Questions
Feb 12, 2023 · Backend Development

Comprehensive Guide to Java 8 Date and Time API

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.

DateTimeFormatterTimeAPIdatetime
0 likes · 24 min read
Comprehensive Guide to Java 8 Date and Time API
The Dominant Programmer
The Dominant Programmer
Nov 1, 2022 · Fundamentals

Common Java 8 Date and Time APIs: Getting Today’s Date and More

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.

Java 8chrono-unitdatetime
0 likes · 10 min read
Common Java 8 Date and Time APIs: Getting Today’s Date and More
Top Architect
Top Architect
Aug 11, 2022 · Backend Development

18 Practical Java 8 Date/Time Handling Examples

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.

TimeAPIdatetimejava
0 likes · 11 min read
18 Practical Java 8 Date/Time Handling Examples
Programmer DD
Programmer DD
May 7, 2021 · Fundamentals

Master Java 8 Date & Time API: Practical Examples and Tips

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.

Java 8Timezonedatetime-api
0 likes · 20 min read
Master Java 8 Date & Time API: Practical Examples and Tips
Architect's Tech Stack
Architect's Tech Stack
Apr 30, 2021 · Backend Development

Java 8 Date and Time API Tutorial with Practical Examples

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
Java 8 Date and Time API Tutorial with Practical Examples
Java Backend Technology
Java Backend Technology
Feb 24, 2021 · Fundamentals

Mastering Java 8 Date & Time API: Practical Examples and Code Snippets

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.

APIdatetimeexamples
0 likes · 15 min read
Mastering Java 8 Date & Time API: Practical Examples and Code Snippets
FunTester
FunTester
Feb 27, 2020 · Backend Development

Parsing Dates Without a Year in Java: Fixing the Common Error

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
Parsing Dates Without a Year in Java: Fixing the Common Error
Java Backend Technology
Java Backend Technology
Feb 6, 2020 · Backend Development

Master Java 8 Date & Time API: 18 Practical Code Examples

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
Master Java 8 Date & Time API: 18 Practical Code Examples
Java Captain
Java Captain
Jan 16, 2020 · Fundamentals

Java 8 Date and Time API: Practical Examples and Usage

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
Java 8 Date and Time API: Practical Examples and Usage
Programmer DD
Programmer DD
Aug 1, 2019 · Backend Development

Master Java 8 Date & Time API: From LocalDate to ZonedDateTime

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.

DurationPeriodZonedDateTime
0 likes · 13 min read
Master Java 8 Date & Time API: From LocalDate to ZonedDateTime
Programmer DD
Programmer DD
Mar 13, 2018 · Backend Development

Why Feign Fails with LocalDate/LocalDateTime and How to Fix It

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.

JSONJacksonJavaTimeModule
0 likes · 6 min read
Why Feign Fails with LocalDate/LocalDateTime and How to Fix It