java.util.Date and java.util.Calendar are not deprecated, and still work as they always have. However, how they work is difficult to use, which is why java.time classes are recommended instead.

What you are seeing is the difference between WEEK_OF_YEAR (which depends on the locale) and ALIGNED_WEEK_OF_YEAR (which is the same in all locales).

When setting or getting the WEEK_OF_MONTH or WEEK_OF_YEAR fields, Calendar must determine the first week of the month or year as a reference point. The first week of a month or year is defined as the earliest seven day period beginning on getFirstDayOfWeek() and containing at least getMinimalDaysInFirstWeek() days of that month or year. Weeks numbered ..., -1, 0 precede the first week; weeks numbered 2, 3,... follow it. Note that the normalized numbering returned by get() may be different. For example, a specific Calendar subclass may designate the week before week 1 of a year as week n of the previous year.


ALIGNED_WEEK_OF_YEAR represents concept of the count of weeks within the period of a year where the weeks are aligned to the start of the year. This field is typically used with ALIGNED_DAY_OF_WEEK_IN_YEAR.

For example, in a calendar systems with a seven day week, the first aligned-week-of-year starts on day-of-year 1, the second aligned-week starts on day-of-year 8, and so on. Thus, day-of-year values 1 to 7 are in aligned-week 1, while day-of-year values 8 to 14 are in aligned-week 2, and so on.


And for the locale difference:

// returns DayOfWeek.MONDAY
WeekFields.of(Locale.forLanguageTag("de-DE")).getFirstDayOfWeek();

// returns DayOfWeek.SUNDAY
WeekFields.of(Locale.forLanguageTag("en-ZA")).getFirstDayOfWeek();

To get the unaligned week of year using the current system local with java.time:

LocalDate.now().get(WeekFields.of(Locale.getDefault()).weekOfYear())

If you want to be locale-independent, then there is ISO.weekOfYear() if you want the week to start on a Monday, and SUNDAY_START.weekOfYear() for a Sunday.

Answer from OrangeDog on Stack Overflow
🌐
Oracle
docs.oracle.com › en › java › javase › 11 › docs › api › java.base › java › util › Date.html
Date (Java SE 11 & JDK 11 )
January 20, 2026 - A month is represented by an integer from 0 to 11; 0 is January, 1 is February, and so forth; thus 11 is December. A date (day of month) is represented by an integer from 1 to 31 in the usual manner. An hour is represented by an integer from 0 to 23. Thus, the hour from midnight to 1 a.m. is ...
Top answer
1 of 2
6

java.util.Date and java.util.Calendar are not deprecated, and still work as they always have. However, how they work is difficult to use, which is why java.time classes are recommended instead.

What you are seeing is the difference between WEEK_OF_YEAR (which depends on the locale) and ALIGNED_WEEK_OF_YEAR (which is the same in all locales).

When setting or getting the WEEK_OF_MONTH or WEEK_OF_YEAR fields, Calendar must determine the first week of the month or year as a reference point. The first week of a month or year is defined as the earliest seven day period beginning on getFirstDayOfWeek() and containing at least getMinimalDaysInFirstWeek() days of that month or year. Weeks numbered ..., -1, 0 precede the first week; weeks numbered 2, 3,... follow it. Note that the normalized numbering returned by get() may be different. For example, a specific Calendar subclass may designate the week before week 1 of a year as week n of the previous year.


ALIGNED_WEEK_OF_YEAR represents concept of the count of weeks within the period of a year where the weeks are aligned to the start of the year. This field is typically used with ALIGNED_DAY_OF_WEEK_IN_YEAR.

For example, in a calendar systems with a seven day week, the first aligned-week-of-year starts on day-of-year 1, the second aligned-week starts on day-of-year 8, and so on. Thus, day-of-year values 1 to 7 are in aligned-week 1, while day-of-year values 8 to 14 are in aligned-week 2, and so on.


And for the locale difference:

// returns DayOfWeek.MONDAY
WeekFields.of(Locale.forLanguageTag("de-DE")).getFirstDayOfWeek();

// returns DayOfWeek.SUNDAY
WeekFields.of(Locale.forLanguageTag("en-ZA")).getFirstDayOfWeek();

To get the unaligned week of year using the current system local with java.time:

LocalDate.now().get(WeekFields.of(Locale.getDefault()).weekOfYear())

If you want to be locale-independent, then there is ISO.weekOfYear() if you want the week to start on a Monday, and SUNDAY_START.weekOfYear() for a Sunday.

2 of 2
0

The old, much-derided Date and Calendar classes have always been confusing and difficult to use properly, particularly in a multi-threaded context.Java 8’s JSR 310 implementation offers specific classes for:

The old date library included only a single time representation class – java.util.Date, which despite its name, is actually a timestamp. It only stores the number of milliseconds elapsed since the Unix epoch.

🌐
Oracle
docs.oracle.com › en › java › javase › 11 › docs › api › java.base › java › util › class-use › Date.html
Uses of Class java.util.Date (Java SE 11 & JDK 11 )
July 15, 2025 - Report a bug or suggest an enhancement For further API reference and developer documentation see the Java SE Documentation, which contains more detailed, developer-targeted descriptions with conceptual overviews, definitions of terms, workarounds, and working code examples.
🌐
Andornot
blog.andornot.com › blog › java-11-date-parsing-locale-locale-locale
Java 11 date parsing? Locale, locale, locale. • Andornot Consulting
Long story short, a date like '2004-09-15 12:00:00 AM' produced by Inmagic ODBC from a DB/Textworks database could not be parsed. The parser choked on the string at "AM," even though my match pattern was correct: 'uuuu-MM-dd hh:mm:ss a'. Desperate ...
🌐
Oracle
docs.oracle.com › en › java › javase › 11 › docs › api › java.base › java › time › package-summary.html
java.time (Java SE 11 & JDK 11 )
October 20, 2025 - This stores a date-time like '2010-12-03T11:30+01:00'. This is sometimes found in XML messages and other forms of persistence, but contains less information than a full time-zone. Unless otherwise noted, passing a null argument to a constructor or method in any class or interface in this package will cause a NullPointerException to be thrown. The Javadoc "@param" definition is used to summarise the null-behavior.
🌐
Oracle
java.com › releases
JDK Releases
Full details can be found here, along with instructions on how to subscribe to CPU Alert notifications. Feature releases are scheduled for release in the middle of March and September. The exact dates are posted several months in advance on https://openjdk.java.net/projects/jdk.
Find elsewhere
🌐
GitHub
github.com › google › gson › issues › 1719
java.util.date Java 11 vs Java 8 different serialization · Issue #1719 · google/gson
June 10, 2020 - I don't know what to make of this, whether its a bug or not - but I think its worth mentioning. If you serialize a java.util.Date object, this is what you get with gson 2.8.0 · Java 8 {"creationDate":"Jun 10, 2020 11:13:39 AM"} Java 11 {"creationDate":"Jun 10, 2020, 11:14:17 AM"}
Author   col-panic
🌐
Oracle
docs.oracle.com › en › java › javase › 11 › docs › api › java.base › java › time › LocalDate.html
LocalDate (Java SE 11 & JDK 11 )
January 20, 2026 - java.time.LocalDate · All Implemented Interfaces: Serializable, Comparable<ChronoLocalDate>, ChronoLocalDate, Temporal, TemporalAccessor, TemporalAdjuster · public final class LocalDate extends Object implements Temporal, TemporalAdjuster, ChronoLocalDate, Serializable · A date without a time-zone in the ISO-8601 calendar system, such as 2007-12-03.
🌐
Oracle
docs.oracle.com › en › java › javase › 11 › docs › api › java.base › java › text › DateFormat.html
DateFormat (Java SE 11 & JDK 11 )
January 10, 2026 - Useful constant for zero-based HOUR field alignment. Used in FieldPosition of date/time formatting. HOUR0_FIELD is used for the zero-based 12-hour clock. For example, 11:30 PM + 1 hour results in 00:30 AM.
🌐
Java
download.java.net › java › early_access › loom › docs › api › java.sql › java › sql › Date.html
Date (Java SE 25 & JDK 25 [build 1])
Constructs a Date object initialized with the given year, month, and day. The result is undefined if a given argument is out of bounds. Parameters: year - the year minus 1900; must be 0 to 8099. (Note that 8099 is 9999 minus 1900.) month - 0 to 11 · day - 1 to 31 ·
🌐
Minecraft Wiki
minecraft.wiki › w › Java_Edition_1.21.11
Java Edition 1.21.11 – Minecraft Wiki
1.21.11, the release of Mounts of Mayhem, is a game drop for Java Edition released on December 9, 2025,[1][2] which adds the nautilus, zombie nautilus, nautilus armor, spears, netherite horse armor, camel husks, parched, and zombie horsemen.
🌐
Joda
joda.org › joda-time
Joda-Time - Home
Users are now asked to migrate to java.time (JSR-310). Joda-Time is licensed under the business-friendly Apache 2.0 licence. ... The list of FAQs. ... The standard date and time classes prior to Java SE 8 are poor. By tackling this problem head-on, Joda-Time became the de facto standard date ...
🌐
Baeldung
baeldung.com › home › java › java dates › introduction to the java date/time api
Introduction to the Java Date/Time API | Baeldung
October 13, 2023 - We will also look at some of the core classes of the new Java 8 project that are part of the java.time package, such as LocalDate, LocalTime, LocalDateTime, ZonedDateTime, Period, Duration and their supported APIs. Learn how to work with Date parameters in Spring MVC
🌐
javaspring
javaspring.net › blog › java-11-release-date
Java 11 Release Date: An In-Depth Analysis — javaspring.net
Java 11, released on September 25, 2018, introduced several important features that have enhanced the capabilities of Java developers. Understanding the release date and the associated features is the first step towards leveraging these improvements.
🌐
Oracle
docs.oracle.com › en › java › javase › 11 › docs › api › java.base › java › util › GregorianCalendar.html
GregorianCalendar (Java SE 11 & JDK 11 )
October 20, 2025 - The result is true if and only if the argument is a GregorianCalendar object that represents the same time value (millisecond offset from the Epoch) under the same Calendar parameters and Gregorian change date as this object. Overrides: equals in class Calendar · Parameters: obj - the object to compare with. Returns: true if this object is equal to obj; false otherwise. See Also: Calendar.compareTo(Calendar) public int hashCode() Generates the hash code for this GregorianCalendar object. Overrides: hashCode in class Calendar · Returns: a hash code value for this object. See Also: Object.equals(java.lang.Object), System.identityHashCode(java.lang.Object) public void add​(int field, int amount) Adds the specified (signed) amount of time to the given calendar field, based on the calendar's rules.
🌐
W3Schools
w3schools.com › java › java_date.asp
Java Date and Time
Java does not have a built-in Date class, but we can import the java.time package to work with the date and time API. The package includes many date and time classes.
🌐
Oracle
oracle.com › java › technologies › javase › 11-0-30-relnotes.html
Java™ SE Development Kit 11, 11.0.30 Release Notes
January 20, 2026 - Java Development Kit 11 Release Notes · Release date: January 20, 2026 · The full version string for this update release is 11.0.30+7 (where "+" means "build"). The version number is 11.0.30. This JDK conforms to version 11.3 of the Java SE Specification (JSR 384 MR 3 2024-07-02).
🌐
Redis
versionlog.com › java › 11
Java/Java SE 11: List Releases, Release Date, End of Life
List all releases of Java/Java SE in branch 11, support status, release date of each release in branch 11. Java is a powerful, secure, and popular p...