Lines Matching refs:t
138 strftime_l(char *s, size_t maxsize, char const *format, struct tm const *t, in strftime_l() argument
142 return strftime(s, maxsize, format, t); in strftime_l()
149 strftime(char *s, size_t maxsize, const char *format, const struct tm *t) in strftime() argument
156 p = _fmt(((format == NULL) ? "%c" : format), t, s, s + maxsize, &warn); in strftime()
193 _fmt(const char *format, const struct tm *t, char *pt, in _fmt() argument
205 pt = _add((t->tm_wday < 0 || in _fmt()
206 t->tm_wday >= DAYSPERWEEK) ? in _fmt()
207 "?" : Locale->weekday[t->tm_wday], in _fmt()
211 pt = _add((t->tm_wday < 0 || in _fmt()
212 t->tm_wday >= DAYSPERWEEK) ? in _fmt()
213 "?" : Locale->wday[t->tm_wday], in _fmt()
217 pt = _add((t->tm_mon < 0 || in _fmt()
218 t->tm_mon >= MONSPERYEAR) ? in _fmt()
219 "?" : Locale->month[t->tm_mon], in _fmt()
224 pt = _add((t->tm_mon < 0 || in _fmt()
225 t->tm_mon >= MONSPERYEAR) ? in _fmt()
226 "?" : Locale->mon[t->tm_mon], in _fmt()
237 pt = _yconv(t->tm_year, TM_YEAR_BASE, in _fmt()
244 pt = _fmt(Locale->c_fmt, t, pt, ptlim, &warn2); in _fmt()
252 pt = _fmt("%m/%d/%y", t, pt, ptlim, warnp); in _fmt()
255 … pt = _conv(t->tm_mday, getformat(modifier, "%02d", "%2d", "%d", "%02d"), pt, ptlim); in _fmt()
277 pt = _conv(t->tm_mday, getformat(modifier, "%2d", "%2d", "%d", "%02d"), pt, ptlim); in _fmt()
280 pt = _fmt("%Y-%m-%d", t, pt, ptlim, warnp); in _fmt()
283 pt = _conv(t->tm_hour, getformat(modifier, "%02d", "%2d", "%d", "%02d"), pt, ptlim); in _fmt()
286 pt = _conv((t->tm_hour % 12) ? in _fmt()
287 (t->tm_hour % 12) : 12, in _fmt()
291 … pt = _conv(t->tm_yday + 1, getformat(modifier, "%03d", "%3d", "%d", "%03d"), pt, ptlim); in _fmt()
304 pt = _conv(t->tm_hour, getformat(modifier, "%2d", "%2d", "%d", "%02d"), pt, ptlim); in _fmt()
324 pt = _conv((t->tm_hour % 12) ? in _fmt()
325 (t->tm_hour % 12) : 12, in _fmt()
329 pt = _conv(t->tm_min, getformat(modifier, "%02d", "%2d", "%d", "%02d"), pt, ptlim); in _fmt()
332 … pt = _conv(t->tm_mon + 1, getformat(modifier, "%02d", "%2d", "%d", "%02d"), pt, ptlim); in _fmt()
339 pt = _add((t->tm_hour >= (HOURSPERDAY / 2)) ? in _fmt()
345 pt = _fmt("%H:%M", t, pt, ptlim, warnp); in _fmt()
348 pt = _fmt("%I:%M:%S %p", t, pt, ptlim, warnp); in _fmt()
351 pt = _conv(t->tm_sec, getformat(modifier, "%02d", "%2d", "%d", "%02d"), pt, ptlim); in _fmt()
360 tm = *t; in _fmt()
371 pt = _fmt("%H:%M:%S", t, pt, ptlim, warnp); in _fmt()
377 pt = _conv((t->tm_yday + DAYSPERWEEK - in _fmt()
378 t->tm_wday) / DAYSPERWEEK, in _fmt()
388 pt = _conv((t->tm_wday == 0) ? in _fmt()
389 DAYSPERWEEK : t->tm_wday, in _fmt()
420 year = t->tm_year; in _fmt()
422 yday = t->tm_yday; in _fmt()
423 wday = t->tm_wday; in _fmt()
464 t->tm_mon == TM_JANUARY) || in _fmt()
466 t->tm_mon == TM_DECEMBER)) in _fmt()
488 pt = _fmt("%e-%b-%Y", t, pt, ptlim, warnp); in _fmt()
491 pt = _conv((t->tm_yday + DAYSPERWEEK - in _fmt()
492 (t->tm_wday ? in _fmt()
493 (t->tm_wday - 1) : in _fmt()
498 pt = _conv(t->tm_wday, "%d", pt, ptlim); in _fmt()
501 pt = _fmt(Locale->X_fmt, t, pt, ptlim, warnp); in _fmt()
507 pt = _fmt(Locale->x_fmt, t, pt, ptlim, &warn2); in _fmt()
516 pt = _yconv(t->tm_year, TM_YEAR_BASE, in _fmt()
521 pt = _yconv(t->tm_year, TM_YEAR_BASE, in _fmt()
529 const char* zone = t->TM_ZONE; in _fmt()
534 if (t->tm_isdst == 0) zone = tzname[0]; in _fmt()
535 else if (t->tm_isdst > 0) zone = tzname[1]; in _fmt()
545 if (t->tm_isdst >= 0) in _fmt()
546 pt = _add(tzname[t->tm_isdst != 0], in _fmt()
560 if (t->tm_isdst < 0) in _fmt()
563 diff = t->TM_GMTOFF; in _fmt()
584 if (t->tm_isdst == 0) in _fmt()
609 pt = _fmt(Locale->date_fmt, t, pt, ptlim, in _fmt()