diff options
author | Karol Baraniecki <karol@baraniecki.eu> | 2023-03-04 01:58:13 +0100 |
---|---|---|
committer | Andrew Kaster <andrewdkaster@gmail.com> | 2023-04-25 01:54:53 -0600 |
commit | b4bec4dd2fab6361acf512786c6ee620f6fc8de2 (patch) | |
tree | c622e47ee6d99b9d58b5ab5c9f7494316bdf9ce4 | |
parent | af2a606f25a6d8f9c9cd93df3841ca4a5f48d972 (diff) | |
download | serenity-b4bec4dd2fab6361acf512786c6ee620f6fc8de2.zip |
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
-rw-r--r-- | Userland/Utilities/cal.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
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<Vector<String>> 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++; } |