Add `date-fns` wrapper
As !61 kind of got out of hand another iteration with less changes.
What I did:
- Rename
DateString
toCalendarDateString
to emphasize it only handles calendar dates and ignores hours etc. - Wrap
date-fns
functions in date helper file (which now understand both date and ISO8601 strings) - Reworked one function in
BasicDataViewService
to get rid of some functions inCalendarDateString
- Added documentation
- Added functions in
DateString
calling the helper functions in date and transorming them to days.
Questions:
- How do you feel about the naming in CalendarDateString?
- Do the added docs help?
Discussion:
I feel we should use the Date object where we want to do things with dates - e.g. adding days etc.
We only should use the CalendarDateString
where we explicitely need a string representation of calendar dates.
Edited by Carlos Sanchez