duration
Represents a positive or negative span of time.
コンストラクタ
If a type has a constructor, you can call it like a function to create a new value of the type.
Creates a new duration.
You can specify the duration using weeks, days, hours, minutes and seconds. You can also get a duration by subtracting two datetimes.
#duration(
days: 3,
hours: 12,
).hours()
seconds
The number of seconds.
Default:0
minutes
The number of minutes.
Default:0
hours
The number of hours.
Default:0
days
The number of days.
Default:0
weeks
The number of weeks.
Default:0
定義
Functions and types and can have associated definitions. These are accessed by specifying the function or type, followed by a period, and then the definition's name.
seconds
The duration expressed in seconds.
This function returns the total duration represented in seconds as a floating-point number rather than the second component of the duration.
minutes
The duration expressed in minutes.
This function returns the total duration represented in minutes as a floating-point number rather than the second component of the duration.
hours
The duration expressed in hours.
This function returns the total duration represented in hours as a floating-point number rather than the second component of the duration.
days
The duration expressed in days.
This function returns the total duration represented in days as a floating-point number rather than the second component of the duration.
weeks
The duration expressed in weeks.
This function returns the total duration represented in weeks as a floating-point number rather than the second component of the duration.