{"id":15649250,"url":"https://github.com/jk-gan/aion","last_synced_at":"2026-03-27T04:41:38.130Z","repository":{"id":44060650,"uuid":"234923163","full_name":"jk-gan/aion","owner":"jk-gan","description":"A friendly Rust utility crate for duration and datetime ","archived":false,"fork":false,"pushed_at":"2022-02-12T15:44:11.000Z","size":39,"stargazers_count":38,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-15T12:18:48.623Z","etag":null,"topics":["chrono","datetime","duration","rust-lang"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jk-gan.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}},"created_at":"2020-01-19T15:41:18.000Z","updated_at":"2024-11-28T16:34:37.000Z","dependencies_parsed_at":"2022-07-21T14:02:25.228Z","dependency_job_id":null,"html_url":"https://github.com/jk-gan/aion","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jk-gan%2Faion","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jk-gan%2Faion/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jk-gan%2Faion/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jk-gan%2Faion/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jk-gan","download_url":"https://codeload.github.com/jk-gan/aion/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249067787,"owners_count":21207396,"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":["chrono","datetime","duration","rust-lang"],"created_at":"2024-10-03T12:29:01.333Z","updated_at":"2026-03-27T04:41:38.097Z","avatar_url":"https://github.com/jk-gan.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Aion [![](https://img.shields.io/crates/v/aion.svg)](https://crates.io/crates/aion)\nAion is a utility crate, inspired by rails, that allows you to write `Duration` and `DateTime` in a friendly way:\n```rust\n// Easily represent a chrono::Duration\nlet two_days = 2.days();\nlet attention_span = 1.seconds();\n\n// Add or subtract durations from the current time (UTC)\nlet now = Utc::now();\nlet three_hours_from_now = now + 3.hours();\nlet two_hours_from_now = 2.hours().from_now();\nlet last_week = 7.days().ago(); // or 1.weeks().ago()\n\n// More complex DateTimes can be represented using before() and after() methods\nlet christmas = Utc.ymd(2020, 12, 25).and_hms(0, 0, 0);\nlet two_weeks_before_christmas = 2.weeks().before(christmas);\nlet boxing_day = 1.days().after(christmas);\n```\n\n## Installation\nAdd this to your `Cargo.toml` file:\n```toml\n[dependencies]\naion = \"0.2\"\n```\n\n## Example\nThe example is located in `example` folder. You can run it by using\n```bash\ncargo run --example example\n```\n\n## Limitations\nCurrently this crate only will return `DateTime\u003cUtc\u003e`.\n\n## Acknowledgement\nThis crate is using [chrono](https://github.com/chronotope/chrono). Thanks for this awesome crate.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjk-gan%2Faion","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjk-gan%2Faion","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjk-gan%2Faion/lists"}