From 6b505dabb8420d1ae41a6d68772fe8ad4b252dd8 Mon Sep 17 00:00:00 2001 From: Xi Ruoyao Date: Wed, 7 Apr 2021 01:13:48 +0800 Subject: [PATCH] remove leading zero for day --- git-version.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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";;