PeriodUnits class
The units within a period
. When a period is created to find the difference between two local values,
the caller may specify which units are required - for example, you can ask for the difference between two dates
in 'years and weeks'. Units are always applied largest-first in arithmetic.
- Annotations
-
- @immutable
Constructors
- PeriodUnits(int _value)
-
const
Properties
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
parse(
String text) → PeriodUnits? -
toString(
) → String -
A string representation of this object.
override
Operators
-
operator &(
PeriodUnits other) → PeriodUnits -
operator +(
PeriodUnits other) → int -
operator -(
PeriodUnits other) → int -
operator <(
PeriodUnits other) → bool -
operator <=(
PeriodUnits other) → bool -
operator ==(
Object other) → bool -
The equality operator.
override
-
operator >(
PeriodUnits other) → bool -
operator >=(
PeriodUnits other) → bool -
operator |(
PeriodUnits other) → PeriodUnits
Static Properties
-
values
→ List<
PeriodUnits> -
no setter
Static Methods
-
union(
Iterable< PeriodUnits> units) → PeriodUnits
Constants
- allDateUnits → const PeriodUnits
- Compound value representing the combination of years, months, weeks and days
- allTimeUnits → const PeriodUnits
- Compound value representing the combination of all time elements
- allUnits → const PeriodUnits
- Compound value representing the combination of all possible elements
- dateAndTime → const PeriodUnits
- Compound value representing the combination of all possible elements except weeks
- days → const PeriodUnits
-
Days element within a
period
- hourMinuteSecond → const PeriodUnits
- Compound value representing the combination of hours, minutes and seconds
- hours → const PeriodUnits
-
Hours element within a
period
- microseconds → const PeriodUnits
-
Tick element within a
period
- milliseconds → const PeriodUnits
-
Milliseconds element within a
period
- minutes → const PeriodUnits
-
Minutes element within a
period
- months → const PeriodUnits
-
Months element within a
period
- nanoseconds → const PeriodUnits
-
Nanoseconds element within a
period
- none → const PeriodUnits
- Value indicating no units - an empty period
- seconds → const PeriodUnits
-
Seconds element within a
period
- weeks → const PeriodUnits
-
Weeks element within a
period
- yearMonthDay → const PeriodUnits
- Compound value representing the combination of years, months and days
- years → const PeriodUnits
-
Years element within a
period