This function is ambiguous. Specifically it does not treat the calculation in the presence of leap years. In the Actual/Actual basis, do we ever divide by 366 Or only by 365 Would we divide by 366 only if the leap day is between start-date and end-date Of either start-date or end-date are in the leap year If both start-date and end-date are in a leap year

Clarify the definition of the function when involving leap years.

YEARFRAC Part 4, Section 3.17.7.348

te

Proposed Disposition of DIS 29500 Comment US-0233 (Modified: 2007-12-20) We agree that YEARFRAC is defined ambiguously with regard to its treatment of leap years. In the presence of leap years when using the Actual/Actual day count basis, YEARFRAC uses an average year length. We propose modifying Part 4, §3.17.7.348, page 2,826, line 10, and page 2,827, after line 2 to read: 3.17.7.348 YEARFRAC Return Type and Value: number ­ The fractional number of years represented by the number of whole days between two dates, start-date and end-date., according to basis. If the Actual/actual basis is used, the year length used is the average length of the years that the range crosses, regardless of where start-date and end-date fall in their respective years. However, if the value of basis is out of range, #NUM! is returned. [Example: YEARFRAC(DATE(2006,1,1),DATE(2006,3,26)) results in 0.236111111 YEARFRAC(DATE(2006,3,26),DATE(2006,1,1)) results in 0.236111111 YEARFRAC(DATE(2006,1,1),DATE(2006,7,1)) results in 0.5 YEARFRAC(DATE(2006,1,1),DATE(2007,9,1)) results in 1.666666667 YEARFRAC(DATE(2006,1,1),DATE(2006,7,1),0) results in 0.5 YEARFRAC(DATE(2006,1,1),DATE(2006,7,1),1) results in 0.495890411 YEARFRAC(DATE(2006,1,1),DATE(2006,7,1),2) results in 0.502777778 YEARFRAC(DATE(2006,1,1),DATE(2006,7,1),3) results in 0.495890411 YEARFRAC(DATE(2006,1,1),DATE(2006,7,1),4) results in 0.5 YEARFRAC(DATE(2004,3,1),DATE(2006,3,1),1) results in 1.998175 (because 2004 is a leap year and Actual/actual basis is used, the average year length is 365.3333) end example] Similar Comments: CA-0051 , CL-0174 , CO-0204 , FR-0498 , GB-0437 ,

Tag and Go

No Comments

Sorry, the comment form is closed at this time.

  • Argentina (1)
  • Australia (30)
  • Austria (1)
  • Belgium (1)
  • Brazil (64)
  • Bulgaria (3)
  • Canada (79)
  • Chile (217)
  • China (1)
  • Colombia (237)
  • Czech Republic (75)
  • Denmark (168)
  • Ecma (76)
  • Ecuador (1)
  • Finland (15)
  • France (592)
  • Germany (162)
  • Ghana (12)
  • Greece (113)
  • India (82)
  • Iran (58)
  • Ireland (12)
  • Israel (33)
  • Italy (2)
  • Japan (82)
  • Jordan (1)
  • Kenya (81)
  • Malaysia (23)
  • Malta (5)
  • Mexico (7)
  • New Zealand (54)
  • Norway (12)
  • Peru (10)
  • Philippines (7)
  • Poland (4)
  • Portugal (118)
  • Singapore (2)
  • South Africa (17)
  • South Korea (25)
  • Spain (1)
  • Switzerland (19)
  • Thailand (1)
  • Tunisia (3)
  • Turkey (1)
  • UK (635)
  • Uruguay (18)
  • USA (288)
  • Venezuela (73)