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 Event
- type Hour
- type Minute
- type Month
- 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 Now() Timestamp
- func UnixFrom(y Year, m Month, d Day, hh Hour, mm Minute, ss Second) Timestamp
- func UnixFromStd(t time.Time) 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 Today
- 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 ( // https://github.com/qioalice/ekago/ekatime/once_in.go 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 ( IsValidDate = ekatime_orig.IsValidDate IsLeap = ekatime_orig.IsLeap NewEvent = ekatime_orig.NewEvent TillNextMinute = ekatime_orig.TillNextMinute TillNextHour = ekatime_orig.TillNextHour TillNextNoon = ekatime_orig.TillNextNoon TillNextMidnight = ekatime_orig.TillNextMidnight TillNextDay = ekatime_orig.TillNextDay TillNextMonth = ekatime_orig.TillNextMonth TillNextYear = ekatime_orig.TillNextYear IsValidTime = ekatime_orig.IsValidTime )
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 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 ¶ added in v2.8.5
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 ¶ added in v2.8.5
func (*Date) DecodeBinary ¶ added in v2.8.15
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 ¶ added in v2.8.15
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 ¶ added in v2.8.5
func (Date) ToOrig ¶ added in v2.8.5
func (dd Date) ToOrig() OriginalDate
func (*Date) ToOrigPtr ¶ added in v2.8.5
func (dd *Date) ToOrigPtr() *OriginalDate
func (*Date) UnmarshalJSON ¶ added in v2.8.5
type Day ¶
type Day = ekatime_orig.Day
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 OriginalDate ¶ added in v2.8.11
type OriginalDate = ekatime_orig.Date
type OriginalTime ¶ added in v2.8.11
type OriginalTime = ekatime_orig.Time
type OriginalTimestamp ¶ added in v2.8.11
type OriginalTimestamp = ekatime_orig.Timestamp
type OriginalTimestampPair ¶ added in v2.8.11
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
WrapDate returns a Time object as modified ekatime.Time object for being able to use it with go-pg.
See also: WrapDateUnsafe().
func WrapTimePtr ¶ added in v2.8.5
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.
See also: WrapTime().
func (*Time) DecodeBinary ¶ added in v2.8.15
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 ¶ added in v2.8.15
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 ¶ added in v2.8.5
func (Time) ToOrig ¶ added in v2.8.5
func (t Time) ToOrig() OriginalTime
func (*Time) ToOrigPtr ¶ added in v2.8.5
func (t *Time) ToOrigPtr() *OriginalTime
func (*Time) UnmarshalJSON ¶ added in v2.8.5
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 UnixFromStd ¶
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 ¶ added in v2.8.5
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 ¶ added in v2.8.5
func (ts Timestamp) BeginningAndEndOfDay() TimestampPair
func (Timestamp) BeginningAndEndOfMonth ¶ added in v2.8.5
func (ts Timestamp) BeginningAndEndOfMonth() TimestampPair
func (Timestamp) BeginningAndEndOfYear ¶ added in v2.8.5
func (ts Timestamp) BeginningAndEndOfYear() TimestampPair
func (Timestamp) BeginningOfDay ¶ added in v2.8.5
func (Timestamp) BeginningOfMonth ¶ added in v2.8.5
func (Timestamp) BeginningOfYear ¶ added in v2.8.5
func (*Timestamp) DecodeBinary ¶ added in v2.8.15
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 ¶ added in v2.8.15
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 ¶ added in v2.8.5
func (*Timestamp) MarshalJSON ¶ added in v2.8.5
func (Timestamp) TillNext12h ¶ added in v2.8.5
func (Timestamp) TillNextDay ¶ added in v2.8.5
func (Timestamp) TillNextHour ¶ added in v2.8.5
func (Timestamp) TillNextMidnight ¶ added in v2.8.5
func (Timestamp) TillNextMinute ¶ added in v2.8.5
func (Timestamp) TillNextMonth ¶ added in v2.8.5
func (Timestamp) TillNextNoon ¶ added in v2.8.5
func (Timestamp) TillNextYear ¶ added in v2.8.5
func (Timestamp) ToOrig ¶ added in v2.8.5
func (ts Timestamp) ToOrig() OriginalTimestamp
func (*Timestamp) ToOrigPtr ¶ added in v2.8.5
func (ts *Timestamp) ToOrigPtr() *OriginalTimestamp
func (*Timestamp) UnmarshalJSON ¶ added in v2.8.5
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 ¶ added in v2.8.5
func WrapTimestampPair(tsp OriginalTimestampPair) TimestampPair
func (TimestampPair) I64 ¶ added in v2.8.5
func (tsp TimestampPair) I64() (int64, int64)
func (TimestampPair) Split ¶ added in v2.8.5
func (tsp TimestampPair) Split() (t1, t2 Timestamp)
func (TimestampPair) ToOrig ¶ added in v2.8.5
func (tsp TimestampPair) ToOrig() OriginalTimestampPair
type Today ¶
type Today = ekatime_orig.Today
type Weekday ¶
type Weekday = ekatime_orig.Weekday
type Year ¶
type Year = ekatime_orig.Year