hare

The Hare programming language
git clone https://git.torresjrjr.com/hare.git
Log | Files | Refs | README | LICENSE

commit de5d92ff32c045d7f6ad0bc391630318b6915646
parent 14a5fc3617634833f776f49c34f7e3ab7a808602
Author: Vlad-Stefan Harbuz <vlad@vladh.net>
Date:   Mon, 17 Jan 2022 11:54:10 +0100

remove formatting localization TODOs

Signed-off-by: Vlad-Stefan Harbuz <vlad@vladh.net>

Diffstat:
Mdatetime/format.ha | 10----------
1 file changed, 0 insertions(+), 10 deletions(-)

diff --git a/datetime/format.ha b/datetime/format.ha @@ -88,19 +88,15 @@ export fn parse(b: *builder, layout: str, s: str) (void | errors::invalid) = { switch (format_r) { // Basic specifiers case 'a' => - // TODO: Localization b.weekday = get_default_locale_string_index( &s_iter, WEEKDAYS_SHORT[..])?; case 'A' => - // TODO: Localization b.weekday = get_default_locale_string_index( &s_iter, WEEKDAYS[..])?; case 'b' => - // TODO: Localization b.month = get_default_locale_string_index( &s_iter, MONTHS_SHORT[..])?; case 'B' => - // TODO: Localization b.month = get_default_locale_string_index( &s_iter, MONTHS[..])?; case 'd' => @@ -137,7 +133,6 @@ export fn parse(b: *builder, layout: str, s: str) (void | errors::invalid) = { b.nsec = clamp_int( get_max_n_digits(&s_iter, 3)?, 0, 999); case 'p' => - // TODO: Localization if (b.hour is void) { // We can't change the hour's am/pm because we // have no hour. @@ -220,16 +215,12 @@ export fn format(layout: str, dt: *datetime) (str | errors::invalid | io::error) fn fmt_specifier(r: rune, dt: *datetime) (str | errors::invalid | io::error) = { return switch (r) { case 'a' => - // TODO: Localization yield WEEKDAYS_SHORT[weekday(dt) - 1]; case 'A' => - // TODO: Localization yield WEEKDAYS[weekday(dt) - 1]; case 'b' => - // TODO: Localization yield MONTHS_SHORT[month(dt) - 1]; case 'B' => - // TODO: Localization yield MONTHS[month(dt) - 1]; case 'd' => yield fmt::asprintf("{:02}", day(dt)); @@ -246,7 +237,6 @@ fn fmt_specifier(r: rune, dt: *datetime) (str | errors::invalid | io::error) = { case 'N' => yield fmt::asprintf("{:09}", strconv::itos(nsec(dt))); case 'p' => - // TODO: Localization yield if (hour(dt) < 12) { yield "AM"; } else {