Resolve "Replace custom date functions with library `date-fns`"
As !61 kind of got out of hand another iteration with less changes.
What I did:
- Use
date-fns
functions inDateString
- Reworked one function in
BasicDataViewService
to get rid of some functions inCalendarDateString
- Added documentation
Questions:
- How do you feel about renaming
DateString
toCalendarDateString
to emphasize it handles only calendar dates? - Do the added docs help?
Future:
- Should we create an issue for a Date module to encapsulate
date-fns
? I am devided on this. It feels like it might be a good time investment if we want to change the library, but now it would mostly be functions calling the date-fns function. - I feel like we should only use calendar date strings (YYYY-MM-DD) where necessary and use Dates where we want to calculate stuff. Imho it is too much to always convert string to date and back again. (But keeping it string is no good option imho neither)
Edited by Carlos Sanchez