Documentation ¶
Index ¶
- Constants
- Variables
- func DayofmonthToEnglish(i uint16) string
- func MonthBegin(dt time.Time, deltaMonths int) time.Time
- func MonthContinuousIsQuarterBegin(monthc uint64) bool
- func MonthContinuousIsYearBegin(monthc uint64) bool
- func MonthContinuousToTime(monthc uint64) time.Time
- func MonthContinuousToYearMonth(monthc uint64) (uint64, uint64)
- func Parse(months []string, value string, insensitive bool) (time.Month, error)
- func TimeSeriesMonth(sortAsc bool, times ...time.Time) timeslice.TimeSlice
- func TimeToMonthContinuous(t time.Time) uint64
- func YearMonthBase36(yyyy, mm uint64) string
- func YearMonthBase36Time(dt time.Time) string
- func YearMonthToMonthContinuous(year, month uint64) uint64
Constants ¶
const ( MonthsEnAbbr3 = "Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec" MonthsEnFull = "January,February,March,April,May,June,July,August,September,October,November,December" )
Variables ¶
var ( ErrMonthsFormatInvalid = errors.New("invalid number of month elements") ErrMonthNotFound = errors.New("month not found") )
Functions ¶
func DayofmonthToEnglish ¶
func MonthBegin ¶
MonthBegin allows you to add/subtract months resulting in the first day of each month while avoiding Go's `AddDate` normalization where "adding one month to October 31 yields December 1, the normalized form for November 31." Setting `deltaMonths` to 0 indicates the current month.
func MonthContinuousToTime ¶
MonthContinuousToTime converts a continuous month value to a `time.Time` value.
func MonthContinuousToYearMonth ¶
MonthContinuousToYearMonth converts a continuous month value (e.g. number of months from year 0).
func TimeSeriesMonth ¶
TimeSeriesMonth returns time series of months given start and end input times.
func TimeToMonthContinuous ¶
TimeToMonthContinuous converts a `time.Time` value to a continuous month.
func YearMonthBase36 ¶
func YearMonthBase36Time ¶
func YearMonthToMonthContinuous ¶
YearMonthToMonthContinuous converts a year and month to a continuous month integer. This is useful when an even even spacing between months is desired, such as with charting x-axis values.
Types ¶
This section is empty.