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
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:
>> 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.
>> 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
as a terser and easier-to-parse alternative, which does have some
existing similar usage.
> 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
[log in to unmask] http://per.bothner.com/