Lines Matching refs:day
39 d->day,
53 GDateDay day;
94 TEST("Returned day is 1", g_date_get_day(d) == 1);
99 TEST("Bad day is invalid", !g_date_valid_day(G_DATE_BAD_DAY));
100 TEST("Day 32 is invalid", !g_date_valid_day(32));
133 TEST("GDate's \"Julian\" epoch's first day is valid", g_date_valid(d));
194 day = 1;
198 while (day <= dim)
203 TEST("DMY triplet is valid", g_date_valid_dmy(day,m,y));
207 d = &days[day-1];
209 TEST("Cleared day is invalid", !g_date_valid(d));
211 g_date_set_dmy(d,day,m,y);
213 TEST("Set day is valid", g_date_valid(d));
215 if (m == G_DATE_JANUARY && day == 1)
225 TEST("Day of month accessor works", g_date_get_day(d) == day);
227 TEST("Day of year is consistent with Julian dates",
233 g_print("first day: %u this day: %u day of year: %u\n",
239 if (m == G_DATE_DECEMBER && day == 31)
241 TEST("Last day of year equals number of days in year",
245 g_print("last day: %u days in year: %u\n",
250 TEST("Day of year is not more than number of days in the year",
266 TEST("Monday week of year on Monday 1 more than previous day's week of year",
268 if ((m == G_DATE_JANUARY && day <= 4) ||
269 (m == G_DATE_DECEMBER && day >= 29)) {
273 TEST("ISO 8601 week of year on Monday 1 more than previous day's week of year",
279 TEST("Monday week of year on non-Monday 0 more than previous day's week of year",
281 if (!(day == 1 && m == G_DATE_JANUARY)) {
282 TEST("ISO 8601 week of year on non-Monday 0 more than previous day's week of year (",
303 TEST("Sunday week of year on Sunday 1 more than previous day's week of year",
308 TEST("Sunday week of year on non-Sunday 0 more than previous day's week of year",
332 TEST("Forward days then backward days returns us to current day",
333 g_date_get_day(d) == day);
337 g_print(" (increment %u, dmy %u %u %u) ", i, day, m, y);
346 g_print(" (increment %u, dmy %u %u %u) ", i, day, m, y);
355 g_print(" (increment %u, dmy %u %u %u) ", i, day, m, y);
372 g_print(" (increment %u, dmy %u %u %u) ", i, day, m, y);
381 g_print(" (increment %u, dmy %u %u %u) ", i, day, m, y);
386 if (day < 29)
388 /* Day should be unchanged */
390 TEST("Forward months then backward months returns us to current day",
391 g_date_get_day(d) == day);
395 g_print(" (increment %u, dmy %u %u %u) ", i, day, m, y);
401 /* reset the day for later tests */
402 g_date_set_day(d, day);
420 g_print(" (increment %u, dmy %u %u %u) ", i, day, m, y);
429 g_print(" (increment %u, dmy %u %u %u) ", i, day, m, y);
433 if (m != 2 && day != 29)
435 TEST("Forward years then backward years returns us to current day",
436 g_date_get_day(d) == day);
440 g_print(" (increment %u, dmy %u %u %u) ", i, day, m, y);
446 g_date_set_day(d, day); /* reset */
467 TEST("Next day has julian 1 higher",
475 TEST("Previous day has julian 1 lower",
488 ++day;