Report generated 11-04-2023 10:42

Feature: EOMONTH Function

Computes and returns a date on the last day of the month, n months before or after a specified date. You can use it to calculate expiration dates, maturity dates, contract dates, and other due dates.
This function behave exactly as Excel EOMONTH function.

There is only one keyword argument

- months:  
    The value to specify may be negative or positive; Use a positive value to get a date in the future, and a negative value to get a date in the past.

Scenarios

Given the date {start date}

When relative delta {relative delta} is applied

Then the relative date should be {relative date}

Examples:

descriptionstart daterelative deltarelative date
next end of month2021-09-20months=+12021-10-31
last end of month2021-09-20months=-12021-08-31
next end of two months2021-09-20months=+22021-11-30
next end of three months2021-09-20months=+32021-12-31
next end of four months2021-09-20months=+42022-01-31
next end of five months2021-09-20months=+52022-02-28

Given the date {start date}

When relative delta {relative delta} is applied

Then the relative date should be {relative date}

Examples:

descriptionstart daterelative deltarelative date
next month2021-10-31months=+12021-11-30
last month2021-10-31months=-12021-09-30
next two months2021-10-31months=+22021-12-31
next three months2021-10-31months=+32022-01-31
next four months2021-10-31months=+42022-02-28
next five months2021-10-31months=+52022-03-31

Feature Coverage By Scenario

Test Outcomes

Test Performance

Key Statistics

Number of Scenarios 2 Total Duration 281ms
Total Number of Test Cases 12 Fastest Test 15ms
Number of Manual Test Cases 0 Slowest Test 28ms
Tests Started Apr 11, 2023 10:42:07 Average Execution Time 19ms
Tests Finished Apr 11, 2023 10:42:08 Total Execution Time 277ms

Automated Tests

feature Scenario Context Steps Started Total Duration Result
EOMONTH Function 1: The start date do not involve last day of month
description=next end of month, start date=2021-09-20, relative delta=months=+1, relative date=2021-10-31
windows 3 10:42:07 015ms SUCCESS
EOMONTH Function 2: The start date do not involve last day of month
description=last end of month, start date=2021-09-20, relative delta=months=-1, relative date=2021-08-31
windows 3 10:42:07 016ms SUCCESS
EOMONTH Function 3: The start date do not involve last day of month
description=next end of two months, start date=2021-09-20, relative delta=months=+2, relative date=2021-11-30
windows 3 10:42:07 016ms SUCCESS
EOMONTH Function 4: The start date do not involve last day of month
description=next end of three months, start date=2021-09-20, relative delta=months=+3, relative date=2021-12-31
windows 3 10:42:08 026ms SUCCESS
EOMONTH Function 5: The start date do not involve last day of month
description=next end of four months, start date=2021-09-20, relative delta=months=+4, relative date=2022-01-31
windows 3 10:42:08 017ms SUCCESS
EOMONTH Function 6: The start date do not involve last day of month
description=next end of five months, start date=2021-09-20, relative delta=months=+5, relative date=2022-02-28
windows 3 10:42:08 016ms SUCCESS
EOMONTH Function 1: The start date with 31 as last day
description=next month, start date=2021-10-31, relative delta=months=+1, relative date=2021-11-30
windows 3 10:42:08 017ms SUCCESS
EOMONTH Function 2: The start date with 31 as last day
description=last month, start date=2021-10-31, relative delta=months=-1, relative date=2021-09-30
windows 3 10:42:08 021ms SUCCESS
EOMONTH Function 3: The start date with 31 as last day
description=next two months, start date=2021-10-31, relative delta=months=+2, relative date=2021-12-31
windows 3 10:42:08 028ms SUCCESS
EOMONTH Function 4: The start date with 31 as last day
description=next three months, start date=2021-10-31, relative delta=months=+3, relative date=2022-01-31
windows 3 10:42:08 019ms SUCCESS
EOMONTH Function 5: The start date with 31 as last day
description=next four months, start date=2021-10-31, relative delta=months=+4, relative date=2022-02-28
windows 3 10:42:08 017ms SUCCESS
EOMONTH Function 6: The start date with 31 as last day
description=next five months, start date=2021-10-31, relative delta=months=+5, relative date=2022-03-31
windows 3 10:42:08 020ms SUCCESS

Manual Tests

No manual tests were recorded
Serenity BDD version 3.6.22