Skip to content

Commit 238db00

Browse files
authored
Merge pull request #861 from yavisht/feature/add-date-time-tool-for-marketplace
feat: dateTime marketplace tool
2 parents 691ad48 + d03108d commit 238db00

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"name": "todays_date_time",
3+
"description": "Useful to get todays day, date and time.",
4+
"color": "linear-gradient(rgb(117,118,129), rgb(230,10,250))",
5+
"iconSrc": "https://raw.githubusercontent.com/gilbarbara/logos/main/logos/javascript.svg",
6+
"schema": "[]",
7+
"func": "const timeZone = 'Australia/Sydney';\nconst options = {\n timeZone: timeZone,\n year: 'numeric',\n month: 'long',\n day: 'numeric',\n weekday: 'long',\n hour: '2-digit',\n minute: '2-digit',\n second: '2-digit',\n hour12: true\n};\nconst today = new Date();\nconst formattedDate = today.toLocaleString('en-GB', options);\nconst result = {\n \"formattedDate\": formattedDate,\n \"timezone\": timeZone\n};\nreturn JSON.stringify(result);\n"
8+
}

0 commit comments

Comments
 (0)