BroadcastMonthRange class
A single broadcast month.
The broadcast calendar is a standardized calendar used primarily for the planning and purchase of radio and television programs and advertising. Every week in the broadcast calendar starts on a Monday and ends on a Sunday, and every month has either four or five such weeks. Broadcast calendar months thus have either 28 or 35 days. The key link between the broadcast and Gregorian calendars is that the first week of every broadcast month always contains the Gregorian calendar first of the month.
For details, see: https://en.wikipedia.org/wiki/Broadcast_calendar Example: https://www.tvb.org/Portals/0/media/file/TVB_Bdcst_Calendar_2015-17.pdf
Special-cased so that next/previous picks the next/previous broadcast month; and also to have titles like "This broadcast month", "Last broadcast month", etc.
- Implemented types
Constructors
- BroadcastMonthRange.monthsAgo(Clock clock, int ago, [RangeTitle titleFunction = _defaultTitle])
-
factory
Properties
- end → Date
-
no setteroverride
- hashCode → int
-
The hash code for this object.
no setteroverride
- isAllTime → bool
-
true
if this date range represents all available history.no setteroverride - isPredefined → bool
-
Whether the date range is predefined by the application.
no setteroverride
- next → DatepickerDateRange
-
A date range which begins immediately after this one ends, and has either
the same length or similar semantics (such as "the next month").
no setteroverride
- prev → DatepickerDateRange
-
A date range which ends immediately before this one starts, and has either
the same length or similar semantics (such as "the previous year").
no setteroverride
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- start → Date
-
no setteroverride
- title → String
-
E.g. "Last 7 days", "This month", "Custom", etc.
no setteroverride
Methods
-
asPlainRange(
) → DateRange -
Returns this range as a plain DateRange. This is needed because
DateRange's equality is strict on types.
override
-
clamp(
{Date? min, Date? max}) → DatepickerDateRange? -
Clamps the current date range to the given min and max dates. Returns null
if this range has no overlap with the given date range.
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toProtoBuf(
) → DatepickerDateRange -
Convert this date range into the protocol buffer format defined in
date_range.proto.
override
-
toString(
) → String -
A string representation of this object.
override
-
unclamped(
) → DatepickerDateRange -
Reverses the effect of one call to clamp() (assuming clamp() didn't return
null). If clamp() succeeds, range.clamp(...).unclamped() == range.
override
Operators
-
operator ==(
Object o) → bool -
The equality operator.
override