Skip to content

Commit

Permalink
Fix filenames
Browse files Browse the repository at this point in the history
  • Loading branch information
wooorm committed Feb 20, 2024
1 parent ab64360 commit 5c2715f
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions script/crawl.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,13 @@ let slice = 0
const size = 20
const now = new Date()
const destination = new URL(
`../data/${now.getUTCFullYear()}-${
now.getUTCMonth() + 1
}-${now.getUTCDate()}.json`,
'../data/' +
String(now.getUTCFullYear()).padStart(4, '0') +
'-' +
String(now.getUTCMonth() + 1).padStart(2, '0') +
'-' +
String(now.getUTCDate()).padStart(2, '0') +
'.json',
import.meta.url
)

Expand Down

0 comments on commit 5c2715f

Please sign in to comment.