LISTSERV mailing list manager LISTSERV 16.0

Help for DATETIME Archives


DATETIME Archives

DATETIME Archives


DATETIME@C4VLPLISTSERV01.LOC.GOV


View:

Message:

[

First

|

Previous

|

Next

|

Last

]

By Topic:

[

First

|

Previous

|

Next

|

Last

]

By Author:

[

First

|

Previous

|

Next

|

Last

]

Font:

Proportional Font

LISTSERV Archives

LISTSERV Archives

DATETIME Home

DATETIME Home

DATETIME  January 2010

DATETIME January 2010

Subject:

Re: syntax of date ranges

From:

Per Bothner <[log in to unmask]>

Reply-To:

Discussion of the Developing Date/Time Standards <[log in to unmask]>

Date:

Tue, 26 Jan 2010 11:39:10 -0800

Content-Type:

text/plain

Parts/Attachments:

Parts/Attachments

text/plain (97 lines)

On 01/26/2010 10:54 AM, Edward C. Zimmermann wrote:
> On Tue, 26 Jan 2010 08:15:31 -0800, Per Bothner wrote
>> I notice the proposal uses '/' for a date range,
>> and '-' as a date component separator.  Unfortunately,
>> I think this is the reverse of what most "humans"
>> (at least in the US) expect.  I.e. traditionally when
>
> That's precisely the point. Most humans don't live in the US or are US
> ex-pats.

Actually, '/' is common as a separator in European locales, too.
At least Norwegian, which I know well!

> The standard date syntax used in the U.S. clashes with the syntax
> found in many other countries and is thus quite ambiguous.

However, YYYY/MM/DD would have been unambigious - though that
is water under the bridge, and not the issue at hand.  As I wrote
"For compatibility reasons we're stuck with using '-' as a separator".

Sorry if I gave the impression that I was arguing for replacing
the YYYY-MM-YY syntax - I think it was a mistake, but not a big one,
and we're stuck with it.

However, it is hopefully not too late to stop the use of '/'
to indicate a range.

> Somebody reading:
>>
>>     2004/2006
>>
>> is going to assume that means 2004 *or* 2006.
>>
>> A suggestion: Use two dots, as in '..'.  For example:
>
> I really don't see how ".." is better than "/".

Because, at least in English usage, '/' is commonly used to
mean "or", and it is never used used to indicate a range.
However '..' or '...' *are* commonly used to indicate a
range, at least in programming or mathematical notation.
(Though as you point out, it's not quite the same.)

So it has the advantage of not being gratuitously confusing.

> Its hardly more economical:-)

One extra character is well worth it.

>>     2004..2006
>>     2004-12-20..22
>>     2005-12-24..2006-01-06
>>
>> Alternatively, the specification could use 3 dots, which is
>> traditional in mathematics, but there is precedence for using 2 dots:
>
> (its actually not... An ellipsis is an omission, a pause or an unsaid
> thought. In mathematics the ellipsis is an omission to imply the continuation
> of a defined series: "et cetera" (and so forth). All hardly the stuff of
> ranges... )

I think you're splitting hairs.  If
   1, ..., n
is not a syntax for expressing a range, it's pretty close.  True,
"a defined series" would be discrete, while a date range is continuous.
Still, if someone writes:
   2004, ..., 2009
that is equivalent to:
   2004, 2005, 2006, 2007, 2008, 2009
Is this list equivalent to the range from 2004 to 2009?  I think so.

So I'm suggesting
   2004..2009
as a terser and easier-to-parse alternative, which does have some
existing similar usage.

>> http://en.wikipedia.org/wiki/Ellipsis#In_programming
>
> In programming the semantics for ".." or "..." are quite arbitrary, typically
> function looking for some well-defined lexical ...

No idea what the second part of that sentence means.  I agree with the
first part, but we're not trying to standardize programming languages,
or find some existing universal notation.  We're trying to find some
syntax that extends xs:date, and adds certain desired functionality,
including date ranges.  In terms of functionality, there is no
difference between using '/' or '..' for ranges.  But there are
pragmatic issues to consider.  When picking a syntax, we have a choice
between '/' which is explicitly misleading/confusing, because
it is commonly used for something else (either meaning "or" or the
components of a date); vs a syntax that does not have this problem,
and for which there is precedence for it being used for something
similar.
-- 
	--Per Bothner
[log in to unmask]   http://per.bothner.com/

Top of Message | Previous Page | Permalink

Advanced Options


Options

Log In

Log In

Get Password

Get Password


Search Archives

Search Archives


Subscribe or Unsubscribe

Subscribe or Unsubscribe


Archives

August 2019
February 2019
December 2018
November 2018
October 2018
January 2018
August 2017
July 2017
June 2017
April 2017
March 2017
February 2017
August 2016
July 2016
May 2016
April 2016
March 2016
February 2016
January 2016
December 2015
November 2015
October 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
December 2014
November 2014
March 2014
September 2013
May 2013
February 2013
October 2012
September 2012
August 2012
May 2012
March 2012
December 2011
November 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
February 2010
January 2010
December 2009
November 2009

ATOM RSS1 RSS2



LISTSERV.LOC.GOV

CataList Email List Search Powered by the LISTSERV Email List Manager