mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 07:07:34 +00:00
cal: Center the month-year text
For now this only has an effect when displaying two-digit years, but when month names get implemented this will be helpful.
This commit is contained in:
parent
119dc042ab
commit
905f2ca152
1 changed files with 1 additions and 1 deletions
|
@ -29,7 +29,7 @@ static ErrorOr<Vector<String>> month_lines_to_print(int month, int year)
|
||||||
Vector<String> lines;
|
Vector<String> lines;
|
||||||
|
|
||||||
// FIXME: Both the month name and month header text should be provided by a locale
|
// FIXME: Both the month name and month header text should be provided by a locale
|
||||||
TRY(lines.try_append(TRY(String::formatted(" {:02} - {:02} ", month, year))));
|
TRY(lines.try_append(TRY(String::formatted("{:^20s}", TRY(String::formatted("{:02} - {:02}", month, year))))));
|
||||||
TRY(lines.try_append(TRY(String::from_utf8("Su Mo Tu We Th Fr Sa"sv))));
|
TRY(lines.try_append(TRY(String::from_utf8("Su Mo Tu We Th Fr Sa"sv))));
|
||||||
|
|
||||||
int day_to_print = 1;
|
int day_to_print = 1;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue