From mboxrd@z Thu Jan 1 00:00:00 1970 Received: by 10.86.87.8 with SMTP id k8cs25769fgb; Wed, 10 Mar 2010 09:45:03 -0800 (PST) Received: by 10.224.56.131 with SMTP id y3mr1302303qag.219.1268243102491; Wed, 10 Mar 2010 09:45:02 -0800 (PST) Return-Path: Received: from rubyforge.org (rubyforge.org [205.234.109.19]) by mx.google.com with ESMTP id 6si3822763qwd.24.2010.03.10.09.45.02; Wed, 10 Mar 2010 09:45:02 -0800 (PST) Received-SPF: pass (google.com: domain of sup-talk-bounces@rubyforge.org designates 205.234.109.19 as permitted sender) client-ip=205.234.109.19; Authentication-Results: mx.google.com; spf=pass (google.com: domain of sup-talk-bounces@rubyforge.org designates 205.234.109.19 as permitted sender) smtp.mail=sup-talk-bounces@rubyforge.org Received: from rubyforge.org (rubyforge.org [127.0.0.1]) by rubyforge.org (Postfix) with ESMTP id A972C1598086; Wed, 10 Mar 2010 12:45:01 -0500 (EST) Received: from kuovi.tilus.net (kuovi.tilus.net [80.68.89.168]) by rubyforge.org (Postfix) with ESMTP id AA2BC18582F3 for ; Wed, 10 Mar 2010 12:44:49 -0500 (EST) Received: by kuovi.tilus.net (Postfix, from userid 1000) id 2E0616011; Wed, 10 Mar 2010 19:44:49 +0200 (EET) From: Tero Tilus To: sup-talk In-reply-to: <123554aa1003100745v59a49fd4uda1a800266290d18@mail.gmail.com> References: <123554aa1003100745v59a49fd4uda1a800266290d18@mail.gmail.com> Date: Wed, 10 Mar 2010 19:44:49 +0200 Message-Id: <1268239924-sup-190@tilus.net> User-Agent: Sup/git Subject: Re: [sup-talk] 12h/24h Datetime format in sup index X-BeenThere: sup-talk@rubyforge.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: User & developer discussion of Sup List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: sup-talk-bounces@rubyforge.org Errors-To: sup-talk-bounces@rubyforge.org Dominik Epple, 2010-03-10 17:45: > I would prefer to have this as 24h date > Can one configure this? How? You need index-mode-date-widget hook $ sup --list-hooks ... index-mode-date-widget ---------------------- File: /home/terotil/.sup/hooks/index-mode-date-widget.rb Generates the per-thread date widget for each thread. Variables: thread: The message thread to be formatted. ... Mine looks like this date = thread.date from = Time.now if date.is_the_same_day? from # same day date.strftime("klo %H:%M") elsif date.is_the_day_before? from # yesterday date.nearest_hour.strftime("eilen %H") else if date.year != from.year # different year date.strftime("%e.%m.%Y") elsif date.month != from.month # same year date.strftime("%e.%m. %H") else # same month date.strftime("%e. %H:%M") end end Just copy that to your .sup/hooks/index-mode-date-widget.rb and tweak the formats (strftime calls) to suit your needs. Available formats you find from . -- Tero Tilus ## 050 3635 235 ## http://tero.tilus.net/ _______________________________________________ sup-talk mailing list sup-talk@rubyforge.org http://rubyforge.org/mailman/listinfo/sup-talk