Add options args to date

This commit is contained in:
Adria Navarro 2025-02-27 13:02:26 +01:00
parent 0a17ba7767
commit 470cc6bb1f
2 changed files with 5 additions and 4 deletions
packages/string-templates

View File

@ -34,8 +34,8 @@ const outputJSON: Manifest = {}
const ADDED_HELPERS = { const ADDED_HELPERS = {
date: { date: {
date: { date: {
args: ["datetime", "format"], args: ["datetime", "format", "options"],
numArgs: 2, numArgs: 3,
example: '{{date now "DD-MM-YYYY" "America/New_York" }} -> 21-01-2021', example: '{{date now "DD-MM-YYYY" "America/New_York" }} -> 21-01-2021',
description: description:
"Format a date using moment.js date formatting - the timezone is optional and uses the tz database.", "Format a date using moment.js date formatting - the timezone is optional and uses the tz database.",

View File

@ -1345,9 +1345,10 @@
"date": { "date": {
"args": [ "args": [
"datetime", "datetime",
"format" "format",
"options"
], ],
"numArgs": 2, "numArgs": 3,
"example": "{{date now \"DD-MM-YYYY\" \"America/New_York\" }} -> 21-01-2021", "example": "{{date now \"DD-MM-YYYY\" \"America/New_York\" }} -> 21-01-2021",
"description": "<p>Format a date using moment.js date formatting - the timezone is optional and uses the tz database.</p>\n" "description": "<p>Format a date using moment.js date formatting - the timezone is optional and uses the tz database.</p>\n"
}, },