commit 99aabd792823e3b71ff229de37e3b0f627874033
parent 6267400c2aceb4101b57b57aefb1d69e7cc72703
Author: Juan F. Meleiro <juan@juanmeleiro.mat.br>
Date: Wed, 31 May 2023 11:33:28 -0300
birthdays: Add "the" to date
Diffstat:
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/birthdays/birthday.fish b/birthdays/birthday.fish
@@ -36,8 +36,9 @@ set MONTH (env LANG=en date +"%B" -d "$year-$month-$day")
set DATEORD (ord $day)
set COUNT (math "$year - $birthyear")
set COUNTORD (ord "$COUNT")
+set DAY (string trim -l -c '0' $day)
-set DATE "$day$DATEORD of $MONTH of $year"
+set DATE "The $DAY$DATEORD of $MONTH of $year"
set DATELEN (string length "$DATE")
set DATEPAD (repeat (math "floor(($WIDTH - $DATELEN)/2)") " ")
echo $DATEPAD