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.
Scenario Outline: The start date do not involve last day of month (6 examples) |
|
||
Scenario Outline: The start date with 31 as last day (6 examples) |
|
Given the date {start date}
When relative delta {relative delta} is applied
Then the relative date should be {relative date}
Examples:
Given the date {start date}
When relative delta {relative delta} is applied
Then the relative date should be {relative date}
Examples:
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 |
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 |
3 | 10:42:07 | 015ms | ||
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 |
3 | 10:42:07 | 016ms | ||
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 |
3 | 10:42:07 | 016ms | ||
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 |
3 | 10:42:08 | 026ms | ||
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 |
3 | 10:42:08 | 017ms | ||
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 |
3 | 10:42:08 | 016ms | ||
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 |
3 | 10:42:08 | 017ms | ||
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 |
3 | 10:42:08 | 021ms | ||
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 |
3 | 10:42:08 | 028ms | ||
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 |
3 | 10:42:08 | 019ms | ||
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 |
3 | 10:42:08 | 017ms | ||
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 |
3 | 10:42:08 | 020ms |