Re: [whatwg] brief question on 2.4.5 Dates and times

2009-09-04 Thread Julian Reschke

Ian Hickson wrote:

...
If you're looking for something, start at the start. Don't try to 
short-circuit the spec and jump half-way through your answer; if you do 
that you might miss restrictions that apply to particular cases.

...


At the start of the spec? Seriously?

BR, Julian





Re: [whatwg] brief question on 2.4.5 Dates and times

2009-09-01 Thread Ian Hickson
On Wed, 26 Aug 2009, Silvia Pfeiffer wrote:
 
 I am trying to use the specification of Dates and times given in section 
 2.4.5.

How? That section is just introducing concepts for the rest of the spec.


 I was surprised to find that there is a specification of a valid month 
 string, but not of a valid year string or a valid day string. Is that an 
 oversight?

No, nothing in the spec uses the term valid year string or valid day 
string, so I didn't need to define them.


On Thu, 27 Aug 2009, Silvia Pfeiffer wrote:
 
 I was trying to find out what restrictions we are putting on the year 
 part of the string. E.g. are we allowing years before the year 0 and 
 how.

In what context? time? input type=date? ins datetime? Something 
else? (The answer is the same for all of them, but the answer is much 
easier to find if you start from a concrete question, and then follow the 
definitions back.)


 It's all there, and it's all fully defined by recursive definition of 
 the parts that are being re-used (e.g. date reuses month (which is 
 month-year, but not just month). However, if you are trying to look for 
 something, it's rather confusing not to have e.g. year and day exposed 
 in the contents, while month is.

If you're looking for something, start at the start. Don't try to 
short-circuit the spec and jump half-way through your answer; if you do 
that you might miss restrictions that apply to particular cases.

-- 
Ian Hickson   U+1047E)\._.,--,'``.fL
http://ln.hixie.ch/   U+263A/,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'


Re: [whatwg] brief question on 2.4.5 Dates and times

2009-09-01 Thread Silvia Pfeiffer
On Wed, Sep 2, 2009 at 9:51 AM, Ian Hickson i...@hixie.ch wrote:

 On Wed, 26 Aug 2009, Silvia Pfeiffer wrote:
 
  I am trying to use the specification of Dates and times given in section
  2.4.5.

 How? That section is just introducing concepts for the rest of the spec.


I was looking at harmonising the way in which time is specified in W3C Media
Fragment URIs with the way in which we are doing it in HTML5. Therefore,
there is no relationship to any HTML5 elements.



  I was surprised to find that there is a specification of a valid month
  string, but not of a valid year string or a valid day string. Is that an
  oversight?

 No, nothing in the spec uses the term valid year string or valid day
 string, so I didn't need to define them.


As I realised that, I understood why it's been done the way it is. So, while
I believe it's a hard to read section if all you're looking for is to
understand the date format, I now also understand why it is done the way it
is.


 On Thu, 27 Aug 2009, Silvia Pfeiffer wrote:
 
  I was trying to find out what restrictions we are putting on the year
  part of the string. E.g. are we allowing years before the year 0 and
  how.

 In what context? time? input type=date? ins datetime? Something
 else? (The answer is the same for all of them, but the answer is much
 easier to find if you start from a concrete question, and then follow the
 definitions back.)


My concrete question is independent of a particular element and is not even
based in HTML directly.


 It's all there, and it's all fully defined by recursive definition of
  the parts that are being re-used (e.g. date reuses month (which is
  month-year, but not just month). However, if you are trying to look for
  something, it's rather confusing not to have e.g. year and day exposed
  in the contents, while month is.

 If you're looking for something, start at the start. Don't try to
 short-circuit the spec and jump half-way through your answer; if you do
 that you might miss restrictions that apply to particular cases.


For my particular case, I started at the start, which is the specification
of the date string concept. Also, if somebody wants to understand the
principle of how time is specified in HTML, this is the place to start and
not in the particular elements. I don't think one can prescribe how somebody
must read a spec. Rather, a spec should be easy to read no matter which
section somebody is interested in.

In any case, it's not a major headache and hardly worth further worrying
about. There are more important things to take care of.

Regards,
Silvia.


Re: [whatwg] brief question on 2.4.5 Dates and times

2009-08-26 Thread Tab Atkins Jr.
On Tue, Aug 25, 2009 at 9:01 PM, Silvia
Pfeiffersilviapfeiff...@gmail.com wrote:
 Hi,

 I am trying to use the specification of Dates and times given in section
 2.4.5.

 I was surprised to find that there is a specification of a valid month
 string, but not of a valid year string or a valid day string. Is that an
 oversight?

Isn't a valid day string just a normal date string?  The month string
is month-year, after all, not just month.

A year string by itself isn't useful in the current spec, as there's
nothing that would consume it.  time uses a date or datetime, and
the various inputs all use times, dates, weeks, or months.

~TJ


Re: [whatwg] brief question on 2.4.5 Dates and times

2009-08-26 Thread Silvia Pfeiffer
On Wed, Aug 26, 2009 at 11:12 PM, Tab Atkins Jr. jackalm...@gmail.comwrote:

 On Tue, Aug 25, 2009 at 9:01 PM, Silvia
 Pfeiffersilviapfeiff...@gmail.com wrote:
  Hi,
 
  I am trying to use the specification of Dates and times given in section
  2.4.5.
 
  I was surprised to find that there is a specification of a valid month
  string, but not of a valid year string or a valid day string. Is that an
  oversight?

 Isn't a valid day string just a normal date string?  The month string
 is month-year, after all, not just month.

 A year string by itself isn't useful in the current spec, as there's
 nothing that would consume it.  time uses a date or datetime, and
 the various inputs all use times, dates, weeks, or months.


I suppose it is a matter of taste how to describe this. I'll give you my
impression.

I was trying to find out what restrictions we are putting on the year part
of the string. E.g. are we allowing years before the year 0 and how. I went
into the table of content and wasn't able to find anything about year, but
only about month and date etc. By working backwards from the date, I found
that the year string was defined under the month paragraph. I was rather
frustrated by that time. Similarly with the format of the day string (i.e.
the day part of the string, though that was much more obvious.

It's all there, and it's all fully defined by recursive definition of the
parts that are being re-used (e.g. date reuses month (which is month-year,
but not just month). However, if you are trying to look for something, it's
rather confusing not to have e.g. year and day exposed in the contents,
while month is.

As I said - a matter of taste - and possibly usability.

Regards,
Silvia.


[whatwg] brief question on 2.4.5 Dates and times

2009-08-25 Thread Silvia Pfeiffer
Hi,

I am trying to use the specification of Dates and times given in section
2.4.5.

I was surprised to find that there is a specification of a valid month
string, but not of a valid year string or a valid day string. Is that an
oversight?

Regards,
Silvia.