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] Commented: (OFFICE-2630) YEARFRAC ambiguity

    [ http://tools.oasis-open.org/issues/browse/OFFICE-2630?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18369#action_18369 ] 

Dennis Hamilton commented on OFFICE-2630:

I was thinking of (334+60)/(365+366) = 0.53899, assuming that the end date is not in the interval (i.e., that 2007-12-31 to 2008-01-01 is one day in 2007).  This is obviously not the "right" answer, but it is what I had in mind in terms of actual days in the interval and actual calendar years (in days) that contain the interval.  There's no question.  This is not what actual/actual means.

It is an interesting question whether the YEARFRAC values for split periods are thought to be additive or not, at least for the actual/actual case.  For some of the other basis ruless, it seems not.

Using your example, some would say that  2007/2/1 to 2008/2/1 is one whole year (assuming the starting date is in the interval and the ending date is not) and 2008/2/1 to 2008/3/1 is the additional partial year.  I like the way you did it (334/365+60/366 = 1.079003, with March 1 not in the interval)  better than that, although I can see the logic in (1+29/366 = 1.079235) too.  Which do you think lenders choose?

I think these are all over the map,  It is clear that there are significant deviations when the time span is relatively small.  It would be interesting to find principled definitions that folks could work around/adapt in how the functions are used.  That may not be possible, of course.

> YEARFRAC ambiguity
> ------------------
>                 Key: OFFICE-2630
>                 URL: http://tools.oasis-open.org/issues/browse/OFFICE-2630
>             Project: OASIS Open Document Format for Office Applications (OpenDocument) TC
>          Issue Type: Bug
>          Components: OpenFormula
>    Affects Versions: ODF 1.2 Part 2 CD 1
>            Reporter: Robert Weir 
> I thought we nailed this one a while ago, but I see the problem still in Part 2, CD 01.
> YEARFRAC is currently defined as "Computes the fraction of the number of years between a StartDate and EndDate.
> Basis is the system for determining how many days are in a month or year."
> OK.  So YEARFRAC is A/B where A= number of days between the two dates, using the counting conventions of the basis.  And B is what? A year certainly.  But how many days?  365?  365.25?  Dependent on whether date 1 or date 2 is in a leap year?  
> I thought David figured this out at one point.

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators: http://tools.oasis-open.org/issues/secure/Administrators.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]