Home > Date And Time > Relative date time > DATEDIF Function > The start date involve last day of february
Report generated 11-04-2023 10:42

DATEDIF Function

  Datedif   Windows   Relative Delta   Date

The start date involve last day of february

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-02-28 2021-03-28 months=1
2 2021-02-28 2021-03-29 months=1, days=1
3 2021-02-28 2021-03-30 months=1, days=2
4 2021-02-28 2021-03-31 months=1, days=3
5 2021-02-28 2021-01-28 months=-1
6 2021-02-28 2021-04-28 months=2
7 2021-02-28 2021-05-28 months=3
8 2021-02-28 2022-02-28 years=1
9 2021-02-28 2024-02-28 years=3
Steps Outcome
SUCCESS 023ms
SUCCESS 025ms
SUCCESS 024ms
SUCCESS 030ms
SUCCESS 034ms
SUCCESS 035ms
SUCCESS 039ms
SUCCESS 031ms
SUCCESS 029ms
SUCCESS 0.33s
Serenity BDD version 3.6.22