+ return buf;
+}
+
+void cgit_print_date(time_t secs, const char *format, int local_time)
+{
+ html_txt(fmt_date(secs, format, local_time));
+}
+
+const struct date_mode *cgit_date_mode(const char *format)
+{
+ static struct date_mode mode;
+ mode.type = DATE_STRFTIME;
+ mode.strftime_fmt = format;
+ mode.local = ctx.cfg.local_time;
+ return &mode;
+}
+
+static void print_rel_date(time_t t, int tz, double value,
+ const char *class, const char *suffix)
+{
+ htmlf("<span class='%s' title='", class);
+ html_attr(show_date(t, tz, cgit_date_mode(FMT_LONGDATE)));
+ htmlf("'>%.0f %s</span>", value, suffix);