Skip to content

Commit cdb64d2

Browse files
committed
add duration intermediate type documentation
1 parent 252b95e commit cdb64d2

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/documentation/language/datatypes.malloynb

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,15 @@ Ranges may be used in conjunction with the [apply operator](apply.malloynb) to t
126126

127127
In the future, other ranges may be allowed, such as `string` ranges.
128128

129+
### Duration
130+
131+
Durations can be added to timestamps and dates.
132+
133+
* `@2001-02-03 04:05 + 5 minutes`
134+
* `@2001-02-03 04:05 + myHours hours`
135+
* `@2021-01-01 + 5 weeks`
136+
* `@0000-01-01 + myYear years + (daysIntoMyYear - 1) days`
137+
129138
### Alternations and Partials
130139

131140
_Partials_ represent a "part of" a comparison.

0 commit comments

Comments
 (0)