Skip to content

feat: migrate from luxon to dayjs#62

Open
Copilot wants to merge 1 commit into
developfrom
copilot/migrate-from-luxon-to-dayjs
Open

feat: migrate from luxon to dayjs#62
Copilot wants to merge 1 commit into
developfrom
copilot/migrate-from-luxon-to-dayjs

Conversation

Copy link
Copy Markdown

Copilot AI commented May 8, 2026

Replaces the luxon date/time library with dayjs across rita-core.

Changes

  • Atom.ts: replaced DateTime.fromISO(val).toJSDate() with dayjs(val).toDate()
  • Calculation.ts: replaced DateTime.fromJSDate(item).toISO() with dayjs(item).toISOString()
  • DateCalculation.ts: replaced all DateTime/Duration usage with dayjs and the dayjs/plugin/duration plugin:
    • Duration.fromMillis(ms)dayjs.duration(ms)
    • Duration.fromObject({[unit]: value})dayjs.duration({[unit]: value})
    • d.toMillis()d.asMilliseconds()
    • DateTime.fromJSDate(date).plus(dur).toJSDate()dayjs(date).add(dur).toDate()
    • DateTime.fromJSDate(date).minus(dur).toJSDate()dayjs(date).subtract(dur).toDate()
    • res.as(unit) → unchanged (dayjs Duration has the same .as() API)
  • Assertions.ts: replaced Duration.isDuration(value) with dayjs.isDuration(value)
  • Test files (macros.ts, schema.test.ts, calculation.test.ts): replaced DateTime usage with dayjs
  • package.json: removed luxon and @types/luxon, added dayjs ^1.11.20

Testing

All 98 existing tests pass with no modifications needed.

Agent-Logs-Url: https://github.com/educorvi/rita/sessions/73f2717f-4331-4b92-97db-f75254d2db94

Co-authored-by: neferin12 <33598039+neferin12@users.noreply.github.com>
Copilot AI requested a review from neferin12 May 8, 2026 14:53
@neferin12 neferin12 marked this pull request as ready for review May 8, 2026 14:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants