lubridate v1.3.3


Monthly downloads



Make dealing with dates a little easier

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.

Functions in lubridate

Name Description
Interval-class Interval class
hm Create a period with the specified number of hours and minutes
olson_time_zones Names of available time zones
is.instant Is x a date-time object?
decimal_date Converts a date to a decimal of its year.
ms Create a period with the specified number of minutes and seconds
leap_year Is a year a leap year?
force_tz Replace time zone to create new date-time
stamp Format dates and times based on human-friendly templates.
origin 1970-01-01 UTC
dst Get Daylight Savings Time indicator of a date-time.
pretty_dates Computes attractive axis breaks for date-time data
date_decimal Converts a decimal to a date.
am Does date time occur in the am or pm?
%m+% Add and subtract months to a date without exceeding the last day of the new month
minute Get/set minutes component of a date-time.
Duration-class Duration class
yday Get/set days component of a date-time.
new_period Create a period object.
Period-class Period class
int_flip Flip the direction of an interval
today The current date
now The current time
timespan Description of time span classes in lubridate.
int_standardize Ensures all intervals in an interval object are positive
guess_formats Guess formats from the supplied date-time character vector.
fit_to_timeline Fit a POSIXlt date-time to the timeline
new_duration Create a duration object.
int_aligns Test if two intervals share an endpoint
is.period Is x a period object?
is.POSIXt Is x a POSIXct or POSIXlt object?
hour Get/set hours component of a date-time.
period Create a period object.
DateUpdate Changes the components of a date object
as.interval Change an object to an interval.
lubridate Dates and times made easy with lubridate
round_date Rounding for date-times.
new_difftime Create a difftime object.
%within% Tests whether a date or interval falls within an interval
as.duration Change an object to a duration.
days_in_month Get the number of days in the month of a date-time.
int_length Get the length of an interval in seconds
seconds Quickly create relative timespans.
is.timespan Is x a length of time?
Timespan-class Timespan class
is.interval Is x an Interval object?
int_overlaps Test if two intervals overlap
DateCoercion Convert a variety of date-time classes to POSIXlt and POSIXct
ceiling_date Round date-times up.
int_shift Shift an interval along the timeline
week Get/set weeks component of a date-time.
ymd_hms Parse dates that have hours, minutes, or seconds elements.
period_to_seconds Convert a period to the number of seconds it appears to represent
as.period Change an object to a period.
reclass_date Convenience method to reclass dates post-modification.
floor_date Round date-times down.
sundays Quickly create common epoch objects
tz Get/set time zone component of a date-time.
wday Get/set days component of a date-time.
here The current time in your local timezone
second Get/set seconds component of a date-time.
duration Create a duration object.
month Get/set months component of a date-time.
quarter Get the fiscal quarter of a date-time.
lubridate_formats Lubridate format orders used in stamp
make_difftime Makes a difftime object from a given number of seconds
is.duration Is x a duration object?
year Get/set years component of a date-time.
int_diff Extract the intervals within a vector of date-times
hms Create a period with the specified hours, minutes, and seconds
new_interval Create an interval object.
rollback Roll back date to last day of previous month
new_epoch Create an epoch object
dseconds Quickly create exact time spans.
lakers Lakers 2008-2009 basketball data set
int_start Access and change the start date of an interval
seconds_to_period Contrive a period from a given number of seconds
reclass_timespan Convenience method to reclass timespans post-modification.
add_epoch_to_date Add epochs to dates
parse_date_time Parse character and numeric date-time vectors with user friendly order formats.
ymd Parse dates according to the order in that year, month, and day elements appear in the input vector.
int_end Access and change the end date of an interval
is.difftime Is x a difftime object?
with_tz Get date-time in a different time zone
is.Date Is x a Date object?
No Results!

Last month downloads


License GPL
LazyData true
Type Package
VignetteBuilder knitr
Collate 'time-zones.r' 'POSIXt.r' 'timespans.r' 'numeric.r' 'util.r' 'durations.r' 'periods.r' 'intervals.r' 'difftimes.r' 'Dates.r' 'coercion.r' 'ops-addition.r' 'ops-division.r' 'ops-integer-division.r' 'ops-modulo.r' 'ops-multiplication.r' 'ops-subtraction.r' 'accessors-day.r' 'accessors-dst.r' 'accessors-hour.r' 'accessors-minute.r' 'accessors-month.r' 'accessors-second.r' 'accessors-tz.r' 'accessors-week.r' 'accessors-year.r' 'am-pm.r' 'decimal-dates.r' 'epochs.r' 'help.r' 'instants.r' 'leap-years.r' 'parse.r' 'pretty.r' 'round.r' 'update.r' 'data.r' 'guess.r' 'stamp.r' 'ops-%m+%.r' 'accessors-quarter.r'
Packaged 2013-12-26 20:51:01 UTC; garrettgrolemund
NeedsCompilation yes
Repository CRAN
Date/Publication 2013-12-31 16:24:04

Include our badge in your README