disentcorp / dateroll

dateroll makes working with 📅 dates less painful.
Apache License 2.0
12 stars 1 forks source link

ScheduleString: allow 2nd part to be DateDurationString OR DateString or DateMathString #11

Open amalizzio opened 5 months ago

amalizzio commented 5 months ago

Is your feature request related to a problem? Please describe. Currently, when specifying a ScheduleString you use the format

DateString: ddh("t,t+5y,3m") $\to$ OK DateMathString: ddh("t,t+5y,3m") $\to$ OK DurationString: ddh("t,5y,3m") -> TypeError: Stop of generation must be a valid Date

Please allow DurationString!

Describe the solution you'd like If the user supplies just a DateDurationString, then it should be implicit that the "from" date is the first date. this saves user typing and is intuitive for function. Example:

ddh('t,5y,3m')

thus stop date is start date + 5y if 5y is DurationString

Describe alternatives you've considered None, this is a specific enhancement request

Additional context None