Documentation
¶
Index ¶
- type TimeUtil
- func (t *TimeUtil) AddDays(days int) *TimeUtil
- func (t *TimeUtil) Carbon() *carbon.Carbon
- func (t *TimeUtil) DifferenceInDays(other *TimeUtil) int64
- func (t *TimeUtil) EndOfWeek() *TimeUtil
- func (t *TimeUtil) Format(layout string) string
- func (t *TimeUtil) IsWeekend() bool
- func (t *TimeUtil) StartOfWeek() *TimeUtil
- func (t *TimeUtil) SubtractDays(days int) *TimeUtil
- func (t *TimeUtil) ToTime() time.Time
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type TimeUtil ¶
type TimeUtil struct {
// contains filtered or unexported fields
}
TimeUtil wraps a Carbon instance for chainable time utility operations.
func Parse ¶
Parse parses a date string into a TimeUtil instance. Returns an error if the string is not a valid date.
func (*TimeUtil) AddDays ¶
AddDays adds the specified number of days and returns the updated TimeUtil.
func (*TimeUtil) DifferenceInDays ¶
DifferenceInDays returns the number of days between this and another TimeUtil.
func (*TimeUtil) StartOfWeek ¶
StartOfWeek returns a new TimeUtil set to the beginning of the week.
func (*TimeUtil) SubtractDays ¶
SubtractDays subtracts the specified number of days and returns the updated TimeUtil.
Click to show internal directories.
Click to hide internal directories.