robotframework
robotframework copied to clipboard
Feature Request :Add option to add months in Current date
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.
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.