(date)
| 474 | } |
| 475 | |
| 476 | function formatDate(date) { |
| 477 | let year = date.getFullYear(); |
| 478 | let month = padZero(date.getMonth() + 1); |
| 479 | let day = padZero(date.getDate()); |
| 480 | return `${year}-${month}-${day}`; |
| 481 | } |
| 482 | |
| 483 | function padZero(num) { |
| 484 | return num.toString().padStart(2, "0"); |