Is the given date tomorrow?
Is the given date tomorrow?
⚠️ Please note that this function is not present in the FP submodule as it uses
Date.now()internally hence impure and can't be safely curried.
// CommonJS
var isTomorrow = require('date-fns/isTomorrow')
// ES 2015 import isTomorrow from 'date-fns/isTomorrow'
// ESM
import { isTomorrow } from 'date-fns'
isTomorrow(date)
| Name | Description |
|---|---|
date |
the date to check |
| Description |
|---|
|
the date is tomorrow |
| Type | Description |
|---|---|
TypeError |
1 argument required |
// If today is 6 October 2014, is 7 October 14:00:00 tomorrow? const result = isTomorrow(new Date(2014, 9, 7, 14, 0)) //=> true
© 2021 Sasha Koss and Lesha Koss
Licensed under the MIT License.
https://date-fns.org/v2.29.2/docs/isTomorrow