[webkit-reviews] review granted: [Bug 124379] Reimplement getDayBoundaries using NSCalendar on 10.9 : [Attachment 216973] Patch
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Thu Nov 14 13:38:25 PST 2013
mitz at webkit.org <mitz at webkit.org> has granted Anders Carlsson
<andersca at apple.com>'s request for review:
Bug 124379: Reimplement getDayBoundaries using NSCalendar on 10.9
https://bugs.webkit.org/show_bug.cgi?id=124379
Attachment 216973: Patch
https://bugs.webkit.org/attachment.cgi?id=216973&action=review
------- Additional Comments from mitz at webkit.org <mitz at webkit.org>
View in context: https://bugs.webkit.org/attachment.cgi?id=216973&action=review
> Source/WebKit/mac/History/WebHistory.mm:164
> + NSDate *beginningOfDayDate = [calendar startOfDayForDate:date];
> + beginningOfDay = beginningOfDayDate.timeIntervalSinceReferenceDate;
> +
> + NSDate *beginningOfNextDayDate = [calendar
dateByAddingUnit:NSCalendarUnitDay value:1 toDate:beginningOfDayDate
options:0];
I believe you can do this with a single method call to -[NSCalendar
rangeOfUnit:startDate:interval:forDate:]. Seems wasteful to do two.
More information about the webkit-reviews
mailing list