mirror of
https://github.com/duke-git/lancet.git
synced 2026-02-13 17:22:27 +08:00
IsWeekend func Deprecated (#123)
* expand BeginOfWeek、EndOfWeek * IsWeekend func Deprecated
This commit is contained in:
@@ -262,6 +262,7 @@ func DayOfYear(t time.Time) int {
|
|||||||
|
|
||||||
// IsWeekend checks if passed time is weekend or not.
|
// IsWeekend checks if passed time is weekend or not.
|
||||||
// Play: https://go.dev/play/p/cupRM5aZOIY
|
// Play: https://go.dev/play/p/cupRM5aZOIY
|
||||||
|
// Deprecated Use '== Weekday' instead
|
||||||
func IsWeekend(t time.Time) bool {
|
func IsWeekend(t time.Time) bool {
|
||||||
return time.Saturday == t.Weekday() || time.Sunday == t.Weekday()
|
return time.Saturday == t.Weekday() || time.Sunday == t.Weekday()
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user