Skip to content

Commit

Permalink
Update releaseversion.mts (#121)
Browse files Browse the repository at this point in the history
Pad numbers with leading 0
  • Loading branch information
Alxandr authored Jul 11, 2024
1 parent 8afac95 commit ba17d71
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .github/actions/release/releaseversion.mts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
function getVersion()
{
const currentDate = new Date();
const year = currentDate.getFullYear();
const month = currentDate.getMonth() + 1;
const day = currentDate.getDate();
const year = String(currentDate.getFullYear()).padStart(4, '0');
const month = String(currentDate.getMonth() + 1).padStart(2, '0');
const day = String(currentDate.getDate()).padStart(2, '0');

const release_version_number = `${year}.${month}.${day}`;
return release_version_number;
Expand Down

0 comments on commit ba17d71

Please sign in to comment.