{"id":13857951,"url":"https://github.com/s-fleck/dint","last_synced_at":"2025-08-24T13:36:04.982Z","repository":{"id":56936524,"uuid":"130039666","full_name":"s-fleck/dint","owner":"s-fleck","description":"A toolkit for working year-quarter and year-month dates","archived":false,"fork":false,"pushed_at":"2024-11-20T17:15:34.000Z","size":3304,"stargazers_count":14,"open_issues_count":0,"forks_count":3,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-08-16T12:35:57.114Z","etag":null,"topics":["date","dates","month","period","quarter","r","week"],"latest_commit_sha":null,"homepage":"https://s-fleck.github.io/dint/","language":"R","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/s-fleck.png","metadata":{"files":{"readme":"README.Rmd","changelog":"NEWS.md","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,"zenodo":null}},"created_at":"2018-04-18T09:38:21.000Z","updated_at":"2024-11-20T15:01:41.000Z","dependencies_parsed_at":"2025-07-26T14:37:19.709Z","dependency_job_id":"8e38fafa-411a-4feb-b2fb-ba50940c30ea","html_url":"https://github.com/s-fleck/dint","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/s-fleck/dint","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/s-fleck%2Fdint","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/s-fleck%2Fdint/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/s-fleck%2Fdint/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/s-fleck%2Fdint/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/s-fleck","download_url":"https://codeload.github.com/s-fleck/dint/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/s-fleck%2Fdint/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271506920,"owners_count":24771821,"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-08-21T02:00:08.990Z","response_time":74,"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":["date","dates","month","period","quarter","r","week"],"created_at":"2024-08-05T03:01:51.589Z","updated_at":"2025-08-24T13:36:04.954Z","avatar_url":"https://github.com/s-fleck.png","language":"R","readme":"---\noutput: github_document\n---\n\n\u003c!-- README.md is generated from README.Rmd. Please edit that file --\u003e\n\n```{r setup, include = FALSE}\nknitr::opts_chunk$set(\n  collapse = TRUE,\n  comment = \"#\u003e\",\n  fig.path = \"man/figures/README-\",\n  out.width = \"100%\"\n)\n```\n# dint\n\n[![CRAN status](https://www.r-pkg.org/badges/version/dint)](https://cran.r-project.org/package=dint)\n[![lifecycle](https://img.shields.io/badge/lifecycle-stable-brightgreen.svg)](https://lifecycle.r-lib.org/articles/stages.html#stable)\n\n\nA Toolkit for Year-Quarter, Year-Month and Year-Isoweek Dates\n\nS3 classes and methods to create and work with year-quarter and year-month \nvectors. Basic arithmetic operations (such as adding and subtracting) are\nsupported, as well as formatting and converting to and from standard R\nDate types. For more info please refer to the\n[package vignette](https://CRAN.R-project.org/package=dint/vignettes/dint.html)\nor the [documentation](https://s-fleck.github.io/dint/)\n\n\n## Dependencies\n\ndint is implemented strictly in base R and will **always stay free of hard dependencies**.\nThe optional dependencies of dint are just there to facilitate interoperability \nthese packages if you are already using them; for example by providing ggplot2 \nscales.\n\n\n## Installation\n\nInstall the release version of dint from CRAN:\n\n```{r cran-installation, eval = FALSE}\ninstall.packages(\"dint\")\n```\n\nOr install the development version from GitHub with:\n\n```{r gh-installation, eval = FALSE}\n# install.packages(\"devtools\")\ndevtools::install_github(\"s-fleck/dint\")\n```\n\n\n\n\n\n## Example\n\n```{r example}\nlibrary(dint)\n\n# creation\nq \u003c- date_yq(2014, 4)\nm \u003c- as_date_ym(201412)\nw \u003c- as_date_yw(as.Date(\"2017-01-01\"))\n\n# printing\nprint(q)\nprint(m)\nprint(w)  # isoweeks do not follow calendar years!\n\n# arithmetic operations\n# quarters\nq\nq + 1\nseq(q -2, q + 2)\n\n\n# months\nm\nm + 1\nseq(m -2, m + 2)\n\n\n# formatting\nformat(q)\nformat(q, \"%Y.%q\")\nformat(q, \"%y.%q\")\nformat(m)\n\n\n# get start and end of period\nlast_of_quarter(q)\nfirst_of_quarter(q)\nfirst_of_month(Sys.Date())\nfirst_of_isoweek(w)\nlast_of_isoweek(w)\n\n```\n","funding_links":[],"categories":["R"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fs-fleck%2Fdint","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fs-fleck%2Fdint","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fs-fleck%2Fdint/lists"}