Skip to content

Conversation

@billyvg
Copy link
Member

@billyvg billyvg commented Nov 3, 2025

This fixes the following console.warn that we are getting in prod:

 Deprecation warning: value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.
Arguments:

getRelativeTime() is passed 2 moment objects that are formatted into a non-standard date string, that is used to re-create another moment object. We can use the moment arguments directly instead.

This fixes the following console.warn that we are getting in prod:

```
 Deprecation warning: value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.
Arguments:
```

`getRelativeTime()` is passed 2 `moment` objects that are formatted into a non-standard date string, that is used to re-create another `moment` object. We can use the `moment` arguments directly instead.
@github-actions github-actions bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Nov 3, 2025
@billyvg
Copy link
Member Author

billyvg commented Nov 3, 2025

@sentry review

@billyvg billyvg marked this pull request as ready for review November 3, 2025 20:18
@billyvg billyvg requested review from a team and priscilawebdev November 3, 2025 20:18
@billyvg billyvg merged commit ced98a8 into master Nov 4, 2025
48 checks passed
@billyvg billyvg deleted the billy/fix-moment-deprecation-warning-getRelativeTime branch November 4, 2025 18:13
shashjar pushed a commit that referenced this pull request Nov 4, 2025
…)` (#102599)

This fixes the following console.warn that we are getting in prod:

```
 Deprecation warning: value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.
Arguments:
```

`getRelativeTime()` is passed 2 `moment` objects that are formatted into
a non-standard date string, that is used to re-create another `moment`
object. We can use the `moment` arguments directly instead.
priscilawebdev pushed a commit that referenced this pull request Nov 6, 2025
…)` (#102599)

This fixes the following console.warn that we are getting in prod:

```
 Deprecation warning: value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.
Arguments:
```

`getRelativeTime()` is passed 2 `moment` objects that are formatted into
a non-standard date string, that is used to re-create another `moment`
object. We can use the `moment` arguments directly instead.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Frontend Automatically applied to PRs that change frontend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants