{"id":16376596,"url":"https://github.com/killercup/kairos","last_synced_at":"2025-11-11T12:02:21.203Z","repository":{"id":66475110,"uuid":"111323507","full_name":"killercup/kairos","owner":"killercup","description":"Calculate times with chrono \"plain text like\" in Rust.","archived":false,"fork":false,"pushed_at":"2017-11-19T19:03:43.000Z","size":123,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-21T08:47:21.167Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/killercup.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,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-11-19T19:03:26.000Z","updated_at":"2021-07-05T07:49:26.000Z","dependencies_parsed_at":"2023-06-01T12:46:02.177Z","dependency_job_id":null,"html_url":"https://github.com/killercup/kairos","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/killercup/kairos","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/killercup%2Fkairos","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/killercup%2Fkairos/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/killercup%2Fkairos/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/killercup%2Fkairos/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/killercup","download_url":"https://codeload.github.com/killercup/kairos/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/killercup%2Fkairos/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":283846898,"owners_count":26904663,"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","status":"online","status_checked_at":"2025-11-11T02:00:06.610Z","response_time":65,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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-10-11T03:25:15.555Z","updated_at":"2025-11-11T12:02:21.180Z","avatar_url":"https://github.com/killercup.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Kairos\n\nCalculate times with chrono \"plain text like\" in Rust.\n\n[![Build Status](https://travis-ci.org/matthiasbeyer/kairos.svg?branch=master)](https://travis-ci.org/matthiasbeyer/kairos)\n[![license](https://img.shields.io/github/license/matthiasbeyer/kairos.svg?maxAge=2592000?style=flat-square)]()\n[![Tokei](https://tokei.rs/b1/github/matthiasbeyer/kairos)](https://github.com/matthiasbeyer/kairos)\n\nFrom Wikipedia:\n\n\u003e Kairos (καιρός) is an Ancient Greek word meaning the right, critical or\n\u003e opportune moment.\n\nThis library offers an abstraction over the awesome `chrono` crate to\ncalculate dates almost like one would write plain text:\n\n```rust\nuse kairos::timetype::TimeType as TT;\n\n// get the end of the month of the day 5 days ago\nlet _ = (TT::today() - TT::weeks(1) + TT::days(2)).end_of_month();\n\n// alternative to above\nlet _ = (TT::today() - TT::days(5)).end_of_month();\n\n// NOTE: The following features are not yet included\n\n// get a vector of dates for the next 4 weeks, starting today\nlet _ = TT::today()\n    .every(TT::week(1))\n    .take(4);\n\n// get an iterator of dates for the next year, in a weekly fashion, starting\n// today but skipping october\nlet _ = TT::today()\n    .every(TT::week(1))\n    .skip(Month::October)\n    .until(Mark::END_OF_YEAR);\n\n// and finally, a complex one\n\nlet _ = (TT::today() - TT::years(1))       // exactly one year ago\n  .every(Day::Monday)                      // and then every Monday\n  .skip(Month::October)                    // but not in october\n  .skip(|date| date.is(Mark::MONTH_START)) // and not if the day is the 1st of a month\n  .until(Mark::Moment(today()));           // until today\n```\n\n## Parsing User-Input\n\nkairos ships a user input parser, so you can include kairos in your\ncommandline applications.\n\nHave a look at [the example CLI utility](./examples/main.rs).\n\n# License\n\nMPL 2.0\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkillercup%2Fkairos","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkillercup%2Fkairos","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkillercup%2Fkairos/lists"}