Some date arithmetics are already implemented in Trevas JS.
In the case of subtraction between two dates, the return type is an integer (eg seconds).
We would like to implement addition and subtraction between a date and a number with another date as the return type.
For example, with a DATE variable of 2023-09-29, we would like the resulting behavior:
DATE + 3 → 2023-10-02
Some date arithmetics are already implemented in Trevas JS.
In the case of subtraction between two dates, the return type is an integer (eg seconds).
We would like to implement addition and subtraction between a date and a number with another date as the return type.
For example, with a DATE variable of
2023-09-29, we would like the resulting behavior:DATE + 3→2023-10-02