From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bernt Hansen Subject: Re: org-evaluate-time-range Date: Tue, 28 Jun 2011 18:57:10 -0400 Message-ID: <87ei2dr2d5.fsf@norang.ca> References: <87k4c5agb7.fsf@hecubus.retroj.net> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([140.186.70.92]:52423) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QbhDi-0001xZ-5U for emacs-orgmode@gnu.org; Tue, 28 Jun 2011 18:57:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QbhDc-0003st-Ga for emacs-orgmode@gnu.org; Tue, 28 Jun 2011 18:57:26 -0400 Received: from mho-04-ewr.mailhop.org ([204.13.248.74]:65349 helo=mho-02-ewr.mailhop.org) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QbhDc-0003qL-De for emacs-orgmode@gnu.org; Tue, 28 Jun 2011 18:57:20 -0400 In-Reply-To: <87k4c5agb7.fsf@hecubus.retroj.net> (John J. Foerch's message of "Tue, 28 Jun 2011 15:47:56 -0400") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: John J Foerch Cc: emacs-orgmode@gnu.org John J Foerch writes: > Hello, > > I have a question about the use-case for org-evaluate-time-range, > because for what I would use it for, its behavior seems > counter-intuitive. Consider a time range: > > <2011-08-12 Fri>--<2011-08-14 Sun> > > Calling org-evaluate-time-range on this range reports 2 days, but for > situations when I would use time ranges, I would have expected an > _inclusive_ count of 3 days. The span represented from a friday through > a sunday is indeed a span of 3 days. > > Can anyone explain the logic behind the current behavior? Thank you. Timestamps with no time are considered to be at midnight (00:00) So Midnight Friday to Midnight Sunday is 48 hours. -Bernt -- Bernt