add duration intermediate type documentation#91
Open
vitiral wants to merge 1 commit intomalloydata:mainfrom
Open
add duration intermediate type documentation#91vitiral wants to merge 1 commit intomalloydata:mainfrom
vitiral wants to merge 1 commit intomalloydata:mainfrom
Conversation
mtoy-googly-moogly
requested changes
Aug 31, 2023
Contributor
mtoy-googly-moogly
left a comment
There was a problem hiding this comment.
If you'd like to finish this up, here's the remaining text you need to work into your change.
If you'd just like to contribute this and move on, let me know, I appreciate it either way.
Comment on lines
+129
to
+137
| ### Duration | ||
|
|
||
| Durations can be added to timestamps and dates. | ||
|
|
||
| * `@2001-02-03 04:05 + 5 minutes` | ||
| * `@2001-02-03 04:05 + myHours hours` | ||
| * `@2021-01-01 + 5 weeks` | ||
| * `@0000-01-01 + myYear years + (daysIntoMyYear - 1) days` | ||
|
|
Contributor
There was a problem hiding this comment.
Thanks for starting this.
A few notes.
- Durations can be added or subtracted.
- The legal units for durations are, i think, microseconds, milliseconds, seconds, minutes, hours, days, weeks.
- SQL durations, if the database has them, are not imported and useful as Malloy durations.
Author
There was a problem hiding this comment.
Done. I added years to your list of legal units 😄
Author
There was a problem hiding this comment.
I also modified point3 for clarity.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Per: https://malloy-community.slack.com/archives/C025JAK8G0N/p1691827240356029
The duration type should be properly documented.
@mtoy-googly-moogly