Skip to content

Commit 0093c8d

Browse files
committed
readme: added doc for daysUntil, min, max
1 parent 6c7689b commit 0093c8d

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

README.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,30 @@ const date3 = IntlDate.of('gregorian', 1957, 10, 25);
164164
const result = date2.isBetween(date1, date3); // true
165165
```
166166

167+
#### daysUntil
168+
169+
```javascript
170+
const date1 = IntlDate.of('gregorian', 1957, 10, 16);
171+
const date2 = IntlDate.of('gregorian', 1957, 11, 20);
172+
const days = date1.daysUntil(date2); // 35
173+
```
174+
175+
#### min
176+
177+
```javascript
178+
const date1 = IntlDate.of('gregorian', 1957, 10, 16);
179+
const date2 = IntlDate.of('gregorian', 1957, 10, 20);
180+
const min = IntlDate.min(date1, date2); // date1
181+
```
182+
183+
#### max
184+
185+
```javascript
186+
const date1 = IntlDate.of('gregorian', 1957, 10, 16);
187+
const date2 = IntlDate.of('gregorian', 1957, 10, 20);
188+
const max = IntlDate.max(date1, date2); // date2
189+
```
190+
167191
### String operations
168192

169193
#### format

0 commit comments

Comments
 (0)