Implement +/- operators for timestamp.
This commit is contained in:
@@ -18,10 +18,12 @@ Built-in Functions
|
||||
|
||||
The following methods (defined in the [`BasicTimePackage`][packages] but excluded if using a [raw `Engine`]) operate on timestamps:
|
||||
|
||||
| Function | Parameter(s) | Description |
|
||||
| ----------------------------- | ---------------------------------- | -------------------------------------------------------- |
|
||||
| `elapsed` method and property | _none_ | returns the number of seconds since the timestamp |
|
||||
| `-` operator | later timestamp, earlier timestamp | returns the number of seconds between the two timestamps |
|
||||
| Function | Parameter(s) | Description |
|
||||
| ----------------------------- | ------------------------------------------- | -------------------------------------------------------- |
|
||||
| `elapsed` method and property | _none_ | returns the number of seconds since the timestamp |
|
||||
| `-` operator | 1) later timestamp<br/>2) earlier timestamp | returns the number of seconds between the two timestamps |
|
||||
| `+` operator | number of seconds to add | returns a new timestamp |
|
||||
| `-` operator | number of seconds to subtract | returns a new timestamp |
|
||||
|
||||
|
||||
Examples
|
||||
|
Reference in New Issue
Block a user