Skip to content

Commit

Permalink
Update inline comment rules
Browse files Browse the repository at this point in the history
  • Loading branch information
rxaviers committed May 1, 2016
1 parent badf1cb commit 30868e4
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/relative-time.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
/**
* Rule: (equivalent for future)
*
* [0s, 1min[ - just now
* 0s - now
* ]0s, 1min[ - x seconds ago
* [1min, 2min[ - 1 minute ago
* [xmin, x+1min[ - x minutes ago
* [1h, 2h[ - 1 hour ago
Expand Down Expand Up @@ -45,7 +46,7 @@ export default class RelativeTime {
var absDiff = Math.abs(diff);
var round = Math[diff > 0 ? "floor" : "ceil"];

// just now.
// now or x seconds ago.
if (absDiff < minute) {
return formatters.second(round(diff / second));
}
Expand Down Expand Up @@ -91,7 +92,7 @@ export default class RelativeTime {
}

// TODO: Remove redundancy. The only reason this code is that ugly is to get
// supported by globalize-compiler (it will read the static formatters).
// supported by globalize-compiler (which reads the static formatters).
RelativeTime.initializeFormatters = function(globalize) {
if (globalize) {
return {
Expand Down

0 comments on commit 30868e4

Please sign in to comment.