You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you have some specific code that needs LocalTime arithmetics, please share it here or on the Kotlin Slack, and we'll help you reach an idiomatic and robust solution.
The
Instant
type supports addition and subtraction of aDuration
:The
LocalDate
type supports addition and subtraction ofDatePeriod
:However, the
LocalTime
doesn't support any addition or subtraction, which requires cumbersome code to do these changes:What about adding a
TimePeriod
type? This would allow to write code like this:This would also pave the way for addition and subtraction of the
LocalDateTime
type:The text was updated successfully, but these errors were encountered: