Skip to main content

TimespanWithValueDrop

A timespan inside a ScheduledValue that associates a range of time with a particular value

Fields

description (String)

A human-readable description of the timespan and its value

"$30.00 from January 3, 2018 up to January 9, 2018"
"42 from November 22, 2017 indefinitely"
"$10.25 anytime up to April 13, 1972"
"10 anytime"

description_without_value (String)

A human-readable description of just the timespan without its value

"from January 3, 2018 up to January 9, 2018"
"from November 22, 2017 indefinitely"
"anytime up to April 13, 1972"
"anytime"

finish (ActiveSupport::TimeWithZone)

When the timespan ends. (This moment is NOT considered part of the timespan.)

short_description (String)

A shorter format of the human-readable description of the timespan and its value

"$30.00 January 3, 2018 - January 9, 2018"
"42 November 22, 2017 onwards"
"$10.25 up to April 13, 1972"
"10"

short_description_without_value (String)

A shorter format of the human-readable description of the timespan, without its value

"January 3, 2018 - January 9, 2018"
"November 22, 2017 onwards"
"up to April 13, 1972"
Infinite timespans return an empty string
""

start (ActiveSupport::TimeWithZone)

When the timespan starts. (This moment is considered part of the timespan.)

timezone (ActiveSupport::TimeZone)

The time zone used for calculating the range of time

value (String)

The value for this timespan, formatted as a string