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

DATEDIF Function

  Datedif   Windows   Relative Delta   Date

The start date do not involve last day of month

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-09-20 2021-10-20 months=1
2 2021-09-20 2021-10-21 months=1, days=1
3 2021-09-20 2021-08-20 months=-1
4 2021-09-20 2021-11-20 months=2
5 2021-09-20 2021-10-27 months=1, days=7
6 2021-09-20 2022-08-20 months=11
7 2021-09-20 2022-10-20 years=1, months=1
8 2021-09-20 2021-09-30 days=10
9 2021-09-20 2021-10-02 days=12
Steps Outcome
SUCCESS 049ms
SUCCESS 023ms
SUCCESS 020ms
SUCCESS 032ms
SUCCESS 024ms
SUCCESS 023ms
SUCCESS 020ms
SUCCESS 023ms
SUCCESS 023ms
SUCCESS 0.3s
Serenity BDD version 3.6.22