[COMPASS-6637] Looser date type detection Created: 22/Mar/23 Updated: 24/Apr/23 Resolved: 11/Apr/23 |
|
| Status: | Closed |
| Project: | Compass |
| Component/s: | Import/Export |
| Affects Version/s: | None |
| Fix Version/s: | No version |
| Type: | Task | Priority: | Major - P3 |
| Reporter: | Le Roux Bodenstein | Assignee: | Le Roux Bodenstein |
| Resolution: | Done | Votes: | 0 |
| Labels: | milestone-5 | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Epic Link: | COMPASS-5576 |
| Story Points: | 2 |
| Documentation Changes: | Not Needed |
| Description |
|
The ISO date regex copied from papaparse is a bit strict. For example the airbnb sample test data we often use has dates like: 2015-01-04 00:00:00 I've also seen: 2015-01-04 We can just make the relevant parts optional as both of those can safely be passed to new Date(). There are unit tests for this detection and we can just copy/paste and make some more. There's also test/csv/types/date.csv where we can add some examples. Some expected results may or may not have to be updated to match. You can just focus the relevant files (.only on a describe somewhere) and run: DEBUG=import npx mocha --bail src/import for fast test turnaround. |
| Comments |
| Comment by Githook User [ 24/Apr/23 ] |
|
Author: {'name': 'Le Roux Bodenstein', 'email': 'lerouxb@gmail.com', 'username': 'lerouxb'}Message: feat(export): exportCSV()
Co-authored-by: Rhys <Anemy@users.noreply.github.com>
Co-authored-by: Rhys <Anemy@users.noreply.github.com>
Co-authored-by: Rhys <Anemy@users.noreply.github.com>
--------- Co-authored-by: Rhys <Anemy@users.noreply.github.com> |
| Comment by Githook User [ 21/Apr/23 ] |
|
Author: {'name': 'Le Roux Bodenstein', 'email': 'lerouxb@gmail.com', 'username': 'lerouxb'}Message: feat(export): exportCSV()
Co-authored-by: Rhys <Anemy@users.noreply.github.com>
Co-authored-by: Rhys <Anemy@users.noreply.github.com>
Co-authored-by: Rhys <Anemy@users.noreply.github.com>
--------- Co-authored-by: Rhys <Anemy@users.noreply.github.com> |
| Comment by Githook User [ 12/Apr/23 ] |
|
Author: {'name': 'Le Roux Bodenstein', 'email': 'lerouxb@gmail.com', 'username': 'lerouxb'}Message: feat(export): exportCSV()
Co-authored-by: Rhys <Anemy@users.noreply.github.com>
Co-authored-by: Rhys <Anemy@users.noreply.github.com>
Co-authored-by: Rhys <Anemy@users.noreply.github.com>
--------- Co-authored-by: Rhys <Anemy@users.noreply.github.com> |
| Comment by Githook User [ 11/Apr/23 ] |
|
Author: {'name': 'Le Roux Bodenstein', 'email': 'lerouxb@gmail.com', 'username': 'lerouxb'}Message: feat(export): exportCSV()
Co-authored-by: Rhys <Anemy@users.noreply.github.com>
Co-authored-by: Rhys <Anemy@users.noreply.github.com>
Co-authored-by: Rhys <Anemy@users.noreply.github.com>
--------- Co-authored-by: Rhys <Anemy@users.noreply.github.com> |
| Comment by Githook User [ 11/Apr/23 ] |
|
Author: {'name': 'Le Roux Bodenstein', 'email': 'lerouxb@gmail.com', 'username': 'lerouxb'}Message: feat(export): exportCSV()
Co-authored-by: Rhys <Anemy@users.noreply.github.com>
Co-authored-by: Rhys <Anemy@users.noreply.github.com>
Co-authored-by: Rhys <Anemy@users.noreply.github.com>
--------- Co-authored-by: Rhys <Anemy@users.noreply.github.com> |
| Comment by Githook User [ 11/Apr/23 ] |
|
Author: {'name': 'Le Roux Bodenstein', 'email': 'lerouxb@gmail.com', 'username': 'lerouxb'}Message: feat(export): exportCSV()
Co-authored-by: Rhys <Anemy@users.noreply.github.com>
Co-authored-by: Rhys <Anemy@users.noreply.github.com>
Co-authored-by: Rhys <Anemy@users.noreply.github.com>
--------- Co-authored-by: Rhys <Anemy@users.noreply.github.com> |