Home > Date And Time > Relative date time > DATEDIF Function > The months with different numbers of days
Report generated 11-04-2023 10:42

DATEDIF Function

  Datedif   Windows   Relative Delta   Date

The months with different numbers of days

Scenario Outline

Given the first date <start date> and the second date <end date>
When the datedif function is used to compute the difference between them
Then the returned relative delta should be <relative delta>

Examples: 

# Start Date End Date Relative Delta
1 2021-01-27 2021-02-27 months=1
2 2021-01-28 2021-02-28 months=1
3 2021-01-29 2021-02-28 months=1
4 2021-01-30 2021-02-28 months=1
5 2021-01-31 2021-02-28 months=1
6 2021-01-31 2021-03-31 months=2
7 2021-01-31 2021-04-30 months=3
8 2021-01-30 2021-04-30 months=3
Steps Outcome
SUCCESS 030ms
SUCCESS 033ms
SUCCESS 035ms
SUCCESS 032ms
SUCCESS 055ms
SUCCESS 030ms
SUCCESS 021ms
SUCCESS 018ms
SUCCESS 0.31s
Serenity BDD version 3.6.22