{"id":13763391,"url":"https://github.com/sa-/mo-time","last_synced_at":"2025-05-10T17:30:32.568Z","repository":{"id":194720845,"uuid":"691421755","full_name":"sa-/mo-time","owner":"sa-","description":"It's time for a time pkg in 🔥 Mojo","archived":false,"fork":false,"pushed_at":"2023-11-03T10:35:14.000Z","size":35,"stargazers_count":19,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-02-11T18:46:36.749Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Makefile","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sa-.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2023-09-14T06:35:02.000Z","updated_at":"2024-02-11T18:46:36.750Z","dependencies_parsed_at":"2023-09-22T02:40:00.971Z","dependency_job_id":"8acf0fa8-15a6-4edf-9b38-0d148acb4ae6","html_url":"https://github.com/sa-/mo-time","commit_stats":null,"previous_names":["sa-/mo-time"],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sa-%2Fmo-time","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sa-%2Fmo-time/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sa-%2Fmo-time/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sa-%2Fmo-time/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sa-","download_url":"https://codeload.github.com/sa-/mo-time/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253453145,"owners_count":21911049,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-03T15:00:43.793Z","updated_at":"2025-05-10T17:30:32.161Z","avatar_url":"https://github.com/sa-.png","language":"Makefile","readme":"![](https://img.shields.io/badge/status-alpha-orange)\n\nPlease don't put negative numbers in `plus_*` functions yet 😬\n\n## Usage\n\nGrab a `.mojopkg` from the releases, or clone this repo and run `make build`\n\n```python\nfrom mo_time import Instant, DateTimeLocal\n\n# Instantiate with the .now static methods\nDateTimeLocal.now_utc()\nDateTimeLocal.now()\n\n# or from an Instant\nlet instant = Instant.now()\nDateTimeLocal.from_instant(instant)\nDateTimeLocal.from_instant_utc(instant)\n\n# or with the constructor\nDateTimeLocal(2023, 9, 14, 0, 0, 0)\n\n# convert back and forth between python and mojo\nlet py_dt = DateTimeLocal.now().to_py()\nlet mojo_dt = DateTimeLocal.from_py(py_dt)\n\n# Print\nlet dt = DateTimeLocal.now_utc()\nprint(dt.__str__())\n\n# Supports basic arithmetic\ndt.plus_years(1)\ndt.plus_months(12)\ndt.plus_days(366)\ndt.plus_hours(8784)\ndt.plus_minutes(527040)\ndt.plus_seconds(31622400)\n```\n\nComing up\n- Types\n  - `DateTimeOffset`\n  - `DateTimeZoned`\n  - `Date`\n  - `Time`\n  - `Duration`\n  - `TimeZone`\n\n\n## Testing \n\n`make test`\n","funding_links":[],"categories":["🗂️ Libraries\u003ca id='libraries'\u003e\u003c/a\u003e"],"sub_categories":["Date \u0026 Time"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsa-%2Fmo-time","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsa-%2Fmo-time","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsa-%2Fmo-time/lists"}