Update yesterday.md

This commit is contained in:
Angelos Chalaris
2020-10-04 10:30:14 +03:00
committed by GitHub
parent 423084cc8b
commit 0c705c1936

View File

@ -10,7 +10,7 @@ Results in a string representation of yesterday's date.
```js
const yesterday = () => {
const t = new Date();
let t = new Date();
t.setDate(t.getDate() - 1);
return t.toISOString().split('T')[0];
};