1 Return-Path: <Sebastian@SSpaeth.de>
\r
2 X-Original-To: notmuch@notmuchmail.org
\r
3 Delivered-To: notmuch@notmuchmail.org
\r
4 Received: from localhost (localhost [127.0.0.1])
\r
5 by olra.theworths.org (Postfix) with ESMTP id 3E16F431FBC
\r
6 for <notmuch@notmuchmail.org>; Fri, 22 Jan 2010 08:04:34 -0800 (PST)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
11 X-Spam-Status: No, score=0.08 tagged_above=-999 required=5 tests=[AWL=0.079,
\r
12 BAYES_50=0.001] autolearn=ham
\r
13 Received: from olra.theworths.org ([127.0.0.1])
\r
14 by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)
\r
15 with ESMTP id ETWSyN547CMr for <notmuch@notmuchmail.org>;
\r
16 Fri, 22 Jan 2010 08:04:33 -0800 (PST)
\r
17 Received: from homiemail-a21.g.dreamhost.com (mailbigip.dreamhost.com
\r
19 by olra.theworths.org (Postfix) with ESMTP id AEEC8431FAE
\r
20 for <notmuch@notmuchmail.org>; Fri, 22 Jan 2010 08:04:33 -0800 (PST)
\r
21 Received: from sspaeth.de (unknown [84.55.198.58])
\r
22 by homiemail-a21.g.dreamhost.com (Postfix) with ESMTPA id D2DF4300061;
\r
23 Fri, 22 Jan 2010 08:04:31 -0800 (PST)
\r
24 Received: by sspaeth.de (sSMTP sendmail emulation);
\r
25 Fri, 22 Jan 2010 17:04:29 +0100
\r
26 From: "Sebastian Spaeth" <Sebastian@SSpaeth.de>
\r
27 To: notmuch@notmuchmail.org
\r
28 In-Reply-To: <1264173971-11879-1-git-send-email-Sebastian@SSpaeth.de>
\r
29 References: <1264173971-11879-1-git-send-email-Sebastian@SSpaeth.de>
\r
30 Date: Fri, 22 Jan 2010 17:04:29 +0100
\r
31 Message-ID: <87aaw66s8i.fsf@SSpaeth.de>
\r
33 Content-Type: text/plain; charset=us-ascii
\r
34 Subject: Re: [notmuch] [PATCH] Make the date parser nicer
\r
35 X-BeenThere: notmuch@notmuchmail.org
\r
36 X-Mailman-Version: 2.1.13
\r
38 List-Id: "Use and development of the notmuch mail system."
\r
39 <notmuch.notmuchmail.org>
\r
40 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
41 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
42 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
43 List-Post: <mailto:notmuch@notmuchmail.org>
\r
44 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
45 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
46 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
47 X-List-Received-Date: Fri, 22 Jan 2010 16:04:34 -0000
\r
49 On Fri, 22 Jan 2010 16:26:11 +0100, Sebastian Spaeth <Sebastian@SSpaeth.de> wrot> + if (begin.size() == 8) {
\r
51 > + no_items = sscanf(begin.c_str(), "%4i%2i%2i", &year, &month, &day);
\r
52 > + if (no_items != 3)
\r
53 > + return Xapian::BAD_VALUENO;
\r
55 Also I have found that my sscanf skills are sourly lacking:
\r
56 a date of 20060108 will lead to 2006 1 0 for (year, month, day)
\r
58 I bet someone knows a nice way to parse those values in a good way.
\r