We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent dbc4c80 commit e432558Copy full SHA for e432558
src/pages/2020-07/relative-time-format/index.md
@@ -124,13 +124,15 @@ const DIVISIONS = [
124
function formatTimeAgo(date) {
125
let duration = (date - new Date()) / 1000
126
127
- for (let i = 0; i <= DIVISIONS.length; i++) {
+ for (let i = 0; i < DIVISIONS.length; i++) {
128
const division = DIVISIONS[i]
129
if (Math.abs(duration) < division.amount) {
130
return formatter.format(Math.round(duration), division.name)
131
}
132
duration /= division.amount
133
134
+
135
+ return false
136
137
```
138
0 commit comments