RESOLVED FIXED 33986
HTMLInputElement::valueAsDate setter support for type=week.
https://bugs.webkit.org/show_bug.cgi?id=33986
Summary HTMLInputElement::valueAsDate setter support for type=week.
Kent Tamura
Reported 2010-01-21 20:41:38 PST
HTMLInputElement::valueAsDate setter support for type=week.
Attachments
Proposd patch (11.56 KB, patch)
2010-01-21 20:44 PST, Kent Tamura
no flags
Proposed patch (rev.2) (11.68 KB, patch)
2010-01-21 21:09 PST, Kent Tamura
darin: review+
Kent Tamura
Comment 1 2010-01-21 20:44:06 PST
Created attachment 47173 [details] Proposd patch
Kent Tamura
Comment 2 2010-01-21 20:46:30 PST
This is the last patch for HTMLInputElement::valueAsDate!
Eric Seidel (no email)
Comment 3 2010-01-21 20:58:40 PST
Kent Tamura
Comment 4 2010-01-21 21:09:05 PST
Created attachment 47174 [details] Proposed patch (rev.2)
Darin Adler
Comment 5 2010-01-22 09:28:59 PST
Comment on attachment 47174 [details] Proposed patch (rev.2) > +debug('Around Geregorian calendar starting year:'); Typo: "Geregorian". > +// Gregorian calendar started in 1582. We don't suuprot that year. Typo: "suuprot". > case Week: { > - // Offset from January 1st to Monday of the ISO 8601's first week. > - // ex. If January 1st is Friday, such Monday is 3 days later. > - int offsetTo1stWeekStart = 1 - dayOfWeek(m_year, 0, 1); > - if (offsetTo1stWeekStart <= -4) > - offsetTo1stWeekStart += 7; > - return (dateToDaysFrom1970(m_year, 0, 1) + offsetTo1stWeekStart + (m_week - 1) * 7) * msPerDay; > + return (dateToDaysFrom1970(m_year, 0, 1) + offsetTo1stWeekStart(m_year) + (m_week - 1) * 7) * msPerDay; > } Should get rid of the unneeded braces here.
Kent Tamura
Comment 6 2010-01-24 18:17:23 PST
Thank you for the review. (In reply to comment #5) > (From update of attachment 47174 [details]) > > +debug('Around Geregorian calendar starting year:'); > > Typo: "Geregorian". Fixed. > > +// Gregorian calendar started in 1582. We don't suuprot that year. > > Typo: "suuprot". Fixed. > > case Week: { > > - // Offset from January 1st to Monday of the ISO 8601's first week. > > - // ex. If January 1st is Friday, such Monday is 3 days later. > > - int offsetTo1stWeekStart = 1 - dayOfWeek(m_year, 0, 1); > > - if (offsetTo1stWeekStart <= -4) > > - offsetTo1stWeekStart += 7; > > - return (dateToDaysFrom1970(m_year, 0, 1) + offsetTo1stWeekStart + (m_week - 1) * 7) * msPerDay; > > + return (dateToDaysFrom1970(m_year, 0, 1) + offsetTo1stWeekStart(m_year) + (m_week - 1) * 7) * msPerDay; > > } > > Should get rid of the unneeded braces here. Fixed. Landed as r53787.
Note You need to log in before you can comment on or make changes to this bug.