Skip to content

An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作

:art: New template functions `ISOYear`, `ISOMonth` and `ISOWeekDate` https://github.com/siyuan-note/siyuan/issues/15679

Danielca7e4ef503d1
diff --git a/kernel/util/time.go b/kernel/util/time.go
index 933e880841..e767d02952 100644
--- a/kernel/util/time.go
+++ b/kernel/util/time.go
@@ -82,7 +82,7 @@ func ISOMonth(date time.Time) int {
// ISOWeekDate returns the date of the specified day of the week in the ISO 8601 week of date.
// day: Monday=1, ..., Sunday=7.
-func ISOWeekDate(date time.Time, day int) time.Time {
+func ISOWeekDate(day int, date time.Time) time.Time {
weekday := int(date.Weekday())
if weekday == 0 {
weekday = 7