(date)
| 644 | } |
| 645 | |
| 646 | function dateToString(date) { |
| 647 | let day = date.getDate().toString().padStart(2, "0"); |
| 648 | let month = (date.getMonth() + 1).toString().padStart(2, "0"); |
| 649 | let year = date.getFullYear(); |
| 650 | let dateString = `${year}-${month}-${day}`; |
| 651 | return dateString; |
| 652 | } |
| 653 | |
| 654 | function getPath(date) { |
| 655 | return `/log/${dateToString(date)}`; |