Documentation
¶
Index ¶
- type JsonTime
- type Timex
- func FuzzyParse(value string) *Timex
- func MustNowInTz(tz string) *Timex
- func MustParse(layout, value string) *Timex
- func MustParseInTz(layout, value, tz string) *Timex
- func New(t time.Time) *Timex
- func Now() *Timex
- func NowInTz(tz string) (*Timex, error)
- func Parse(layout, value string) (*Timex, error)
- func ParseInTz(layout, value, tz string) (*Timex, error)
- func (t *Timex) DateStr() string
- func (t *Timex) DatetimeStr() string
- func (t *Timex) EndOfDay() *Timex
- func (t *Timex) EndOfMonth() *Timex
- func (t *Timex) EndOfYear() *Timex
- func (t *Timex) Format(layout string) string
- func (t *Timex) IsCurrentMonth() bool
- func (t *Timex) IsCurrentYear() bool
- func (t *Timex) MustTz(tz string) *Timex
- func (t *Timex) StartOfDay() *Timex
- func (t *Timex) StartOfMonth() *Timex
- func (t *Timex) StartOfYear() *Timex
- func (t *Timex) Tz(tz string) (*Timex, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Timex ¶
func FuzzyParse ¶
FuzzyParse try diffrent format and parse a time string panic when no format matched
func MustParseInTz ¶
MustParseInTz parse a time string with given format in a timezone but panic when error occured
func (*Timex) DatetimeStr ¶
DatetimeStr format time into datetime string
func (*Timex) EndOfMonth ¶
EndOfMonth calculate the end moment of month of time
func (*Timex) IsCurrentMonth ¶
IsCurrentMonth check if is in current month
func (*Timex) IsCurrentYear ¶
IsCurrentYear check if is in current year
func (*Timex) StartOfDay ¶
StartOfDay calculate the start moment of day of time
func (*Timex) StartOfMonth ¶
StartOfMonth calculate the start moment of month of time
func (*Timex) StartOfYear ¶
StartOfYear calculate the start moment of year of time
Click to show internal directories.
Click to hide internal directories.