Skip to content

Commit

Permalink
Add star before Type in table
Browse files Browse the repository at this point in the history
Signed-off-by: Jacob Laursen <[email protected]>
  • Loading branch information
jlaur authored Jan 15, 2025
1 parent 024b6ed commit 6e26bca
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1093,16 +1093,16 @@ console.log(timestamp.getMillisFromNow());
The following rules are used during the conversion:
| Argument Type | Rule | Examples |
|-----------------------------------------------|-----------------------------------------------------------------------------------------|----------------------------------------------|
| `null` or `undefined` | `time.Instant.now()` | `time.toInstant();` |
| `time.Instant` | passed through unmodified | |
| `java.time.Instant` | converted to the `time.Instant` equivalent | |
| `java.time.ZonedDateTime` | converted to the `time.Instant` equivalent | |
| JavaScript native `Date` | converted to the `time.Instant` equivalent | |
| `items.Item` or `org.openhab.core.types.Item` | if the state is supported (see the `Type` rules in this table), the state is converted | `time.toInstant(items.getItem('MyItem'));` |
| `String`, `java.lang.String`, `StringType` | parsed | `time.toInstant('2019-10-12T07:20:50.52Z');` |
| `DateTimeType` | converted to the `time.Instant` equivalent | |
| Argument Type | Rule | Examples |
|-----------------------------------------------|------------------------------------------------------------------------------------------|----------------------------------------------|
| `null` or `undefined` | `time.Instant.now()` | `time.toInstant();` |
| `time.Instant` | passed through unmodified | |
| `java.time.Instant` | converted to the `time.Instant` equivalent | |
| `java.time.ZonedDateTime` | converted to the `time.Instant` equivalent | |
| JavaScript native `Date` | converted to the `time.Instant` equivalent | |
| `items.Item` or `org.openhab.core.types.Item` | if the state is supported (see the `*Type` rules in this table), the state is converted | `time.toInstant(items.getItem('MyItem'));` |
| `String`, `java.lang.String`, `StringType` | parsed | `time.toInstant('2019-10-12T07:20:50.52Z');` |
| `DateTimeType` | converted to the `time.Instant` equivalent | |
When a type or string that cannot be handled is encountered, an error is thrown.
Expand Down

0 comments on commit 6e26bca

Please sign in to comment.