Skip to content

DateTime: support calendar units in date arithmetic - #5738

Open
fzlzjerry wants to merge 1 commit into
robotframework:masterfrom
fzlzjerry:fix/4890-calendar-time-strings
Open

DateTime: support calendar units in date arithmetic#5738
fzlzjerry wants to merge 1 commit into
robotframework:masterfrom
fzlzjerry:fix/4890-calendar-time-strings

Conversation

@fzlzjerry

Copy link
Copy Markdown

Summary

  • extend timestr_to_secs() with an optional start date and support integer calendar years and months alongside existing fixed units
  • apply calendar components with end-of-month clamping before fixed-duration components, preserving the original time of day
  • use the calendar-aware conversion in Add Time To Date and Subtract Time From Date, including correct backward arithmetic and negative inputs
  • document the Robot Framework 7.6 behavior and add unit and acceptance coverage for leap years, year boundaries, mixed units, and invalid values

Validation

  • .venv/bin/python utest/run.py — 2403 passed
  • .venv/bin/python atest/run.py atest/robot/standard_libraries/datetime — 60 passed
  • .venv/bin/invoke library-docs DateTime

Fixes #4890

Copilot AI lite review requested due to automatic review settings August 10, 2026 18:58

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@fzlzjerry
fzlzjerry marked this pull request as ready for review August 11, 2026 08:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

DateTime: Support adding months and yeards to dates

2 participants