Fixes {format,formatToParts}/en-us-numeric-auto.js (#2207)

The following lines expect each unit has property "-1" and "1" 
```
  const expected = unit in exceptions
    ? [exceptions[unit]["1"], exceptions[unit]["0"], exceptions[unit]["0"], exceptions[unit]["-1"]]
    : [`in 1 ${unit}`, `in 0 ${unit}s`, `0 ${unit}s ago`, `1 ${unit} ago`];
```
This commit is contained in:
Frank Yung-Fong Tang 2019-06-21 10:44:42 -07:00 committed by Leo Balter
parent 7a1da555a5
commit 9d0072df3d
2 changed files with 12 additions and 2 deletions

View File

@ -51,10 +51,14 @@ const exceptions = {
"1": "tomorrow",
},
"hour": {
'0': 'this hour'
"-1": "1 hour ago",
'0': 'this hour',
"1": "in 1 hour",
},
"minute": {
'0': 'this minute'
"-1": "1 minute ago",
'0': 'this minute',
"1": "in 1 minute",
},
"second": {
"-1": "1 second ago",

View File

@ -46,6 +46,12 @@ function expected(key, unit, default_) {
"0": "today",
"1": "tomorrow",
},
"hour": {
"0": "this hour",
},
"minute": {
"0": "this minute",
},
"second": {
"0": "now",
},