0

I'm actually looking for a solution to get the years week count in Java 8, using the java.time package.

With the old methods, it was simply calling:

Calendar#getActualMaximum(Calendar.WEEK_OF_YEAR)

But I cant find a similar solution for java.time...

Ole V.V.
  • 81,772
  • 15
  • 137
  • 161
the_dani
  • 2,466
  • 2
  • 20
  • 46
  • Did you read https://stackoverflow.com/questions/44197872/java-time-get-max-number-of-weeks-for-particular-year? – Jens Dibbern Feb 12 '19 at 20:40
  • No thanks, that's what I was looking for! – the_dani Feb 12 '19 at 20:44
  • FYI, the terribly troublesome old date-time classes such as [`java.util.Date`](https://docs.oracle.com/javase/10/docs/api/java/util/Date.html), [`java.util.Calendar`](https://docs.oracle.com/javase/10/docs/api/java/util/Calendar.html), and `java.text.SimpleDateFormat` are now [legacy](https://en.wikipedia.org/wiki/Legacy_system), supplanted by the [*java.time*](https://docs.oracle.com/javase/10/docs/api/java/time/package-summary.html) classes built into Java 8 and later. See [*Tutorial* by Oracle](https://docs.oracle.com/javase/tutorial/datetime/TOC.html). – Basil Bourque Feb 13 '19 at 22:12
  • Well, that's why I was looking for another solution! – the_dani Feb 14 '19 at 06:29

0 Answers0