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-2631) Do all Day CountBasis values truncate the dates and reverse the order of date 1 and date 2if needed?



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

Eike Rathke commented on OFFICE-2631:
-------------------------------------

Draft25 says for all methods that dates are to be swapped.

@Dennis:
I don't know of any of definition (ISDA, ISMA, AFB, NASD, ...) that explicitly allow start dates after end dates (except how DAYS360() is implemented). Especially for YEARFRAC() existing implementations don't return negative values, probably because a fraction of a year is just that, a fraction. On the other hand I also don't know of any definition that explicitly says to swap dates.
Yes, DateParam already involves conversion to Integer. 3.11.6 Basis gives the general algorithms to calculate date differences, regardless of what parameters functions using them accept. Truncating an integer does no harm..

We could remove the "swap values" from 3.11.6 Basis, say that the result is Error in that case, add to YEARFRAC() that dates are to be swapped, and add constraints to other financial functions that expect two date parameters that dates shall be in order. In fact I just tested using ACCRINTM() that does not have these constraints and giving reverse dates results in error for Excel, Gnumeric. and OOo. Some other financial functions already have constraints added, needs to be checked for all.

> Do all Day Count Basis values truncate the dates and reverse the order of date 1 and date 2 if needed?
> ------------------------------------------------------------------------------------------------------
>
>                 Key: OFFICE-2631
>                 URL: http://tools.oasis-open.org/issues/browse/OFFICE-2631
>             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 
>
> Section 3.11.6.
> For date basis values 0, 1 and 4 we explicitly say, "Truncates date values and swaps them if date1 is after date2."
> But we do not say that for basis 2 or 3.  Is this intentional?  If so we should probably say explicitly that the dates are not truncated or reversed.  But we should first confirm that this in fact is the case.  I suspect that truncating and reversing should apply to all 5 basis conventions.

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