// Days generates a seq of timestamps by day, from -days to today.
175588
func (ts timeSequence) Days(days int) []time.Time {
	var values []time.Time
	for day := days; day >= 0; day-- {
		values = append(values, time.Now().AddDate(0, 0, -day))
	}
	return values
}
220631
func (c *Carbon) DiffInWeekendDays(carb *Carbon, abs bool) int64 {
	f := func(t *Carbon) bool {
		return t.IsWeekend()
	}

	return c.DiffFiltered(dayDuration, f, carb, abs)
}
107550
func (fur *fur) WeekdayShort(weekday time.Weekday) string {
	return fur.daysShort[weekday]
}
175438
func (c *Carbon) AddWeekdays(wd int) *Carbon {
	d := 1
	if wd < 0 {
		wd, d = -wd, -d
	}
	t := c.Copy()
	for wd > 0 {
		t = t.AddDays(d)
		if t.IsWeekday() {
			wd--
		}
	}

	return t
}
924640
func UnixToDay(epoch int64) time.Time {
	t := time.Unix(epoch, 0).UTC()
	return time.Date(t.Year(), t.Month(), t.Day(), 0, 0, 0, 0, time.UTC)
}
117023
func (c *Carbon) IsSameDay(carb *Carbon) bool {
	n := nowIn(c.Location())
	if carb != nil {
		n = carb
	}

	return c.Year() == n.Year() && c.Month() == n.Month() && c.Day() == n.Day()
}
999746
func (s *Transition) SetDays(v int64) *Transition {
	s.Days = &v
	return s
}
1260163
func (t MysqlTime) YearDay() int {
	if t.month == 0 || t.day == 0 {
		return 0
	}
	return calcDaynr(int(t.year), int(t.month), int(t.day)) -
		calcDaynr(int(t.year), 1, 1) + 1
}
5988
func (pt *pt_PT) WeekdayShort(weekday time.Weekday) string {
	return pt.daysShort[weekday]
}
933350
func (mer *mer) WeekdayShort(weekday time.Weekday) string {
	return mer.daysShort[weekday]
}
1192243
func GetLastDay(year, month int) int {
	var day = 0
	if month > 0 && month <= 12 {
		day = daysByMonth[month-1]
	}
	if month == 2 && isLeapYear(uint16(year)) {
		day = 29
	}
	return day
}
80040
func TimeFromDays(num int64) Time {
	if num < 0 {
		return Time{
			Time: FromDate(0, 0, 0, 0, 0, 0, 0),
			Type: mysql.TypeDate,
			Fsp:  0,
		}
	}
	year, month, day := getDateFromDaynr(uint(num))

	return Time{
		Time: FromDate(int(year), int(month), int(day), 0, 0, 0, 0),
		Type: mysql.TypeDate,
		Fsp:  0,
	}
}
700422
func (c *Carbon) SetDay(d int) {
	c.Time = time.Date(c.Year(), c.Month(), d, c.Hour(), c.Minute(), c.Second(), c.Nanosecond(), c.Location())
}
661438
func (m DayOfMonthMapper) ID(ti ...interface{}) (rowIDs []int64, err error) {
	t := ti[0].(time.Time)
	return []int64{int64(t.Day())}, nil
}
901455
func (ar *ar_DZ) WeekdayShort(weekday time.Weekday) string {
	return ar.daysShort[weekday]
}
328716
func DateS(ts string, format string) string {
	i, _ := strconv.ParseInt(ts, 10, 64)
	return Date(i, format)
}
416060
func (w Weekday) Occurrences(tr TimeRange) chan time.Time {
	return occurrencesFor(w, tr)
}