Lines Matching refs:day

321          * Compute the day of the week for the first day of the month.  "instance" has a
322 * day number and a DotW, so we compute the DotW of the 1st from that. Note DotW
325 * The basic calculation is to take the instance's "day of the week" number, subtract
326 * (day of the month - 1) mod 7, and then make sure it's positive. We can simplify
341 * Generate a set according to the BYDAY rules. For each day of the month, determine
342 * if its day of the week is included. If so, append it to the day set.
349 // For each month day, see if it's part of the set. (This makes some assumptions
430 boolean get(Time iterator, int day)
441 + "/" + iterator.year + " day=" + day);
443 if (day < 1 || day > 28) {
446 t.set(day, realMonth, realYear);
450 day = t.monthDay;
460 Log.i(TAG, "set t=" + t + " " + realMonth + "/" + day + "/" + realYear);
466 t.set(day, realMonth, realYear);
482 return (mDays & (1<<day)) != 0;
509 // calculate the day of week for the first of this month (first)
534 // v is 0, each day in the month/week
670 // them to year/month/day values in the local timezone.
685 // them to year/month/day values in the local timezone.
698 // for fast comparisons and that is easy to generate from year/month/day
826 // days, set the iterator day field to 1 because sometimes
847 // We need the "until" year/month/day values to be in the same
858 // is an all-day one.
910 * iterator.weekDay indicates the day of the week (0-6, SU-SA).
917 * The day that starts the week is determined by WKST, which
921 * Thursdays. Tuesday is day 2, Thursday is day 4, so we
924 * need to move back (2 - 1 + 7) % 7 = 1 day.
939 do { // day
940 int day;
946 day = dayIndex;
949 day = iteratorDay;
951 if (SPEW) Log.i(TAG, " day=" + day);
980 generated.set(second, minute, hour, day, month, iteratorYear);
1161 // include this year's leap day, if any.
1164 // effective date but makes monthDay (the day of the month) much
1257 * the given year, month, and day.
1261 * @param day the 1-based day of the month in the range [1,31]
1264 static int weekDay(int year, int month, int day) {
1269 return (day + (13 * month - 14) / 5 + year + year/4 - year/100 + year/400) % 7;
1273 * Computes the 0-based "year day", given the year, month, and day.
1277 * @param day the 1-based day in the range [1,31]
1278 * @return the 0-based "year day", the number of days into the year
1280 static int yearDay(int year, int month, int day) {
1281 int yearDay = DAYS_IN_YEAR_PRECEDING_MONTH[month] + day - 1;