Lines Matching refs:tm

119  * Return the week number of `tm' (Sunday being the first day of the week)
124 week_number_sun (const struct tm *tm)
126 return (tm->tm_yday + 7 - (tm->tm_yday % 7 - tm->tm_wday + 7) % 7) / 7;
130 * Return the week number of `tm' (Monday being the first day of the week)
135 week_number_mon (const struct tm *tm)
137 int wday = (tm->tm_wday + 6) % 7;
139 return (tm->tm_yday + 7 - (tm->tm_yday % 7 - wday + 7) % 7) / 7;
143 * Return the week number of `tm' (Monday being the first day of the
149 week_number_mon4 (const struct tm *tm)
151 int wday = (tm->tm_wday + 6) % 7;
152 int w1day = (wday - tm->tm_yday % 7 + 7) % 7;
155 ret = (tm->tm_yday + w1day) / 7;
171 const struct tm *tm)
184 "%s", abb_weekdays[tm->tm_wday]);
188 "%s", full_weekdays[tm->tm_wday]);
193 "%s", abb_month[tm->tm_mon]);
197 "%s", full_month[tm->tm_mon]);
202 tm->tm_year,
203 tm->tm_mon + 1,
204 tm->tm_mday,
205 tm->tm_hour,
206 tm->tm_min,
207 tm->tm_sec);
211 "%02d", (tm->tm_year + 1900) / 100);
215 "%02d", tm->tm_mday);
220 tm->tm_mon + 1,
221 tm->tm_mday,
222 (tm->tm_year + 1900) % 100);
226 "%2d", tm->tm_mday);
230 "%04d-%02d-%02d", tm->tm_year + 1900,
231 tm->tm_mon + 1, tm->tm_mday);
241 "%02d", tm->tm_hour);
246 hour_24to12 (tm->tm_hour));
250 "%03d", tm->tm_yday + 1);
254 "%2d", tm->tm_hour);
259 hour_24to12 (tm->tm_hour));
263 "%02d", tm->tm_mon + 1);
267 "%02d", tm->tm_min);
274 hour_to_ampm (tm->tm_hour));
279 hour_24to12 (tm->tm_hour),
280 tm->tm_min,
281 tm->tm_sec,
282 hour_to_ampm (tm->tm_hour));
287 tm->tm_hour,
288 tm->tm_min);
292 "%d", (int)mktime(rk_UNCONST(tm)));
296 "%02d", tm->tm_sec);
305 tm->tm_hour,
306 tm->tm_min,
307 tm->tm_sec);
311 "%d", (tm->tm_wday == 0) ? 7 : tm->tm_wday);
315 "%02d", week_number_sun (tm));
319 "%02d", week_number_mon4 (tm));
323 "%d", tm->tm_wday);
327 "%02d", week_number_mon (tm));
332 tm->tm_year,
333 tm->tm_mon + 1,
334 tm->tm_mday);
338 "%02d", (tm->tm_year + 1900) % 100);
342 "%d", tm->tm_year + 1900);
348 (long)tm->tm_gmtoff
351 tm->tm_isdst ?
365 tm->tm_zone
367 tzname[tm->tm_isdst]