Replace moment.js with Temporal API (temporal-polyfill)#7488
Draft
Copilot wants to merge 2 commits into
Draft
Conversation
Agent-Logs-Url: https://github.com/StoDevX/AAO-React-Native/sessions/d47599b2-86c2-42dd-988b-3f5961c23ab9 Co-authored-by: hawkrives <464441+hawkrives@users.noreply.github.com>
Agent-Logs-Url: https://github.com/StoDevX/AAO-React-Native/sessions/af3afc69-b131-4efa-98cf-3926472415a0 Co-authored-by: hawkrives <464441+hawkrives@users.noreply.github.com>
Copilot created this pull request from a session on behalf of
hawkrives
April 13, 2026 11:29
View session
Member
|
Our test coverage isn't good enough for me to trust this one. Also not thinking I like the moment compatibility layer. Leaving as draft… |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Removes
momentandmoment-timezonein favor of the TC39 Temporal API viatemporal-polyfill.New utility layer
source/lib/temporal.ts— central module providing moment-compatible helpers overTemporal.ZonedDateTime:format(dt, token)— supports moment-style tokens (h:mma,MMM Do,LT,dddd,Do, etc.)isBefore,isAfter,isSame,isSameOrBefore,isSameOrAfter,isBetweenparseDate,parseDateFormat,parseTimeToday,parseTimeComponentsfromNow,relativeTo(Math.ceil rounding),calendartoDate,fromDate,fromEpochMs,fromTimestampMigrations
modules/: timer (useMomentTimer→useTemporalTimer, deprecated alias kept), event-type, ccc-calendar, event-list, food-menu, datepicker, add-to-device-calendarsource/views/: building-hours, transportation/bus, streaming, menus, sis, student-orgs, stoprintscripts/validate-bus-schedules.mjs: moment replaced with pure-JS time parsingmoment.helper.ts→temporal.helper.tsin building-hours and bus test suitesCleanup
source/init/moment.tsand itsapp.tsximportmoment,moment-timezoneremoved from dependenciesCLAUDE.mdupdated to reference TemporalTests
All 200 tests pass (36 suites), TypeScript clean.