Jacob Ras
01/10/2024, 3:17 PMFrank Bouwens
01/10/2024, 3:31 PMJacob Ras
01/10/2024, 3:32 PMFrank Bouwens
01/10/2024, 3:33 PMJacob Ras
01/10/2024, 3:35 PMFrank Bouwens
01/10/2024, 3:37 PMJacob Ras
01/10/2024, 3:37 PMJacob Ras
01/10/2024, 3:44 PM8.days
is a week ago but for 11.days
I already switch to "2 weeks" because of rounding. In minutes that doesn't happen: 59.minutes
results in "59 minutes", not yet "1 hour". That's inconsistent.
I saw a similar library in another language switch on 75%: so 44.minutes
= "44 minutes" but then 45.minutes
becomes "1 hour".Frank Bouwens
01/10/2024, 3:45 PMJacob Ras
01/10/2024, 3:46 PMprecision
🤓 https://github.com/Humanizr/Humanizer#humanize-datetimeFrank Bouwens
01/10/2024, 3:47 PMdave08
01/10/2024, 4:12 PMJacob Ras
01/10/2024, 4:23 PMKonstantin Tskhovrebov
01/10/2024, 4:24 PMJacob Ras
01/10/2024, 4:25 PMKonstantin Tskhovrebov
01/10/2024, 4:25 PMKonstantin Tskhovrebov
01/10/2024, 4:26 PMKonstantin Tskhovrebov
01/10/2024, 4:28 PMJacob Ras
01/10/2024, 4:33 PMKonstantin Tskhovrebov
01/10/2024, 4:35 PMJacob Ras
01/10/2024, 4:37 PMKonstantin Tskhovrebov
01/10/2024, 4:38 PMJacob Ras
01/10/2024, 4:39 PMKlitos Kyriacou
01/10/2024, 5:00 PMHumanReadable.fileSize(20_411_000_000, decimals = 2) // "20.44 GB"
Shouldn't that be "19.01 GB"?
Also, I think it would be nice to have an option for binary or decimal base (if set to decimal, then use "GiB" for gibibytes and "GB" for decimal gigabytes; if set to binary, use "GB" for gibibytes and no support for decimal gigabytes)Jacob Ras
01/10/2024, 5:16 PMMiroslav Sobotka
01/11/2024, 10:50 AMdave08
01/11/2024, 10:55 AMKlitos Kyriacou
01/11/2024, 11:36 AMOption = binary -> "GB" means gibibyte
Option = decimal -> "GB" means gigabyte and "GiB" means gibibyte
So, the option controls whether to use base 1024 (binary) or 1000 (decimal) for the meaning of "GB".Klitos Kyriacou
01/11/2024, 11:37 AMKonstantin Tskhovrebov
01/11/2024, 1:05 PMKonstantin Tskhovrebov
01/11/2024, 1:06 PMFrank Bouwens
01/11/2024, 1:07 PMFrank Bouwens
01/11/2024, 1:07 PMJacob Ras
01/11/2024, 1:26 PM