Skip to main content

Duration.+

+that

Group: Operators
Aliases: add duration

Documentation

Add the specified amount of time to this duration.

Arguments

  • that: The duration to add to self.

Examples

Add 6 seconds to a duration of 3 minutes

      import Standard.Base.Data.Time.Duration

example_add = (Duration.new minutes=3) + (Duration.new seconds=6)

Add 12 hours to a duration of 30 minutes.

      import Standard.Base.Data.Time.Duration

example_add = (Duration.new minutes=30) + (Duration.new hours=12)