Title: [How-to] - How to convert string to pendulum · Issue #649 · python-pendulum/pendulum · GitHub
Open Graph Title: [How-to] - How to convert string to pendulum · Issue #649 · python-pendulum/pendulum
X Title: [How-to] - How to convert string to pendulum · Issue #649 · python-pendulum/pendulum
Description: Hello beautiful people! I have for hours and hours trying to figure out how to use pendulum in a case which is super hard. I have a text that returns 01-06-08-45 which means: Closing in : 1 day, 6 hours, 8 minutes and 45 seconds. and I w...
Open Graph Description: Hello beautiful people! I have for hours and hours trying to figure out how to use pendulum in a case which is super hard. I have a text that returns 01-06-08-45 which means: Closing in : 1 day, 6 ...
X Description: Hello beautiful people! I have for hours and hours trying to figure out how to use pendulum in a case which is super hard. I have a text that returns 01-06-08-45 which means: Closing in : 1 day, 6 ...
Opengraph URL: https://github.com/python-pendulum/pendulum/issues/649
X: @github
Domain: github.com
IPv4 address: 140.82.112.3
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[How-to] - How to convert string to pendulum","articleBody":"Hello beautiful people!\r\n\r\nI have for hours and hours trying to figure out how to use pendulum in a case which is super hard. I have a text that returns \r\n\r\n`01-06-08-45`\r\n\r\nwhich means:\r\n\r\nClosing in : 1 day, 6 hours, 8 minutes and 45 seconds.\r\n\r\nand I want to be able to convert this into pendulum.format/parse (so I have something like 2022-09-01 12:00:00)\r\nI have currently done something like this:\r\n```\r\nt = '01-06-08-45'\r\ntest = pendulum.duration(days=float(t.split('-')[0]), hours=float(t.split('-')[1]), minutes=float(t.split('-')[2]), seconds=float(t.split('-')[3]))\r\n```\r\nwhich returns `1 day 6 hours 8 minutes 45 seconds` but my question is how can I convert this into a format of e.g. `2022-09-01 12:00:00` instead? Is that possible using Pendulum?","author":{"url":"https://github.com/BarryAljawari","@type":"Person","name":"BarryAljawari"},"datePublished":"2022-08-31T15:53:45Z","url":"https://github.com/python-pendulum/pendulum/issues/649"}
| 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:6486de8c-06e6-6b4f-fe26-6783ba9a2609 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 98E6:E08F0:2733CC:3727A4:6B046A3A |
| html-safe-nonce | fba8ed8c9fb1e88404ad4ed6cb9ec34cdb7d0a547f336ac0d42785e0cbb3f8e5 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5OEU2OkUwOEYwOjI3MzNDQzozNzI3QTQ6NkIwNDZBM0EiLCJ2aXNpdG9yX2lkIjoiMTIxNDYyNzU2MzUzNjkzNTQ4MiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 49d8713ec17e4314c56226b3e3c7f7e4bcb117dda66165e9bff1494cc04a37ea |
| hovercard-subject-tag | issue:1357539833 |
| 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/649/issue_layout |
| twitter:image | https://opengraph.githubassets.com/54efda40a5902bfa5ea46e078d9fb6c1f309a3826fc3aff2ed4a417e0721fdbf/python-pendulum/pendulum/issues/649 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/54efda40a5902bfa5ea46e078d9fb6c1f309a3826fc3aff2ed4a417e0721fdbf/python-pendulum/pendulum/issues/649 |
| og:image:alt | Hello beautiful people! I have for hours and hours trying to figure out how to use pendulum in a case which is super hard. I have a text that returns 01-06-08-45 which means: Closing in : 1 day, 6 ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | BarryAljawari |
| 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