Documentation ¶
Index ¶
- Constants
- Variables
- func BeginOfDay() time.Time
- func BeginOfHalf() time.Time
- func BeginOfHour() time.Time
- func BeginOfMinute() time.Time
- func BeginOfMonth() time.Time
- func BeginOfQuarter() time.Time
- func BeginOfWeek(weekStartDays ...time.Weekday) time.Time
- func BeginOfYear() time.Time
- func EndOfDay() time.Time
- func EndOfHalf() time.Time
- func EndOfHour() time.Time
- func EndOfMinute() time.Time
- func EndOfMonth() time.Time
- func EndOfQuarter() time.Time
- func EndOfWeek(weekStartDays ...time.Weekday) time.Time
- func EndOfYear() time.Time
- func MustParse(v any, l ...*time.Location) time.Time
- func Parse(v any, l ...*time.Location) (time.Time, error)
- type Time
- func (t *Time) BeginOfDay() time.Time
- func (t *Time) BeginOfHalf() time.Time
- func (t *Time) BeginOfHour() time.Time
- func (t *Time) BeginOfMinute() time.Time
- func (t *Time) BeginOfMonth() time.Time
- func (t *Time) BeginOfQuarter() time.Time
- func (t *Time) BeginOfWeek(weekStartDays ...time.Weekday) time.Time
- func (t *Time) BeginOfYear() time.Time
- func (t *Time) EndOfDay() time.Time
- func (t *Time) EndOfHalf() time.Time
- func (t *Time) EndOfHour() time.Time
- func (t *Time) EndOfMinute() time.Time
- func (t *Time) EndOfMonth() time.Time
- func (t *Time) EndOfQuarter() time.Time
- func (t *Time) EndOfWeek(weekStartDays ...time.Weekday) time.Time
- func (t *Time) EndOfYear() time.Time
Constants ¶
View Source
const ( DateFormat = "2006-01-02" TimeFormat = "15:04:05" DateTimeFormat = "2006-01-02 15:04:05" )
Variables ¶
View Source
var (
UTC, _ = time.LoadLocation("UTC")
GMT, _ = time.LoadLocation("GMT")
CET, _ = time.LoadLocation("CET")
PRC, _ = time.LoadLocation("PRC")
)
Functions ¶
func BeginOfDay ¶
func BeginOfHalf ¶
func BeginOfHour ¶
func BeginOfMinute ¶
func BeginOfMonth ¶
func BeginOfQuarter ¶
func BeginOfYear ¶
func EndOfMinute ¶
func EndOfMonth ¶
func EndOfQuarter ¶
Types ¶
type Time ¶
func (*Time) BeginOfDay ¶
func (*Time) BeginOfHalf ¶
func (*Time) BeginOfHour ¶
func (*Time) BeginOfMinute ¶
func (*Time) BeginOfMonth ¶
func (*Time) BeginOfQuarter ¶
func (*Time) BeginOfYear ¶
func (*Time) EndOfMinute ¶
func (*Time) EndOfMonth ¶
func (*Time) EndOfQuarter ¶
Click to show internal directories.
Click to hide internal directories.