[energidataservice] Update JS example (#16963)
Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>pull/16972/head
parent
3770650bf4
commit
bd2fd5555a
|
@ -739,7 +739,7 @@ logInfo("Spot price two hours from now", price.toString)
|
||||||
|
|
||||||
```javascript
|
```javascript
|
||||||
var hourStart = time.toZDT().plusHours(2).truncatedTo(time.ChronoUnit.HOURS);
|
var hourStart = time.toZDT().plusHours(2).truncatedTo(time.ChronoUnit.HOURS);
|
||||||
var price = items.SpotPrice.history.historicState(hourStart).quantityState;
|
var price = items.SpotPrice.persistence.persistedState(hourStart).quantityState;
|
||||||
console.log("Spot price two hours from now: " + price);
|
console.log("Spot price two hours from now: " + price);
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue