-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Construct datetime from record #12289
Copy link
Copy link
Closed
Labels
A:datetime-handlingSemantics and implementation of the datetime/duration types and commandsSemantics and implementation of the datetime/duration types and commandscategory:enhancementNew feature or requestNew feature or requeststatus:needs-triageAn issue that hasn't had any proper lookAn issue that hasn't had any proper look
Description
Related problem
I am trying to construct a datetime in a structured way and am hitting a wall.
Describe the solution you'd like
Something like
{ year: 1946 month: 12 day: 7 } | into datetimeSome components would be optional and default to zero (seconds, milliseconds)
Describe alternatives you've considered
Parsing the date from a string would solve my problem, but constructing a string when you already have the components in a structured form seems unnecessary.
I imagine the string parsing logic already does something similar after the initial tokenization stage, although I haven't looked at the source code.
I might be able to make this contribution myself if people are on board with the idea.
Additional context and details
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
A:datetime-handlingSemantics and implementation of the datetime/duration types and commandsSemantics and implementation of the datetime/duration types and commandscategory:enhancementNew feature or requestNew feature or requeststatus:needs-triageAn issue that hasn't had any proper lookAn issue that hasn't had any proper look