Documentation ¶
Index ¶
- Constants
- func InvalidDateSpan() merrors.CommonError
- func InvalidMonth() merrors.CommonError
- func NoOverlapToClamp() merrors.CommonError
- type Date
- func (d Date) DateDiff(other Date) int
- func (d Date) IsEarlier(other Date) bool
- func (d Date) IsEarlierEq(other Date) bool
- func (d Date) IsEqual(other Date) bool
- func (d Date) IsLater(other Date) bool
- func (d Date) IsLaterEq(other Date) bool
- func (d Date) IsNextDay(other Date) bool
- func (d Date) JapanFiscalYear() JapanFiscalYear
- func (d Date) MarshalJSON() ([]byte, error)
- func (d Date) MarshalText() (text []byte, err error)
- func (d Date) MinusNDay(n int) Date
- func (d Date) Month() Month
- func (d Date) PlusNDay(n int) Date
- func (d *Date) Scan(value interface{}) error
- func (d Date) String() string
- func (d Date) StringWithFormat(format string) string
- func (d *Date) UnmarshalJSON(data []byte) error
- func (d Date) Value() (driver.Value, error)
- func (d Date) Year() Year
- func (d Date) YearMonth() YearMonth
- type DateSpan
- func (s DateSpan) ClampDateSpan(other DateSpan) (DateSpan, error)
- func (s DateSpan) GetDateList() Dates
- func (s DateSpan) IncludesDate(date Date) bool
- func (s DateSpan) IsContinuous(other DateSpan) bool
- func (s DateSpan) IsOverlapping(other DateSpan) bool
- func (s DateSpan) OverlappingYearMonth() YearMonths
- type DateSpans
- type DateSpansSlice
- type Dates
- type JapanFiscalYear
- type Month
- type Year
- type YearMonth
- type YearMonths
Constants ¶
View Source
const ( ErrorInvalidDateSpan merrors.ErrorType = "invalid_date_span" ErrorNoOverlapToClamp merrors.ErrorType = "no_overlap_to_clamp" )
View Source
const (
ErrorInvalidMonth merrors.ErrorType = "invalidMonth"
)
Variables ¶
This section is empty.
Functions ¶
func InvalidDateSpan ¶
func InvalidDateSpan() merrors.CommonError
func InvalidMonth ¶
func InvalidMonth() merrors.CommonError
func NoOverlapToClamp ¶
func NoOverlapToClamp() merrors.CommonError
Types ¶
type Date ¶
func MustDateFromStr ¶
func NewDateFromStr ¶
func NewDateFromUnix ¶
func (Date) IsEarlierEq ¶
func (Date) JapanFiscalYear ¶
func (d Date) JapanFiscalYear() JapanFiscalYear
func (Date) MarshalJSON ¶
func (Date) MarshalText ¶
func (Date) StringWithFormat ¶
func (*Date) UnmarshalJSON ¶
type DateSpan ¶
func MustDateSpan ¶
func (DateSpan) ClampDateSpan ¶
ClampDateSpan 重複している期間を取り出す
func (DateSpan) GetDateList ¶
func (DateSpan) IncludesDate ¶
func (DateSpan) IsContinuous ¶
func (DateSpan) IsOverlapping ¶
func (DateSpan) OverlappingYearMonth ¶
func (s DateSpan) OverlappingYearMonth() YearMonths
type DateSpansSlice ¶
type DateSpansSlice []DateSpans
func (DateSpansSlice) Merge ¶
func (s DateSpansSlice) Merge() DateSpans
type YearMonths ¶
type YearMonths []YearMonth
Click to show internal directories.
Click to hide internal directories.