You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

591 lines
12 KiB

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

---
test case: Simple addition (+1h)
in:
time: 2020-01-01 02:00:00.000000000
fmt: '%Y-%m-%d %H:%M:%S'
timezone: 'UTC'
period: '+1h'
out:
value: '2020-01-01 03:00:00'
return: SUCCEED
---
test case: Simple substraction (-1h)
in:
time: 2020-01-01 02:00:00.000000000
fmt: '%Y-%m-%d %H:%M:%S'
timezone: 'UTC'
period: '-1h'
out:
value: '2020-01-01 01:00:00'
return: SUCCEED
---
test case: Simple addition (+1d)
in:
time: 2020-01-01 02:00:00.000000000
fmt: '%Y-%m-%d %H:%M:%S'
timezone: 'UTC'
period: '+1d'
out:
value: '2020-01-02 02:00:00'
return: SUCCEED
---
test case: Simple substraction (-1d)
in:
time: 2020-01-01 02:00:00.000000000
fmt: '%Y-%m-%d %H:%M:%S'
timezone: 'UTC'
period: '-1d'
out:
value: '2019-12-31 02:00:00'
return: SUCCEED
---
test case: Simple addition (+1w)
in:
time: 2020-01-01 02:00:00.000000000
fmt: '%Y-%m-%d %H:%M:%S'
timezone: 'UTC'
period: '+1w'
out:
value: '2020-01-08 02:00:00'
return: SUCCEED
---
test case: Simple substraction (-1w)
in:
time: 2020-01-01 02:00:00.000000000
fmt: '%Y-%m-%d %H:%M:%S'
timezone: 'UTC'
period: '-1w'
out:
value: '2019-12-25 02:00:00'
return: SUCCEED
---
test case: Simple addition (+1M)
in:
time: 2020-01-01 02:00:00.000000000
fmt: '%Y-%m-%d %H:%M:%S'
timezone: 'UTC'
period: '+1M'
out:
value: '2020-02-01 02:00:00'
return: SUCCEED
---
test case: Simple substraction (-1M)
in:
time: 2020-01-01 02:00:00.000000000
fmt: '%Y-%m-%d %H:%M:%S'
timezone: 'UTC'
period: '-1M'
out:
value: '2019-12-01 02:00:00'
return: SUCCEED
---
test case: Simple addition (+1y)
in:
time: 2020-01-01 02:00:00.000000000
fmt: '%Y-%m-%d %H:%M:%S'
timezone: 'UTC'
period: '+1y'
out:
value: '2021-01-01 02:00:00'
return: SUCCEED
---
test case: Simple substraction (-1y)
in:
time: 2020-01-01 02:00:00.000000000
fmt: '%Y-%m-%d %H:%M:%S'
timezone: 'UTC'
period: '-1y'
out:
value: '2019-01-01 02:00:00'
return: SUCCEED
---
test case: Different macros formulas with substraction (-1d-1h)
in:
time: 2020-01-01 02:00:00.000000000
fmt: '%Y-%m-%d %H:%M:%S'
timezone: 'UTC'
period: '-1d-1h'
out:
value: '2019-12-31 01:00:00'
return: SUCCEED
---
test case: Different macros formulas with substraction (-1w-1h)
in:
time: 2020-01-01 02:00:00.000000000
fmt: '%Y-%m-%d %H:%M:%S'
timezone: 'UTC'
period: '-1w-1h'
out:
value: '2019-12-25 01:00:00'
return: SUCCEED
---
test case: Different macros formulas with substraction (-1w-1d)
in:
time: 2020-01-01 02:00:00.000000000
fmt: '%Y-%m-%d %H:%M:%S'
timezone: 'UTC'
period: '-1w-1d'
out:
value: '2019-12-24 02:00:00'
return: SUCCEED
---
test case: Different macros formulas with substraction (-1M-1h)
in:
time: 2020-01-01 02:00:00.000000000
fmt: '%Y-%m-%d %H:%M:%S'
timezone: 'UTC'
period: '-1M-1h'
out:
value: '2019-12-01 01:00:00'
return: SUCCEED
---
test case: Different macros formulas with substraction (-1M-1d)
in:
time: 2020-01-01 02:00:00.000000000
fmt: '%Y-%m-%d %H:%M:%S'
timezone: 'UTC'
period: '-1M-1d'
out:
value: '2019-11-30 02:00:00'
return: SUCCEED
---
test case: Different macros formulas with substraction (-1M-1w)
in:
time: 2020-01-01 02:00:00.000000000
fmt: '%Y-%m-%d %H:%M:%S'
timezone: 'UTC'
period: '-1M-1w'
out:
value: '2019-11-24 02:00:00'
return: SUCCEED
---
test case: Different macros formulas with substraction (-1y-1h)
in:
time: 2020-01-01 02:00:00.000000000
fmt: '%Y-%m-%d %H:%M:%S'
timezone: 'UTC'
period: '-1y-1h'
out:
value: '2019-01-01 01:00:00'
return: SUCCEED
---
test case: Different macros formulas with substraction (-1y-1d)
in:
time: 2020-01-01 02:00:00.000000000
fmt: '%Y-%m-%d %H:%M:%S'
timezone: 'UTC'
period: '-1y-1d'
out:
value: '2018-12-31 02:00:00'
return: SUCCEED
---
test case: Different macros formulas with substraction (-1y-1w)
in:
time: 2020-01-01 02:00:00.000000000
fmt: '%Y-%m-%d %H:%M:%S'
timezone: 'UTC'
period: '-1y-1w'
out:
value: '2018-12-25 02:00:00'
return: SUCCEED
---
test case: Different macros formulas with substraction (-1y-1M)
in:
time: 2020-01-01 02:00:00.000000000
fmt: '%Y-%m-%d %H:%M:%S'
timezone: 'UTC'
period: '-1y-1M'
out:
value: '2018-12-01 02:00:00'
return: SUCCEED
---
test case: Different macros formulas with substraction (-1h-1h)
in:
time: 2020-01-01 02:00:00.000000000
fmt: '%Y-%m-%d %H:%M:%S'
timezone: 'UTC'
period: '-1h-1h'
out:
value: '2020-01-01 00:00:00'
return: SUCCEED
---
test case: Different macros formulas with adding (-1d+1h)
in:
time: 2020-01-01 02:00:00.000000000
fmt: '%Y-%m-%d %H:%M:%S'
timezone: 'UTC'
period: '-1d+1h'
out:
value: '2019-12-31 03:00:00'
return: SUCCEED
---
test case: Different macros formulas with adding (-1w+1h)
in:
time: 2020-01-01 02:00:00.000000000
fmt: '%Y-%m-%d %H:%M:%S'
timezone: 'UTC'
period: '-1w+1h'
out:
value: '2019-12-25 03:00:00'
return: SUCCEED
---
test case: Different macros formulas with adding (-1w+1d)
in:
time: 2020-01-01 02:00:00.000000000
fmt: '%Y-%m-%d %H:%M:%S'
timezone: 'UTC'
period: '-1w+1d'
out:
value: '2019-12-26 02:00:00'
return: SUCCEED
---
test case: Different macros formulas with adding (-1M+1h)
in:
time: 2020-01-01 02:00:00.000000000
fmt: '%Y-%m-%d %H:%M:%S'
timezone: 'UTC'
period: '-1M+1h'
out:
value: '2019-12-01 03:00:00'
return: SUCCEED
---
test case: Different macros formulas with adding (-1M+1d)
in:
time: 2020-01-01 02:00:00.000000000
fmt: '%Y-%m-%d %H:%M:%S'
timezone: 'UTC'
period: '-1M+1d'
out:
value: '2019-12-02 02:00:00'
return: SUCCEED
---
test case: Different macros formulas with adding (-1M+1w)
in:
time: 2020-01-01 02:00:00.000000000
fmt: '%Y-%m-%d %H:%M:%S'
timezone: 'UTC'
period: '-1M+1w'
out:
value: '2019-12-08 02:00:00'
return: SUCCEED
---
test case: Different macros formulas with adding (-1y+1h)
in:
time: 2020-01-01 02:00:00.000000000
fmt: '%Y-%m-%d %H:%M:%S'
timezone: 'UTC'
period: '-1y+1h'
out:
value: '2019-01-01 03:00:00'
return: SUCCEED
---
test case: Different macros formulas with adding (-1y+1d)
in:
time: 2020-01-01 02:00:00.000000000
fmt: '%Y-%m-%d %H:%M:%S'
timezone: 'UTC'
period: '-1y+1d'
out:
value: '2019-01-02 02:00:00'
return: SUCCEED
---
test case: Different macros formulas with adding (-1y+1w)
in:
time: 2020-01-01 02:00:00.000000000
fmt: '%Y-%m-%d %H:%M:%S'
timezone: 'UTC'
period: '-1y+1w'
out:
value: '2019-01-08 02:00:00'
return: SUCCEED
---
test case: Different macros formulas with adding (-1y+1M)
in:
time: 2020-01-01 02:00:00.000000000
fmt: '%Y-%m-%d %H:%M:%S'
timezone: 'UTC'
period: '-1y+1M'
out:
value: '2019-02-01 02:00:00'
return: SUCCEED
---
test case: Different macros formulas with adding (-1d+1h)
in:
time: 2020-01-01 02:00:00.000000000
fmt: '%Y-%m-%d %H:%M:%S'
timezone: 'UTC'
period: '-1d+1h'
out:
value: '2019-12-31 03:00:00'
return: SUCCEED
---
test case: Check end period date/time with + (+1M/M-1d)
in:
time: 2020-01-01 02:00:00.000000000
fmt: '%Y-%m-%d %H:%M:%S'
timezone: 'UTC'
period: '+1M/M-1d'
out:
value: '2020-01-31 00:00:00'
return: SUCCEED
---
test case: Check end period date/time with + (+1M/M-1h)
in:
time: 2020-01-01 02:00:00.000000000
fmt: '%Y-%m-%d %H:%M:%S'
timezone: 'UTC'
period: '+1M/M-1h'
out:
value: '2020-01-31 23:00:00'
return: SUCCEED
---
test case: Check end period date/time with + (+1d/d-1h)
in:
time: 2020-01-01 02:00:00.000000000
fmt: '%Y-%m-%d %H:%M:%S'
timezone: 'UTC'
period: '+1d/d-1h'
out:
value: '2020-01-01 23:00:00'
return: SUCCEED
---
test case: Check end period date/time with + (+1w/w-1h)
in:
time: 2020-01-01 02:00:00.000000000
fmt: '%Y-%m-%d %H:%M:%S'
timezone: 'UTC'
period: '+1w/w-1h'
out:
value: '2020-01-05 23:00:00'
return: SUCCEED
---
test case: Check end period date/time with + (+1w/w-1d)
in:
time: 2020-01-01 02:00:00.000000000
fmt: '%Y-%m-%d %H:%M:%S'
timezone: 'UTC'
period: '+1w/w-1d'
out:
value: '2020-01-05 00:00:00'
return: SUCCEED
---
test case: Check end period date/time with + (+1M/M-1w)
in:
time: 2020-01-01 02:00:00.000000000
fmt: '%Y-%m-%d %H:%M:%S'
timezone: 'UTC'
period: '+1M/M-1w'
out:
value: '2020-01-25 00:00:00'
return: SUCCEED
---
test case: Check end period date/time with + (+1y/y-1h)
in:
time: 2020-01-01 02:00:00.000000000
fmt: '%Y-%m-%d %H:%M:%S'
timezone: 'UTC'
period: '+1y/y-1h'
out:
value: '2020-12-31 23:00:00'
return: SUCCEED
---
test case: Check end period date/time with + (+1y/y-1d)
in:
time: 2020-01-01 02:00:00.000000000
fmt: '%Y-%m-%d %H:%M:%S'
timezone: 'UTC'
period: '+1y/y-1d'
out:
value: '2020-12-31 00:00:00'
return: SUCCEED
---
test case: Check end period date/time with + (+1y/y-1w)
in:
time: 2020-01-01 02:00:00.000000000
fmt: '%Y-%m-%d %H:%M:%S'
timezone: 'UTC'
period: '+1y/y-1w'
out:
value: '2020-12-25 00:00:00'
return: SUCCEED
---
test case: Check end period date/time with + (+1y/y-1M)
in:
time: 2020-01-01 02:00:00.000000000
fmt: '%Y-%m-%d %H:%M:%S'
timezone: 'UTC'
period: '+1y/y-1M'
out:
value: '2020-12-01 00:00:00'
return: SUCCEED
---
test case: Check start period date/time with - (-1M/M-1d)
in:
time: 2020-01-01 02:00:00.000000000
fmt: '%Y-%m-%d %H:%M:%S'
timezone: 'UTC'
period: '-1M/M-1d'
out:
value: '2019-11-30 00:00:00'
return: SUCCEED
---
test case: Check start period date/time with - (-1M/M-1h)
in:
time: 2020-01-01 02:00:00.000000000
fmt: '%Y-%m-%d %H:%M:%S'
timezone: 'UTC'
period: '-1M/M-1h'
out:
value: '2019-11-30 23:00:00'
return: SUCCEED
---
test case: Check start period date/time with - (-1d/d-1h)
in:
time: 2020-01-01 02:00:00.000000000
fmt: '%Y-%m-%d %H:%M:%S'
timezone: 'UTC'
period: '-1d/d-1h'
out:
value: '2019-12-30 23:00:00'
return: SUCCEED
---
test case: Check start period date/time with - (-1w/w-1h)
in:
time: 2020-01-01 02:00:00.000000000
fmt: '%Y-%m-%d %H:%M:%S'
timezone: 'UTC'
period: '-1w/w-1h'
out:
value: '2019-12-22 23:00:00'
return: SUCCEED
---
test case: Check start period date/time with - (-1w/w-1d)
in:
time: 2020-01-01 02:00:00.000000000
fmt: '%Y-%m-%d %H:%M:%S'
timezone: 'UTC'
period: '-1w/w-1d'
out:
value: '2019-12-22 00:00:00'
return: SUCCEED
---
test case: Check start period date/time with - (-1M/M-1w)
in:
time: 2020-01-01 02:00:00.000000000
fmt: '%Y-%m-%d %H:%M:%S'
timezone: 'UTC'
period: '-1M/M-1w'
out:
value: '2019-11-24 00:00:00'
return: SUCCEED
---
test case: Check start period date/time with - (-1y/y-1h)
in:
time: 2020-01-01 02:00:00.000000000
fmt: '%Y-%m-%d %H:%M:%S'
timezone: 'UTC'
period: '-1y/y-1h'
out:
value: '2018-12-31 23:00:00'
return: SUCCEED
---
test case: Check start period date/time with - (-1y/y-1d)
in:
time: 2020-01-01 02:00:00.000000000
fmt: '%Y-%m-%d %H:%M:%S'
timezone: 'UTC'
period: '-1y/y-1d'
out:
value: '2018-12-31 00:00:00'
return: SUCCEED
---
test case: Check start period date/time with - (-1y/y-1w)
in:
time: 2020-01-01 02:00:00.000000000
fmt: '%Y-%m-%d %H:%M:%S'
timezone: 'UTC'
period: '-1y/y-1w'
out:
value: '2018-12-25 00:00:00'
return: SUCCEED
---
test case: Check start period date/time with - (-1y/y-1M)
in:
time: 2020-01-01 02:00:00.000000000
fmt: '%Y-%m-%d %H:%M:%S'
timezone: 'UTC'
period: '-1y/y-1M'
out:
value: '2018-12-01 00:00:00'
return: SUCCEED
---
test case: Simple expression invalid sign (*1h)
in:
time: 2020-01-01 02:00:00.000000000
fmt: '%Y-%m-%d %H:%M:%S'
timezone: 'UTC'
period: '*1h'
out:
value: ''
return: FAIL
---
test case: Simple expression invalid time unit (+1q)
in:
time: 2020-01-01 02:00:00.000000000
fmt: '%Y-%m-%d %H:%M:%S'
timezone: 'UTC'
period: '+1q'
out:
value: ''
return: FAIL
---
test case: Simple expression invalid time amount (+xh)
in:
time: 2020-01-01 02:00:00.000000000
fmt: '%Y-%m-%d %H:%M:%S'
timezone: 'UTC'
period: '+xh'
out:
value: ''
return: FAIL
---
test case: Simple expression invalid character (x)
in:
time: 2020-01-01 02:00:00.000000000
fmt: '%Y-%m-%d %H:%M:%S'
timezone: 'UTC'
period: 'x'
out:
value: ''
return: FAIL
---
test case: Invalid rounding sign (+1y.y-1h)
in:
time: 2020-01-01 02:00:00.000000000
fmt: '%Y-%m-%d %H:%M:%S'
timezone: 'UTC'
period: '+1y.y-1h'
out:
value: ''
return: FAIL
---
test case: Invalid rounding time unit (+1y/X-1h)
in:
time: 2020-01-01 02:00:00.000000000
fmt: '%Y-%m-%d %H:%M:%S'
timezone: 'UTC'
period: '+1y/X-1h'
out:
value: ''
return: FAIL
---
test case: Absent rounding time unit (+1M/-1d)
in:
time: 2020-01-01 02:00:00.000000000
fmt: '%Y-%m-%d %H:%M:%S'
timezone: 'UTC'
period: '+1M/-1d'
out:
value: ''
return: FAIL