Update yesterday.md

This commit is contained in:
Isabelle Viktoria Maciohsek
2020-10-07 21:19:10 +03:00
committed by GitHub
parent 46c0906262
commit c8c73e06f5

View File

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