Skip to content

[BACKEND] Switch dayjs usage to utilities to properly use exported dayjs #940

@jji05

Description

@jji05

Is your feature request related to a problem? Please describe.

We have a dayjs.ts file where we set up utc, timezone, and our custom parse formatter. This avoids having to duplicate the same measures and so that we can unionise all the date parsing and add tests to ensure functionality is correct.

Describe the solution you'd like

  • Avoid using dayjs (default export) at all times and use dayjs.ts file.
  • Use date utils whenever possible
  • Test all newly created date utils (if necessary)

BEFORE MERGING

  • Integration test written for services
  • Schemas annotated if adding new models
  • Code generation run (hint: pnpm generate:types)
  • Appropriate mocks created where possible
  • PR Reviewed (For non-trivial changes)
  • Changes tested after rebasing on master or merging in master (hint: git fetch origin master:master, then git rebase master or git merge master)
  • All required PR checks passing

Metadata

Metadata

Assignees

No one assigned

    Labels

    backendrelating to code in the /server directorygood first issueGood for newcomerstech debtTechnical debt needing to be fixed

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions