Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DateIterator ¶
type DateIterator interface { // Get returns the current date. Get() calendar.Date // Copy returns a copy of this iterator. Copy() DateIterator // Move moves this iterator by the given days. Move(days int) // Diff returns the number of days from the given iterator to this iterator. Diff(from DateIterator) int // Year returns a YearIterator of the year including the date. Year() YearIterator // YearMonth returns a YearMonthIterator of the year and month including the date. YearMonth() YearMonthIterator // YearWeek returns a YearWeekIterator of the year and week including the date. YearWeek() YearWeekIterator }
DateIterator is an iterator iterating on dates of the calendar.
func OfDate ¶
func OfDate(date calendar.Date) DateIterator
OfDate creates a DateIterator on the date.
type YearIterator ¶
type YearIterator interface { // Get returns the current year. Get() calendar.Year // Copy returns a copy of this iterator. Copy() YearIterator // Move moves this iterator by the given years. Move(years int) // Diff returns the number of years from the given iterator to this iterator. Diff(from YearIterator) int // Date returns a DateIterator of the day of year in the year. Date(dayOfYear int) DateIterator // Days returns the number of days in the year. Days() int // FirstDate returns the first date in the year. FirstDate() DateIterator // LastDate returns the last date in the year. LastDate() DateIterator // Weeks returns the number of weeks in the year. Weeks() int // Week returns a YearWeekIterator of the week in the year. Week(week int) YearWeekIterator // FirstWeek returns the first week in the year. FirstWeek() YearWeekIterator // LastWeek returns the last week in the year. LastWeek() YearWeekIterator // Month returns a YearMonthIterator of the month in the year. Month(month calendar.Month) YearMonthIterator // FirstMonth returns the first month in the year. FirstMonth() YearMonthIterator // LastMonth returns the last month in the year. LastMonth() YearMonthIterator }
YearIterator is an iterator iterating on years of the calendar.
func OfYear ¶
func OfYear(year calendar.Year) YearIterator
type YearMonthIterator ¶
type YearMonthIterator interface { // Get returns the current year-month. Get() calendar.YearMonth // Copy returns a copy of this iterator. Copy() YearMonthIterator // Move moves this iterator by the given months. Move(months int) // Diff returns the number of months from the given iterator to this iterator. Diff(from YearMonthIterator) int // Year returns a YearIterator of the year including the year-month. Year() YearIterator // Days returns the number of days in the year-month. Days() int // Date returns a DateIterator of the day of month in the year-month. Date(dayOfMonth int) DateIterator // FirstDate returns the first date in the year-month. FirstDate() DateIterator // LastDate returns the last date in the year-month. LastDate() DateIterator }
YearMonthIterator is an iterator iterating on year-months of the calendar.
func OfYearMonth ¶
func OfYearMonth(yearMonth calendar.YearMonth) YearMonthIterator
type YearWeekIterator ¶
type YearWeekIterator interface { // Get returns the current year-week. Get() calendar.YearWeek // Copy returns a copy of this iterator. Copy() YearWeekIterator // Move moves this iterator by the given weeks. Move(weeks int) // Diff returns the number of weeks from the given iterator to this iterator. Diff(from YearWeekIterator) int // Year returns a YearIterator of the year including the year-week. Year() YearIterator // Date returns a DateIterator of the day of week in the year-week. Date(dayOfWeek calendar.DayOfWeek) DateIterator // FirstDate returns the first date in the year-week. FirstDate() DateIterator // LastDate returns the last date in the year-week. LastDate() DateIterator }
YearWeekIterator is an iterator iterating on year-weeks of the calendar.
func OfYearWeek ¶
func OfYearWeek(yearWeek calendar.YearWeek) YearWeekIterator
Click to show internal directories.
Click to hide internal directories.