Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This PR implements improved date parsing.
Original Problems
Invalid Date
in several scenariosSolution
getParsedDate
into a few functions and saves them in a module calleddateParsing
standardizeDateString
- Parses any date string and attempts to get it into a standard formatYYYY-MM-DDTHH:MM:SS
standardizeDateColumn
- AppliesstandardizeDateString
to a full column in a data objectconvertColumnToDate
- AppliesstandardizeDateString
to a full column plusnew Date()
Chart.svelte
tidyJS
library, we're not able to use Date objects in multi-series charts, so using standardized strings is the preferred solution until that issue is resolvedRemaining Issues
This is likely not a good long-term solution - it relies on date strings being in a close enough format to be able to convert them to the standardized
YYYY-MM-DDTHH:MM:SS
format.Potential future improvements:
dbcommons