]> git.notmuchmail.org Git - notmuch/commitdiff
json: date_relative for threads
authorpazz <patricktotzke@googlemail.com>
Sat, 23 Jul 2011 09:54:04 +0000 (10:54 +0100)
committerDavid Bremner <bremner@debian.org>
Thu, 8 Dec 2011 01:20:49 +0000 (21:20 -0400)
include the date_relative field in the
json formated output of notmuch search

notmuch-search.c

index 36686d196aa166b1c9d10e6b646f73ddefb62709..90ff4c2dffe99234171c0294f60e2c3eb1cbe9e0 100644 (file)
@@ -176,12 +176,14 @@ format_thread_json (const void *ctx,
 
     printf ("\"thread\": %s,\n"
            "\"timestamp\": %ld,\n"
+           "\"date_relative\": \"%s\",\n"
            "\"matched\": %d,\n"
            "\"total\": %d,\n"
            "\"authors\": %s,\n"
            "\"subject\": %s,\n",
            json_quote_str (ctx_quote, thread_id),
            date,
+           notmuch_time_relative_date (ctx, date),
            matched,
            total,
            json_quote_str (ctx_quote, authors),