Documentation
¶
Index ¶
- Variables
- func BeginningOfDay() time.Time
- func BeginningOfHour() time.Time
- func BeginningOfMinute() time.Time
- func BeginningOfMonth() time.Time
- func BeginningOfQuarter() time.Time
- func BeginningOfWeek() time.Time
- func BeginningOfYear() time.Time
- func Between(time1, time2 string) bool
- func EndOfDay() time.Time
- func EndOfHour() time.Time
- func EndOfMinute() time.Time
- func EndOfMonth() time.Time
- func EndOfQuarter() time.Time
- func EndOfSunday() time.Time
- func EndOfWeek() time.Time
- func EndOfYear() time.Time
- func Monday() time.Time
- func MustParse(strs ...string) time.Time
- func MustParseInLocation(loc *time.Location, strs ...string) time.Time
- func Parse(strs ...string) (time.Time, error)
- func ParseInLocation(loc *time.Location, strs ...string) (time.Time, error)
- func Sunday() time.Time
- type Config
- type Now
- func (now *Now) BeginningOfDay() time.Time
- func (now *Now) BeginningOfHalf() time.Time
- func (now *Now) BeginningOfHour() time.Time
- func (now *Now) BeginningOfMinute() time.Time
- func (now *Now) BeginningOfMonth() time.Time
- func (now *Now) BeginningOfQuarter() time.Time
- func (now *Now) BeginningOfWeek() time.Time
- func (now *Now) BeginningOfYear() time.Time
- func (now *Now) Between(begin, end string) bool
- func (now *Now) EndOfDay() time.Time
- func (now *Now) EndOfHalf() time.Time
- func (now *Now) EndOfHour() time.Time
- func (now *Now) EndOfMinute() time.Time
- func (now *Now) EndOfMonth() time.Time
- func (now *Now) EndOfQuarter() time.Time
- func (now *Now) EndOfSunday() time.Time
- func (now *Now) EndOfWeek() time.Time
- func (now *Now) EndOfYear() time.Time
- func (now *Now) Monday() time.Time
- func (now *Now) Parse(strs ...string) (t time.Time, err error)
- func (now *Now) Sunday() time.Time
Constants ¶
This section is empty.
Variables ¶
View Source
var TimeFormats = []string{ "2006", "2006-1", "2006-1-2", "2006-1-2 15", "2006-1-2 15:4", "2006-1-2 15:4:5", "1-2", "15:4:5", "15:4", "15", "15:4:5 Jan 2, 2006 MST", "2006-01-02 15:04:05.999999999 -0700 MST", "2006-01-02T15:04:05-07:00", "2006.1.2", "2006.1.2 15:04:05", "2006.01.02", "2006.01.02 15:04:05", "2006.01.02 15:04:05.999999999", "1/2/2006", "1/2/2006 15:4:5", "2006/01/02", "2006/01/02 15:04:05", time.ANSIC, time.UnixDate, time.RubyDate, time.RFC822, time.RFC822Z, time.RFC850, time.RFC1123, time.RFC1123Z, time.RFC3339, time.RFC3339Nano, time.Kitchen, time.Stamp, time.StampMilli, time.StampMicro, time.StampNano, }
View Source
var WeekStartDay = time.Sunday
Functions ¶
func BeginningOfQuarter ¶
BeginningOfQuarter beginning of quarter
Types ¶
type Config ¶
Config configuration for now package
var DefaultConfig *Config
DefaultConfig default config
type Now ¶
Now now struct
func (*Now) BeginningOfDay ¶
func (*Now) BeginningOfHalf ¶
func (*Now) BeginningOfHour ¶
func (*Now) BeginningOfMinute ¶
func (*Now) BeginningOfMonth ¶
func (*Now) BeginningOfQuarter ¶
BeginningOfQuarter beginning of quarter
func (*Now) BeginningOfWeek ¶
func (*Now) BeginningOfYear ¶
func (*Now) EndOfMinute ¶
func (*Now) EndOfMonth ¶
func (*Now) EndOfQuarter ¶
func (*Now) EndOfSunday ¶
Click to show internal directories.
Click to hide internal directories.