Skip to content

WS-NA: Temporal Migration (PR 2: Adds Internal Adapter)#14101

Draft
Isabella-Mitchell wants to merge 6 commits into
WS-NA-temporal-migrate-prep-testsfrom
WS-NA-temporal-migrate-add-internal-adapter
Draft

WS-NA: Temporal Migration (PR 2: Adds Internal Adapter)#14101
Isabella-Mitchell wants to merge 6 commits into
WS-NA-temporal-migrate-prep-testsfrom
WS-NA-temporal-migrate-add-internal-adapter

Conversation

@Isabella-Mitchell

@Isabella-Mitchell Isabella-Mitchell commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

Resolves JIRA: WS-NA - 10% time. See plan

Summary

Converts file to TS

Wraps all Moment.js calls in psammead-timestamp-container behind an internal date adapter object, so future PRs can swap Moment for Temporal one method at a time without touching the exported functions. Also installs the Temporal polyfill so it's available at runtime.

The exported functions (formatDuration, formatUnixTimestamp, localisedMoment) are unchanged. I've raised this as it's own PR to verify no regressions before swapping in Temporal."

Code changes

  • List key code changes that have been made.

Testing

  1. List the steps required to test this PR.

Useful Links

@Isabella-Mitchell Isabella-Mitchell changed the title WS-NA-temporal-migrate: Add dep to simorgh package.json. Adds interna… WS-NA: Temporal Migration (PR 2: Adds Internal Adapter) Jul 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant