Home

Awesome

<!-- README.md is generated from README.Rmd. Please edit that file -->

lubridate <img src="man/figures/logo.png" align="right" />

<!-- badges: start -->

CRAN version R build status Coverage Status CRAN RStudio mirror downloads Development version

<!-- badges: end -->

Overview

Date-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.

If you are new to lubridate, the best place to start is the date and times chapter in R for data science.

Installation

# The easiest way to get lubridate is to install the whole tidyverse:
install.packages("tidyverse")

# Alternatively, install just lubridate:
install.packages("lubridate")

# Or the the development version from GitHub:
# install.packages("devtools")
devtools::install_github("tidyverse/lubridate")

Cheatsheet

<a href="https://rawgit.com/rstudio/cheatsheets/main/lubridate.pdf"><img src="https://raw.githubusercontent.com/rstudio/cheatsheets/main/pngs/thumbnails/lubridate-cheatsheet-thumbs.png" width="630" height="252"/></a>

Features

library(lubridate, warn.conflicts = FALSE)

Lubridate 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.

Code of Conduct

Please note that the lubridate project is released with a Contributor Code of Conduct. By contributing to this project, you agree to abide by its terms.