* make mu_msg_str_date[_s] take an strftime-like argument for the format;

update callers
This commit is contained in:
Dirk-Jan C. Binnema
2010-11-03 07:43:46 +02:00
parent 55cd529bec
commit ef4116efc2
6 changed files with 22 additions and 18 deletions

View File

@ -50,22 +50,24 @@ mu_msg_str_normalize (const char *str, gboolean downcase)
const char*
mu_msg_str_date_s (time_t t)
mu_msg_str_date_s (const char* frm, time_t t)
{
struct tm *tmbuf;
static char buf[64];
static char buf[128];
g_return_val_if_fail (frm, NULL);
tmbuf = localtime(&t);
strftime (buf, sizeof(buf), "%x", tmbuf);
strftime (buf, sizeof(buf), frm, tmbuf);
return buf;
}
char*
mu_msg_str_date (time_t t)
mu_msg_str_date (const char* frm, time_t t)
{
return g_strdup (mu_msg_str_date_s(t));
return g_strdup (mu_msg_str_date_s(frm, t));
}