Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Calendar ¶
type Calendar struct {
// contains filtered or unexported fields
}
Calendar exposes functions to manipulate dates with respect to a calendar.
func New ¶
func New(convention Convention) *Calendar
New returns a calendar based on the specified input convention.
func (*Calendar) LatestBefore ¶
LatestBefore returns the latest date before or equal to an input date. As opposed to the input date, the output date belongs to the calendar by construction.
type Convention ¶
type Convention string
Convention defines the calendar convention.
const ( // BusinessDays uses a no-holiday calendar. // Only working days are active, weekends are neglected. BusinessDays Convention = "BusinessDays" // CalendarDays defines a convention that uses a nominal ISO calendar. // All days, including weekends, are considered active. CalendarDays Convention = "CalendarDays" )
Click to show internal directories.
Click to hide internal directories.