Home > Requirements > Date And Time > Year Fractions Computation > Actual364 Day Count Convention
Report generated 11-04-2023 10:42

Feature: Actual364 Day Count Convention

Names:

The name of this convention is Actual/364.

Computation Method:

The number of accrued days is equal to the actual number of days between the start date and the end date.
The year fraction is the number of accrued days divided by 364. Here is the general formula:

\[YearFraction = \frac{Days(StartDate, EndDate)}{364}\]

Where:

The \(Days\) function returns the number of days between two dates.

The days in the numerators are calculated on a Julian day difference basis. In this convention the first day
of the period is included and the last day is excluded.

Scenarios

Given the dates {start date} and {end date}

When the Actual364 day count convention is used

Then the year fraction should be {day count fraction}

Examples:

start dateend dateday count fraction
2006-08-202007-02-200.505494505
2007-02-202007-08-200.497252747
2007-08-202008-02-200.505494505
2008-02-202008-08-200.50000000
2008-08-202009-02-200.505494505
2009-02-202009-08-200.497252747

Given the dates {start date} and {end date}

When the Actual364 day count convention is used

Then the year fraction should be {day count fraction}

Examples:

start dateend dateday count fraction
2006-02-282006-08-310.505494505
2006-08-312007-02-280.497252747
2007-02-282007-08-310.505494505
2007-08-312008-02-290.50000000
2008-02-292008-08-310.505494505
2008-08-312009-02-280.497252747
2009-02-282009-08-310.505494505
2009-08-312010-02-280.497252747
2010-02-282010-08-310.505494505
2010-08-312011-02-280.497252747
2011-02-282011-08-310.505494505
2011-08-312012-02-290.50000000

Given the dates {start date} and {end date}

When the Actual364 day count convention is used

Then the year fraction should be {day count fraction}

Examples:

start dateend dateday count fraction
2006-01-312006-02-280.076923077
2006-01-302006-02-280.07967033
2006-02-282006-03-030.008241758
2006-02-142006-02-280.038461538
2006-09-302006-10-310.085164835
2006-10-312006-11-280.076923077
2007-08-312008-02-280.497252747
2008-02-282008-08-280.50000000
2008-02-282008-08-300.505494505
2008-02-282008-08-310.508241758
2007-02-282008-02-281.002747253
2007-02-282008-02-291.005494505
2008-02-292009-02-281.002747253
2008-02-292008-03-300.082417582
2008-02-292008-03-310.085164835

Feature Coverage By Scenario

Test Outcomes

Test Performance

Key Statistics

Number of Scenarios 3 Total Duration 762ms
Total Number of Test Cases 33 Fastest Test 14ms
Number of Manual Test Cases 0 Slowest Test 30ms
Tests Started Apr 11, 2023 10:42:14 Average Execution Time 18ms
Tests Finished Apr 11, 2023 10:42:15 Total Execution Time 755ms

Automated Tests

feature Scenario Context Steps Started Total Duration Result
Actual364 day count convention 1: The end dates do not involve last day of February
start date=2006-08-20, end date=2007-02-20, day count fraction=0.505494505
windows 3 10:42:14 019ms SUCCESS
Actual364 day count convention 2: The end dates do not involve last day of February
start date=2007-02-20, end date=2007-08-20, day count fraction=0.497252747
windows 3 10:42:14 025ms SUCCESS
Actual364 day count convention 3: The end dates do not involve last day of February
start date=2007-08-20, end date=2008-02-20, day count fraction=0.505494505
windows 3 10:42:14 023ms SUCCESS
Actual364 day count convention 4: The end dates do not involve last day of February
start date=2008-02-20, end date=2008-08-20, day count fraction=0.50000000
windows 3 10:42:14 024ms SUCCESS
Actual364 day count convention 5: The end dates do not involve last day of February
start date=2008-08-20, end date=2009-02-20, day count fraction=0.505494505
windows 3 10:42:14 019ms SUCCESS
Actual364 day count convention 6: The end dates do not involve last day of February
start date=2009-02-20, end date=2009-08-20, day count fraction=0.497252747
windows 3 10:42:14 017ms SUCCESS
Actual364 day count convention 1: The end dates include some end-February dates
start date=2006-02-28, end date=2006-08-31, day count fraction=0.505494505
windows 3 10:42:14 029ms SUCCESS
Actual364 day count convention 2: The end dates include some end-February dates
start date=2006-08-31, end date=2007-02-28, day count fraction=0.497252747
windows 3 10:42:14 025ms SUCCESS
Actual364 day count convention 3: The end dates include some end-February dates
start date=2007-02-28, end date=2007-08-31, day count fraction=0.505494505
windows 3 10:42:14 019ms SUCCESS
Actual364 day count convention 4: The end dates include some end-February dates
start date=2007-08-31, end date=2008-02-29, day count fraction=0.50000000
windows 3 10:42:15 018ms SUCCESS
Actual364 day count convention 5: The end dates include some end-February dates
start date=2008-02-29, end date=2008-08-31, day count fraction=0.505494505
windows 3 10:42:15 030ms SUCCESS
Actual364 day count convention 6: The end dates include some end-February dates
start date=2008-08-31, end date=2009-02-28, day count fraction=0.497252747
windows 3 10:42:15 027ms SUCCESS
Actual364 day count convention 7: The end dates include some end-February dates
start date=2009-02-28, end date=2009-08-31, day count fraction=0.505494505
windows 3 10:42:15 029ms SUCCESS
Actual364 day count convention 8: The end dates include some end-February dates
start date=2009-08-31, end date=2010-02-28, day count fraction=0.497252747
windows 3 10:42:15 024ms SUCCESS
Actual364 day count convention 9: The end dates include some end-February dates
start date=2010-02-28, end date=2010-08-31, day count fraction=0.505494505
windows 3 10:42:15 021ms SUCCESS
Actual364 day count convention 10: The end dates include some end-February dates
start date=2010-08-31, end date=2011-02-28, day count fraction=0.497252747
windows 3 10:42:15 016ms SUCCESS
Actual364 day count convention 11: The end dates include some end-February dates
start date=2011-02-28, end date=2011-08-31, day count fraction=0.505494505
windows 3 10:42:15 015ms SUCCESS
Actual364 day count convention 12: The end dates include some end-February dates
start date=2011-08-31, end date=2012-02-29, day count fraction=0.50000000
windows 3 10:42:15 015ms SUCCESS
Actual364 day count convention 1: Miscellaneous calculation
start date=2006-01-31, end date=2006-02-28, day count fraction=0.076923077
windows 3 10:42:15 014ms SUCCESS
Actual364 day count convention 2: Miscellaneous calculation
start date=2006-01-30, end date=2006-02-28, day count fraction=0.07967033
windows 3 10:42:15 014ms SUCCESS
Actual364 day count convention 3: Miscellaneous calculation
start date=2006-02-28, end date=2006-03-03, day count fraction=0.008241758
windows 3 10:42:15 015ms SUCCESS
Actual364 day count convention 4: Miscellaneous calculation
start date=2006-02-14, end date=2006-02-28, day count fraction=0.038461538
windows 3 10:42:15 014ms SUCCESS
Actual364 day count convention 5: Miscellaneous calculation
start date=2006-09-30, end date=2006-10-31, day count fraction=0.085164835
windows 3 10:42:15 015ms SUCCESS
Actual364 day count convention 6: Miscellaneous calculation
start date=2006-10-31, end date=2006-11-28, day count fraction=0.076923077
windows 3 10:42:15 015ms SUCCESS
Actual364 day count convention 7: Miscellaneous calculation
start date=2007-08-31, end date=2008-02-28, day count fraction=0.497252747
windows 3 10:42:15 014ms SUCCESS
Actual364 day count convention 8: Miscellaneous calculation
start date=2008-02-28, end date=2008-08-28, day count fraction=0.50000000
windows 3 10:42:15 015ms SUCCESS
Actual364 day count convention 9: Miscellaneous calculation
start date=2008-02-28, end date=2008-08-30, day count fraction=0.505494505
windows 3 10:42:15 016ms SUCCESS
Actual364 day count convention 10: Miscellaneous calculation
start date=2008-02-28, end date=2008-08-31, day count fraction=0.508241758
windows 3 10:42:15 014ms SUCCESS
Actual364 day count convention 11: Miscellaneous calculation
start date=2007-02-28, end date=2008-02-28, day count fraction=1.002747253
windows 3 10:42:15 016ms SUCCESS
Actual364 day count convention 12: Miscellaneous calculation
start date=2007-02-28, end date=2008-02-29, day count fraction=1.005494505
windows 3 10:42:15 017ms SUCCESS
Actual364 day count convention 13: Miscellaneous calculation
start date=2008-02-29, end date=2009-02-28, day count fraction=1.002747253
windows 3 10:42:15 017ms SUCCESS
Actual364 day count convention 14: Miscellaneous calculation
start date=2008-02-29, end date=2008-03-30, day count fraction=0.082417582
windows 3 10:42:15 015ms SUCCESS
Actual364 day count convention 15: Miscellaneous calculation
start date=2008-02-29, end date=2008-03-31, day count fraction=0.085164835
windows 3 10:42:15 014ms SUCCESS

Manual Tests

No manual tests were recorded
Serenity BDD version 3.6.22