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

feat(ava/data): add function to parse ISO date string to js Date type #770

Merged
merged 3 commits into from
Mar 11, 2024

Conversation

chenluli
Copy link
Member

PR includes

  • add function tool
  • add / modify test cases

PR #749 中提到需要在绘制折线图等横轴为时间的图表时,将识别为日期字段的数据转换为标准日期格式传入 G2 spec 中,但new Date() 的生效范围和 ava/data 中识别日期的方式不一致, 因此提供一个函数使用和识别日期格式相同的正则来解析日期字符串。

#749 try to parse date string to js Date by new Date() when draw line chart, but some date string like '1996-W08' cannot be parsed by new Date(). So data provide a tool function to parse ISO 8601 date string to Date, using the same regular expressions that has been used for filed type recommendation.

@chenluli chenluli requested review from LAI-X and BBSQQ February 21, 2024 03:52
Copy link
Member

@BBSQQ BBSQQ left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LG

@LAI-X LAI-X merged commit 2a927a4 into master Mar 11, 2024
@LAI-X LAI-X deleted the dev-iso-date-transform branch March 11, 2024 07:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants