Add helper description

This commit is contained in:
Adria Navarro 2025-03-06 11:17:28 +01:00
parent b075a34ed7
commit 78856ca62b
2 changed files with 16 additions and 0 deletions

View File

@ -44,6 +44,13 @@ const ADDED_HELPERS = {
description:
"Produce a humanized duration left/until given an amount of time and the type of time measurement.",
},
difference: {
args: ["from", "to", "[unitType=ms]"],
example:
'{{ difference "2025-09-30" "2025-06-17" "seconds" }} -> 9072000',
description:
"Gets the difference between two dates, in milliseconds. Pass a third parameter to adjust the unit measurement.",
},
},
}

View File

@ -1222,6 +1222,15 @@
],
"example": "{{duration 8 \"seconds\"}} -> a few seconds",
"description": "<p>Produce a humanized duration left/until given an amount of time and the type of time measurement.</p>\n"
},
"difference": {
"args": [
"from",
"to",
"[unitType=ms]"
],
"example": "{{ difference \"2025-09-30\" \"2025-06-17\" \"seconds\" }} -> 9072000",
"description": "<p>Gets the difference between two dates, in milliseconds. Pass a third parameter to adjust the unit measurement.</p>\n"
}
}
}