2022-06-05 20:59:45 +00:00
|
|
|
---
|
2022-06-06 03:02:17 +00:00
|
|
|
sidebar_position: 5
|
2022-06-05 20:59:45 +00:00
|
|
|
title: Duration
|
|
|
|
---
|
|
|
|
|
|
|
|
### toString
|
2022-06-06 05:16:29 +00:00
|
|
|
```
|
|
|
|
toString: (duration) => string
|
2022-06-05 20:59:45 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
|
2022-06-06 05:16:29 +00:00
|
|
|
|
|
|
|
### minutes
|
|
|
|
```
|
|
|
|
minutes: (number) => duration
|
2022-06-05 20:59:45 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
|
2022-06-06 05:16:29 +00:00
|
|
|
|
|
|
|
### hours
|
|
|
|
```
|
|
|
|
hours: (number) => duration
|
2022-06-05 20:59:45 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
|
2022-06-06 05:16:29 +00:00
|
|
|
|
|
|
|
### days
|
|
|
|
```
|
|
|
|
days: (number) => duration
|
2022-06-05 20:59:45 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
|
2022-06-06 05:16:29 +00:00
|
|
|
|
|
|
|
### years
|
|
|
|
```
|
|
|
|
years: (number) => duration
|
2022-06-05 20:59:45 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
|
2022-06-06 05:16:29 +00:00
|
|
|
|
|
|
|
### toHours
|
|
|
|
```
|
|
|
|
Duration.toHours: (duration) => number
|
2022-06-05 20:59:45 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
|
2022-06-06 05:16:29 +00:00
|
|
|
|
|
|
|
### toMinutes
|
|
|
|
```
|
|
|
|
Duration.toMinutes: (duration) => number
|
2022-06-05 20:59:45 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
|
2022-06-06 05:16:29 +00:00
|
|
|
|
|
|
|
### toDays
|
|
|
|
```
|
|
|
|
Duration.toDays: (duration) => number
|
2022-06-05 20:59:45 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
|
2022-06-06 05:16:29 +00:00
|
|
|
|
|
|
|
### toYears
|
|
|
|
```
|
|
|
|
Duration.toYears: (duration) => number
|
2022-06-05 20:59:45 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
|
2022-06-06 05:16:29 +00:00
|
|
|
|
|
|
|
### add
|
|
|
|
```
|
|
|
|
add: (duration, duration) => duration
|
2022-06-05 20:59:45 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
|
2022-06-06 05:16:29 +00:00
|
|
|
|
|
|
|
### subtract
|
|
|
|
```
|
|
|
|
subtract: (duration, duration) => duration
|
2022-06-05 20:59:45 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
|
2022-06-06 05:16:29 +00:00
|
|
|
|
|
|
|
### multiply
|
|
|
|
```
|
|
|
|
multiply: (duration, duration) => duration
|
2022-06-05 20:59:45 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
|
2022-06-06 05:16:29 +00:00
|
|
|
|
|
|
|
### divide
|
|
|
|
```
|
|
|
|
divide: (duration, duration) => duration
|
2022-06-05 21:13:56 +00:00
|
|
|
```
|