Browse by Topic
Popular
Popular Posts
Latest
Latest Java Posts
Java Period Between Two Dates
How to use Java's Period.between to compute the calendar difference between two LocalDate values as years, months, and days, with examples and edge cases.
Java Date Comparison: Legacy vs java.time
Learn how to compare dates in Java using java.util.Date and java.time, including LocalDate, ZonedDateTime, and Instant, with practical examples.
Java LocalDate minusDays: Subtract Days from a Date
Learn how to subtract days from a Java LocalDate using minusDays(), including boundary handling, negative arguments, and immutable behavior.
Using LocalDate.plusDays in Java
Learn how LocalDate.plusDays works, why it returns a new instance, and how to handle month boundaries, negative values, and overflow in Java.
Java DateTimeFormatter: Formatting and Parsing Dates
Learn how to use Java's DateTimeFormatter to format and parse dates and times, including pattern letters, builder usage, thread safety, locales, and common pitfalls.
Java LocalDate Format: Patterns and Examples
Learn how to format a Java LocalDate with DateTimeFormatter, including predefined and custom patterns, locale handling, parsing, and common pitfalls.
Java LocalDate parse: Converting Strings to Dates
Learn how to parse strings into LocalDate using DateTimeFormatter, handle invalid inputs, and avoid common pitfalls in Java.
Java LocalDate.now(): Get the Current Date
Learn how LocalDate.now() gets the current date in Java, including time zone handling, formatting, thread safety, and common pitfalls.
Java Date vs LocalDate: Choosing the Right Type
Learn the core difference between java.util.Date and java.time.LocalDate, when to use each, and how to convert between them safely.
Java Period: Date-Based Amounts in java.time
Use java.time.Period to represent date-based amounts in years, months, and days, including creation, arithmetic, normalization, and differences from Duration.