Home > Date And Time > Relative date time > EDATE Function > The start date with 31 as last day
Report generated 11-04-2023 10:42

EDATE Function

  Windows   Relative Date   Date   Edate

The start date with 31 as last day

It maintains the last day of month when a day is 31.

Scenario Outline

Given the date <start date>
When relative delta <relative delta> is applied
Then the relative date should be <relative date>

Examples: 

# Description Start Date Relative Delta Relative Date
1 next month 2021-10-31 months=+1 2021-11-30
2 last month 2021-10-31 months=-1 2021-09-30
3 next two months 2021-10-31 months=+2 2021-12-31
4 next three months 2021-10-31 months=+3 2022-01-31
5 next four months 2021-10-31 months=+4 2022-02-28
6 next five months 2021-10-31 months=+5 2022-03-31
Steps Outcome
SUCCESS 021ms
SUCCESS 019ms
SUCCESS 019ms
SUCCESS 019ms
SUCCESS 018ms
SUCCESS 018ms
SUCCESS 0.14s
Serenity BDD version 3.6.22