OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

office message

[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 ]

Andreas Guelzow updated OFFICE-2164:
------------------------------------
    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 Gregorian Calendar in the year passed in as Year if given, otherwise returns the date of the next Easter Sunday on or after TODAY(). Note: The use of the Gregorian calendar was introduced in different locations at different times.

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}
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 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().

  was:
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 Gregorian Calendar in the year passed in as Year if given, otherwise returns the date of the next Easter Sunday on or after TODAY(). Note: The use of the Gregorian calendar was introduced in different locations at different times.

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}
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 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]