[energidataservice] Update JS example (#16963)

Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
Signed-off-by: Ciprian Pascu <contact@ciprianpascu.ro>
This commit is contained in:
jimtng 2024-06-30 00:14:26 +10:00 committed by Ciprian Pascu
parent cd01019d8c
commit f61d4ed3bf

View File

@ -739,7 +739,7 @@ logInfo("Spot price two hours from now", price.toString)
```javascript
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);
```