From b4bec4dd2fab6361acf512786c6ee620f6fc8de2 Mon Sep 17 00:00:00 2001 From: Karol Baraniecki Date: Sat, 4 Mar 2023 01:58:13 +0100 Subject: [PATCH] cal: Pad days on the left with spaces instead of zeroes I think this looks a lot prettier: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 than that: 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 --- Userland/Utilities/cal.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Userland/Utilities/cal.cpp b/Userland/Utilities/cal.cpp index 7ffe8ebcc5..15d636c73e 100644 --- a/Userland/Utilities/cal.cpp +++ b/Userland/Utilities/cal.cpp @@ -71,7 +71,7 @@ static ErrorOr> month_lines_to_print(Header header_mode, int mont if (year == current_year && month == current_month && day == current_day) { TRY(days_in_row.try_append(TRY(String::formatted(ANSI_INVERT_OUTPUT "{:2}" ANSI_RESET_OUTPUT, day)))); } else { - TRY(days_in_row.try_append(TRY(String::formatted("{:02}", day)))); + TRY(days_in_row.try_append(TRY(String::formatted("{:2}", day)))); } day++; }