Bug 92671 - Add function to calculate the day in year from a date
Summary: Add function to calculate the day in year from a date
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Template Framework (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Patrick R. Gansterer
Depends on:
Reported: 2012-07-30 13:20 PDT by Patrick R. Gansterer
Modified: 2012-07-30 14:53 PDT (History)
0 users

See Also:

Patch (2.46 KB, patch)
2012-07-30 13:27 PDT, Patrick R. Gansterer
rniwa: review+
rniwa: commit-queue-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Patrick R. Gansterer 2012-07-30 13:20:03 PDT
Add function to calculate the day in year from a date
Comment 1 Patrick R. Gansterer 2012-07-30 13:27:34 PDT
Created attachment 155349 [details]
Comment 2 Ryosuke Niwa 2012-07-30 13:44:22 PDT
Comment on attachment 155349 [details]

View in context: https://bugs.webkit.org/attachment.cgi?id=155349&action=review

> Source/WTF/ChangeLog:9
> +        dayInYear() makes existing firstDayOfMonth data
> +        accessible from other files than DateMath too.

Please mention that this change helps fixing the bug 92286.

> Source/WTF/wtf/DateMath.cpp:289
> -static inline int monthToDayInYear(int month, bool isLeapYear)
> +int dayInYear(int year, int month, int day)

Let's keep this function static local for now since it's not used elsewhere at the moment.
Comment 3 Patrick R. Gansterer 2012-07-30 14:53:37 PDT
Committed r124095: <http://trac.webkit.org/changeset/124095>