Return the start of yesterday.
Return the start of yesterday.
⚠️ Please note that this function is not present in the FP submodule as it uses
new Date()internally hence impure and can't be safely curried.
// CommonJS
var startOfYesterday = require('date-fns/startOfYesterday')
// ES 2015 import startOfYesterday from 'date-fns/startOfYesterday'
// ESM
import { startOfYesterday } from 'date-fns'
| Description |
|---|
|
the start of yesterday |
// If today is 6 October 2014: const result = startOfYesterday() //=> Sun Oct 5 2014 00:00:00
© 2021 Sasha Koss and Lesha Koss
Licensed under the MIT License.
https://date-fns.org/v2.29.2/docs/startOfYesterday