Return-Path: X-Original-To: notmuch@notmuchmail.org Delivered-To: notmuch@notmuchmail.org Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 9E71B431FD0 for ; Sat, 23 Jul 2011 02:54:28 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -0.799 X-Spam-Level: X-Spam-Status: No, score=-0.799 tagged_above=-999 required=5 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled Received: from olra.theworths.org ([127.0.0.1]) by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id hH24oGM7sTuX for ; Sat, 23 Jul 2011 02:54:27 -0700 (PDT) Received: from mail-wy0-f181.google.com (mail-wy0-f181.google.com [74.125.82.181]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id ACD1B429E26 for ; Sat, 23 Jul 2011 02:54:19 -0700 (PDT) Received: by wyh22 with SMTP id 22so2256908wyh.26 for ; Sat, 23 Jul 2011 02:54:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; bh=3ZB4OVddzc8bKhEFHqpYL94HPkLzX1ZODpeWYN64CSg=; b=Sn9S0z/YZwfxegTCRiop1v/qUiIn/ReE7gYgxhFFZOqHNLVYSrLajPcce/lEHlU5v0 X9RoAcsvDO/Dz4fdU1lifFYazF8SWejt2Dk1oKpH5ki3e7NPYG2MPlOkJ1GJXHa8Tyyx ZjpipPUudkh7+YtFdMbsaN6CyTHklKgQnRBtM= Received: by 10.227.39.66 with SMTP id f2mr2129884wbe.2.1311414858273; Sat, 23 Jul 2011 02:54:18 -0700 (PDT) Received: from localhost (cpc1-sgyl2-0-0-cust47.sgyl.cable.virginmedia.com [80.192.18.48]) by mx.google.com with ESMTPS id b13sm2595154wbh.24.2011.07.23.02.54.16 (version=TLSv1/SSLv3 cipher=OTHER); Sat, 23 Jul 2011 02:54:17 -0700 (PDT) From: pazz To: notmuch@notmuchmail.org Subject: [PATCH 2/2] json: date_relative for threads Date: Sat, 23 Jul 2011 10:54:04 +0100 Message-Id: <1311414844-12378-2-git-send-email-patricktotzke@gmail.com> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1311414844-12378-1-git-send-email-patricktotzke@gmail.com> References: <20110715210459.GA12727@brick.lan> <1311414844-12378-1-git-send-email-patricktotzke@gmail.com> X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Jul 2011 09:54:28 -0000 include the date_relative field in the json formated output of notmuch search --- notmuch-search.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/notmuch-search.c b/notmuch-search.c index faccaf7..b1adc03 100644 --- a/notmuch-search.c +++ b/notmuch-search.c @@ -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), -- 1.7.4.1