beautify 1st part of the tutorial
This commit is contained in:
parent
e3dd2cedc0
commit
6444024a9d
327 changed files with 2358 additions and 1986 deletions
|
@ -2,8 +2,8 @@
|
|||
|
||||
```js
|
||||
function getDateAgo(date, days) {
|
||||
date.setDate( date.getDate() - days );
|
||||
return date.getDate();
|
||||
date.setDate(date.getDate() - days);
|
||||
return date.getDate();
|
||||
}
|
||||
```
|
||||
|
||||
|
@ -15,9 +15,9 @@ function getDateAgo(date, days) {
|
|||
//+ run
|
||||
function getDateAgo(date, days) {
|
||||
var dateCopy = new Date(date);
|
||||
|
||||
dateCopy.setDate( date.getDate() - days );
|
||||
return dateCopy.getDate();
|
||||
|
||||
dateCopy.setDate(date.getDate() - days);
|
||||
return dateCopy.getDate();
|
||||
}
|
||||
|
||||
var date = new Date(2015, 0, 2);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue