Bug 1873590 Comment 16 Edit History

Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.

(In reply to Jeff Muizelaar [:jrmuizel] from comment #15)
> What does:
> ```
>     let anchor = new Date("2016-04-10 12:00:00");
>     testRTFBestUnit(anchor, "2015-04-15 00:00"...);
> ```
> give?

The above code would yield "a year ago" for being in the same month in the previous year.

This makes sense to me, based on how I understand the algorithm.

I didn't write the algorithm, but my understanding is that, for the time range we are considering, the granularity is counted in months, until it hits the threshold to start counting in years.

---

### With Threshold 11

With the current threshold set to 11, the exact boundaries would work like this:

```javascript
   // Currently middle of April
    anchor = new Date("2016-04-15 12:30:30");

    // April a year ago
    testRTFBestUnit(anchor, "2015-04-01 00:00:00", "last year");
    testRTFBestUnit(anchor, "2015-04-30 23:59:59", "last year");

    // May a year ago
    testRTFBestUnit(anchor, "2015-05-01 00:00:00", "11 months ago");
    testRTFBestUnit(anchor, "2015-05-31 23:59:59", "11 months ago");

    // June a year ago
    testRTFBestUnit(anchor, "2015-06-01 00:00:00", "10 months ago");

    // April a year from now
    testRTFBestUnit(anchor, "2017-04-30 23:59:59", "next year");
    testRTFBestUnit(anchor, "2017-04-01 00:00:00", "next year");

    // March a year from now
    testRTFBestUnit(anchor, "2017-03-31 23:59:59", "in 11 months");
    testRTFBestUnit(anchor, "2017-03-01 00:00:00", "in 11 months");

    // February a year from now
    testRTFBestUnit(anchor, "2017-02-28 23:59:59", "in 10 months");
```

---

### With Threshold 12

If I were to set the threshold to 12, it would work like this:

```javascript

    // Currently middle of April
    anchor = new Date("2016-04-15 12:30:30");

    // March a year ago
    testRTFBestUnit(anchor, "2015-03-01 00:00:00", "last year");
    testRTFBestUnit(anchor, "2015-03-31 23:59:59", "last year");

    // April a year ago
    testRTFBestUnit(anchor, "2015-04-01 00:00:00", "12 months ago");
    testRTFBestUnit(anchor, "2015-04-30 23:59:59", "12 months ago");

    // May a year ago
    testRTFBestUnit(anchor, "2015-05-01 00:00:00", "11 months ago");

    // May a year from now
    testRTFBestUnit(anchor, "2017-05-31 23:59:59", "next year");
    testRTFBestUnit(anchor, "2017-05-01 00:00:00", "next year");

    // April a year from now
    testRTFBestUnit(anchor, "2017-04-30 23:59:59", "in 12 months");
    testRTFBestUnit(anchor, "2017-04-01 00:00:00", "in 12 months");

    // March a year from now
    testRTFBestUnit(anchor, "2017-03-31 23:59:59", "in 11 months");
```

---

### Outlook

I would find it strange to go up fully to 12 months, refraining from counting in years until the 13th month.
The same way that I think it would be strange to go fully up to "60 minutes ago" and not start counting in hours until the 61st minute.

In that way, it makes sense to me that the threshold for minutes is 59, and the threshold for months is now 11.

But I'm certainly open to further consideration here. This is our own internal code and there doesn't appear to be an officially approved spec or standard (yet).

Do you find 12 to be more reasonable?
(In reply to Jeff Muizelaar [:jrmuizel] from comment #15)
> What does:
> ```
>     let anchor = new Date("2016-04-10 12:00:00");
>     testRTFBestUnit(anchor, "2015-04-15 00:00"...);
> ```
> give?

The above code would yield "a year ago" for being in the same month in the previous year.

This makes sense to me, based on how I understand the algorithm.

I didn't write the algorithm, but my understanding is that, for the time range we are considering, the granularity is counted in months, until it hits the threshold to start counting in years.

---

### With Threshold 11

With the current threshold set to 11, the exact boundaries would work like this:

```javascript
   // Currently middle of April
    anchor = new Date("2016-04-15 12:30:30");

    // April of the previous calendar year
    testRTFBestUnit(anchor, "2015-04-01 00:00:00", "last year");
    testRTFBestUnit(anchor, "2015-04-30 23:59:59", "last year");

    // May of the previous calendar year
    testRTFBestUnit(anchor, "2015-05-01 00:00:00", "11 months ago");
    testRTFBestUnit(anchor, "2015-05-31 23:59:59", "11 months ago");

    // June of the previous calendar year
    testRTFBestUnit(anchor, "2015-06-01 00:00:00", "10 months ago");

    // April of the next calendar year
    testRTFBestUnit(anchor, "2017-04-30 23:59:59", "next year");
    testRTFBestUnit(anchor, "2017-04-01 00:00:00", "next year");

    // March of the next calendar year
    testRTFBestUnit(anchor, "2017-03-31 23:59:59", "in 11 months");
    testRTFBestUnit(anchor, "2017-03-01 00:00:00", "in 11 months");

    // February of the next calendar year
    testRTFBestUnit(anchor, "2017-02-28 23:59:59", "in 10 months");
```

---

### With Threshold 12

If I were to set the threshold to 12, it would work like this:

```javascript

    // Currently middle of April
    anchor = new Date("2016-04-15 12:30:30");

    // March of the previous calendar year
    testRTFBestUnit(anchor, "2015-03-01 00:00:00", "last year");
    testRTFBestUnit(anchor, "2015-03-31 23:59:59", "last year");

    // April of the previous calendar year
    testRTFBestUnit(anchor, "2015-04-01 00:00:00", "12 months ago");
    testRTFBestUnit(anchor, "2015-04-30 23:59:59", "12 months ago");

    // May of the previous calendar year
    testRTFBestUnit(anchor, "2015-05-01 00:00:00", "11 months ago");

    // May of the next calendar year
    testRTFBestUnit(anchor, "2017-05-31 23:59:59", "next year");
    testRTFBestUnit(anchor, "2017-05-01 00:00:00", "next year");

    // April of the next calendar year
    testRTFBestUnit(anchor, "2017-04-30 23:59:59", "in 12 months");
    testRTFBestUnit(anchor, "2017-04-01 00:00:00", "in 12 months");

    // March of the next calendar year
    testRTFBestUnit(anchor, "2017-03-31 23:59:59", "in 11 months");
```

---

### Outlook

I would find it strange to go up fully to 12 months, refraining from counting in years until the 13th month.
The same way that I think it would be strange to go fully up to "60 minutes ago" and not start counting in hours until the 61st minute.

In that way, it makes sense to me that the threshold for minutes is 59, and the threshold for months is now 11.

But I'm certainly open to further consideration here. This is our own internal code and there doesn't appear to be an officially approved spec or standard (yet).

Do you find 12 to be more reasonable?
(In reply to Jeff Muizelaar [:jrmuizel] from comment #15)
> What does:
> ```
>     let anchor = new Date("2016-04-10 12:00:00");
>     testRTFBestUnit(anchor, "2015-04-15 00:00"...);
> ```
> give?

The above code would yield "a year ago" for being in the same month in the previous calendar year.

This makes sense to me, based on how I understand the algorithm.

I didn't write the algorithm, but my understanding is that, for the time range we are considering, the granularity is counted in months, until it hits the threshold to start counting in years.

---

### With Threshold 11

With the current threshold set to 11, the exact boundaries would work like this:

```javascript
   // Currently middle of April
    anchor = new Date("2016-04-15 12:30:30");

    // April of the previous calendar year
    testRTFBestUnit(anchor, "2015-04-01 00:00:00", "last year");
    testRTFBestUnit(anchor, "2015-04-30 23:59:59", "last year");

    // May of the previous calendar year
    testRTFBestUnit(anchor, "2015-05-01 00:00:00", "11 months ago");
    testRTFBestUnit(anchor, "2015-05-31 23:59:59", "11 months ago");

    // June of the previous calendar year
    testRTFBestUnit(anchor, "2015-06-01 00:00:00", "10 months ago");

    // April of the next calendar year
    testRTFBestUnit(anchor, "2017-04-30 23:59:59", "next year");
    testRTFBestUnit(anchor, "2017-04-01 00:00:00", "next year");

    // March of the next calendar year
    testRTFBestUnit(anchor, "2017-03-31 23:59:59", "in 11 months");
    testRTFBestUnit(anchor, "2017-03-01 00:00:00", "in 11 months");

    // February of the next calendar year
    testRTFBestUnit(anchor, "2017-02-28 23:59:59", "in 10 months");
```

---

### With Threshold 12

If I were to set the threshold to 12, it would work like this:

```javascript

    // Currently middle of April
    anchor = new Date("2016-04-15 12:30:30");

    // March of the previous calendar year
    testRTFBestUnit(anchor, "2015-03-01 00:00:00", "last year");
    testRTFBestUnit(anchor, "2015-03-31 23:59:59", "last year");

    // April of the previous calendar year
    testRTFBestUnit(anchor, "2015-04-01 00:00:00", "12 months ago");
    testRTFBestUnit(anchor, "2015-04-30 23:59:59", "12 months ago");

    // May of the previous calendar year
    testRTFBestUnit(anchor, "2015-05-01 00:00:00", "11 months ago");

    // May of the next calendar year
    testRTFBestUnit(anchor, "2017-05-31 23:59:59", "next year");
    testRTFBestUnit(anchor, "2017-05-01 00:00:00", "next year");

    // April of the next calendar year
    testRTFBestUnit(anchor, "2017-04-30 23:59:59", "in 12 months");
    testRTFBestUnit(anchor, "2017-04-01 00:00:00", "in 12 months");

    // March of the next calendar year
    testRTFBestUnit(anchor, "2017-03-31 23:59:59", "in 11 months");
```

---

### Outlook

I would find it strange to go up fully to 12 months, refraining from counting in years until the 13th month.
The same way that I think it would be strange to go fully up to "60 minutes ago" and not start counting in hours until the 61st minute.

In that way, it makes sense to me that the threshold for minutes is 59, and the threshold for months is now 11.

But I'm certainly open to further consideration here. This is our own internal code and there doesn't appear to be an officially approved spec or standard (yet).

Do you find 12 to be more reasonable?
(In reply to Jeff Muizelaar [:jrmuizel] from comment #15)
> What does:
> ```
>     let anchor = new Date("2016-04-10 12:00:00");
>     testRTFBestUnit(anchor, "2015-04-15 00:00"...);
> ```
> give?

The above code would yield "a year ago" for being in the same month of the previous calendar year.

This makes sense to me, based on how I understand the algorithm.

I didn't write the algorithm, but my understanding is that, for the time range we are considering, the granularity is counted in months, until it hits the threshold to start counting in years.

---

### With Threshold 11

With the current threshold set to 11, the exact boundaries would work like this:

```javascript
   // Currently middle of April
    anchor = new Date("2016-04-15 12:30:30");

    // April of the previous calendar year
    testRTFBestUnit(anchor, "2015-04-01 00:00:00", "last year");
    testRTFBestUnit(anchor, "2015-04-30 23:59:59", "last year");

    // May of the previous calendar year
    testRTFBestUnit(anchor, "2015-05-01 00:00:00", "11 months ago");
    testRTFBestUnit(anchor, "2015-05-31 23:59:59", "11 months ago");

    // June of the previous calendar year
    testRTFBestUnit(anchor, "2015-06-01 00:00:00", "10 months ago");

    // April of the next calendar year
    testRTFBestUnit(anchor, "2017-04-30 23:59:59", "next year");
    testRTFBestUnit(anchor, "2017-04-01 00:00:00", "next year");

    // March of the next calendar year
    testRTFBestUnit(anchor, "2017-03-31 23:59:59", "in 11 months");
    testRTFBestUnit(anchor, "2017-03-01 00:00:00", "in 11 months");

    // February of the next calendar year
    testRTFBestUnit(anchor, "2017-02-28 23:59:59", "in 10 months");
```

---

### With Threshold 12

If I were to set the threshold to 12, it would work like this:

```javascript

    // Currently middle of April
    anchor = new Date("2016-04-15 12:30:30");

    // March of the previous calendar year
    testRTFBestUnit(anchor, "2015-03-01 00:00:00", "last year");
    testRTFBestUnit(anchor, "2015-03-31 23:59:59", "last year");

    // April of the previous calendar year
    testRTFBestUnit(anchor, "2015-04-01 00:00:00", "12 months ago");
    testRTFBestUnit(anchor, "2015-04-30 23:59:59", "12 months ago");

    // May of the previous calendar year
    testRTFBestUnit(anchor, "2015-05-01 00:00:00", "11 months ago");

    // May of the next calendar year
    testRTFBestUnit(anchor, "2017-05-31 23:59:59", "next year");
    testRTFBestUnit(anchor, "2017-05-01 00:00:00", "next year");

    // April of the next calendar year
    testRTFBestUnit(anchor, "2017-04-30 23:59:59", "in 12 months");
    testRTFBestUnit(anchor, "2017-04-01 00:00:00", "in 12 months");

    // March of the next calendar year
    testRTFBestUnit(anchor, "2017-03-31 23:59:59", "in 11 months");
```

---

### Outlook

I would find it strange to go up fully to 12 months, refraining from counting in years until the 13th month.
The same way that I think it would be strange to go fully up to "60 minutes ago" and not start counting in hours until the 61st minute.

In that way, it makes sense to me that the threshold for minutes is 59, and the threshold for months is now 11.

But I'm certainly open to further consideration here. This is our own internal code and there doesn't appear to be an officially approved spec or standard (yet).

Do you find 12 to be more reasonable?
(In reply to Jeff Muizelaar [:jrmuizel] from comment #15)
> What does:
> ```
>     let anchor = new Date("2016-04-10 12:00:00");
>     testRTFBestUnit(anchor, "2015-04-15 00:00"...);
> ```
> give?

The above code would yield "last year" for being in the same month of the previous calendar year.

This makes sense to me, based on how I understand the algorithm.

I didn't write the algorithm, but my understanding is that, for the time range we are considering, the granularity is counted in months, until it hits the threshold to start counting in years.

---

### With Threshold 11

With the current threshold set to 11, the exact boundaries would work like this:

```javascript
   // Currently middle of April
    anchor = new Date("2016-04-15 12:30:30");

    // April of the previous calendar year
    testRTFBestUnit(anchor, "2015-04-01 00:00:00", "last year");
    testRTFBestUnit(anchor, "2015-04-30 23:59:59", "last year");

    // May of the previous calendar year
    testRTFBestUnit(anchor, "2015-05-01 00:00:00", "11 months ago");
    testRTFBestUnit(anchor, "2015-05-31 23:59:59", "11 months ago");

    // June of the previous calendar year
    testRTFBestUnit(anchor, "2015-06-01 00:00:00", "10 months ago");

    // April of the next calendar year
    testRTFBestUnit(anchor, "2017-04-30 23:59:59", "next year");
    testRTFBestUnit(anchor, "2017-04-01 00:00:00", "next year");

    // March of the next calendar year
    testRTFBestUnit(anchor, "2017-03-31 23:59:59", "in 11 months");
    testRTFBestUnit(anchor, "2017-03-01 00:00:00", "in 11 months");

    // February of the next calendar year
    testRTFBestUnit(anchor, "2017-02-28 23:59:59", "in 10 months");
```

---

### With Threshold 12

If I were to set the threshold to 12, it would work like this:

```javascript

    // Currently middle of April
    anchor = new Date("2016-04-15 12:30:30");

    // March of the previous calendar year
    testRTFBestUnit(anchor, "2015-03-01 00:00:00", "last year");
    testRTFBestUnit(anchor, "2015-03-31 23:59:59", "last year");

    // April of the previous calendar year
    testRTFBestUnit(anchor, "2015-04-01 00:00:00", "12 months ago");
    testRTFBestUnit(anchor, "2015-04-30 23:59:59", "12 months ago");

    // May of the previous calendar year
    testRTFBestUnit(anchor, "2015-05-01 00:00:00", "11 months ago");

    // May of the next calendar year
    testRTFBestUnit(anchor, "2017-05-31 23:59:59", "next year");
    testRTFBestUnit(anchor, "2017-05-01 00:00:00", "next year");

    // April of the next calendar year
    testRTFBestUnit(anchor, "2017-04-30 23:59:59", "in 12 months");
    testRTFBestUnit(anchor, "2017-04-01 00:00:00", "in 12 months");

    // March of the next calendar year
    testRTFBestUnit(anchor, "2017-03-31 23:59:59", "in 11 months");
```

---

### Outlook

I would find it strange to go up fully to 12 months, refraining from counting in years until the 13th month.
The same way that I think it would be strange to go fully up to "60 minutes ago" and not start counting in hours until the 61st minute.

In that way, it makes sense to me that the threshold for minutes is 59, and the threshold for months is now 11.

But I'm certainly open to further consideration here. This is our own internal code and there doesn't appear to be an officially approved spec or standard (yet).

Do you find 12 to be more reasonable?
(In reply to Jeff Muizelaar [:jrmuizel] from comment #15)
> What does:
> ```
>     let anchor = new Date("2016-04-10 12:00:00");
>     testRTFBestUnit(anchor, "2015-04-15 00:00"...);
> ```
> give?

The above code would yield "last year" for being in the same month of the previous calendar year.

This makes sense to me, based on how I understand the algorithm.

I didn't write the algorithm, but my understanding is that, for the time range we are considering, the granularity is counted in months until it hits the threshold to start counting in years.

---

### With Threshold 11

With the current threshold set to 11, the exact boundaries would work like this:

```javascript
   // Currently middle of April
    anchor = new Date("2016-04-15 12:30:30");

    // April of the previous calendar year
    testRTFBestUnit(anchor, "2015-04-01 00:00:00", "last year");
    testRTFBestUnit(anchor, "2015-04-30 23:59:59", "last year");

    // May of the previous calendar year
    testRTFBestUnit(anchor, "2015-05-01 00:00:00", "11 months ago");
    testRTFBestUnit(anchor, "2015-05-31 23:59:59", "11 months ago");

    // June of the previous calendar year
    testRTFBestUnit(anchor, "2015-06-01 00:00:00", "10 months ago");

    // April of the next calendar year
    testRTFBestUnit(anchor, "2017-04-30 23:59:59", "next year");
    testRTFBestUnit(anchor, "2017-04-01 00:00:00", "next year");

    // March of the next calendar year
    testRTFBestUnit(anchor, "2017-03-31 23:59:59", "in 11 months");
    testRTFBestUnit(anchor, "2017-03-01 00:00:00", "in 11 months");

    // February of the next calendar year
    testRTFBestUnit(anchor, "2017-02-28 23:59:59", "in 10 months");
```

---

### With Threshold 12

If I were to set the threshold to 12, it would work like this:

```javascript

    // Currently middle of April
    anchor = new Date("2016-04-15 12:30:30");

    // March of the previous calendar year
    testRTFBestUnit(anchor, "2015-03-01 00:00:00", "last year");
    testRTFBestUnit(anchor, "2015-03-31 23:59:59", "last year");

    // April of the previous calendar year
    testRTFBestUnit(anchor, "2015-04-01 00:00:00", "12 months ago");
    testRTFBestUnit(anchor, "2015-04-30 23:59:59", "12 months ago");

    // May of the previous calendar year
    testRTFBestUnit(anchor, "2015-05-01 00:00:00", "11 months ago");

    // May of the next calendar year
    testRTFBestUnit(anchor, "2017-05-31 23:59:59", "next year");
    testRTFBestUnit(anchor, "2017-05-01 00:00:00", "next year");

    // April of the next calendar year
    testRTFBestUnit(anchor, "2017-04-30 23:59:59", "in 12 months");
    testRTFBestUnit(anchor, "2017-04-01 00:00:00", "in 12 months");

    // March of the next calendar year
    testRTFBestUnit(anchor, "2017-03-31 23:59:59", "in 11 months");
```

---

### Outlook

I would find it strange to go up fully to 12 months, refraining from counting in years until the 13th month.
The same way that I think it would be strange to go fully up to "60 minutes ago" and not start counting in hours until the 61st minute.

In that way, it makes sense to me that the threshold for minutes is 59, and the threshold for months is now 11.

But I'm certainly open to further consideration here. This is our own internal code and there doesn't appear to be an officially approved spec or standard (yet).

Do you find 12 to be more reasonable?
(In reply to Jeff Muizelaar [:jrmuizel] from comment #15)
> What does:
> ```
>     let anchor = new Date("2016-04-10 12:00:00");
>     testRTFBestUnit(anchor, "2015-04-15 00:00"...);
> ```
> give?

The above code would yield "last year" for being in the same month of the previous calendar year.

This makes sense to me, based on how I understand the algorithm.

I didn't write the algorithm, but my understanding is that, for the time range we are considering, the granularity is counted in months until it hits the threshold to start counting in years.

---

### With Threshold 11

With the current threshold set to 11, the exact boundaries would work like this:

```javascript
    // Currently middle of April
    anchor = new Date("2016-04-15 12:30:30");

    // April of the previous calendar year
    testRTFBestUnit(anchor, "2015-04-01 00:00:00", "last year");
    testRTFBestUnit(anchor, "2015-04-30 23:59:59", "last year");

    // May of the previous calendar year
    testRTFBestUnit(anchor, "2015-05-01 00:00:00", "11 months ago");
    testRTFBestUnit(anchor, "2015-05-31 23:59:59", "11 months ago");

    // June of the previous calendar year
    testRTFBestUnit(anchor, "2015-06-01 00:00:00", "10 months ago");

    // April of the next calendar year
    testRTFBestUnit(anchor, "2017-04-30 23:59:59", "next year");
    testRTFBestUnit(anchor, "2017-04-01 00:00:00", "next year");

    // March of the next calendar year
    testRTFBestUnit(anchor, "2017-03-31 23:59:59", "in 11 months");
    testRTFBestUnit(anchor, "2017-03-01 00:00:00", "in 11 months");

    // February of the next calendar year
    testRTFBestUnit(anchor, "2017-02-28 23:59:59", "in 10 months");
```

---

### With Threshold 12

If I were to set the threshold to 12, it would work like this:

```javascript

    // Currently middle of April
    anchor = new Date("2016-04-15 12:30:30");

    // March of the previous calendar year
    testRTFBestUnit(anchor, "2015-03-01 00:00:00", "last year");
    testRTFBestUnit(anchor, "2015-03-31 23:59:59", "last year");

    // April of the previous calendar year
    testRTFBestUnit(anchor, "2015-04-01 00:00:00", "12 months ago");
    testRTFBestUnit(anchor, "2015-04-30 23:59:59", "12 months ago");

    // May of the previous calendar year
    testRTFBestUnit(anchor, "2015-05-01 00:00:00", "11 months ago");

    // May of the next calendar year
    testRTFBestUnit(anchor, "2017-05-31 23:59:59", "next year");
    testRTFBestUnit(anchor, "2017-05-01 00:00:00", "next year");

    // April of the next calendar year
    testRTFBestUnit(anchor, "2017-04-30 23:59:59", "in 12 months");
    testRTFBestUnit(anchor, "2017-04-01 00:00:00", "in 12 months");

    // March of the next calendar year
    testRTFBestUnit(anchor, "2017-03-31 23:59:59", "in 11 months");
```

---

### Outlook

I would find it strange to go up fully to 12 months, refraining from counting in years until the 13th month.
The same way that I think it would be strange to go fully up to "60 minutes ago" and not start counting in hours until the 61st minute.

In that way, it makes sense to me that the threshold for minutes is 59, and the threshold for months is now 11.

But I'm certainly open to further consideration here. This is our own internal code and there doesn't appear to be an officially approved spec or standard (yet).

Do you find 12 to be more reasonable?
(In reply to Jeff Muizelaar [:jrmuizel] from comment #15)
> What does:
> ```
>     let anchor = new Date("2016-04-10 12:00:00");
>     testRTFBestUnit(anchor, "2015-04-15 00:00"...);
> ```
> give?

The above code would yield "last year" for being in the same month of the previous calendar year.

This makes sense to me, based on how I understand the algorithm.

I didn't write the algorithm, but my understanding is that, for the time range we are considering, the granularity is counted in months until it hits the threshold to start counting in years.

---

### With Threshold = 11

With the current threshold set to 11, the exact boundaries would work like this:

```javascript
    // Currently middle of April
    anchor = new Date("2016-04-15 12:30:30");

    // April of the previous calendar year
    testRTFBestUnit(anchor, "2015-04-01 00:00:00", "last year");
    testRTFBestUnit(anchor, "2015-04-30 23:59:59", "last year");

    // May of the previous calendar year
    testRTFBestUnit(anchor, "2015-05-01 00:00:00", "11 months ago");
    testRTFBestUnit(anchor, "2015-05-31 23:59:59", "11 months ago");

    // June of the previous calendar year
    testRTFBestUnit(anchor, "2015-06-01 00:00:00", "10 months ago");

    // April of the next calendar year
    testRTFBestUnit(anchor, "2017-04-30 23:59:59", "next year");
    testRTFBestUnit(anchor, "2017-04-01 00:00:00", "next year");

    // March of the next calendar year
    testRTFBestUnit(anchor, "2017-03-31 23:59:59", "in 11 months");
    testRTFBestUnit(anchor, "2017-03-01 00:00:00", "in 11 months");

    // February of the next calendar year
    testRTFBestUnit(anchor, "2017-02-28 23:59:59", "in 10 months");
```

---

### With Threshold = 12

If I were to set the threshold to 12, it would work like this:

```javascript

    // Currently middle of April
    anchor = new Date("2016-04-15 12:30:30");

    // March of the previous calendar year
    testRTFBestUnit(anchor, "2015-03-01 00:00:00", "last year");
    testRTFBestUnit(anchor, "2015-03-31 23:59:59", "last year");

    // April of the previous calendar year
    testRTFBestUnit(anchor, "2015-04-01 00:00:00", "12 months ago");
    testRTFBestUnit(anchor, "2015-04-30 23:59:59", "12 months ago");

    // May of the previous calendar year
    testRTFBestUnit(anchor, "2015-05-01 00:00:00", "11 months ago");

    // May of the next calendar year
    testRTFBestUnit(anchor, "2017-05-31 23:59:59", "next year");
    testRTFBestUnit(anchor, "2017-05-01 00:00:00", "next year");

    // April of the next calendar year
    testRTFBestUnit(anchor, "2017-04-30 23:59:59", "in 12 months");
    testRTFBestUnit(anchor, "2017-04-01 00:00:00", "in 12 months");

    // March of the next calendar year
    testRTFBestUnit(anchor, "2017-03-31 23:59:59", "in 11 months");
```

---

### Outlook

I would find it strange to go up fully to 12 months, refraining from counting in years until the 13th month.
The same way that I think it would be strange to go fully up to "60 minutes ago" and not start counting in hours until the 61st minute.

In that way, it makes sense to me that the threshold for minutes is 59, and the threshold for months is now 11.

But I'm certainly open to further consideration here. This is our own internal code and there doesn't appear to be an officially approved spec or standard (yet).

Do you find 12 to be more reasonable?

Back to Bug 1873590 Comment 16