mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-01-13 20:53:30 +01:00
[PR #244] [MERGED] add template-function-datetime
#170
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/mountain-loop/yaak/pull/244
Author: @subframe7536
Created: 7/19/2025
Status: ✅ Merged
Merged: 7/23/2025
Merged by: @gschier
Base:
main← Head:fn-datetime📝 Commits (4)
dabbd3daddtemplate-function-datetime5584d54Merge branch 'main' into fn-datetime1b2b250Some improvements before merging470da62Tweak args📊 Changes
20 files changed (+331 additions, -51 deletions)
View changed files
📝
package-lock.json(+11 -0)📝
package.json(+1 -0)📝
packages/plugin-runtime-types/src/bindings/gen_events.ts(+1 -1)📝
packages/plugin-runtime/src/PluginInstance.ts(+21 -9)➕
plugins/template-function-datetime/package.json(+13 -0)➕
plugins/template-function-datetime/src/index.ts(+156 -0)➕
plugins/template-function-datetime/tests/formatDatetime.test.ts(+71 -0)➕
plugins/template-function-datetime/tsconfig.json(+3 -0)📝
src-tauri/src/uri_scheme.rs(+1 -1)📝
src-tauri/yaak-plugins/bindings/gen_events.ts(+1 -1)📝
src-tauri/yaak-plugins/src/events.rs(+2 -0)📝
src-tauri/yaak-plugins/src/manager.rs(+20 -10)📝
src-web/components/TemplateFunctionDialog.tsx(+23 -22)📝
src-web/components/core/Editor/Editor.tsx(+1 -1)📝
src-web/components/core/Icon.tsx(+1 -1)📝
src-web/components/core/IconTooltip.tsx(+1 -0)📝
src-web/components/core/Input.tsx(+1 -1)📝
src-web/components/core/Label.tsx(+1 -1)📝
src-web/hooks/useRenderTemplate.ts(+2 -2)📝
src-web/hooks/useTemplateTokensToString.ts(+0 -1)📄 Description
In this PR, I added 4 template functions for datetime with
date-fns:datetime.timestamp: Returns current timestamp in milliseconds.datetime.iso: Returns current date in ISO format.datetime.calculate: Supports date arithmetic (e.g.,+1d,-2h) and returns ISO string.datetime.format: Formats a date string with a custom output format.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.