From 8b950048ecc29c16112c81cab32c9a0d664d9b99 Mon Sep 17 00:00:00 2001 From: Jurfix Date: Thu, 4 Jul 2024 19:34:56 +0000 Subject: [PATCH] Automated Extension submission for issue #1180 --- extensions/community/TimestampToDate.json | 100 ++++++++++++++++++++++ 1 file changed, 100 insertions(+) create mode 100644 extensions/community/TimestampToDate.json diff --git a/extensions/community/TimestampToDate.json b/extensions/community/TimestampToDate.json new file mode 100644 index 000000000..6be03982f --- /dev/null +++ b/extensions/community/TimestampToDate.json @@ -0,0 +1,100 @@ +{ + "author": "", + "category": "General", + "extensionNamespace": "", + "fullName": "Timestamp to date", + "helpPath": "", + "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLXRpbWVsaW5lLWNsb2NrLW91dGxpbmUiIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNNCAyVjhIMlYySDRNMiAyMlYxNkg0VjIySDJNNSAxMkM1IDEzLjExIDQuMTEgMTQgMyAxNEMxLjkgMTQgMSAxMy4xMSAxIDEyQzEgMTAuOSAxLjkgMTAgMyAxMEM0LjExIDEwIDUgMTAuOSA1IDEyTTE2IDRDMjAuNDIgNCAyNCA3LjU4IDI0IDEyQzI0IDE2LjQyIDIwLjQyIDIwIDE2IDIwQzEyLjQgMjAgOS4zNiAxNy42MiA4LjM1IDE0LjM1TDYgMTJMOC4zNSA5LjY1QzkuMzYgNi4zOCAxMi40IDQgMTYgNE0xNiA2QzEyLjY5IDYgMTAgOC42OSAxMCAxMkMxMCAxNS4zMSAxMi42OSAxOCAxNiAxOEMxOS4zMSAxOCAyMiAxNS4zMSAyMiAxMkMyMiA4LjY5IDE5LjMxIDYgMTYgNk0xNSAxM1Y4SDE2LjVWMTIuMkwxOS41IDE0TDE4LjY4IDE1LjI2TDE1IDEzWiIgLz48L3N2Zz4=", + "name": "TimestampToDate", + "previewIconUrl": "https://asset-resources.gdevelop.io/public-resources/Icons/35f30e45e8a5841242ec600ac4c6967567a01fac103cee1989a01985eb928272_timeline-clock-outline.svg", + "shortDescription": "Convert timestamp from milliseconds to local date or local time.", + "version": "1.0.0", + "description": "Convert timestamp from milliseconds to local date in format XX.XX.XXXX or local time in format XX:XX:XX.", + "tags": [ + "timestamp", + "time", + "date", + "milliseconds", + "convert" + ], + "authorIds": [ + "dt0tRnf2kHWJnjkrpnzTzNj9Yc63" + ], + "dependencies": [], + "eventsFunctions": [ + { + "description": "Timestamp in ms to date.", + "fullName": "Timestamp to date", + "functionType": "StringExpression", + "name": "TimestampToDate", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [] + }, + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const timestamp = eventsFunctionContext.getArgument(\"Timestamp\");", + "const date = new Date(timestamp);", + "eventsFunctionContext.returnValue = date.toLocaleDateString();" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "expressionType": { + "type": "string" + }, + "parameters": [ + { + "description": "Timestamp in ms", + "name": "Timestamp", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Timestamp in ms to time.", + "fullName": "Timestamp to time", + "functionType": "StringExpression", + "name": "TimestampToTime", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [] + }, + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "const timestamp = eventsFunctionContext.getArgument(\"Timestamp\");", + "const time = new Date(timestamp);", + "eventsFunctionContext.returnValue = time.toLocaleTimeString();" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "expressionType": { + "type": "string" + }, + "parameters": [ + { + "description": "Timestamp in ms", + "name": "Timestamp", + "type": "expression" + } + ], + "objectGroups": [] + } + ], + "eventsBasedBehaviors": [], + "eventsBasedObjects": [] +} \ No newline at end of file