|
|
@@ -88,6 +88,11 @@ func StrToLocationDate(s string) (t time.Time, err error) {
|
|
|
return
|
|
|
}
|
|
|
|
|
|
+// Unix returns the local Time corresponding to the given Unix time, sec seconds and nsec nanoseconds since January 1, 1970 UTC.
|
|
|
+func Unix(sec, nsec int64) time.Time {
|
|
|
+ return time.Unix(sec, nsec)
|
|
|
+}
|
|
|
+
|
|
|
// IsWeekEnd 日期是否周末
|
|
|
func IsWeekEnd(d time.Weekday) bool {
|
|
|
day := int(d)
|