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

Subtracting datetime values should produce a duration #6297

Open
Chriscbr opened this issue Apr 22, 2024 · 0 comments
Open

Subtracting datetime values should produce a duration #6297

Chriscbr opened this issue Apr 22, 2024 · 0 comments
Labels
✨ enhancement New feature or request 🙋‍♀️ help wanted Extra attention is needed 📐 language-design Language architecture

Comments

@Chriscbr
Copy link
Contributor

Use Case

let d1 = datetime.fromIso("2024-04-22T18:02:12.123Z");
let d2 = datetime.fromIso("2024-04-22T18:02:15.223Z");

let elapsed = d2 - d1; // 3 seconds and 100 milliseconds

Or explicitly:

let elapsed = d2.subtract(d1);

Proposed Solution

No response

Implementation Notes

No response

Component

Language Design

Community Notes

  • Please vote by adding a 👍 reaction to the issue to help us prioritize.
  • If you are interested to work on this issue, please leave a comment.
  • If this issue is labeled needs-discussion, it means the spec has not been finalized yet. Please reach out on the #dev channel in the Wing Slack.
@Chriscbr Chriscbr added ✨ enhancement New feature or request 📐 language-design Language architecture needs-discussion Further discussion is needed prior to impl labels Apr 22, 2024
@Chriscbr Chriscbr added 🙋‍♀️ help wanted Extra attention is needed and removed needs-discussion Further discussion is needed prior to impl labels Jun 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✨ enhancement New feature or request 🙋‍♀️ help wanted Extra attention is needed 📐 language-design Language architecture
Projects
Status: 🤝 Backlog - handoff to owners
Development

No branches or pull requests

1 participant