Documentation ¶
Index ¶
- func FeYmd2layout(format string) string
- func FormatByFeYMD(date, format string) string
- func FormatByPhpYMD(date, format string) string
- func GetCarbon(v interface{}, format string) (*carbon.Carbon, error)
- func GetMonthsBetweenDates(sDate, eDate uint) []string
- func GetNextMonth() time.Time
- func GetNextPeriodTime(period string) time.Time
- func GetNextWeek() time.Time
- func NewCarbonByFeYMD(date, format string) (parse *carbon.Carbon, layout string, err error)
- func NewCarbonByPhpYMD(date, format string) (parse *carbon.Carbon, layout string, err error)
- func PhpYmd2layout(format string) string
- func TimeFormatByFeYMD(date time.Time, format string) string
- func TimeFormatByPhpYMD(date time.Time, format string) string
- type DateTimePeriod
- func GetDayPeriod(v interface{}, format string) (*DateTimePeriod, error)
- func GetMonthPeriod(v interface{}, format string) (*DateTimePeriod, error)
- func GetQuarterPeriod(v interface{}, format string) (*DateTimePeriod, error)
- func GetWeekPeriod(v interface{}, format string) (*DateTimePeriod, error)
- func GetYearPeriod(v interface{}, format string) (*DateTimePeriod, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetMonthsBetweenDates ¶
GetMonthsBetweenDates 返回时间区间内的所有月份
func GetNextPeriodTime ¶
GetNextPeriodTime 获取下一个范围的初始时间
func NewCarbonByFeYMD ¶
NewCarbonByFeYMD 生成一个Carbon时间
func NewCarbonByPhpYMD ¶
NewCarbonByPhpYMD 生成一个Carbon时间
func TimeFormatByFeYMD ¶
TimeFormatByFeYMD 格式化一个时间
Types ¶
type DateTimePeriod ¶
type DateTimePeriod struct { StartAt *carbon.Carbon `json:"start_at"` EndAt *carbon.Carbon `json:"end_at"` }
DateTimePeriod 表示一个时间范围
func GetDayPeriod ¶
func GetDayPeriod(v interface{}, format string) (*DateTimePeriod, error)
GetDayPeriod 获取某个日期所处的Day范围
func GetMonthPeriod ¶
func GetMonthPeriod(v interface{}, format string) (*DateTimePeriod, error)
GetMonthPeriod 获取某个日期所处的Month范围
func GetQuarterPeriod ¶
func GetQuarterPeriod(v interface{}, format string) (*DateTimePeriod, error)
GetQuarterPeriod 获取某个日期所处的Quarter范围
func GetWeekPeriod ¶
func GetWeekPeriod(v interface{}, format string) (*DateTimePeriod, error)
GetWeekPeriod 获取某个日期所处的Week范围
func GetYearPeriod ¶
func GetYearPeriod(v interface{}, format string) (*DateTimePeriod, error)
GetYearPeriod 获取某个日期所处的Year范围
Click to show internal directories.
Click to hide internal directories.