Handling Date, Time, Text, Numeric and Boolean Values
What this topic covers
Evaluate numeric and boolean expressions with primitives, wrappers, casting, and the Math API. Work with text using String and StringBuilder, and handle dates, durations, and time zones with the Date-Time API.
What does Period.between return, and why does toTotalMonths ignore leftover days?
Period.between returns a calendar-based Period between two LocalDate values, and toTotalMonths returns only its complete months. Any remaining days are ignored, so a period of one month and twenty days gives 1.