Skip to content

Commit

Permalink
Use a singular time expression one year
Browse files Browse the repository at this point in the history
Close #1973
  • Loading branch information
tilgovi committed Feb 25, 2015
1 parent b3176dd commit 936c1ad
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions h/static/scripts/helpers/time-helpers.coffee
Expand Up @@ -14,6 +14,7 @@ BREAKPOINTS = [
[2 * day, 'yesterday', day ]
[month, '{} days ago', day ]
[year, '{} months ago', month ]
[2 * year, 'one year ago', year ]
[Infinity, '{} years ago', year ]
]

Expand Down
3 changes: 3 additions & 0 deletions tests/js/helpers/time-helpers-test.coffee
Expand Up @@ -17,6 +17,9 @@ FIXTURES_TO_FUZZY_STRING = [
[27 * hour, 'yesterday']
[3 * day + 30 * minute, '3 days ago']
[6 * month + 2 * day, '6 months ago']
[1 * year, 'one year ago']
[1 * year + 2 * month, 'one year ago']
[2 * year, '2 years ago']
[8 * year, '8 years ago']
]

Expand Down

0 comments on commit 936c1ad

Please sign in to comment.