Documentation ¶
Index ¶
- Constants
- Variables
- func DayStartTime(t time.Time) time.Time
- func EmptyTimeToNow(t time.Time) time.Time
- func GetLastDay(d time.Time) time.Time
- func GetNextDay(d time.Time) time.Time
- func SplitTimeRangeStr(utime, separator string) (err error, start string, end string)
- func TimeFormat(tm time.Time, format string) (res string)
- func TimeFormatByYMDHMS(format string) (res string)
- func Timestamp2TimeInt64(in int64) time.Time
- func Timestamp2TimeUint64(in uint64) time.Time
- type JSONTIME
- type STDateStartEnd
- type TimeArray
Constants ¶
View Source
const (
TimeFormatYMDhms = "2006-01-02 15:04:05" //default format
)
Variables ¶
View Source
var ( TimeFormatStrYMDHMS = TimeFormatByYMDHMS("yyyy-MM-dd hh:mm:ss") TimeFormatStrYMD = TimeFormatByYMDHMS("yyyy-MM-dd") )
Functions ¶
func SplitTimeRangeStr ¶ added in v0.5.5
utime 时间字符串 separator 分隔符
func TimeFormatByYMDHMS ¶ added in v0.2.2
func Timestamp2TimeInt64 ¶
func Timestamp2TimeUint64 ¶
Types ¶
type JSONTIME ¶
func (JSONTIME) GetFormatStr ¶ added in v0.5.5
func (JSONTIME) MarshalJSON ¶
func (*JSONTIME) UnmarshalJSON ¶
type STDateStartEnd ¶
type STDateStartEnd struct { Start time.Time End time.Time TimestampStart uint64 TimestampEnd uint64 DateTimeString string DateString string }
func GetDayRange ¶
func GetDayRange(d time.Time) (dateSE STDateStartEnd)
func GetLastDayRange ¶
func GetLastDayRange(d time.Time) (dateSE STDateStartEnd)
func GetNextDayRange ¶
func GetNextDayRange(d time.Time) (dateSE STDateStartEnd)
func GetTodayRange ¶
func GetTodayRange() (dateSE STDateStartEnd)
func GetYesterdayRange ¶
func GetYesterdayRange() (dateSE STDateStartEnd)
Click to show internal directories.
Click to hide internal directories.