Closed maennchen closed 3 years ago
I'm am really sorry to see that, even more so that the resolution doesn't immediately jump out. I'm seeing:
iex> now = DateTime.utc_now
~U[2021-09-22 09:36:50.220795Z]
iex(2)> then = DateTime.utc_now
~U[2021-09-22 09:37:02.547976Z]
iex> Cldr.DateTime.Relative.to_string then, relative_to: now
{:ok, "in 12 seconds"}
iex> Cldr.DateTime.Relative.to_string then, relative_to: now, format: :short
{:ok, "in 12 sec."}
Meaning I'll have to dig deeper - starting now.
@kipcole9 I'll provide some more details then like the specific dates.
This is our Cldr Module: https://github.com/jshmrtn/hygeia/blob/master/apps/hygeia_cldr/lib/hygeia_cldr.ex
No need to be sorry, thanks as always for having a look :)
OK, got it. Just adding tests and will publish again.
Published ex_cldr_dates_times version 2.9.4 with the following changelog entry:
:relative_to
parameter and no :unit
parameter is specified. Thanks to @maennchen for the report. Closes #26.@kipcole9 I'll test in a minute, thank you so much for fixing this that fast :heart:
There seems to be a new bug introduced in c5f6d309ef271a2c4b7e6c003735f7204a3bd29c
When running the following code, an error is produced:
Both
@time
and@now
are normal DateTimes.https://github.com/jshmrtn/hygeia/blob/4d4e23b24ddb0c19daee3cf13529033de7856177/apps/hygeia_web/lib/hygeia_web/live/relative_time.ex#L28