Learn R Programming

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

lubridate (version 0.2.2)

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

0.2.2

License

GPL

Maintainer

Hadley Wickham

Last Published

November 17th, 2010

Functions in lubridate (0.2.2)

is.interval

Is x an interval object?
is.timespan

Is x a length of time?
hour

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

Adding date-time objects...
is.difftime

Is x a difftime object?
ms

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

Description of time span classes in lubridate.
is.period

Is x a period object?
floor_date

Round date-times down.
make_difftime

Makes a difftime object from a given number of seconds...
month

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

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

Change an object to an interval.
minute

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

1970-01-01 GMT...
force_tz

Replace time zone to create new date-time...
lakers

Lakers 2008-2009 basketball data set...
new_interval

Create an interval object.
as.period

Change an object to a period.
am

Does date time occur in the am or pm?
hms

Create a period with the specified hours, minutes, and seconds...
hm

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

Is a year a leap year?
add_epoch_to_date

Add epochs to dates...
is.Date

Is x a Date object?
is.POSIXt

Is x a POSIXct or POSIXlt object?
ceiling_date

Round date-times up.
is.instant

Is x a date-time object?
DateUpdate

Changes the components of a date object...
as.duration

Change an object to a duration (difftime).
end

Access and change the end date of an interval...
second

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

Convenience method to reclass dates post-modification.
parse_date

Change dates into a POSIXct format...
pretty.dates

Computes attractive axis breaks for date-time data...
today

The current date...
DateCoercion

Convert every date method we know about to POSIXlt and POSIXct...
new_difftime

Create a difftime object.
new_duration

Create a duration object.
dst

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

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

The current time...
is.duration

Is x a duration object?
sundays

Quickly create common epoch objects...
new_epoch

Create an epoch object...
subtract_dates

Subtracting date-time objects...
new_period

Create a period object.
seconds

Quickly create relative timespans.
tz

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

Quickly create exact time spans.
ymd_hms

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

Get date-time in a different time zone...
start

Access and change the start date of an interval...
year

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

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

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

Rounding for date-times.
week

Get/set weeks component of a date-time.