Versions in this module Expand all Collapse all v2 v2.0.4 Mar 3, 2022 v2.0.3 Mar 3, 2022 Changes in this version + const AnsicFormat + const April + const August + const Bangkok + const Berlin + const CET + const Chicago + const Chongqing + const CookieFormat + const Cuba + const DateFormat + const DateTimeFormat + const DayDateTimeFormat + const DaysPerLeapYear + const DaysPerNormalYear + const DaysPerWeek + const December + const Dubai + const EET + const EST + const Egypt + const Eire + const February + const Friday + const GMT + const Greenwich + const Harbin + const HongKong + const HoursPerDay + const HoursPerWeek + const ISO8601Format + const Iceland + const Iran + const Israel + const Jamaica + const January + const Japan + const July + const June + const KitchenFormat + const Libya + const Local + const London + const LosAngeles + const MST + const Macao + const March + const May + const MicrosecondsPerMillisecond + const MicrosecondsPerSecond + const MillisecondsPerSecond + const MinutesPerDay + const MinutesPerHour + const Monday + const MonthsPerQuarter + const MonthsPerYear + const Moscow + const NewYork + const November + const October + const PRC + const Paris + const Poland + const Portugal + const QuartersPerYear + const RFC1036Format + const RFC1123Format + const RFC1123ZFormat + const RFC2822Format + const RFC3339Format + const RFC7231Format + const RFC822Format + const RFC822ZFormat + const RFC850Format + const Rome + const RssFormat + const RubyDateFormat + const Saigon + const Saturday + const SecondsPerDay + const SecondsPerHour + const SecondsPerMinute + const SecondsPerWeek + const Seoul + const September + const Shanghai + const ShortDateFormat + const ShortDateTimeFormat + const ShortTimeFormat + const Singapore + const Sunday + const Taipei + const Thursday + const TimeFormat + const Tokyo + const Tuesday + const Turkey + const UCT + const UTC + const UnixDateFormat + const Wednesday + const WeeksPerMonth + const WeeksPerNormalYear + const YearsPerCentury + const YearsPerDecade + const YearsPerMillennium + type Carbon struct + Error error + func CreateFromDate(year int, month int, day int, timezone ...string) Carbon + func CreateFromDateTime(year int, month int, day int, hour int, minute int, second int, nsecond int, ...) Carbon + func CreateFromTime(hour int, minute int, second int, timezone ...string) Carbon + func CreateFromTimestamp(timestamp int64, timezone ...string) Carbon + func NewCarbon() Carbon + func Now(timezone ...string) Carbon + func Parse(value string, timezone ...string) Carbon + func ParseByFormat(value string, format string, timezone ...string) Carbon + func ParseByLayout(value string, layout string, timezone ...string) Carbon + func SetLanguage(lang *Language) Carbon + func SetLocale(locale string) Carbon + func SetTimezone(name string) Carbon + func Time2Carbon(tt time.Time) Carbon + func Tomorrow(timezone ...string) Carbon + func Yesterday(timezone ...string) Carbon + func (c *Carbon) Scan(v interface{}) error + func (c Carbon) AddCenturies(centuries int) Carbon + func (c Carbon) AddCenturiesNoOverflow(centuries int) Carbon + func (c Carbon) AddCentury() Carbon + func (c Carbon) AddCenturyNoOverflow() Carbon + func (c Carbon) AddDay() Carbon + func (c Carbon) AddDays(days int) Carbon + func (c Carbon) AddDecade() Carbon + func (c Carbon) AddDecadeNoOverflow() Carbon + func (c Carbon) AddDecades(decades int) Carbon + func (c Carbon) AddDecadesNoOverflow(decades int) Carbon + func (c Carbon) AddDuration(duration string) 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) AddMonth() Carbon + func (c Carbon) AddMonthNoOverflow() Carbon + func (c Carbon) AddMonths(months int) Carbon + func (c Carbon) AddMonthsNoOverflow(months int) Carbon + func (c Carbon) AddQuarter() Carbon + func (c Carbon) AddQuarterNoOverflow() Carbon + func (c Carbon) AddQuarters(quarters int) Carbon + func (c Carbon) AddQuartersNoOverflow(quarters int) Carbon + func (c Carbon) AddSecond() Carbon + func (c Carbon) AddSeconds(seconds int) Carbon + func (c Carbon) AddWeek() Carbon + func (c Carbon) AddWeeks(weeks int) Carbon + func (c Carbon) AddYear() Carbon + func (c Carbon) AddYearNoOverflow() Carbon + func (c Carbon) AddYears(years int) Carbon + func (c Carbon) AddYearsNoOverflow(years int) Carbon + func (c Carbon) Age() int + func (c Carbon) Between(start Carbon, end Carbon) bool + func (c Carbon) BetweenIncludedBoth(start Carbon, end Carbon) bool + func (c Carbon) BetweenIncludedEnd(start Carbon, end Carbon) bool + func (c Carbon) BetweenIncludedStart(start Carbon, end Carbon) bool + func (c Carbon) Carbon2Time() time.Time + func (c Carbon) Century() int + func (c Carbon) Compare(operator string, t Carbon) bool + func (c Carbon) Constellation() string + func (c Carbon) CreateFromDate(year int, month int, day int, timezone ...string) Carbon + func (c Carbon) CreateFromDateTime(year int, month int, day int, hour int, minute int, second int, nsecond int, ...) Carbon + func (c Carbon) CreateFromTime(hour int, minute int, second int, nsecond int, timezone ...string) Carbon + func (c Carbon) CreateFromTimestamp(timestamp int64, timezone ...string) Carbon + func (c Carbon) Day() int + func (c Carbon) DayOfMonth() int + func (c Carbon) DayOfWeek() int + func (c Carbon) DayOfYear() int + func (c Carbon) DaysInMonth() int + func (c Carbon) DaysInYear() int + func (c Carbon) Decade() int + func (c Carbon) DiffForHumans(carbon ...Carbon) string + func (c Carbon) DiffInDays(carbon ...Carbon) int64 + func (c Carbon) DiffInDaysWithAbs(carbon ...Carbon) int64 + func (c Carbon) DiffInHours(carbon ...Carbon) int64 + func (c Carbon) DiffInHoursWithAbs(carbon ...Carbon) int64 + func (c Carbon) DiffInMinutes(carbon ...Carbon) int64 + func (c Carbon) DiffInMinutesWithAbs(carbon ...Carbon) int64 + func (c Carbon) DiffInMonths(carbon ...Carbon) int64 + func (c Carbon) DiffInMonthsWithAbs(carbon ...Carbon) int64 + func (c Carbon) DiffInSeconds(carbon ...Carbon) int64 + func (c Carbon) DiffInSecondsWithAbs(carbon ...Carbon) int64 + func (c Carbon) DiffInString(carbon ...Carbon) string + func (c Carbon) DiffInStringWithAbs(carbon ...Carbon) string + func (c Carbon) DiffInWeeks(carbon ...Carbon) int64 + func (c Carbon) DiffInWeeksWithAbs(carbon ...Carbon) int64 + func (c Carbon) DiffInYears(carbon ...Carbon) int64 + func (c Carbon) DiffInYearsWithAbs(carbon ...Carbon) int64 + func (c Carbon) EndOfCentury() Carbon + func (c Carbon) EndOfDay() Carbon + func (c Carbon) EndOfDecade() Carbon + func (c Carbon) EndOfHour() Carbon + func (c Carbon) EndOfMinute() Carbon + func (c Carbon) EndOfMonth() Carbon + func (c Carbon) EndOfQuarter() Carbon + func (c Carbon) EndOfSeason() Carbon + func (c Carbon) EndOfSecond() Carbon + func (c Carbon) EndOfWeek() Carbon + func (c Carbon) EndOfYear() Carbon + func (c Carbon) Eq(t Carbon) bool + func (c Carbon) Format(format string, timezone ...string) string + func (c Carbon) Gt(t Carbon) bool + func (c Carbon) Gte(t Carbon) bool + func (c Carbon) Hour() int + func (c Carbon) IsApril() bool + func (c Carbon) IsAquarius() bool + func (c Carbon) IsAries() bool + func (c Carbon) IsAugust() bool + func (c Carbon) IsAutumn() bool + func (c Carbon) IsCancer() bool + func (c Carbon) IsCapricorn() bool + func (c Carbon) IsDecember() bool + func (c Carbon) IsFebruary() bool + func (c Carbon) IsFriday() bool + func (c Carbon) IsFuture() bool + func (c Carbon) IsGemini() bool + func (c Carbon) IsInvalid() bool + func (c Carbon) IsJanuary() bool + func (c Carbon) IsJuly() bool + func (c Carbon) IsJune() bool + func (c Carbon) IsLeapYear() bool + func (c Carbon) IsLeo() bool + func (c Carbon) IsLibra() bool + func (c Carbon) IsLongYear() bool + func (c Carbon) IsMarch() bool + func (c Carbon) IsMay() bool + func (c Carbon) IsMonday() bool + func (c Carbon) IsNovember() bool + func (c Carbon) IsNow() bool + func (c Carbon) IsOctober() bool + func (c Carbon) IsPast() bool + func (c Carbon) IsPisces() bool + func (c Carbon) IsSagittarius() bool + func (c Carbon) IsSaturday() bool + func (c Carbon) IsScorpio() bool + func (c Carbon) IsSeptember() bool + func (c Carbon) IsSpring() bool + func (c Carbon) IsSummer() bool + func (c Carbon) IsSunday() bool + func (c Carbon) IsTaurus() bool + func (c Carbon) IsThursday() bool + func (c Carbon) IsToday() bool + func (c Carbon) IsTomorrow() bool + func (c Carbon) IsTuesday() bool + func (c Carbon) IsVirgo() bool + func (c Carbon) IsWednesday() bool + func (c Carbon) IsWeekday() bool + func (c Carbon) IsWeekend() bool + func (c Carbon) IsWinter() bool + func (c Carbon) IsYesterday() bool + func (c Carbon) IsZero() bool + func (c Carbon) Layout(layout string, timezone ...string) string + func (c Carbon) Locale() string + func (c Carbon) Location() string + func (c Carbon) Lt(t Carbon) bool + func (c Carbon) Lte(t Carbon) bool + func (c Carbon) Lunar() (l lunar) + func (c Carbon) Microsecond() int + func (c Carbon) Millisecond() int + func (c Carbon) Minute() int + func (c Carbon) Month() int + func (c Carbon) MonthOfYear() int + func (c Carbon) Nanosecond() int + func (c Carbon) Ne(t Carbon) bool + func (c Carbon) Now(timezone ...string) Carbon + func (c Carbon) Offset() int + func (c Carbon) Parse(value string, timezone ...string) Carbon + func (c Carbon) ParseByFormat(value string, format string, timezone ...string) Carbon + func (c Carbon) ParseByLayout(value string, layout string, timezone ...string) Carbon + func (c Carbon) Quarter() (quarter int) + func (c Carbon) Season() string + func (c Carbon) Second() int + func (c Carbon) SetDay(day int) Carbon + func (c Carbon) SetHour(hour int) Carbon + func (c Carbon) SetLanguage(lang *Language) Carbon + func (c Carbon) SetLocale(locale string) Carbon + func (c Carbon) SetMicrosecond(microsecond int) Carbon + func (c Carbon) SetMillisecond(millisecond int) Carbon + func (c Carbon) SetMinute(minute int) Carbon + func (c Carbon) SetMonth(month int) Carbon + func (c Carbon) SetMonthNoOverflow(month int) Carbon + func (c Carbon) SetNanosecond(nanosecond int) Carbon + func (c Carbon) SetSecond(second int) Carbon + func (c Carbon) SetTimezone(name string) Carbon + func (c Carbon) SetWeekStartsAt(day string) Carbon + func (c Carbon) SetYear(year int) Carbon + func (c Carbon) SetYearNoOverflow(year int) Carbon + func (c Carbon) StartOfCentury() Carbon + func (c Carbon) StartOfDay() Carbon + func (c Carbon) StartOfDecade() Carbon + func (c Carbon) StartOfHour() Carbon + func (c Carbon) StartOfMinute() Carbon + func (c Carbon) StartOfMonth() Carbon + func (c Carbon) StartOfQuarter() Carbon + func (c Carbon) StartOfSeason() Carbon + func (c Carbon) StartOfSecond() Carbon + func (c Carbon) StartOfWeek() Carbon + func (c Carbon) StartOfYear() Carbon + func (c Carbon) String() string + func (c Carbon) SubCenturies(centuries int) Carbon + func (c Carbon) SubCenturiesNoOverflow(centuries int) Carbon + func (c Carbon) SubCentury() Carbon + func (c Carbon) SubCenturyNoOverflow() Carbon + func (c Carbon) SubDay() Carbon + func (c Carbon) SubDays(days int) Carbon + func (c Carbon) SubDecade() Carbon + func (c Carbon) SubDecadeNoOverflow() Carbon + func (c Carbon) SubDecades(decades int) Carbon + func (c Carbon) SubDecadesNoOverflow(decades int) Carbon + func (c Carbon) SubDuration(duration string) Carbon + func (c Carbon) SubHour() Carbon + func (c Carbon) SubHours(hours int) Carbon + func (c Carbon) SubMinute() Carbon + func (c Carbon) SubMinutes(minutes int) Carbon + func (c Carbon) SubMonth() Carbon + func (c Carbon) SubMonthNoOverflow() Carbon + func (c Carbon) SubMonths(months int) Carbon + func (c Carbon) SubMonthsNoOverflow(months int) Carbon + func (c Carbon) SubQuarter() Carbon + func (c Carbon) SubQuarterNoOverflow() Carbon + func (c Carbon) SubQuarters(quarters int) Carbon + func (c Carbon) SubQuartersNoOverflow(quarters int) Carbon + func (c Carbon) SubSecond() Carbon + func (c Carbon) SubSeconds(seconds int) Carbon + func (c Carbon) SubWeek() Carbon + func (c Carbon) SubWeeks(weeks int) Carbon + func (c Carbon) SubYear() Carbon + func (c Carbon) SubYearNoOverflow() Carbon + func (c Carbon) SubYears(years int) Carbon + func (c Carbon) SubYearsNoOverflow(years int) Carbon + func (c Carbon) Timestamp() int64 + func (c Carbon) TimestampWithMicrosecond() int64 + func (c Carbon) TimestampWithMillisecond() int64 + func (c Carbon) TimestampWithNanosecond() int64 + func (c Carbon) TimestampWithSecond() int64 + func (c Carbon) Timezone() string + func (c Carbon) ToAnsicString(timezone ...string) string + func (c Carbon) ToAtomString(timezone ...string) string + func (c Carbon) ToCookieString(timezone ...string) string + func (c Carbon) ToDateString(timezone ...string) string + func (c Carbon) ToDateTimeString(timezone ...string) string + func (c Carbon) ToDayDateTimeString(timezone ...string) string + func (c Carbon) ToFormatString(format string, timezone ...string) string + func (c Carbon) ToIso8601String(timezone ...string) string + func (c Carbon) ToKitchenString(timezone ...string) string + func (c Carbon) ToLayoutString(layout string, timezone ...string) string + func (c Carbon) ToMonthString(timezone ...string) string + func (c Carbon) ToRfc1036String(timezone ...string) string + func (c Carbon) ToRfc1123String(timezone ...string) string + func (c Carbon) ToRfc1123zString(timezone ...string) string + func (c Carbon) ToRfc2822String(timezone ...string) string + func (c Carbon) ToRfc3339String(timezone ...string) string + func (c Carbon) ToRfc7231String(timezone ...string) string + func (c Carbon) ToRfc822String(timezone ...string) string + func (c Carbon) ToRfc822zString(timezone ...string) string + func (c Carbon) ToRfc850String(timezone ...string) string + func (c Carbon) ToRssString(timezone ...string) string + func (c Carbon) ToRubyDateString(timezone ...string) string + func (c Carbon) ToShortDateString(timezone ...string) string + func (c Carbon) ToShortDateTimeString(timezone ...string) string + func (c Carbon) ToShortMonthString(timezone ...string) string + func (c Carbon) ToShortTimeString(timezone ...string) string + func (c Carbon) ToShortWeekString(timezone ...string) string + func (c Carbon) ToString(timezone ...string) string + func (c Carbon) ToTimeString(timezone ...string) string + func (c Carbon) ToUnixDateString(timezone ...string) string + func (c Carbon) ToW3cString(timezone ...string) string + func (c Carbon) ToWeekString(timezone ...string) string + func (c Carbon) Tomorrow(timezone ...string) Carbon + func (c Carbon) Value() (driver.Value, error) + func (c Carbon) Week() int + func (c Carbon) WeekOfMonth() int + func (c Carbon) WeekOfYear() int + func (c Carbon) Year() int + func (c Carbon) Yesterday(timezone ...string) Carbon + type Date struct + func (t *Date) UnmarshalJSON(b []byte) error + func (t Date) MarshalJSON() ([]byte, error) + type DateTime struct + func (t *DateTime) UnmarshalJSON(b []byte) error + func (t DateTime) MarshalJSON() ([]byte, error) + type Language struct + Error error + func NewLanguage() *Language + func (lang *Language) SetLocale(locale string) + func (lang *Language) SetResources(resources map[string]string) + type Time struct + func (t *Time) UnmarshalJSON(b []byte) error + func (t Time) MarshalJSON() ([]byte, error) + type Timestamp struct + func (t *Timestamp) UnmarshalJSON(b []byte) error + func (t Timestamp) MarshalJSON() ([]byte, error) + type TimestampWithMicrosecond struct + func (t *TimestampWithMicrosecond) UnmarshalJSON(b []byte) error + func (t TimestampWithMicrosecond) MarshalJSON() ([]byte, error) + type TimestampWithMillisecond struct + func (t *TimestampWithMillisecond) UnmarshalJSON(b []byte) error + func (t TimestampWithMillisecond) MarshalJSON() ([]byte, error) + type TimestampWithNanosecond struct + func (t *TimestampWithNanosecond) UnmarshalJSON(b []byte) error + func (t TimestampWithNanosecond) MarshalJSON() ([]byte, error) + type TimestampWithSecond struct + func (t *TimestampWithSecond) UnmarshalJSON(b []byte) error + func (t TimestampWithSecond) MarshalJSON() ([]byte, error)