Skip to content

v0.2.0

Choose a tag to compare

@woodie woodie released this 09 Jul 00:57

humane v0.2.0

Humane::TimeFormatter wording change (breaking)

Humane::TimeFormatter#string now renders future times as "in X"
("in 3 minutes", "in 15 hours", "in less than a minute"), matching
Swift's RelativeDateTimeFormatter output exactly, instead of v0.1.0's
symmetric "X from now" wording.

v0.1.0 documented the symmetric wording as "a deliberate departure" from
RelativeDateTimeFormatter. On reflection that departure didn't earn its
keep: this gem exists to match what Swift/Finder-adjacent APIs actually do --
the same bar Humane::SizeFormatter was held to -- and
RelativeDateTimeFormatter's real output is asymmetric. "X ago" past-side
wording is unchanged.

Upgrading

Any code matching on the literal string "X from now" needs to switch to
"in X". scandalous is the one known consumer; it needs a follow-up update
before bumping its humane pin past "~> 0.1".