localdate

How to get the current year as an integer in Scala

Scala FAQ: How do I get the current year as an integer (Int value) in Scala?

Solution: Use the Java 8 Year or LocalDate classes, or the older old Java Calendar class. The solutions are shown below.