Closed mormubis closed 4 years ago
Which package? intl-utils
intl-utils
Describe the bug selectUnit results in {"value": -1, "unit": "year"} after new years.
selectUnit
{"value": -1, "unit": "year"}
To Reproduce
selectUnit(new Date(2019, 10, 30), new Date(2020, 0, 16)) // {"value": 1, "unit": "year"}
Expected behavior
selectUnit(new Date(2019, 10, 30), new Date(2020, 0, 16)) // {"value": 1, "unit": "month"}
Thanks for the PR but we don't accept PRs to selectUnit since its output is entirely editorial and will break people. See https://github.com/formatjs/formatjs/tree/master/packages/intl-utils#caveats
Which package?
intl-utils
Describe the bug
selectUnit
results in{"value": -1, "unit": "year"}
after new years.To Reproduce
Expected behavior