[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: [OASIS Issue Tracker] (OFFICE-2164) Add EASTERSUNDAY function
[ https://issues.oasis-open.org/browse/OFFICE-2164?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=80851#comment-80851 ] Andreas Guelzow commented on OFFICE-2164: ----------------------------------------- Alternate proposal: Move EASTERSUNDAY from the Huge group to the Large group. Define as: Syntax: EASTERSUNDAY( [Number Year] ) Description: Returns the date of Easter Sunday in the year passed as Year if given, otherwise returns the date of the next Easter Sunday on or after TODAY(). Return: Date Constraints: 1582 <= Year <= 9956 Semantics: Given a value for Year, the Easter Sunday date is calculated according to the following algorithm given an integer {{Year}} in the range from 1582 to 9956: Â {code:java} int month; int day; int century, n, k, i, j, l; century = year/100; n = Year - 19 * (Year / 19); k = (century - 17) / 25; i = century - century / 4 - (century - k) / 3 + 19 * n + 15; i %= 30; i = i - (i / 28) * (1 - (i / 28) * (29 / (i+1)) * ((21 - n) / 11 )); j = Year + Year / 4 + i + 2 - century + century / 4; j %= 7; l = i - j; month = 3 + (l + 40) / 44; day = l + 28 - 31 * (month / 4); {code} Â The resulting date is: Date =Â{{Year-month-day}}. Note that all calculations in the above code are integer calculations and operations are written using C notation. If Year is not given, the above calculation is performed for the current and the next year and the smaller of the two dates is returned that is not before TODAY(). > Add EASTERSUNDAY function > ------------------------- > > Key: OFFICE-2164 > URL: https://issues.oasis-open.org/browse/OFFICE-2164 > Project: OASIS Open Document Format for Office Applications (OpenDocument) TC > Issue Type: New Feature > Components: OpenFormula, Part 2 (Formulas) > Reporter: Eike Rathke > Assignee: Patrick Durusau > Priority: Minor > Fix For: ODF 1.4 > > > OpenOffice.org Calc knows the EASTERSUNDAY function, this is a proposal to include that with OpenFormula. -- This message was sent by Atlassian Jira (v8.3.3#803004)
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]