Package: lubridate 1.9.3.9000

Vitalie Spinu

lubridate: Make Dealing with Dates a Little Easier

Functions to work with date-times and time-spans: fast and user friendly parsing of date-time data, extraction and updating of components of a date-time (years, months, days, hours, minutes, and seconds), algebraic manipulation on date-time and time-span objects. The 'lubridate' package has a consistent and memorable syntax that makes working with dates easy and fun.

Authors:Vitalie Spinu [aut, cre], Garrett Grolemund [aut], Hadley Wickham [aut], Davis Vaughan [ctb], Ian Lyttle [ctb], Imanuel Costigan [ctb], Jason Law [ctb], Doug Mitarotonda [ctb], Joseph Larmarange [ctb], Jonathan Boiser [ctb], Chel Hee Lee [ctb]

lubridate_1.9.3.9000.tar.gz
lubridate_1.9.3.9000.zip(r-4.5)lubridate_1.9.3.9000.zip(r-4.4)lubridate_1.9.3.9000.zip(r-4.3)
lubridate_1.9.3.9000.tgz(r-4.4-x86_64)lubridate_1.9.3.9000.tgz(r-4.4-arm64)lubridate_1.9.3.9000.tgz(r-4.3-x86_64)lubridate_1.9.3.9000.tgz(r-4.3-arm64)
lubridate_1.9.3.9000.tar.gz(r-4.5-noble)lubridate_1.9.3.9000.tar.gz(r-4.4-noble)
lubridate_1.9.3.9000.tgz(r-4.4-emscripten)lubridate_1.9.3.9000.tgz(r-4.3-emscripten)
lubridate.pdf |lubridate.html
lubridate/json (API)
NEWS

# Install 'lubridate' in R:
install.packages('lubridate', repos = c('https://fastverse.r-universe.dev', 'https://cloud.r-project.org'))

Peer review:

Bug tracker:https://github.com/tidyverse/lubridate/issues

Datasets:
  • lakers - Lakers 2008-2009 basketball data set

On CRAN:

datedate-time

20.81 score 731 stars 1.9k packages 139k scripts 859k downloads 84 mentions 162 exports 3 dependencies

Last updated 4 months agofrom:2f3ab32151. Checks:OK: 9. Indexed: no.

TargetResultDate
Doc / VignettesOKNov 03 2024
R-4.5-win-x86_64OKNov 03 2024
R-4.5-linux-x86_64OKNov 03 2024
R-4.4-win-x86_64OKNov 03 2024
R-4.4-mac-x86_64OKNov 03 2024
R-4.4-mac-aarch64OKNov 03 2024
R-4.3-win-x86_64OKNov 03 2024
R-4.3-mac-x86_64OKNov 03 2024
R-4.3-mac-aarch64OKNov 03 2024

Exports:%--%%m-%%m+%%within%add_with_rollbackamArithas_dateas_datetimeas.difftimeas.durationas.intervalas.periodceiling_dateComparecyclic_encodingdateDatedate_decimaldate<-dayday<-daysdays_in_monthddaysdecimal_datedhoursdmicrosecondsdmillisecondsdminutesdmonthsdmydmy_hdmy_hmdmy_hmsdnanosecondsdpicosecondsdsecondsdstdurationdweeksdyearsdymepiweekepiyearfast_strptimefit_to_timelinefloor_dateforce_tzforce_tzsformat_ISO8601guess_formatshmhmshourhour<-hoursint_alignsint_diffint_endint_end<-int_flipint_lengthint_overlapsint_shiftint_standardizeint_startint_start<-intersectintervalis.Dateis.difftimeis.durationis.instantis.intervalis.periodis.POSIXctis.POSIXltis.POSIXtis.timepointis.timespanisoweekisoyearleap_yearlocal_timemake_datemake_datetimemake_difftimemdaymday<-mdymdy_hmdy_hmmdy_hmsmicrosecondsmillisecondsminuteminute<-minutesmonthmonth<-msmymydNA_Date_NA_POSIXct_nanosecondsnoworiginparse_date_timeparse_date_time2periodperiod_to_secondspicosecondspmPOSIXctpretty_datesqdayqday<-quarterreclass_datereclass_timespanrollbackrollbackwardrollforwardround_datesecondsecond<-secondsseconds_to_periodsemestersetdiffshowstampstamp_datestamp_timetime_lengthtodaytztz<-unionwdaywday<-weekweek<-weekswith_tzydayyday<-ydmydm_hydm_hmydm_hmsyearyear<-yearsymymdymd_hymd_hmymd_hmsyq

Dependencies:cpp11genericstimechange

Do more with dates and times in R

Rendered fromlubridate.Rmdusingknitr::rmarkdownon Nov 03 2024.

Last update: 2020-12-11
Started: 2013-07-24

Readme and manuals

Help Manual

Help pageTopics
Add and subtract months to a date without exceeding the last day of the new month%m+% %m+%,ANY,ANY-method %m+%,ANY,Duration-method %m+%,ANY,Interval-method %m+%,ANY,Period-method %m+%,Duration,ANY-method %m+%,Interval,ANY-method %m+%,Period,ANY-method %m-% %m-%,ANY,ANY-method %m-%,ANY,Duration-method %m-%,ANY,Interval-method %m-%,ANY,Period-method %m-%,Duration,ANY-method %m-%,Interval,ANY-method %m-%,Period,ANY-method add_with_rollback m+ m-
Does a date (or interval) fall within an interval?%within% %within%,ANY,Interval-method %within%,Date,list-method %within%,Interval,Interval-method %within%,Interval,list-method %within%,POSIXt,list-method
Does date time occur in the am or pm?am pm
Convert an object to a date or date-timeas_date as_date,ANY-method as_date,character-method as_date,numeric-method as_date,POSIXt-method as_datetime as_datetime,ANY-method as_datetime,character-method as_datetime,Date-method as_datetime,numeric-method as_datetime,POSIXt-method
Change an object to a durationas.duration as.duration,character-method as.duration,difftime-method as.duration,Duration-method as.duration,Interval-method as.duration,logical-method as.duration,numeric-method as.duration,Period-method
Change an object to an 'interval'as.interval as.interval,difftime-method as.interval,Duration-method as.interval,Interval-method as.interval,logical-method as.interval,numeric-method as.interval,Period-method as.interval,POSIXt-method
Change an object to a periodas.period as.period,character-method as.period,difftime-method as.period,Duration-method as.period,Interval-method as.period,logical-method as.period,numeric-method as.period,Period-method
Cyclic encoding of date-timescyclic_encoding
Get/set date component of a date-timedate date<-
Converts a decimal to a datedate_decimal
Changes the components of a date objectDateTimeUpdate update.POSIXt
Get/set days component of a date-timeday day<- mday mday<- qday qday<- wday wday<- yday yday<-
Get the number of days in the month of a date-timedays_in_month
Converts a date to a decimal of its yeardecimal_date
Get *d*aylight *s*avings *t*ime indicator of a date-timedst
Create a duration object.ddays dhours dmicroseconds dmilliseconds dminutes dmonths dnanoseconds dpicoseconds dseconds duration dweeks dyears is.duration
Duration classDuration-class durations
Fit a POSIXlt date-time to the timelinefit_to_timeline
Replace time zone to create new date-timeforce_tz force_tz.default force_tzs
Format in ISO8601 character formatformat_ISO8601 format_ISO8601,Date-method format_ISO8601,Duration-method format_ISO8601,Interval-method format_ISO8601,Period-method format_ISO8601,POSIXt-method
Guess possible date-times formats from a character vectorguess_formats
Get/set hours component of a date-timehour hour<-
Utilities for creation and manipulation of 'Interval' objects%--% interval int_aligns int_diff int_end int_end<- int_flip int_length int_overlaps int_shift int_standardize int_start int_start<- is.interval
Interval classInterval-class intervals
Various date utilitiesDate is.Date NA_Date_
Is x a difftime object?is.difftime
Is x a date-time object?instant instants is.instant is.timepoint
Various POSIX utilitiesis.POSIXct is.POSIXlt is.POSIXt NA_POSIXct_ POSIXct
Is x a length of time?is.timespan
Lakers 2008-2009 basketball data setlakers
Is a year a leap year?leap_year
Get local time from a date-time vector.local_time
Efficient creation of date-times from numeric representationsmake_date make_datetime
Create a difftime object.make_difftime
Get/set minutes component of a date-timeminute minute<-
Get/set months component of a date-timemonth month<-
Parse periods with *h*our, *m*inute, and *s*econd componentshm hms ms
The current day and timenow today
1970-01-01 UTCorigin
User friendly date-time parsing functionsfast_strptime parse_date_time parse_date_time2
Create or parse period objectsdays hours is.period microseconds milliseconds minutes months.numeric nanoseconds period periods picoseconds seconds weeks years
Contrive a period to/from a given number of secondsperiod_to_seconds seconds_to_period
Computes attractive axis breaks for date-time datapretty_dates
Get the fiscal quarter and semester of a date-timequarter semester
Roll backward or forward a date the previous, current or next monthrollback rollbackward rollforward
Round, floor and ceiling methods for date-time objectsceiling_date floor_date round_date
Get/set seconds component of a date-timesecond second<-
Format dates and times based on human-friendly templatesstamp stamp_date stamp_time
Compute the exact length of a time spantime_length time_length,Interval-method
Description of time span classes in lubridatetimespan timespans
Get/set time zone component of a date-timetz tz<-
Get/set weeks component of a date-timeepiweek isoweek week week<-
Get date-time in a different time zonewith_tz with_tz.default
Get/set years component of a date-timeepiyear isoyear year year<-
Parse dates with *y*ear, *m*onth, and *d*ay componentsdmy dym mdy my myd ydm ym ymd yq
Parse date-times with *y*ear, *m*onth, and *d*ay, *h*our, *m*inute, and *s*econd components.dmy_h dmy_hm dmy_hms mdy_h mdy_hm mdy_hms ydm_h ydm_hm ydm_hms ymd_h ymd_hm ymd_hms