[webkit-reviews] review granted: [Bug 33986] HTMLInputElement::valueAsDate setter support for type=week. : [Attachment 47174] Proposed patch (rev.2)

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Jan 22 09:28:58 PST 2010


Darin Adler <darin at apple.com> has granted TAMURA, Kent <tkent at chromium.org>'s
request for review:
Bug 33986: HTMLInputElement::valueAsDate setter support for type=week.
https://bugs.webkit.org/show_bug.cgi?id=33986

Attachment 47174: Proposed patch (rev.2)
https://bugs.webkit.org/attachment.cgi?id=47174&action=review

------- Additional Comments from Darin Adler <darin at apple.com>
> +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.


More information about the webkit-reviews mailing list