ekatime

package
v3.2.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 18, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
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

View Source
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
)
View Source
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 NewDate

func NewDate(y Year, m Month, d Day) Date

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) AppendTo

func (dd Date) AppendTo(b []byte, separator byte) []byte

func (Date) AppendValue

func (dd Date) AppendValue(b []byte, flags int) ([]byte, error)

func (Date) Day

func (dd Date) Day() Day

func (Date) DaysInMonth

func (dd Date) DaysInMonth() Day

func (*Date) DecodeBinary

func (dd *Date) DecodeBinary(_ *pgtype.ConnInfo, src []byte) error

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

func (dd Date) EncodeBinary(_ *pgtype.ConnInfo, buf []byte) (newBuf []byte, err error)

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) Equal

func (dd Date) Equal(other Date) bool

func (*Date) MarshalJSON

func (dd *Date) MarshalJSON() ([]byte, error)

func (Date) Month

func (dd Date) Month() Month

func (*Date) ParseFrom

func (dd *Date) ParseFrom(b []byte) error

func (*Date) ScanValue

func (dd *Date) ScanValue(rd types.Reader, n int) error

func (Date) Split

func (dd Date) Split() (y Year, m Month, d Day)

func (Date) String

func (dd Date) String() string

func (Date) ToCmp

func (dd Date) ToCmp() Date

func (Date) ToOrig

func (dd Date) ToOrig() OriginalDate

func (*Date) ToOrigPtr

func (dd *Date) ToOrigPtr() *OriginalDate

func (*Date) UnmarshalJSON

func (dd *Date) UnmarshalJSON(b []byte) error

func (Date) Weekday

func (dd Date) Weekday() Weekday

func (Date) WithTime

func (dd Date) WithTime(hh Hour, mm Minute, ss Second) Timestamp

func (Date) Year

func (dd Date) Year() Year

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 NewTime

func NewTime(h Hour, m Minute, s Second) Time

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) AppendTo

func (t Time) AppendTo(b []byte, separator byte) []byte

func (Time) AppendValue

func (t Time) AppendValue(b []byte, flags int) ([]byte, error)

func (*Time) DecodeBinary

func (t *Time) DecodeBinary(_ *pgtype.ConnInfo, src []byte) error

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

func (t Time) EncodeBinary(_ *pgtype.ConnInfo, buf []byte) (newBuf []byte, err error)

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) Hour

func (t Time) Hour() Hour

func (*Time) MarshalJSON

func (t *Time) MarshalJSON() ([]byte, error)

func (Time) Minute

func (t Time) Minute() Minute

func (*Time) ParseFrom

func (t *Time) ParseFrom(b []byte) error

func (*Time) ScanValue

func (t *Time) ScanValue(rd types.Reader, n int) error

func (Time) Second

func (t Time) Second() Second

func (Time) Split

func (t Time) Split() (h Hour, m Minute, s Second)

func (Time) String

func (t Time) String() string

func (Time) ToOrig

func (t Time) ToOrig() OriginalTime

func (*Time) ToOrigPtr

func (t *Time) ToOrigPtr() *OriginalTime

func (*Time) UnmarshalJSON

func (t *Time) UnmarshalJSON(b []byte) error

func (Time) WithDate

func (t Time) WithDate(y Year, m Month, d Day) Timestamp

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 BeginningOfMonth(y Year, m Month) Timestamp

func BeginningOfYear

func BeginningOfYear(y Year) Timestamp

func EndOfMonth

func EndOfMonth(y Year, m Month) Timestamp

func EndOfYear

func EndOfYear(y Year) Timestamp

func InMonth

func InMonth(y Year, m Month) Timestamp

func InYear

func InYear(y Year) Timestamp

func NewTimestamp

func NewTimestamp(y Year, m Month, d Day, hh Hour, mm Minute, ss Second) Timestamp

func NewTimestampFromStd

func NewTimestampFromStd(t time.Time) Timestamp

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) AppendTo

func (ts Timestamp) AppendTo(b []byte, separatorDate, separatorTime byte) []byte

func (Timestamp) AppendValue

func (ts Timestamp) AppendValue(b []byte, flags int) ([]byte, error)

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 (ts Timestamp) BeginningOfDay() Timestamp

func (Timestamp) BeginningOfMonth

func (ts Timestamp) BeginningOfMonth() Timestamp

func (Timestamp) BeginningOfYear

func (ts Timestamp) BeginningOfYear() Timestamp

func (Timestamp) Date

func (ts Timestamp) Date() Date

func (Timestamp) Day

func (ts Timestamp) Day() Day

func (*Timestamp) DecodeBinary

func (ts *Timestamp) DecodeBinary(_ *pgtype.ConnInfo, src []byte) error

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

func (ts Timestamp) EncodeBinary(_ *pgtype.ConnInfo, buf []byte) (newBuf []byte, err error)

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) EndOfDay

func (ts Timestamp) EndOfDay() Timestamp

func (Timestamp) EndOfMonth

func (ts Timestamp) EndOfMonth() Timestamp

func (Timestamp) EndOfYear

func (ts Timestamp) EndOfYear() Timestamp

func (Timestamp) Hour

func (ts Timestamp) Hour() Hour

func (Timestamp) I64

func (ts Timestamp) I64() int64

func (*Timestamp) MarshalJSON

func (ts *Timestamp) MarshalJSON() ([]byte, error)

func (Timestamp) Minute

func (ts Timestamp) Minute() Minute

func (Timestamp) Month

func (ts Timestamp) Month() Month

func (*Timestamp) ParseFrom

func (ts *Timestamp) ParseFrom(b []byte) error

func (*Timestamp) ScanValue

func (ts *Timestamp) ScanValue(rd types.Reader, n int) error

func (Timestamp) Second

func (ts Timestamp) Second() Second

func (Timestamp) Split

func (ts Timestamp) Split() (d Date, t Time)

func (Timestamp) Std

func (ts Timestamp) Std() time.Time

func (Timestamp) String

func (ts Timestamp) String() string

func (Timestamp) TillNext12h

func (ts Timestamp) TillNext12h() time.Duration

func (Timestamp) TillNextDay

func (ts Timestamp) TillNextDay() time.Duration

func (Timestamp) TillNextHour

func (ts Timestamp) TillNextHour() time.Duration

func (Timestamp) TillNextMidnight

func (ts Timestamp) TillNextMidnight() time.Duration

func (Timestamp) TillNextMinute

func (ts Timestamp) TillNextMinute() time.Duration

func (Timestamp) TillNextMonth

func (ts Timestamp) TillNextMonth() time.Duration

func (Timestamp) TillNextNoon

func (ts Timestamp) TillNextNoon() time.Duration

func (Timestamp) TillNextYear

func (ts Timestamp) TillNextYear() time.Duration

func (Timestamp) Time

func (ts Timestamp) Time() Time

func (Timestamp) ToOrig

func (ts Timestamp) ToOrig() OriginalTimestamp

func (*Timestamp) ToOrigPtr

func (ts *Timestamp) ToOrigPtr() *OriginalTimestamp

func (*Timestamp) UnmarshalJSON

func (ts *Timestamp) UnmarshalJSON(b []byte) error

func (Timestamp) Year

func (ts Timestamp) Year() Year

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL