{"id":13654037,"url":"https://github.com/tidyverse/lubridate","last_synced_at":"2025-04-23T20:54:03.206Z","repository":{"id":519779,"uuid":"148017","full_name":"tidyverse/lubridate","owner":"tidyverse","description":"Make working with dates in R just that little bit easier","archived":false,"fork":false,"pushed_at":"2025-04-01T21:17:18.000Z","size":15696,"stargazers_count":762,"open_issues_count":106,"forks_count":210,"subscribers_count":45,"default_branch":"main","last_synced_at":"2025-04-23T20:53:55.466Z","etag":null,"topics":["date","date-time","r"],"latest_commit_sha":null,"homepage":"https://lubridate.tidyverse.org","language":"R","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tidyverse.png","metadata":{"files":{"readme":"README.Rmd","changelog":"NEWS.md","contributing":".github/CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":".github/CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":".github/SUPPORT.md","governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2009-03-11T01:18:52.000Z","updated_at":"2025-04-15T14:06:27.000Z","dependencies_parsed_at":"2023-02-14T06:00:40.081Z","dependency_job_id":"f569fc56-8fcb-4fbe-8278-b3b383b06d52","html_url":"https://github.com/tidyverse/lubridate","commit_stats":{"total_commits":1757,"total_committers":106,"mean_commits":16.57547169811321,"dds":0.5754126351735913,"last_synced_commit":"e0b50c1759fe35e90a094c012e0c2ce60d47500d"},"previous_names":[],"tags_count":26,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tidyverse%2Flubridate","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tidyverse%2Flubridate/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tidyverse%2Flubridate/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tidyverse%2Flubridate/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tidyverse","download_url":"https://codeload.github.com/tidyverse/lubridate/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250514767,"owners_count":21443208,"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":["date","date-time","r"],"created_at":"2024-08-02T02:01:22.330Z","updated_at":"2025-04-23T20:54:03.186Z","avatar_url":"https://github.com/tidyverse.png","language":"R","funding_links":[],"categories":["R","Data Manipulation","Table of Contents"],"sub_categories":["Data manipulation"],"readme":"---\noutput: github_document\n---\n\n\u003c!-- README.md is generated from README.Rmd. Please edit that file --\u003e\n\n```{r, include = FALSE}\nknitr::opts_chunk$set(\n  collapse = TRUE,\n  comment = \"#\u003e\",\n  fig.path = \"man/figures\"\n)\n```\n\n# lubridate \u003cimg src=\"man/figures/logo.png\" align=\"right\" /\u003e\n\n\u003c!-- badges: start --\u003e\n[![CRAN version](http://www.r-pkg.org/badges/version/lubridate)](https://cran.r-project.org/package=lubridate)\n[![R build status](https://github.com/tidyverse/lubridate/workflows/R-CMD-check/badge.svg)](https://github.com/tidyverse/lubridate/actions)\n[![CRAN RStudio mirror downloads](http://cranlogs.r-pkg.org/badges/lubridate)](https://cran.r-project.org/package=lubridate)\n[![R-CMD-check](https://github.com/tidyverse/lubridate/actions/workflows/check-standard.yaml/badge.svg)](https://github.com/tidyverse/lubridate/actions/workflows/R-CMD-check.yaml)\n\u003c!-- badges: end --\u003e\n\n## Overview\n\nDate-time data can be frustrating to work with in R. R commands for date-times are generally unintuitive and change depending on the type of date-time object being used. Moreover, the methods we use with date-times must be robust to time zones, leap days, daylight savings times, and other time related quirks, and R lacks these capabilities in some situations. Lubridate makes it easier to do the things R does with date-times and possible to do the things R does not.\n\nIf you are new to lubridate, the best place to start is the\n[date and times chapter](https://r4ds.hadley.nz/datetimes.html) in R\nfor data science.\n\n\n## Installation\n\n```{r, eval = FALSE}\n# The easiest way to get lubridate is to install the whole tidyverse:\ninstall.packages(\"tidyverse\")\n\n# Alternatively, install just lubridate:\ninstall.packages(\"lubridate\")\n\n# Or the development version from GitHub:\n# install.packages(\"devtools\")\ndevtools::install_github(\"tidyverse/lubridate\")\n```\n\n## Cheatsheet\n\n\u003ca href=\"https://rawgit.com/rstudio/cheatsheets/main/lubridate.pdf\"\u003e\u003cimg src=\"https://raw.githubusercontent.com/rstudio/cheatsheets/main/pngs/thumbnails/lubridate-cheatsheet-thumbs.png\" width=\"630\" height=\"252\"/\u003e\u003c/a\u003e\n\n## Features\n\n```{r}\nlibrary(lubridate, warn.conflicts = FALSE)\n```\n\n*   Easy and fast parsing of date-times: `ymd()`, `ymd_hms`, `dmy()`, `dmy_hms`,\n    `mdy()`, ...\n\n    ```{r}\n    ymd(20101215)\n    mdy(\"4/1/17\")\n    ```\n\n*   Simple functions to get and set components of a date-time, such as `year()`,\n    `month()`, `mday()`, `hour()`, `minute()` and `second()`:\n\n    ```{r}\n    bday \u003c- dmy(\"14/10/1979\")\n    month(bday)\n    wday(bday, label = TRUE)\n\n    year(bday) \u003c- 2016\n    wday(bday, label = TRUE)\n    ```\n\n*   Helper functions for handling time zones: `with_tz()`, `force_tz()`\n\n    ```{r}\n    time \u003c- ymd_hms(\"2010-12-13 15:30:30\")\n    time\n\n    # Changes printing\n    with_tz(time, \"America/Chicago\")\n\n    # Changes time\n    force_tz(time, \"America/Chicago\")\n    ```\n\nLubridate also expands the type of mathematical operations that can be performed with date-time objects. It introduces three new time span classes borrowed from https://www.joda.org.\n\n* `durations`, which measure the exact amount of time between two points\n\n* `periods`, which accurately track clock times despite leap years, leap\n  seconds, and day light savings time\n\n* `intervals`, a protean summary of the time information between two points\n\n## Code of Conduct\n\nPlease note that the lubridate project is released with a [Contributor Code of Conduct](https://lubridate.tidyverse.org/CODE_OF_CONDUCT.html). By contributing to this project, you agree to abide by its terms.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftidyverse%2Flubridate","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftidyverse%2Flubridate","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftidyverse%2Flubridate/lists"}