WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
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
Details
Formatted Diff
Diff
Proposed patch (rev.2)
(11.68 KB, patch)
2010-01-21 21:09 PST
,
Kent Tamura
darin
: review+
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
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
Attachment 47173
[details]
did not build on mac: Build output:
http://webkit-commit-queue.appspot.com/results/203576
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.
Top of Page
Format For Printing
XML
Clone This Bug