lubridate v1.2.0


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
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 Deprecated internal function, use parse_date_time instead.
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.
No Results!

Last month downloads


License GPL
LazyData true
Type Package
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 2012-10-04 16:22:32 UTC; garrettgrolemund
Repository CRAN
Date/Publication 2012-10-04 16:57:44

Include our badge in your README