Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trailing integer in text data interpreted as Date in DatasetTable #17

Open
cy-moi opened this issue Feb 17, 2023 · 0 comments
Open

Trailing integer in text data interpreted as Date in DatasetTable #17

cy-moi opened this issue Feb 17, 2023 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@cy-moi
Copy link
Contributor

cy-moi commented Feb 17, 2023

Describe the bug
I was trying to display some data with datasetTable and found that some of the texts were interpreted as Date.
For example, 1 is interpreted as a Date and reformat to about 22 years ago

To Reproduce
Steps to reproduce the behavior:

  1. Follow examples to initialize dataset and datasetTable variables
  2. Have some entries with integers or entries ending with an integer, ie. 1, sample 1, etc.
  3. use dataset.create() to append the data as in object format, ie.{entry: '1'}
  4. add the table on dashboards with use()
  5. See 1 -> about 22 years ago

A simpler way to reproduce the behavior:

  1. open Iris-SKlearn example
  2. change Virginica to Virginica 1 or Setosa' to Setosa 1`
  3. load the data in the demo
  4. see Virginica 1 become about 22 years ago

Expected behavior
It should display the original data as in the storage.

Actual behavior
Integers in texts interpreted as Date
Format Error in Console
Does not match to data in Storage

Additional Information
log in the console:

Date Parsing Error text data sample1 RangeError: Invalid time value
    at formatDistance3 (index.js:110:11)
    at formatDistanceToNow (index.js:92:10)
    at Array.formatDate (TableContentCell.svelte:18:16)
    at Object.p (TableContentCell.svelte:45:14)
    at Object.p (TableContentCell.svelte:57:5)
    at update (index.mjs:1191:36)
    at flush (index.mjs:1158:13)

Screenshots
table appearances - actual data in localstorage
after changing Setosa to Setosa 1 in Iris csv

@JulesFrancoise JulesFrancoise self-assigned this Mar 7, 2023
@JulesFrancoise JulesFrancoise added the bug Something isn't working label Mar 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants