77 lines
824 B
Plaintext
77 lines
824 B
Plaintext
---
|
|
sidebar_position: 6
|
|
title: Duration
|
|
---
|
|
|
|
import TOCInline from "@theme/TOCInline";
|
|
|
|
<TOCInline toc={toc} />
|
|
|
|
### toString
|
|
```
|
|
toString: (duration) => string
|
|
```
|
|
|
|
## Units
|
|
|
|
### minutes
|
|
```
|
|
minutes: (number) => duration
|
|
```
|
|
|
|
### hours
|
|
```
|
|
hours: (number) => duration
|
|
```
|
|
|
|
### days
|
|
```
|
|
days: (number) => duration
|
|
```
|
|
|
|
### years
|
|
```
|
|
years: (number) => duration
|
|
```
|
|
|
|
### toHours
|
|
```
|
|
toHours: (duration) => number
|
|
```
|
|
|
|
### toMinutes
|
|
```
|
|
toMinutes: (duration) => number
|
|
```
|
|
|
|
### toDays
|
|
```
|
|
toDays: (duration) => number
|
|
```
|
|
|
|
### toYears
|
|
```
|
|
toYears: (duration) => number
|
|
```
|
|
|
|
## Algebra
|
|
|
|
### add
|
|
```
|
|
add: (duration, duration) => duration
|
|
```
|
|
|
|
### subtract
|
|
```
|
|
subtract: (duration, duration) => duration
|
|
```
|
|
|
|
### multiply
|
|
```
|
|
multiply: (duration, number) => duration
|
|
```
|
|
|
|
### divide
|
|
```
|
|
divide: (duration, number) => duration
|
|
``` |