You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
withr::with_locale(c("LC_TIME" = "de_DE.UTF-8"), blastula::add_readable_time())
[1] "Mittwoch, Juli 12, 2023 at 5:26 (CEST)"
In this case the result should have been : [1] "Mittwoch, Juli 12, 2023 at 17:26 (CEST)"
which could have been achieved by using %H in the format call: gsub(" |^0", "", format(time, "%H:%M")),
But because of the next line this does not work very well.
You will get an extra space, because 24 hour based formats don't have the option %p.
As you can see, there are two spaces between 5:26 and (CEST) (v0.3.2 currently installed
and in v0.3.3 it would be 05:26 (CEST))
> withr::with_locale(c("LC_TIME" = "en_US.UTF-8"), blastula::add_readable_time())
[1] "Wednesday, July 12, 2023 at 5:26 PM (CEST)"
In the second case PM is added, because of the locale, which is correct.
The text was updated successfully, but these errors were encountered:
Because of this formatting option time will always be reduced to the 12 hour format.
The typical 24 hour format can't be accomplished with this.
blastula/R/add_readable_time.R
Line 69 in cdf155b
Even changing locale does not work:
In this case the result should have been :
[1] "Mittwoch, Juli 12, 2023 at 17:26 (CEST)"
which could have been achieved by using
%H
in the format call:gsub(" |^0", "", format(time, "%H:%M")),
But because of the next line this does not work very well.
blastula/R/add_readable_time.R
Line 70 in cdf155b
You will get an extra space, because 24 hour based formats don't have the option
%p
.As you can see, there are two spaces between
5:26
and(CEST)
(v0.3.2 currently installedand in v0.3.3 it would be
05:26 (CEST)
)In the second case
PM
is added, because of the locale, which is correct.The text was updated successfully, but these errors were encountered: