Title: parse of date with duration cause error · Issue #881 · python-pendulum/pendulum · GitHub
Open Graph Title: parse of date with duration cause error · Issue #881 · python-pendulum/pendulum
X Title: parse of date with duration cause error · Issue #881 · python-pendulum/pendulum
Description: I am on the latest Pendulum version. I have searched the issues of this repo and believe that this is not a duplicate. OS version and name: Ubuntu 22.04.5 LTS Pendulum version: 3.0.0 Python version: 3.10.12 Issue Parsing duration with da...
Open Graph Description: I am on the latest Pendulum version. I have searched the issues of this repo and believe that this is not a duplicate. OS version and name: Ubuntu 22.04.5 LTS Pendulum version: 3.0.0 Python version...
X Description: I am on the latest Pendulum version. I have searched the issues of this repo and believe that this is not a duplicate. OS version and name: Ubuntu 22.04.5 LTS Pendulum version: 3.0.0 Python version...
Opengraph URL: https://github.com/python-pendulum/pendulum/issues/881
X: @github
Domain: github.com
IPv4 address: 140.82.113.4
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"parse of date with duration cause error","articleBody":"\u003c!--\n Hi there! Thank you for discovering and submitting an issue.\n\n Before you submit this; let's make sure of a few things.\n Please make sure the following boxes are ticked if they are correct.\n If not, please try and fulfill these first.\n-->\n\n\u003c!-- Checked checkbox should look like this: [x] -->\n- [X] I am on the [latest](https://github.com/sdispater/pendulum/releases/latest) Pendulum version.\n- [X] I have searched the [issues](https://github.com/sdispater/pendulum/issues) of this repo and believe that this is not a duplicate.\n\n\u003c!--\n Once those are done, if you're able to fill in the following list with your information,\n it'd be very helpful to whoever handles the issue.\n-->\n\n- **OS version and name**: Ubuntu 22.04.5 LTS\n- **Pendulum version**: 3.0.0\n- **Python version**: 3.10.12\n\n## Issue\n\u003c!-- Now feel free to write your issue, but please be descriptive! Thanks again 🙌 ❤️ -->\n\nParsing duration with dates does this:\n```\n>>> pendulum.parse(\"2025-03-10/P3D\")\n...\nTypeError: Date.add() got an unexpected keyword argument 'hours'\n```\n\nHowever, adding an hour to the date string works:\n```\n>>> pendulum.parse(\"2025-03-10T00/P3D\")\n\u003cInterval [2025-03-10 00:00:00+00:00 -> 2025-03-13 00:00:00+00:00]>\n```\n\nIt seems the internal datetime object is type Date, which doesn't support `add(hours=...)`","author":{"url":"https://github.com/mlongtin0","@type":"Person","name":"mlongtin0"},"datePublished":"2025-03-17T18:35:33Z","url":"https://github.com/python-pendulum/pendulum/issues/881"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:1a8a1fee-d5ee-23b7-2698-3a3ddab7f0f9 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | B436:1E6AC8:13153C:1B0A34:6B046523 |
| html-safe-nonce | 8a17276d5497808300be666659e7bdee4bcf9c3c83083bbb48c99a33d1390a7e |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCNDM2OjFFNkFDODoxMzE1M0M6MUIwQTM0OjZCMDQ2NTIzIiwidmlzaXRvcl9pZCI6IjMwNjU0MTE0OTkxNzk5MjY4MTkiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 8ac3164b9c73a6ef29c265999365d24ff5a8e7287bbec4e7c4168df6e2fea942 |
| hovercard-subject-tag | issue:2926043651 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/python-pendulum/pendulum/881/issue_layout |
| twitter:image | https://opengraph.githubassets.com/93d639c385f9c637c004b7564786417ee4936acdb5d2ed7e97b7847dfa90ccef/python-pendulum/pendulum/issues/881 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/93d639c385f9c637c004b7564786417ee4936acdb5d2ed7e97b7847dfa90ccef/python-pendulum/pendulum/issues/881 |
| og:image:alt | I am on the latest Pendulum version. I have searched the issues of this repo and believe that this is not a duplicate. OS version and name: Ubuntu 22.04.5 LTS Pendulum version: 3.0.0 Python version... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | mlongtin0 |
| hostname | github.com |
| expected-hostname | github.com |
| None | 83e4c0e58c5162177f3c161c5fbad38527ae04c11ac14980f9f9d85ae2027b1f |
| turbo-cache-control | no-preview |
| go-import | github.com/python-pendulum/pendulum git https://github.com/python-pendulum/pendulum.git |
| octolytics-dimension-user_id | 191041900 |
| octolytics-dimension-user_login | python-pendulum |
| octolytics-dimension-repository_id | 62095504 |
| octolytics-dimension-repository_nwo | python-pendulum/pendulum |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 62095504 |
| octolytics-dimension-repository_network_root_nwo | python-pendulum/pendulum |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | ca4d07a7cef4e4b75f821dc25e7300d80c1450a9 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width