Documentation ¶
Index ¶
- Constants
- func Get30DayExpireTime() time.Duration
- func Get60SecondExpireTime() time.Duration
- func GetArbitrarilyTimeStr(increment time.Duration) string
- func GetBetweenDates(sdate string, edate string) []string
- func GetFiveMinExpireTime() time.Duration
- func GetLastDayTimeStrUnderline() string
- func GetLastMonthStartAndEnd() (string, string)
- func GetLastSevenDates() []string
- func GetMonthStartAndEnd() (string, string)
- func GetNowDayTimeStr() string
- func GetNowDayTimeStrUnderline() string
- func GetNowTime() time.Time
- func GetNowTimeStr() string
- func GetOneDayExpireTime() time.Duration
- func GetSevenExpireTime() time.Duration
- func GetTimeUnix() int64
- func GetTimeUnixHaoMiao() int64
- func GetTimeUnixNano() int64
- func GetYesterDayTimeStr() string
- func OverFormatTime(formatTime string) string
- func TimePare(timeStr string) (time.Time, error)
- type TimeHelper
- func (t *TimeHelper) GetDay() int
- func (t *TimeHelper) GetHour() int
- func (t *TimeHelper) GetMinute() int
- func (t *TimeHelper) GetMonth() int
- func (t *TimeHelper) GetSecond() int
- func (t *TimeHelper) GetWeekDay() *TimeWeek
- func (t *TimeHelper) GetYear() int
- func (t *TimeHelper) ToAll() string
- func (t *TimeHelper) ToDate() string
- func (t *TimeHelper) WeekByDate(time time.Time) *TimeWeek
- type TimeWeek
Constants ¶
View Source
const ( ANSIC = "Mon Jan _2 15:04:05 2006" UnixDate = "Mon Jan _2 15:04:05 MST 2006" RubyDate = "Mon Jan 02 15:04:05 -0700 2006" RFC822 = "02 Jan 06 15:04 MST" RFC822Z = "02 Jan 06 15:04 -0700" // RFC822 with numeric zone RFC850 = "Monday, 02-Jan-06 15:04:05 MST" RFC1123 = "Mon, 02 Jan 2006 15:04:05 MST" RFC1123Z = "Mon, 02 Jan 2006 15:04:05 -0700" // RFC1123 with numeric zone RFC3339 = "2006-01-02T15:04:05Z07:00" RFC3339Nano = "2006-01-02T15:04:05.999999999Z07:00" Kitchen = "3:04PM" Stamp = "Jan _2 15:04:05" StampMilli = "Jan _2 15:04:05.000" StampMicro = "Jan _2 15:04:05.000000" StampNano = "Jan _2 15:04:05.000000000" UTFALL_SECOND = "2006-01-02 15:04:05" UTFALL_MINUTE = "2006-01-02 15:04" UTFALL_HOUR = "2006-01-02 15" UTFALL_DATE = "2006-01-02" )
Variables ¶
This section is empty.
Functions ¶
func GetArbitrarilyTimeStr ¶
func GetBetweenDates ¶
* GetBetweenDates 根据开始日期和结束日期计算出时间段内所有日期 参数为日期格式,如:2020-01-01
func GetLastDayTimeStrUnderline ¶
func GetLastDayTimeStrUnderline() string
func GetMonthStartAndEnd ¶
* GetMonthStartAndEnd 获取月份的第一天和最后一天
func GetNowDayTimeStr ¶
func GetNowDayTimeStr() string
func GetNowDayTimeStrUnderline ¶
func GetNowDayTimeStrUnderline() string
func GetNowTime ¶
func GetNowTimeStr ¶
func GetNowTimeStr() string
Types ¶
type TimeHelper ¶
type TimeHelper struct {
// contains filtered or unexported fields
}
func NewTime ¶
func NewTime(time time.Time) *TimeHelper
func (*TimeHelper) GetDay ¶
func (t *TimeHelper) GetDay() int
func (*TimeHelper) GetHour ¶
func (t *TimeHelper) GetHour() int
func (*TimeHelper) GetMinute ¶
func (t *TimeHelper) GetMinute() int
func (*TimeHelper) GetMonth ¶
func (t *TimeHelper) GetMonth() int
func (*TimeHelper) GetSecond ¶
func (t *TimeHelper) GetSecond() int
func (*TimeHelper) GetWeekDay ¶
func (t *TimeHelper) GetWeekDay() *TimeWeek
func (*TimeHelper) GetYear ¶
func (t *TimeHelper) GetYear() int
func (*TimeHelper) ToAll ¶
func (t *TimeHelper) ToAll() string
func (*TimeHelper) ToDate ¶
func (t *TimeHelper) ToDate() string
func (*TimeHelper) WeekByDate ¶
func (t *TimeHelper) WeekByDate(time time.Time) *TimeWeek
Click to show internal directories.
Click to hide internal directories.