mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-01-25 09:46:10 +01:00
📝 fix incorrect function comments (#16719)
This commit is contained in:
parent
f7822b5b3e
commit
4132736037
2 changed files with 3 additions and 3 deletions
|
|
@ -63,7 +63,7 @@ func RandString(length int) string {
|
|||
return string(b)
|
||||
}
|
||||
|
||||
// InsertElem inserts value at index into a.
|
||||
// InsertElem inserts value at index into s.
|
||||
// 0 <= index <= len(s)
|
||||
func InsertElem[T any](s []T, index int, value T) []T {
|
||||
if len(s) == index { // nil or empty slice or after last element
|
||||
|
|
|
|||
|
|
@ -59,7 +59,7 @@ func WeekdayCN2(date time.Time) string {
|
|||
return weekdayCN2[week]
|
||||
}
|
||||
|
||||
// ISOWeek returns the ISO 8601 year and week number in which date occurs.
|
||||
// ISOWeek returns the ISO 8601 week number in which date occurs.
|
||||
// Week ranges from 1 to 53. Jan 01 to Jan 03 of year n might belong to week 52 or 53 of year n-1,
|
||||
// and Dec 29 to Dec 31 might belong to week 1 of year n+1.
|
||||
func ISOWeek(date time.Time) int {
|
||||
|
|
@ -73,7 +73,7 @@ func ISOYear(date time.Time) int {
|
|||
return year
|
||||
}
|
||||
|
||||
// ISOMonth returns the month in which the first day of the ISO 8601 week of date occurs.
|
||||
// ISOMonth returns the month in which the Thursday of the ISO 8601 week of date occurs.
|
||||
func ISOMonth(date time.Time) int {
|
||||
isoYear, isoWeek := date.ISOWeek()
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue