Skip to content

Commit

Permalink
Fix padStart
Browse files Browse the repository at this point in the history
  • Loading branch information
a2br committed Dec 26, 2020
1 parent 3363094 commit bdbbb48
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/functions/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export function toISODate(date: Date | string | number) {

return [
d.getFullYear(),
(d.getMonth() + 1).toString().padStart(2),
d.getDate().toString().padStart(2),
(d.getMonth() + 1).toString().padStart(2, "0"),
d.getDate().toString().padStart(2, "0"),
].join("-");
}

0 comments on commit bdbbb48

Please sign in to comment.