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

SDATE Function

  Sdate   Windows   Relative Date   Date

The start date do not involve last day of month

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-09-20 months=+1 2021-10-20
2 last month 2021-09-20 months=-1 2021-08-20
3 next two months 2021-09-20 months=+2 2021-11-20
4 next month, plus one week 2021-09-20 months=+1, weeks=+1 2021-10-27
5 one month before one year 2021-09-20 years=+1, months=-1 2022-08-20
6 one month after one year 2021-09-20 years=+1, months=+1 2022-10-20
7 next ten days 2021-09-20 days=+10 2021-09-30
8 next twelve days 2021-09-20 days=+12 2021-10-02
9 next friday 2021-09-20 weekday=FR 2021-09-24
10 last friday in this month 2021-09-20 weekday=FR(-1) 2021-09-17
11 next monday(it’s today!) 2021-09-20 weekday=MO 2021-09-20
12 next monday, but not today 2021-09-20 days=+1, weekday=MO 2021-09-27
13 first saturday in next month 2021-09-20 months=+1, weekday=SA 2021-10-23
Steps Outcome
SUCCESS 018ms
SUCCESS 022ms
SUCCESS 029ms
SUCCESS 030ms
SUCCESS 026ms
SUCCESS 031ms
SUCCESS 020ms
SUCCESS 032ms
SUCCESS 039ms
SUCCESS 024ms
SUCCESS 016ms
SUCCESS 020ms
SUCCESS 014ms
SUCCESS 0.39s
Serenity BDD version 3.6.22