MCPcopy Index your code
hub / github.com/git/git / parse_dates

Function parse_dates

t/helper/test-date.c:61–78  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

59}
60
61static void parse_dates(const char **argv)
62{
63 struct strbuf result = STRBUF_INIT;
64
65 for (; *argv; argv++) {
66 timestamp_t t;
67 int tz;
68
69 strbuf_reset(&result);
70 parse_date(*argv, &result);
71 if (sscanf(result.buf, "%"PRItime" %d", &t, &tz) == 2)
72 printf("%s -> %s\n",
73 *argv, show_date(t, tz, DATE_MODE(ISO8601)));
74 else
75 printf("%s -> bad\n", *argv);
76 }
77 strbuf_release(&result);
78}
79
80static void parse_approxidate(const char **argv)
81{

Callers 1

cmd__dateFunction · 0.85

Calls 3

parse_dateFunction · 0.85
show_dateFunction · 0.85
strbuf_releaseFunction · 0.85

Tested by

no test coverage detected