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