Skip to main content

Date.-

-amount

Group: Operators
Aliases: subtract period

Documentation

Subtract the specified amount of time from this instant to get another date.

Arguments

  • amount: The amount of time to add to this instant. It can be a Period or Date_Period.

Examples

Subtract 7 days from a local date.

      from Standard.Base import Date
import Standard.Base.Data.Time.Duration

example_subtract = Date.new 2020 - (Period.new days=7)

Subtract a month from a local date.

      import Standard.Base.Data.Time.Date_Period

example_add = Date.new 2020 - Date_Period.Month