[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:all-tabpanel ]
Francis Cave updated OFFICE-2164:
---------------------------------
Resolution:
h3. 6.10.8 EASTERSUNDAY
*Summary:* Returns the date of Easter Sunday in the Gregorian Calendar in {color:#610506}_*Year*_{color} if given, otherwise returns the date of the next Easter Sunday on or after TODAY().
{quote}*Note:* The use of the Gregorian calendar was introduced in different locations at different times.{quote}
*Syntax:* EASTERSUNDAY( _{color:#5c2d91}Integer{color}_ {color:#610506}_*Year*_{color} )
*Returns:* _{color:#5c2d91}Date{color}_
*Constraints:* 1582 â {color:#610506}_*Year*_{color} â 9956
*Semantics:* Given an integer value for Year in the allowed range, the Easter Sunday date is calculated according to the following algorithm:
{code:java}
A1 = INT(Year/100)
A2 = Year-19*INT(Year/19)
A3 = INT((A1-17)/25)
A4 = MOD(A1-INT(A1/4)-INT((A1-A3)/3)+19*A2+15;30)
A5 = A4-INT(A4/28)*(1-INT(A4/28)*INT(29/(A4+1))*INT((21-A2)/11))
A6 = MOD(Year+INT(Year/4)+A5+2-A1+INT(A1/4);7)
A7 = A5-A6
month = 3+INT((A7+40)/44)
day = A7+28-31*INT(month/4)
{code}
The resulting date is: DATE({{Year}}; {{month}}; {{day}}).
If {color:#610506}_*Year*_{color} is not given, the above calculation is performed for the current and the next year, and the smaller of the two dates that is not less than TODAY() is returned.
> 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]