Documentation
¶
Index ¶
- Constants
- Variables
- type Calendar
- type Date
- func (dd Date) AppendTo(b []byte, separator byte) []byte
- func (dd Date) AppendValue(b []byte, flags int) ([]byte, error)
- func (dd Date) Day() Day
- func (dd Date) DaysInMonth() Day
- func (dd *Date) DecodeBinary(_ *pgtype.ConnInfo, src []byte) error
- func (dd Date) EncodeBinary(_ *pgtype.ConnInfo, buf []byte) (newBuf []byte, err error)
- func (dd Date) Equal(other Date) bool
- func (dd *Date) MarshalJSON() ([]byte, error)
- func (dd Date) Month() Month
- func (dd *Date) ParseFrom(b []byte) error
- func (dd *Date) ScanValue(rd types.Reader, n int) error
- func (dd Date) Split() (y Year, m Month, d Day)
- func (dd Date) String() string
- func (dd Date) ToCmp() Date
- func (dd Date) ToOrig() OriginalDate
- func (dd *Date) ToOrigPtr() *OriginalDate
- func (dd *Date) UnmarshalJSON(b []byte) error
- func (dd Date) Weekday() Weekday
- func (dd Date) WithTime(hh Hour, mm Minute, ss Second) Timestamp
- func (dd Date) Year() Year
- type Day
- type Days
- type Event
- type Hour
- type Minute
- type Month
- type OnceInCallback
- type OnceInPanicCallback
- type OriginalDate
- type OriginalTime
- type OriginalTimestamp
- type OriginalTimestampPair
- type Second
- type Time
- func (t Time) AppendTo(b []byte, separator byte) []byte
- func (t Time) AppendValue(b []byte, flags int) ([]byte, error)
- func (t *Time) DecodeBinary(_ *pgtype.ConnInfo, src []byte) error
- func (t Time) EncodeBinary(_ *pgtype.ConnInfo, buf []byte) (newBuf []byte, err error)
- func (t Time) Hour() Hour
- func (t *Time) MarshalJSON() ([]byte, error)
- func (t Time) Minute() Minute
- func (t *Time) ParseFrom(b []byte) error
- func (t *Time) ScanValue(rd types.Reader, n int) error
- func (t Time) Second() Second
- func (t Time) Split() (h Hour, m Minute, s Second)
- func (t Time) String() string
- func (t Time) ToOrig() OriginalTime
- func (t *Time) ToOrigPtr() *OriginalTime
- func (t *Time) UnmarshalJSON(b []byte) error
- func (t Time) WithDate(y Year, m Month, d Day) Timestamp
- type Timestamp
- func BeginningOfMonth(y Year, m Month) Timestamp
- func BeginningOfYear(y Year) Timestamp
- func EndOfMonth(y Year, m Month) Timestamp
- func EndOfYear(y Year) Timestamp
- func InMonth(y Year, m Month) Timestamp
- func InYear(y Year) Timestamp
- func NewTimestamp(y Year, m Month, d Day, hh Hour, mm Minute, ss Second) Timestamp
- func NewTimestampFromStd(t time.Time) Timestamp
- func NewTimestampNow() Timestamp
- func WrapTimestamp(ts OriginalTimestamp) Timestamp
- func WrapTimestampPtr(ts *OriginalTimestamp) *Timestamp
- func (ts Timestamp) AppendTo(b []byte, separatorDate, separatorTime byte) []byte
- func (ts Timestamp) AppendValue(b []byte, flags int) ([]byte, error)
- func (ts Timestamp) BeginningAndEndOfDay() TimestampPair
- func (ts Timestamp) BeginningAndEndOfMonth() TimestampPair
- func (ts Timestamp) BeginningAndEndOfYear() TimestampPair
- func (ts Timestamp) BeginningOfDay() Timestamp
- func (ts Timestamp) BeginningOfMonth() Timestamp
- func (ts Timestamp) BeginningOfYear() Timestamp
- func (ts Timestamp) Date() Date
- func (ts Timestamp) Day() Day
- func (ts *Timestamp) DecodeBinary(_ *pgtype.ConnInfo, src []byte) error
- func (ts Timestamp) EncodeBinary(_ *pgtype.ConnInfo, buf []byte) (newBuf []byte, err error)
- func (ts Timestamp) EndOfDay() Timestamp
- func (ts Timestamp) EndOfMonth() Timestamp
- func (ts Timestamp) EndOfYear() Timestamp
- func (ts Timestamp) Hour() Hour
- func (ts Timestamp) I64() int64
- func (ts *Timestamp) MarshalJSON() ([]byte, error)
- func (ts Timestamp) Minute() Minute
- func (ts Timestamp) Month() Month
- func (ts *Timestamp) ParseFrom(b []byte) error
- func (ts *Timestamp) ScanValue(rd types.Reader, n int) error
- func (ts Timestamp) Second() Second
- func (ts Timestamp) Split() (d Date, t Time)
- func (ts Timestamp) Std() time.Time
- func (ts Timestamp) String() string
- func (ts Timestamp) TillNext12h() time.Duration
- func (ts Timestamp) TillNextDay() time.Duration
- func (ts Timestamp) TillNextHour() time.Duration
- func (ts Timestamp) TillNextMidnight() time.Duration
- func (ts Timestamp) TillNextMinute() time.Duration
- func (ts Timestamp) TillNextMonth() time.Duration
- func (ts Timestamp) TillNextNoon() time.Duration
- func (ts Timestamp) TillNextYear() time.Duration
- func (ts Timestamp) Time() Time
- func (ts Timestamp) ToOrig() OriginalTimestamp
- func (ts *Timestamp) ToOrigPtr() *OriginalTimestamp
- func (ts *Timestamp) UnmarshalJSON(b []byte) error
- func (ts Timestamp) Year() Year
- type TimestampPair
- type Weekday
- type Year
Constants ¶
const ( MONTH_JANUARY = ekatime_orig.MONTH_JANUARY MONTH_FEBRUARY = ekatime_orig.MONTH_FEBRUARY MONTH_MARCH = ekatime_orig.MONTH_MARCH MONTH_APRIL = ekatime_orig.MONTH_APRIL MONTH_MAY = ekatime_orig.MONTH_MAY MONTH_JUNE = ekatime_orig.MONTH_JUNE MONTH_JULY = ekatime_orig.MONTH_JULY MONTH_AUGUST = ekatime_orig.MONTH_AUGUST MONTH_SEPTEMBER = ekatime_orig.MONTH_SEPTEMBER MONTH_OCTOBER = ekatime_orig.MONTH_OCTOBER MONTH_NOVEMBER = ekatime_orig.MONTH_NOVEMBER MONTH_DECEMBER = ekatime_orig.MONTH_DECEMBER WEEKDAY_WEDNESDAY = ekatime_orig.WEEKDAY_WEDNESDAY WEEKDAY_THURSDAY = ekatime_orig.WEEKDAY_THURSDAY WEEKDAY_FRIDAY = ekatime_orig.WEEKDAY_FRIDAY WEEKDAY_SATURDAY = ekatime_orig.WEEKDAY_SATURDAY WEEKDAY_SUNDAY = ekatime_orig.WEEKDAY_SUNDAY WEEKDAY_MONDAY = ekatime_orig.WEEKDAY_MONDAY WEEKDAY_TUESDAY = ekatime_orig.WEEKDAY_TUESDAY SECONDS_IN_MINUTE = ekatime_orig.SECONDS_IN_MINUTE SECONDS_IN_HOUR = ekatime_orig.SECONDS_IN_HOUR SECONDS_IN_12H = ekatime_orig.SECONDS_IN_12H SECONDS_IN_DAY = ekatime_orig.SECONDS_IN_DAY SECONDS_IN_WEEK = ekatime_orig.SECONDS_IN_WEEK SECONDS_IN_365_YEAR = ekatime_orig.SECONDS_IN_365_YEAR SECONDS_IN_366_YEAR = ekatime_orig.SECONDS_IN_366_YEAR )
noinspection GoSnakeCaseUsage,GoUnusedConst
Variables ¶
var ( OnceInMinute = &ekatime_orig.OnceInMinute OnceIn10Minutes = &ekatime_orig.OnceIn10Minutes OnceIn15Minutes = &ekatime_orig.OnceIn15Minutes OnceIn30Minutes = &ekatime_orig.OnceIn30Minutes OnceInHour = &ekatime_orig.OnceInHour OnceIn2Hour = &ekatime_orig.OnceIn2Hour OnceIn3Hour = &ekatime_orig.OnceIn3Hour OnceIn6Hour = &ekatime_orig.OnceIn6Hour OnceIn12Hours = &ekatime_orig.OnceIn12Hours OnceInDay = &ekatime_orig.OnceInDay )
var ( NewCalendar = ekatime_orig.NewCalendar IsValidDate = ekatime_orig.IsValidDate DaysInMonth = ekatime_orig.DaysInMonth DaysInMonthIgnoreYear = ekatime_orig.DaysInMonthIgnoreYear IsLeap = ekatime_orig.IsLeap NewEvent = ekatime_orig.NewEvent TillNextMinute = ekatime_orig.TillNextMinute TillNextHour = ekatime_orig.TillNextHour TillNext12h = ekatime_orig.TillNext12h TillNextNoon = ekatime_orig.TillNextNoon TillNextMidnight = ekatime_orig.TillNextMidnight TillNextDay = ekatime_orig.TillNextDay TillNextMonth = ekatime_orig.TillNextMonth TillNextYear = ekatime_orig.TillNextYear IsValidTime = ekatime_orig.IsValidTime WeekdayJan1 = ekatime_orig.WeekdayJan1 WeekdayFrom06 = ekatime_orig.WeekdayFrom06 )
Functions ¶
This section is empty.
Types ¶
type Calendar ¶
type Calendar = ekatime_orig.Calendar
type Date ¶
type Date OriginalDate
Date is the same as ekatime.Date but with supporting go-pg (v10).
Read more: https://github.com/qioalice/ekago/ekatime/date_encode.go , https://github.com/go-pg/pg , https://github.com/go-pg/pg/blob/v10/example_custom_test.go .
func NewDateFromDayOfYear ¶
func NewDateFromDayOfYear(y Year, days ekatime_orig.Days) Date
func WrapDate ¶
func WrapDate(dd OriginalDate) Date
WrapDate returns an Date object as modified ekatime.Date object for being able to use it with go-pg.
See also: WrapDatePtr().
func WrapDatePtr ¶
func WrapDatePtr(dd *OriginalDate) *Date
WrapDatePtr returns a Date object by ptr as modified ekatime.Date object for being able to use it with go-pg.
See also: WrapDate().
func (Date) DaysInMonth ¶
func (*Date) DecodeBinary ¶
DecodeBinary
From https://github.com/jackc/pgtype@v1.7.0/pgtype.go :
DecodeBinary decodes src into BinaryDecoder. If src is nil then the original SQL value is NULL. BinaryDecoder takes ownership of src. The caller MUST not use it again.
func (Date) EncodeBinary ¶
EncodeBinary
From https://github.com/jackc/pgtype@v1.7.0/pgtype.go :
EncodeBinary should append the binary format of self to buf. If self is the SQL value NULL then append nothing and return (nil, nil). The caller of EncodeBinary is responsible for writing the correct NULL value or the length of the data written.
func (*Date) MarshalJSON ¶
func (Date) ToOrig ¶
func (dd Date) ToOrig() OriginalDate
func (*Date) ToOrigPtr ¶
func (dd *Date) ToOrigPtr() *OriginalDate
func (*Date) UnmarshalJSON ¶
type Day ¶
type Day = ekatime_orig.Day
type Days ¶ added in v3.2.2
type Days = ekatime_orig.Days
type Event ¶
type Event = ekatime_orig.Event
type Hour ¶
type Hour = ekatime_orig.Hour
type Minute ¶
type Minute = ekatime_orig.Minute
type Month ¶
type Month = ekatime_orig.Month
type OnceInCallback ¶
type OnceInCallback = ekatime_orig.OnceInCallback
type OnceInPanicCallback ¶
type OnceInPanicCallback = ekatime_orig.OnceInPanicCallback
type OriginalDate ¶
type OriginalDate = ekatime_orig.Date
type OriginalTime ¶
type OriginalTime = ekatime_orig.Time
type OriginalTimestamp ¶
type OriginalTimestamp = ekatime_orig.Timestamp
type OriginalTimestampPair ¶
type OriginalTimestampPair = ekatime_orig.TimestampPair
type Second ¶
type Second = ekatime_orig.Second
type Time ¶
type Time OriginalTime
Time is the same as ekatime.Time but with supporting go-pg (v10).
Read more: https://github.com/qioalice/ekago/ekatime/time_encode.go , https://github.com/go-pg/pg , https://github.com/go-pg/pg/blob/v10/example_custom_test.go .
func WrapTime ¶
func WrapTime(t OriginalTime) Time
WrapTime returns a Time object as modified ekatime.Time object for being able to use it with go-pg.
func WrapTimePtr ¶
func WrapTimePtr(t *OriginalTime) *Time
WrapTimePtr returns a Time object by ptr as modified ekatime.Time object for being able to use it with go-pg.
func (*Time) DecodeBinary ¶
DecodeBinary
From https://github.com/jackc/pgtype@v1.7.0/pgtype.go :
DecodeBinary decodes src into BinaryDecoder. If src is nil then the original SQL value is NULL. BinaryDecoder takes ownership of src. The caller MUST not use it again.
func (Time) EncodeBinary ¶
EncodeBinary
From https://github.com/jackc/pgtype@v1.7.0/pgtype.go :
EncodeBinary should append the binary format of self to buf. If self is the SQL value NULL then append nothing and return (nil, nil). The caller of EncodeBinary is responsible for writing the correct NULL value or the length of the data written.
func (*Time) MarshalJSON ¶
func (Time) ToOrig ¶
func (t Time) ToOrig() OriginalTime
func (*Time) ToOrigPtr ¶
func (t *Time) ToOrigPtr() *OriginalTime
func (*Time) UnmarshalJSON ¶
type Timestamp ¶
type Timestamp OriginalTimestamp
Timestamp is the same as ekatime.Timestamp but with supporting go-pg (v10).
Read more: https://github.com/qioalice/ekago/ekatime/timestamp_encode.go , https://github.com/go-pg/pg , https://github.com/go-pg/pg/blob/v10/example_custom_test.go .
func BeginningOfMonth ¶
func BeginningOfYear ¶
func EndOfMonth ¶
func NewTimestamp ¶
func NewTimestampFromStd ¶
func NewTimestampNow ¶
func NewTimestampNow() Timestamp
func WrapTimestamp ¶
func WrapTimestamp(ts OriginalTimestamp) Timestamp
WrapTimestamp returns a Timestamp object as modified ekatime.Timestamp object for being able to use it with go-pg.
See also: WrapTimestampPtr().
func WrapTimestampPtr ¶
func WrapTimestampPtr(ts *OriginalTimestamp) *Timestamp
WrapTimestampPtr returns a Timestamp object by ptr as modified ekatime.Time object for being able to use it with go-pg.
See also: WrapTimestamp().
func (Timestamp) BeginningAndEndOfDay ¶
func (ts Timestamp) BeginningAndEndOfDay() TimestampPair
func (Timestamp) BeginningAndEndOfMonth ¶
func (ts Timestamp) BeginningAndEndOfMonth() TimestampPair
func (Timestamp) BeginningAndEndOfYear ¶
func (ts Timestamp) BeginningAndEndOfYear() TimestampPair
func (Timestamp) BeginningOfDay ¶
func (Timestamp) BeginningOfMonth ¶
func (Timestamp) BeginningOfYear ¶
func (*Timestamp) DecodeBinary ¶
DecodeBinary
From https://github.com/jackc/pgtype@v1.7.0/pgtype.go :
DecodeBinary decodes src into BinaryDecoder. If src is nil then the original SQL value is NULL. BinaryDecoder takes ownership of src. The caller MUST not use it again.
func (Timestamp) EncodeBinary ¶
EncodeBinary
From https://github.com/jackc/pgtype@v1.7.0/pgtype.go :
EncodeBinary should append the binary format of self to buf. If self is the SQL value NULL then append nothing and return (nil, nil). The caller of EncodeBinary is responsible for writing the correct NULL value or the length of the data written.
func (Timestamp) EndOfMonth ¶
func (*Timestamp) MarshalJSON ¶
func (Timestamp) TillNext12h ¶
func (Timestamp) TillNextDay ¶
func (Timestamp) TillNextHour ¶
func (Timestamp) TillNextMidnight ¶
func (Timestamp) TillNextMinute ¶
func (Timestamp) TillNextMonth ¶
func (Timestamp) TillNextNoon ¶
func (Timestamp) TillNextYear ¶
func (Timestamp) ToOrig ¶
func (ts Timestamp) ToOrig() OriginalTimestamp
func (*Timestamp) ToOrigPtr ¶
func (ts *Timestamp) ToOrigPtr() *OriginalTimestamp
func (*Timestamp) UnmarshalJSON ¶
type TimestampPair ¶
type TimestampPair [2]Timestamp
TimestampPair is the same as ekatime.TimestampPair but with supporting go-pg (v10).
Read more: https://github.com/qioalice/ekago/ekatime/timestamp_encode.go , https://github.com/go-pg/pg , https://github.com/go-pg/pg/blob/v10/example_custom_test.go .
func BeginningAndEndOfMonth ¶
func BeginningAndEndOfMonth(y Year, m Month) TimestampPair
func BeginningAndEndOfYear ¶
func BeginningAndEndOfYear(y Year) TimestampPair
func WrapTimestampPair ¶
func WrapTimestampPair(tsp OriginalTimestampPair) TimestampPair
func (TimestampPair) I64 ¶
func (tsp TimestampPair) I64() (int64, int64)
func (TimestampPair) Split ¶
func (tsp TimestampPair) Split() (t1, t2 Timestamp)
func (TimestampPair) ToOrig ¶
func (tsp TimestampPair) ToOrig() OriginalTimestampPair
type Weekday ¶
type Weekday = ekatime_orig.Weekday
type Year ¶
type Year = ekatime_orig.Year