Learn R Programming

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

lubridate (version 0.1)

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

916,030

Version

0.1

License

GPL

Maintainer

Hadley Wickham

Last Published

August 15th, 2010

Functions in lubridate (0.1)

is.instant

Is x a date-time object?
am

Does date time occur in the am or pm?
second

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

Addition for the duration (i...
duration

Description of time span classes in lubridate.
is.period

Is x a period object?
floor_date

Round date-times down.
seconds

Quickly create relative timespans.
parse_unit_spec

Internal function.
is.difftime

Is x a duration (difftime) object?
minute

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

Quickly create common epoch objects...
make_difftime

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

Add epochs to dates...
pretty.month

Internal function...
hour

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

Lakers 2008-2009 basketball data set...
hms

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

Parse dates that appear in standard POSIXt order...
ceiling_date

Round date-times up.
eseconds

Quickly create exact time spans.
is.POSIXt

Is x a POSIXct or POSIXlt object?
is.interval

Is x an interval object?
force_tz

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

Create a duration object.
combine

Internal function.
wday

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

Is x a length of time?
ms

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

Internal function...
make_format

Make format...
recognize

Internal function.
print.interval

Internal function for printing interval objects.
find_separator

Identifies the likely separators of a string.
now

The current time...
new_period

Create a period object.
origin

1970-01-01 GMT...
DateCoercion

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

Create an interval object.
is.Date

Is x a Date object?
decimal_date

Converts a date to a decimal of its year.
yday

Get/set days component of a date-time.
pretty.year

Internal function...
parse_date

Change dates into a POSIXct format...
ymd

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

Create an epoch object...
pretty.dates

Computes attractive axis breaks for date-time data...
as.POSIXt

Internal function.
guess_format

Guess the format of dates in a character or numeric vector...
format.period

Internal function.
subtract_dates

Subtraction for the duration (i...
with_tz

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

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

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

Is a year a leap year?
pretty.sec

Internal function...
print.period

Internal method for printing interval objects.
update.POSIXct

Changes the components of a date object...
pretty.min

Internal function...
pretty.day

Internal function...
month

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

Internal function.
format.interval

Internal function.
tz

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

The current date...
as.duration

Change an object to a duration (difftime).
dst

Get Daylight Savings Time indicator of a date-time.
as.interval

Change an object to an interval.
pretty.hour

Internal function...
pretty.unit

Internal function...
as.period

Change an object to a period.
reclass_date

Convenience method to reclass dates post-modification.
num_to_date

Internal function...
year

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

Division for period, and interval classes.
round_date

Rounding for date-times.
multiply

Multiplication for period and interval classes.
standardise_date_names

Internal function...