Lines Matching defs:day
45 * 0 sunday first day of week
46 * 1 monday first day of week
47 * 2 monday first day of iso week
49 * if day<0 then set tm to first day of week
50 * otherwise set tm to day in week
55 tmweek(Tm_t* tm, int type, int week, int day)
61 if ((day = tm->tm_wday - tm->tm_yday % 7) < 0)
62 day += 7;
63 week = (tm->tm_yday + offset[day][type]) / 7;
67 week = (day > 0 && day < 6 || tmisleapyear(tm->tm_year - 1)) ? 53 : 52;
73 if (day < 0)
74 day = type != 0;
79 tm->tm_mday = week * 7 - offset[d][type] + ((day || type != 2) ? day : 7);
81 if (d = tm->tm_wday - day)