diff options
author | Xi Ruoyao <xry111@mengyan1223.wang> | 2021-04-07 01:13:48 +0800 |
---|---|---|
committer | Xi Ruoyao <xry111@mengyan1223.wang> | 2021-04-07 01:13:48 +0800 |
commit | 6b505dabb8420d1ae41a6d68772fe8ad4b252dd8 (patch) | |
tree | c8917860229550564fec2b1294d18d901582a124 /git-version.sh | |
parent | 7e80757c0d3bc6392f5657b1ce59dbbb12ce6106 (diff) |
remove leading zero for day
Diffstat (limited to 'git-version.sh')
-rwxr-xr-x | git-version.sh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/git-version.sh b/git-version.sh index 8b1f13d00..898d5b96f 100755 --- a/git-version.sh +++ b/git-version.sh @@ -19,7 +19,7 @@ short_date=$(date --date "$commit_date" "+%Y%m%d") year=$(date --date "$commit_date" "+%Y") month=$(date --date "$commit_date" "+%B") month_digit=$(date --date "$commit_date" "+%m") -day=$(date --date "$commit_date" "+%d") +day=$(date --date "$commit_date" "+%d" | sed 's@^0@@') case $day in "1" | "21" | "31" ) suffix="st";; |