@ -607,11 +607,10 @@ void cgit_submodule_link(const char *class, char *path, const char *rev)
path [ len - 1 ] = tail ;
path [ len - 1 ] = tail ;
}
}
const struct date_mode * cgit_date_mode ( const char * format )
const struct date_mode * cgit_date_mode ( enum date_mode_type type )
{
{
static struct date_mode mode ;
static struct date_mode mode ;
mode . type = DATE_STRFTIME ;
mode . type = type ;
mode . strftime_fmt = format ;
mode . local = ctx . cfg . local_time ;
mode . local = ctx . cfg . local_time ;
return & mode ;
return & mode ;
}
}
@ -620,7 +619,7 @@ static void print_rel_date(time_t t, int tz, double value,
const char * class , const char * suffix )
const char * class , const char * suffix )
{
{
htmlf ( " <span class='%s' title=' " , class ) ;
htmlf ( " <span class='%s' title=' " , class ) ;
html_attr ( show_date ( t , tz , cgit_date_mode ( FMT_LONG DATE) ) ) ;
html_attr ( show_date ( t , tz , cgit_date_mode ( DATE_ISO8601 ) ) ) ;
htmlf ( " '>%.0f %s</span> " , value , suffix ) ;
htmlf ( " '>%.0f %s</span> " , value , suffix ) ;
}
}
@ -637,9 +636,9 @@ void cgit_print_age(time_t t, int tz, time_t max_relative)
if ( secs > max_relative & & max_relative > = 0 ) {
if ( secs > max_relative & & max_relative > = 0 ) {
html ( " <span title=' " ) ;
html ( " <span title=' " ) ;
html_attr ( show_date ( t , tz , cgit_date_mode ( FMT_LONG DATE) ) ) ;
html_attr ( show_date ( t , tz , cgit_date_mode ( DATE_ISO8601 ) ) ) ;
html ( " '> " ) ;
html ( " '> " ) ;
html_txt ( show_date ( t , tz , cgit_date_mode ( FMT_SHORTDATE ) ) ) ;
html_txt ( show_date ( t , tz , cgit_date_mode ( DATE_SHORT ) ) ) ;
html ( " </span> " ) ;
html ( " </span> " ) ;
return ;
return ;
}
}
@ -781,7 +780,7 @@ void cgit_print_docend(void)
else {
else {
htmlf ( " <div class='footer'>generated by <a href='http://git.zx2c4.com/cgit/about/'>cgit %s</a> at " ,
htmlf ( " <div class='footer'>generated by <a href='http://git.zx2c4.com/cgit/about/'>cgit %s</a> at " ,
cgit_version ) ;
cgit_version ) ;
html_txt ( show_date ( time ( NULL ) , 0 , cgit_date_mode ( FMT_LONG DATE) ) ) ;
html_txt ( show_date ( time ( NULL ) , 0 , cgit_date_mode ( DATE_ISO8601 ) ) ) ;
html ( " </div> \n " ) ;
html ( " </div> \n " ) ;
}
}
html ( " </div> <!-- id=cgit --> \n " ) ;
html ( " </div> <!-- id=cgit --> \n " ) ;