* mu-cmd/-cfind/-find: use the split-off date funcs

This commit is contained in:
Dirk-Jan C. Binnema 2011-07-21 00:31:17 +03:00
parent d894621c7f
commit eb62f52e02
3 changed files with 7 additions and 5 deletions

View File

@ -27,6 +27,7 @@
#include "mu-cmd.h"
#include "mu-util.h"
#include "mu-str.h"
#include "mu-date.h"
#include "mu-contacts.h"
#include "mu-runtime.h"
@ -92,8 +93,8 @@ each_contact_bbdb (const char *email, const char *name, time_t tstamp)
fname = mu_str_guess_first_name (name);
lname = mu_str_guess_last_name (name);
now = mu_str_date ("%Y-%m-%d", time(NULL));
timestamp = mu_str_date ("%Y-%m-%d", tstamp);
now = mu_date_str ("%Y-%m-%d", time(NULL));
timestamp = mu_date_str ("%Y-%m-%d", tstamp);
g_print ("[\"%s\" \"%s\" nil nil nil nil (\"%s\") "
"((creation-date . \"%s\") (time-stamp . \"%s\")) nil]\n",
@ -113,7 +114,6 @@ each_contact_mutt_alias (const char *email, const char *name)
gchar *nick;
nick = mu_str_guess_nick (name);
mu_util_print_encoded ("alias %s %s <%s>\n",
nick, name, email);

View File

@ -32,6 +32,7 @@
#include "mu-msg.h"
#include "mu-str.h"
#include "mu-date.h"
#include "mu-maildir.h"
#include "mu-index.h"
#include "mu-query.h"
@ -591,7 +592,7 @@ display_field (MuMsgIter *iter, MuMsgFieldId mfid)
case MU_MSG_FIELD_TYPE_TIME_T:
val = mu_msg_get_field_numeric (msg, mfid);
return mu_str_date_s ("%c", (time_t)val);
return mu_date_str_s ("%c", (time_t)val);
case MU_MSG_FIELD_TYPE_BYTESIZE:
val = mu_msg_get_field_numeric (msg, mfid);

View File

@ -30,6 +30,7 @@
#include "mu-cmd.h"
#include "mu-util.h"
#include "mu-str.h"
#include "mu-date.h"
#include "mu-maildir.h"
#include "mu-contacts.h"
#include "mu-runtime.h"
@ -127,7 +128,7 @@ view_msg (MuMsg *msg, const gchar *fields, gboolean summary,
print_field ("Subject", mu_msg_get_subject (msg), color);
if ((date = mu_msg_get_date (msg)))
print_field ("Date", mu_str_date_s ("%c", date),
print_field ("Date", mu_date_str_s ("%c", date),
color);
if ((lst = mu_msg_get_tags (msg))) {