Skip to content

LIMS-2041: Remove date-fns and date-fns-tz#1020

Merged
ndg63276 merged 1 commit intopre-release/2026-R1.3from
improvement/LIMS-2041/remove-date-fns
Feb 3, 2026
Merged

LIMS-2041: Remove date-fns and date-fns-tz#1020
ndg63276 merged 1 commit intopre-release/2026-R1.3from
improvement/LIMS-2041/remove-date-fns

Conversation

@ndg63276
Copy link
Collaborator

JIRA ticket: LIMS-2041

Summary:

The date-fns-tz library is installed but no longer used, and the date-fns library is only used in a few places to format dates, where native functions can work just as well.

Changes:

  • Remove date-fns and date-fns-tz from package.json
  • Remove the formatDate alias from the webpack config
  • Replace uses of formatDate with native JS functions

To test:

  • Find or create a puck suitable for UDC, eg /containers/cid/349303. Click the Queue button, check the date and time of queueing are displayed in local form, eg 15/01/2026, 16:58:21. (What is saved in the database is current_timestamp, so when you refresh the page you get the PHP version, eg 15-01-2026 16:58)
  • Go to /dewars/registry, and add a new dewar using the form at the bottom, eg DLS-MX-5432. Check it appears in the top half with a Created timestamp in the same form as the other dewars, eg 2026-01-15 17:00:41 (again it is saved in the database as current_timestamp, so it may be slightly different after a refresh)
  • Go to a visits stats page, eg /stats/visit/mx23694-152. Check the date range of the visit is shown at the top right of the page, near the visit breakdown, eg 08/12/2025 - 10/12/2025.
  • Check the same for the beamline stats page eg /runs/overview/bl/i03 has 01/01/2026 - 13/03/2026

@ndg63276 ndg63276 changed the base branch from master to pre-release/2026-R1.3 February 3, 2026 09:46
@ndg63276 ndg63276 merged commit 589f454 into pre-release/2026-R1.3 Feb 3, 2026
2 checks passed
@ndg63276 ndg63276 deleted the improvement/LIMS-2041/remove-date-fns branch February 3, 2026 09:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants