add support for durations and timestamps

This commit is contained in:
2025-08-09 20:55:57 +02:00
parent 4973376639
commit 695ad2e41e
2 changed files with 119 additions and 2 deletions

View File

@@ -199,6 +199,18 @@ name + " is " + string(age) + " years old and " + (active ? "active" : "inactive
true}}}</code
>
</div>
<div class="example" onclick="loadExample(this)">
<h4>Time and Date Operations</h4>
<code
data-expression="some_date < now - old ? 'old' : 'recent'"
data-context='{"some_date": "2023-10-01T12:00:00Z", "now": "2023-10-03T12:00:00Z", "old": "24h"}'
>Expression: some_date < now - old ? 'old' : 'recent'</code
>
<code
>Context: {"some_date": "2023-10-01T12:00:00Z", "now":
"2023-10-03T12:00:00Z", "old": "24h"}</code
>
</div>
<script type="module">