Std.Human
10 public declarations
- bytes
Int -> StrA byte count in powers of 1024, such as
1.5 KiBor3 GiB, to one - bytesDecimal
Int -> StrA byte count in powers of 1000, such as
1.5 kBor3 GB, to one decimal - duration
&Std.Time.Duration -> StrA duration written compactly, such as
1h30m,2d4h,45s, or250ms. - explain
&Std.Human.HumanError -> StrA sentence saying what was wrong with the text.
- HumanError
Why text does not name a quantity.
- ordinal
Int -> StrA whole number with its English ordinal suffix:
1st,2nd,3rd, - parseBytes
Str -> Result[Int, Std.Human.HumanError]A byte count read from text such as
512,1.5 KiB,10MB, or2gib. - parseDuration
Str -> Result[Std.Time.Duration, Std.Human.HumanError]A duration read from text such as
90s,1h30m,1.5h,2d 4h, or - plural
Int -> Str -> Str -> StrA count with the noun that agrees with it:
1 file,0 files, - relative
&Std.Time.Instant -> &Std.Time.Instant -> StrHow far one instant is from another, the way a person says it:
just now,
