Lines Matching refs:month

33 static uint8_t get_day_of_week(uint32_t year, uint32_t month, uint32_t day);
34 static uint8_t get_month_length(int32_t year, int32_t month);
84 void lv_calendar_set_today_date(lv_obj_t * obj, uint32_t year, uint32_t month, uint32_t day) in lv_calendar_set_today_date() argument
90 calendar->today.month = month; in lv_calendar_set_today_date()
109 void lv_calendar_set_showed_date(lv_obj_t * obj, uint32_t year, uint32_t month) in lv_calendar_set_showed_date() argument
115 calendar->showed_date.month = month; in lv_calendar_set_showed_date()
120 d.month = calendar->showed_date.month; in lv_calendar_set_showed_date()
131 uint8_t act_mo_len = get_month_length(d.year, d.month); in lv_calendar_set_showed_date()
132 uint8_t day_first = get_day_of_week(d.year, d.month, 1); in lv_calendar_set_showed_date()
138 uint8_t prev_mo_len = get_month_length(d.year, d.month - 1); in lv_calendar_set_showed_date()
219 date->month = 0; in lv_calendar_get_pressed_date()
230 date->month = calendar->showed_date.month; in lv_calendar_get_pressed_date()
246 calendar->today.month = 1; in lv_calendar_constructor()
250 calendar->showed_date.month = 1; in lv_calendar_constructor()
284 lv_calendar_set_showed_date(obj, calendar->showed_date.year, calendar->showed_date.month); in lv_calendar_constructor()
285 … lv_calendar_set_today_date(obj, calendar->today.year, calendar->today.month, calendar->today.day); in lv_calendar_constructor()
330 static uint8_t get_month_length(int32_t year, int32_t month) in get_month_length() argument
332 month--; in get_month_length()
333 if(month < 0) { in get_month_length()
335 month = 12 + month; /*`month` is negative, the result will be < 12*/ in get_month_length()
337 if(month >= 12) { in get_month_length()
339 month -= 12; in get_month_length()
343 return (month == 1) ? (28 + is_leap_year(year)) : 31 - month % 7 % 2; in get_month_length()
363 static uint8_t get_day_of_week(uint32_t year, uint32_t month, uint32_t day) in get_day_of_week() argument
365 uint32_t a = month < 3 ? 1 : 0; in get_day_of_week()
369 …uint32_t day_of_week = (day + (31 * (month - 2 + 12 * a) / 12) + b + (b / 4) - (b / 100) + (b / 40… in get_day_of_week()
371 …uint32_t day_of_week = (day + (31 * (month - 2 + 12 * a) / 12) + b + (b / 4) - (b / 100) + (b / 40… in get_day_of_week()
385 uint8_t day_first = get_day_of_week(calendar->showed_date.year, calendar->showed_date.month, 1); in highlight_update()
389 calendar->highlighted_dates[i].month == calendar->showed_date.month) { in highlight_update()
396 …showed_date.year == calendar->today.year && calendar->showed_date.month == calendar->today.month) { in highlight_update()