50% off | Unlimited Data & AI Learning
Get 50% off unlimited learning

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

lubridate (version 1.2.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

837,359

Version

1.2.0

License

GPL

Maintainer

Garrett Grolemund

Last Published

October 4th, 2012

Functions in lubridate (1.2.0)

force_tz

Replace time zone to create new date-time
Interval-class

Interval class
decimal_date

Converts a date to a decimal of its year.
DateUpdate

Changes the components of a date object
int_length

Get the length of an interval in seconds
int_diff

Extract the intervals within a vector of date-times
int_end

Access and change the end date of an interval
DateCoercion

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

Guess formats from the supplied date-time character vector.
period_to_seconds

Convert a period to the number of units it appears to represent
hour

Get/set hours component of a date-time.
floor_date

Round date-times down.
Timespan-class

Timespan class
am

Does date time occur in the am or pm?
lubridate_formats

Lubridate format orders used in ymd, hms and ymd_hms family of functions.
as.duration

Change an object to a duration.
int_start

Access and change the start date of an interval
int_overlaps

Test if two intervals overlap
new_interval

Create an interval object.
Duration-class

Duration class
origin

1970-01-01 GMT
int_aligns

Test if two intervals share an endpoint
int_standardize

Ensures all intervals in an interval object are positive
new_period

Create a period object.
pretty_dates

Computes attractive axis breaks for date-time data
lakers

Lakers 2008-2009 basketball data set
new_difftime

Create a difftime object.
%m+%

Add and subtract months to a date without exceeding the last day of the new month
days_in_month

Get the number of days in the month of a date-time.
is.duration

Is x a duration object?
duration

Create a duration object.
is.period

Is x a period object?
minute

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

Shift an interval along the timeline
is.interval

Is x an Interval object?
lubridate

Dates and times made easy with lubridate
dseconds

Quickly create exact time spans.
hm

Create a period with the specified number of hours and minutes
is.POSIXt

Is x a POSIXct or POSIXlt object?
as.period

Change an object to a period.
is.instant

Is x a date-time object?
ceiling_date

Round date-times up.
sundays

Quickly create common epoch objects
ms

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

Quickly create relative timespans.
stamp

Format dates and times based on human-friendly templates.
now

The current time
with_tz

Get date-time in a different time zone
is.timespan

Is x a length of time?
Period-class

Period class
month

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

Is a year a leap year?
is.difftime

Is x a difftime object?
as.interval

Change an object to an interval.
timespan

Description of time span classes in lubridate.
new_epoch

Create an epoch object
second

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

Flip the direction of an interval
reclass_date

Convenience method to reclass dates post-modification.
ymd_hms

Parse dates that have hours, minutes, or seconds elements.
year

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

Get/set time zone component of a date-time.
reclass_timespan

Convenience method to reclass timespans post-modification.
%within%

Tests whether a date or interval falls within an interval
period

Create a period object.
today

The current date
new_duration

Create a duration object.
add_epoch_to_date

Add epochs to dates
dst

Get Daylight Savings Time indicator of a date-time.
week

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

Rounding for date-times.
make_difftime

Makes a difftime object from a given number of seconds
rollback

Roll back date to last day of previous month
wday

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

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

Get the fiscal quarter of a date-time.
parse_date

ymd

Parse dates according to the order that year, month, and day elements appear in the input vector.
is.Date

Is x a Date object?
hms

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

Function to parse character and numeric date-time vectors with user friendly order formats.