robotframework icon indicating copy to clipboard operation
robotframework copied to clipboard

Feature Request :Add option to add months in Current date

Open kchaudhari0 opened this issue 1 year ago • 1 comments

Hi, In Robot currently, we don't have the option to add months to the current data in the DateTime library. We can now add Hours, Days, and, Years using Add Time to data.

${one_month_later} Add Time To Date ${current_date} 1 months

it we try to add the above it will not recognize as a keyword.

kchaudhari0 avatar Oct 07 '23 16:10 kchaudhari0

Month is problematic because it can e 28-31 days. The code for handling formats like "1 day 2 hours" is generic and cannot really handle months. In this particular context incrementing and decrementing months could probably be handled separately, though. I personally don't consider this too high priority, but if someone is interested to implement this I'm happy to review a pull request and discuss about some of the corner cases dealing with months would contain.

pekkaklarck avatar Oct 25 '23 23:10 pekkaklarck