teammates icon indicating copy to clipboard operation
teammates copied to clipboard

Refactor date and time methods into utility file

Open FergusMok opened this issue 3 years ago • 3 comments

The frontend uses DateFormat/TimeFormat, Moment and epoch timestamps, and even Date. However, functions to parse and manipulate between the data types are scattered in different files and folders.

Examples that can benefit from refactoring:

  • Put methods to convert between the types into one single utility file E.g getDateTimeAtTimezone (conversion from timestamp to date/time format) implemented only in Session Edit page
  • Time-related magic numbers being declared locally repeatedly, or even just used plainly as numbers throughout the repo

FergusMok avatar Mar 09 '22 14:03 FergusMok

Hello, @FergusMok is it okay if I try working on this?

tau-bar avatar Aug 19 '22 11:08 tau-bar

@tau-bar Yes please go ahead :)

FergusMok avatar Aug 20 '22 15:08 FergusMok

@FergusMok Could you help me in reviewing the PR?

tau-bar avatar Aug 23 '22 06:08 tau-bar