Learn R Programming

⚠️There's a newer version (1.9.4) of this package.Take me there.

lubridate (version 1.1.0)

Make dealing with dates a little easier

Description

Lubridate makes it easier to work with dates and times by providing functions to identify and parse date-time data, extract and modify components of a date-time (years, months, days, hours, minutes, and seconds), perform accurate math on date-times, handle time zones and Daylight Savings Time. Lubridate has a consistent, memorable syntax, that makes working with dates fun instead of frustrating.

Copy Link

Version

Install

install.packages('lubridate')

Monthly Downloads

947,479

Version

1.1.0

License

GPL

Maintainer

Garrett Grolemund

Last Published

March 5th, 2012

Functions in lubridate (1.1.0)

int_standardize

Ensures all intervals in an interval object are positive
Timespan-class

Timespan class
hms

Create a period with the specified hours, minutes, and seconds
new_duration

Create a duration object.
floor_date

Round date-times down.
add_epoch_to_date

Add epochs to dates
ymd_hms

Parse dates that have hours, minutes, or seconds elements
force_tz

Replace time zone to create new date-time
is.interval

Is x an Interval object?
wday

Get/set days component of a date-time.
pretty_dates

Computes attractive axis breaks for date-time data
duration

Create a duration object.
yday

Get/set days component of a date-time.
is.instant

Is x a date-time object?
period_to_seconds

Convert a period to the number of units it appears to represent
Period-class

Period class
month

Get/set months component of a date-time.
timespan

Description of time span classes in lubridate.
is.duration

Is x a duration object?
today

The current date
new_interval

Create an interval object.
origin

1970-01-01 GMT
ceiling_date

Round date-times up.
int_shift

Shift an interval along the timeline
period

Create a period object.
int_end

Access and change the end date of an interval
DateUpdate

Changes the components of a date object
int_aligns

Test if two intervals share an endpoint
int_start

Access and change the start date of an interval
make_difftime

Makes a difftime object from a given number of seconds
is.Date

Is x a Date object?
sundays

Quickly create common epoch objects
week

Get/set weeks component of a date-time.
int_flip

Flip the direction of an interval
new_epoch

Create an epoch object
am

Does date time occur in the am or pm?
as.period

Change an object to a period.
with_tz

Get date-time in a different time zone
dst

Get Daylight Savings Time indicator of a date-time.
is.difftime

Is x a difftime object?
%within%

Tests whether a date or interval falls within an interval
new_period

Create a period object.
year

Get/set years component of a date-time.
reclass_date

Convenience method to reclass dates post-modification.
is.POSIXt

Is x a POSIXct or POSIXlt object?
hm

Create a period with the specified number of hours and minutes
minute

Get/set minutes component of a date-time.
new_difftime

Create a difftime object.
tz

Get/set time zone component of a date-time.
is.period

Is x a period object?
Interval-class

Interval class
second

Get/set seconds component of a date-time.
seconds

Quickly create relative timespans.
as.duration

Change an object to a duration.
ms

Create a period with the specified number of minutes and seconds
parse_date

Change dates into a POSIXct format
ymd

Parse dates according to the order that year, month, and day elements appear
leap_year

Is a year a leap year?
round_date

Rounding for date-times.
is.timespan

Is x a length of time?
now

The current time
hour

Get/set hours component of a date-time.
Duration-class

Duration class
DateCoercion

Convert a variety of date-time classes to POSIXlt and POSIXct
decimal_date

Converts a date to a decimal of its year.
as.interval

Change an object to an interval.
dseconds

Quickly create exact time spans.
lubridate

Dates and times made easy with lubridate
int_overlaps

Test if two intervals overlap
lakers

Lakers 2008-2009 basketball data set
reclass_timespan

Convenience method to reclass timespans post-modification.