{"id":13730972,"url":"https://github.com/mobius3/asap","last_synced_at":"2025-06-19T04:39:58.250Z","repository":{"id":142742973,"uuid":"116506170","full_name":"mobius3/asap","owner":"mobius3","description":"A C++ header-only library for creating, displaying, iterating and manipulating dates","archived":false,"fork":false,"pushed_at":"2023-04-21T14:16:43.000Z","size":1071,"stargazers_count":76,"open_issues_count":1,"forks_count":15,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-05-13T09:06:01.862Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C++","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/mobius3.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"COPYING","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}},"created_at":"2018-01-06T18:30:42.000Z","updated_at":"2025-02-04T19:57:29.000Z","dependencies_parsed_at":null,"dependency_job_id":"8f3f995d-5a48-47d7-82ce-be2b4732a579","html_url":"https://github.com/mobius3/asap","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/mobius3/asap","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mobius3%2Fasap","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mobius3%2Fasap/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mobius3%2Fasap/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mobius3%2Fasap/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mobius3","download_url":"https://codeload.github.com/mobius3/asap/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mobius3%2Fasap/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260689933,"owners_count":23047048,"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-03T02:01:22.216Z","updated_at":"2025-06-19T04:39:53.229Z","avatar_url":"https://github.com/mobius3.png","language":"C++","readme":"# The ASAP date/time library for beautiful C++ code\n\nASAP is a small, header-only date-time library for C++11 and beyond. It is heavily inspired by my great time using [momentjs](momentjs.com) to parse and display dates. ASAP has a lot of syntatic sugar to make your code look pretty both on the inside and outside :)\n\nAll ASAP examples available [online at _repl.it_](https://repl.it/@mobius3/asapexamples). (`main()` starts at line `533`)\n\n## Features\n\n- A date/time class to handle dates and time (duh)\n- A duration class to handle unbounded periods (e.g, `asap::day(1)` specifies a day)\n- A period class to handle bounded periods (e.g, `asap::period(asap::now(), asap::tomorrow())`)\n- Lots of syntatic sugar (e.g, `auto then = asap::now() + asap::week(1)`)\n- Literals (e.g, `auto then = asap::now() + 1_year`) for seconds, minutes, hours, days, weeks, months and years\n- Broken down duration printing (e.g, `asap::days(10)` prints `\"1 week, 3 days\"`)\n- Range-based iteration for periods:\n```\n   for (auto x: asap::now().until(asap::tomorrow()).every(1_hour)) {\n        std::cout \u003c\u003c x \u003c\u003c std::endl;\n   }\n```\n\n## Index\n\n- asap::datetime [class docs](http://mobius3.github.io/asap/api/classasap_1_1datetime.html) to learn about date/time\n- asap::duration [class docs](http://mobius3.github.io/asap/api/classasap_1_1duration.html) will teach you about durations and their literals\n- asap::period [class docs](http://mobius3.github.io/asap/api/classasap_1_1period.html) to learn about periods and date/time iterations\n- literals.h [docs](http://mobius3.github.io/asap/api/literals_8h_source.html) has the asap::literals namespace with all ASAP literals\n\n## Using\n\nYou can either:\n\n- Drop the `include/asap` folder in your project and use it\n- Make your compiler aware of the `include/asap` folder and include `\"asap.h\"` in your code\n- If using CMake you can add the project subdirectory and link against it using `target_link_libraries`\n- Use `find_package` if you installed ASAP using `make install` or any other method\n- Download the latest release which is a single `asap.h` file bundled with all the classes.\n\n## License\n\nASAP is MIT licensed.\n","funding_links":[],"categories":["Data Formatting and Presentation","Libraries","C++"],"sub_categories":["Misc"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmobius3%2Fasap","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmobius3%2Fasap","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmobius3%2Fasap/lists"}