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(date): add builtin function time to the date package to convert any timeable into datetime (#4749) #4867

Merged
merged 5 commits into from
Jun 14, 2022

Conversation

Rahul-Vasan
Copy link
Contributor

This feature addition now addresses the need for a function as part of the date package to be able to convert any Timeable into a datetime.

fixes: #4749

Done checklist

  • docs/SPEC.md updated
  • Test cases written

…any timeable into datetime (#4749)

This feature addition now addresses the need for a function as part of the date package to be able to convert any Timeable into a datetime.

fixes: #4749
@Rahul-Vasan Rahul-Vasan requested review from a team as code owners June 10, 2022 17:51
@Rahul-Vasan Rahul-Vasan requested review from skartikey and jstirnaman and removed request for a team June 10, 2022 17:51
Copy link
Contributor

@skartikey skartikey left a comment

Choose a reason for hiding this comment

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

looks good!

testcase time_location {
option location = timezone.location(name: "Asia/Kolkata")

want = array.from(rows: [{_value: 2021-03-01T05:30:00Z}])
Copy link
Contributor

Choose a reason for hiding this comment

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

please rename the field _value to time for readability.

Modified buildinfo.gen.go to resolve the error with make checkgenerate
Added documentation for location parameter in the date.flux file. This fixes make checkdocs
Modified buildinfo.gen.go to resolve the error with make checkgenerate
@jstirnaman jstirnaman requested review from sanderson and removed request for jstirnaman June 14, 2022 13:32
@Rahul-Vasan Rahul-Vasan merged commit 53626ea into master Jun 14, 2022
@skartikey skartikey deleted the rsivakkannan-flux-date-time branch June 14, 2022 16:46
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.

Add a function to create a datetime from a Timeable
3 participants