Skip to content
bbminfo – Learn from Scratch
Subjects Code examples Library reference
Computer Programming Python Java C++ C Go PHP Kotlin Ruby R Scala Groovy

Tutorial menu

Subjects

Computer Programming MathsPlanned ChemistryPlanned

Lesson contents

Programming resources

All languages Code examples Library reference

Programming languages

Python Java C++ C Go PHP Kotlin Ruby R Scala Groovy
Tutorials/Computer Programming/Scala/Library/Dates and time

Scala dates and time

Calculate a delivery date or count nights between bookings.

ChronoUnit.DAYS.betweenDateTimeFormatter.ofPatternFiniteDuration arithmetic
  • FiniteDuration arithmeticCalculate a retry budget in seconds
  • ChronoUnit.DAYS.betweenCount nights in a leap-year hotel stay
  • DateTimeFormatter.ofPatternPrint a consistent date on a receipt
  • LocalDate.plusDaysCalculate a delivery date across leap day

All Scala library sections

Scala tutorials

Environment setup› Library reference›
Advertisements
bbminfo – Learn from Scratch
© 2026 bbminfoArtwork creditsPrivacy policy