Documentation ¶
Index ¶
- Variables
- func AddParseLoyouts(layouts ...string)
- func FormatNow(format string) string
- func GetMillisecond() int64
- func GetTimestamp() int64
- type Carbon
- func (c Carbon) Add(sec time.Duration) Carbon
- func (c Carbon) AddDay() Carbon
- func (c Carbon) AddDays(days int) Carbon
- func (c Carbon) AddHour() Carbon
- func (c Carbon) AddHours(hours int) Carbon
- func (c Carbon) AddMinute() Carbon
- func (c Carbon) AddMinutes(minutes int) Carbon
- func (c Carbon) AddWeek() Carbon
- func (c Carbon) AddWeeks(weeks int) Carbon
- func (c Carbon) Clone() Carbon
- func (c Carbon) EndOfDay() Carbon
- func (c Carbon) EndOfHour() Carbon
- func (c Carbon) EndOfMinute() Carbon
- func (c Carbon) EndOfWeek() Carbon
- func (c Carbon) Format(format ...string) string
- func (c Carbon) GetDateString() string
- func (c Carbon) GetDateTimeString() string
- func (c Carbon) GetTime() time.Time
- func (c Carbon) GetTimestamp() int64
- func (c Carbon) MarshalJSON() ([]byte, error)
- func (c *Carbon) Scan(src interface{}) (e error)
- func (c *Carbon) ScanInput(data []byte) error
- func (c Carbon) StartOfDay() Carbon
- func (c Carbon) StartOfHour() Carbon
- func (c Carbon) StartOfMinute() Carbon
- func (c Carbon) StartOfWeek() Carbon
- func (c Carbon) String() string
- func (c Carbon) Value() (driver.Value, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( DefaultDateTimeFormat = "2006-01-02 15:04:05" DefaultDateFormat = "2006-01-02" WeekStartDay = time.Monday Timezone = time.Local )
View Source
var ( ParseLoyouts = []string{ DefaultDateTimeFormat, DefaultDateFormat, time.RFC3339, } )
Functions ¶
func AddParseLoyouts ¶ added in v0.1.3
func AddParseLoyouts(layouts ...string)
func GetMillisecond ¶
func GetMillisecond() int64
func GetTimestamp ¶
func GetTimestamp() int64
Types ¶
type Carbon ¶
type Carbon struct { Valid bool // contains filtered or unexported fields }
func (Carbon) AddMinutes ¶
//////////////////////// Minute ///////////////////////
func (Carbon) EndOfMinute ¶
func (Carbon) GetDateString ¶
func (Carbon) GetDateTimeString ¶
func (Carbon) GetTimestamp ¶
func (Carbon) MarshalJSON ¶
func (Carbon) StartOfHour ¶ added in v0.1.3
func (Carbon) StartOfMinute ¶
func (Carbon) StartOfWeek ¶
Click to show internal directories.
Click to hide internal directories.