{"id":16690717,"url":"https://github.com/nixman/dtf","last_synced_at":"2025-03-02T11:24:47.737Z","repository":{"id":146230342,"uuid":"164717475","full_name":"niXman/dtf","owner":"niXman","description":"Fast, header-only, date-time string formater and validator","archived":false,"fork":false,"pushed_at":"2025-02-17T14:55:57.000Z","size":34,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-17T15:34:13.049Z","etag":null,"topics":["cplusplus","date-formatting","date-time"],"latest_commit_sha":null,"homepage":"","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/niXman.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":"2019-01-08T19:22:49.000Z","updated_at":"2025-02-17T15:05:17.000Z","dependencies_parsed_at":null,"dependency_job_id":"e2bb2747-0551-4e29-9c10-64681b5527f6","html_url":"https://github.com/niXman/dtf","commit_stats":{"total_commits":20,"total_committers":2,"mean_commits":10.0,"dds":"0.44999999999999996","last_synced_commit":"c9ae74e3a4ef4a5177b4f32b7dac17606f2546c5"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/niXman%2Fdtf","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/niXman%2Fdtf/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/niXman%2Fdtf/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/niXman%2Fdtf/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/niXman","download_url":"https://codeload.github.com/niXman/dtf/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241495958,"owners_count":19972206,"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":["cplusplus","date-formatting","date-time"],"created_at":"2024-10-12T16:05:03.457Z","updated_at":"2025-03-02T11:24:47.732Z","avatar_url":"https://github.com/niXman.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# dtf\nFast, header-only, date-time formating and validating functions for C++11\n\n# Example\n```cpp\n#include \u003cdtf/dtf.hpp\u003e\n\nchar buf[dtf::bufsize];\n\n// current timestamp with nanoseconds resolution.\n// the required offset in hours can be passed as an argument in form `+2`/`-2`\nauto t = dtf::timestamp();\n\n// avail flags:\n// dtf::yyyy_mm_dd        // yyyy-mm-dd\n// dtf::dd_mm_yyyy        // dd-mm-yyyy\n// dtf::date_sep_dash     // 2018-12-11/yyyy-mm-dd\n// dtf::date_sep_point    // 2018.12.11/yyyy.mm.dd\n// dtf::date_sep_empty    // 20181211/yyyymmdd\n// dtf::dt_sep_T          // 20181211T13:58:59 (required when `yyyy_mm_dd | date_sep_empty`)\n// dtf::dt_sep_t          // 11122018t13:58:59 (required when `dd_mm_yyyy | date_sep_empty`)\n// dtf::dt_sep_space      // 2018-12-11 13:58:59\n// dtf::dt_sep_underscore // 2018-12-11_13:58:59\n// dtf::dt_sep_slash      // 2018-12-11/13:58:59\n// dtf::time_sep_colon    // 13:58:59/hh:mm:ss\n// dtf::time_sep_point    // 13.58.59/hh.mm.ss\n// dtf::time_sep_empty    // 135859/hhmmss\n// dtf::secs              // seconds resolution\n// dtf::msecs             // milliseconds resolution\n// dtf::usecs             // microseconds resolution\n// dtf::nsecs             // nanoseconds resolution\n\nconstexpr auto flags = dtf::yyyy_mm_dd|dtf::date_sep_empty|dtf::dt_sep_T|dtf::time_sep_empty|dtf::nsecs;\n\n// formating\nauto str = dtf::dt_str(flags);\n\nstd::cout \u003c\u003c str \u003c\u003c std::endl;\n\n// ...\n\n// validating\nauto f = dtf::get_flags(str);\nassert(f != 0); // wrong string or not supported\nassert(f == flags);\n```\n# Benchmark\n```\ndtf time     : 752177494 ns\nstrftime time: 1548738218 ns\nput_time time: 4430988336 ns\n\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnixman%2Fdtf","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnixman%2Fdtf","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnixman%2Fdtf/lists"}