Financial Risk Management
Home
>
Date And Time
>
Relative date time
>
SDATE Function
> The time addition
Overall Test Results
Requirements
Themes
Capabilities
Features
Report generated 11-04-2023 10:42
SDATE Function
Sdate
Date Time
Windows
Relative Date
The time addition
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 hour
2021-10-20T16:10:59
hours=+1
2021-10-20T17:10:59
2
last hour
2021-10-20T16:10:59
hours=-1
2021-10-20T15:10:59
3
next ten hours
2021-10-20T16:10:59
hours=+10
2021-10-21T02:10:59
4
next 24 hours
2021-10-20T16:10:59
hours=+24
2021-10-21T16:10:59
5
next hour and ten minutes
2021-10-20T16:10:59
hours=+1, minutes=+10
2021-10-20T17:20:59
6
next 60 minutes
2021-10-20T16:10:59
minutes=+60
2021-10-20T17:10:59
7
next second
2021-10-20T16:10:59
seconds=+1
2021-10-20T16:11:00
8
next day, plus one hour
2021-10-20T16:10:59
days=+1, hours=+1
2021-10-21T17:10:59
9
one day after one month, plus one hour
2021-10-20T16:10:59
months=+1, days=+1, hours=+1
2021-11-21T17:10:59
10
one day after one month, plus one hour
2021-01-31T16:10:59
months=+1, days=+1, hours=+1
2021-03-01T17:10:59
Steps
Outcome
1: The time addition ({description=next hour, start date=2021-10-20T16:10:59, relative delta=hours=+1, relative date=2021-10-20T17:10:59})
SUCCESS
018ms
Given the date 2021-10-20T16:10:59
SUCCESS
003ms
When relative delta hours=+1 is applied
SUCCESS
001ms
Then the relative date should be 2021-10-20T17:10:59
SUCCESS
008ms
2: The time addition ({description=last hour, start date=2021-10-20T16:10:59, relative delta=hours=-1, relative date=2021-10-20T15:10:59})
SUCCESS
040ms
Given the date 2021-10-20T16:10:59
SUCCESS
004ms
When relative delta hours=-1 is applied
SUCCESS
002ms
Then the relative date should be 2021-10-20T15:10:59
SUCCESS
021ms
3: The time addition ({description=next ten hours, start date=2021-10-20T16:10:59, relative delta=hours=+10, relative date=2021-10-21T02:10:59})
SUCCESS
029ms
Given the date 2021-10-20T16:10:59
SUCCESS
003ms
When relative delta hours=+10 is applied
SUCCESS
002ms
Then the relative date should be 2021-10-21T02:10:59
SUCCESS
012ms
4: The time addition ({description=next 24 hours, start date=2021-10-20T16:10:59, relative delta=hours=+24, relative date=2021-10-21T16:10:59})
SUCCESS
033ms
Given the date 2021-10-20T16:10:59
SUCCESS
003ms
When relative delta hours=+24 is applied
SUCCESS
001ms
Then the relative date should be 2021-10-21T16:10:59
SUCCESS
019ms
5: The time addition ({description=next hour and ten minutes, start date=2021-10-20T16:10:59, relative delta=hours=+1, minutes=+10, relative date=2021-10-20T17:20:59})
SUCCESS
035ms
Given the date 2021-10-20T16:10:59
SUCCESS
004ms
When relative delta hours=+1, minutes=+10 is applied
SUCCESS
002ms
Then the relative date should be 2021-10-20T17:20:59
SUCCESS
014ms
6: The time addition ({description=next 60 minutes, start date=2021-10-20T16:10:59, relative delta=minutes=+60, relative date=2021-10-20T17:10:59})
SUCCESS
024ms
Given the date 2021-10-20T16:10:59
SUCCESS
004ms
When relative delta minutes=+60 is applied
SUCCESS
002ms
Then the relative date should be 2021-10-20T17:10:59
SUCCESS
007ms
7: The time addition ({description=next second, start date=2021-10-20T16:10:59, relative delta=seconds=+1, relative date=2021-10-20T16:11:00})
SUCCESS
021ms
Given the date 2021-10-20T16:10:59
SUCCESS
002ms
When relative delta seconds=+1 is applied
SUCCESS
001ms
Then the relative date should be 2021-10-20T16:11:00
SUCCESS
010ms
8: The time addition ({description=next day, plus one hour, start date=2021-10-20T16:10:59, relative delta=days=+1, hours=+1, relative date=2021-10-21T17:10:59})
SUCCESS
022ms
Given the date 2021-10-20T16:10:59
SUCCESS
003ms
When relative delta days=+1, hours=+1 is applied
SUCCESS
Then the relative date should be 2021-10-21T17:10:59
SUCCESS
009ms
9: The time addition ({description=one day after one month, plus one hour, start date=2021-10-20T16:10:59, relative delta=months=+1, days=+1, hours=+1, relative date=2021-11-21T17:10:59})
SUCCESS
015ms
Given the date 2021-10-20T16:10:59
SUCCESS
001ms
When relative delta months=+1, days=+1, hours=+1 is applied
SUCCESS
001ms
Then the relative date should be 2021-11-21T17:10:59
SUCCESS
008ms
10: The time addition ({description=one day after one month, plus one hour, start date=2021-01-31T16:10:59, relative delta=months=+1, days=+1, hours=+1, relative date=2021-03-01T17:10:59})
SUCCESS
017ms
Given the date 2021-01-31T16:10:59
SUCCESS
003ms
When relative delta months=+1, days=+1, hours=+1 is applied
SUCCESS
001ms
Then the relative date should be 2021-03-01T17:10:59
SUCCESS
007ms
SUCCESS
0.31s
Serenity BDD version 3.6.22