This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 20621 - valid time string point 4 is oddly expressed
Summary: valid time string point 4 is oddly expressed
Status: RESOLVED WORKSFORME
Alias: None
Product: WHATWG
Classification: Unclassified
Component: HTML (show other bugs)
Version: unspecified
Hardware: All All
: P2 normal
Target Milestone: Unsorted
Assignee: Ian 'Hixie' Hickson
QA Contact: contributor
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-01-09 19:02 UTC by Mounir Lamouri
Modified: 2013-03-07 23:04 UTC (History)
2 users (show)

See Also:


Attachments

Description Mounir Lamouri 2013-01-09 19:02:29 UTC
http://www.whatwg.org/specs/web-apps/current-work/multipage/common-microsyntaxes.html#valid-time-string

Point 4 is here to say that:
HH:mm is a valid time string because it is implicitely equivalent to HH:mm:00.

I would suggest to remove the "(required if second is non-zero)" part. A time string is valid if it is on the following formats: HH:mm or HH:mm:ss or HH:mm:ss.sss.

"Valid time string" isn't there to convert the string to a computer-readable time. Only to check if a given string represents a time.
Converting a string to a computer-readable time is the role of "Parse a time string":
http://www.whatwg.org/specs/web-apps/current-work/multipage/common-microsyntaxes.html#parse-a-time-string

This also applies to 4.3.
Comment 1 Ian 'Hixie' Hickson 2013-03-07 23:04:37 UTC
That part of the spec is giving the conformance requirements for writing a valid time string representing a specific time. If the specific time being represented is one second past noon, then the string "12:00" would _not_ be a valid time string for it.