The PR shows a timestamp with new Date(value).toLocaleString() or a handmade 'YYYY-MM-DD' slice. The repo already has a date formatter (formatDate, formatRelative, or an Intl wrapper) that the rest of the UI uses for locale, time zone, and relative phrases. The new string looks close in your browser and wrong in the next locale, or it disagrees with the same timestamp elsewhere on the page.

I've started treating a one-off date format in a component as a consistency bug, not as a quick display. The existing formatter is there so list, detail, and emails do not invent three styles.

Why the one-off format shows up

JavaScript examples start with toLocaleString or a short slice. The model can write that without finding formatDate. Your helper may live under lib/date or next to i18n, which is easy to miss if the prompt only says "show the updated time."

A second date library is a different problem. This one is narrower: the library (or Intl) is already wrapped, and the component bypasses the wrapper.

A simple date-format policy

  • New date and time display uses the existing formatter
  • Do not call toLocaleString or slice ISO strings in a feature component
  • A new format (date only, relative, with time zone) is a formatter change, with an example
  • Keep parsing and display in the helper, not ad-hoc in the JSX

If the value is not a date, fix the data. Do not hide a stringly timestamp with a one-off parse in the view.

What to put in the prompt

Use the existing date formatter for this timestamp. Do not use toLocaleString or handmade ISO slices in this component. If you need a format we do not have, add it to the formatter; do not invent it here. 

Paste the formatter's exports or one existing usage. In review, search the diff for toLocaleString, toLocaleDateString, Date(, and string slices on ISO timestamps.

Reject / send back

Reject

  • A component that formats a date with toLocaleString or a handmade slice
  • A second format helper added next to the existing one
  • A view that parses and formats a timestamp inline
  • Mixed formats for the same kind of timestamp on one screen

Accept

  • A timestamp rendered with the existing formatter
  • A formatter PR that adds a documented format
  • A bugfix that replaces a one-off format with the helper