Releases: tidyverse/lubridate
Releases · tidyverse/lubridate
Lubridate 1.9.2
Lubridate 1.9.1
NEW FEATURES
as_datetime()
accepts multiple formats in format argument, just likeas_date()
does.
BUG FIXES
- #1091 Fix formatting of numeric inputs to parse_date_time.
- #1092 Fix regression in
ymd_hm
on locales wherep
format is not defined. - #1097 Fix
as_date("character")
to work correctly with formats that include extra characters. - #1098 Roll over the month boundary in
make_dateime()
when units exceed their maximal values. - #1090 timechange has been moved from Depends to Imports.
Lubridate 1.9.0
Version 1.9.0
NEW FEATURES
roll
argument to updating and time-zone manipulation functions is deprecated in favor of a newroll_dst
parameter.- #1042
as_date
with character inputs accepts multiple formats informat
argument. Whenformat
is supplied, the input string is parsed withparse_date_time
instead of the oldstrptime
. - #1055 Implement
as.integer
method for Duration, Period and Interval classes. - #1061 Make
year<-
,month<-
etc. accessors truly generic. In order to make them work with arbitrary class XYZ, it's enough to define areclass_date.XYZ
method. - #1061 Add support for
year<-
,month<-
etc. accessors fordata.table
's IDate and ITime objects. - #1017
week_start
argument in all lubridate functions now accepts full and abbreviated names of the days of the week. - The assignment value
wday<-
can be a string either in English or as provided by the current locale. - Date rounding functions accept a date-time
unit
argument for rounding to a vector of date-times. - #1005
as.duration
now allows for full roundtripduration -> as.character -> as.duration
- #911 C parsers treat multiple spaces as one (just like strptime does)
stamp
gained new argumentexact=FALSE
to indicate whetherorders
argument is an exact strptime formats string or not.- #1001 Add
%within
method with signature (Interval, list), which was documented but not implemented. - #941
format_ISO8601()
gained a new optionusetz="Z"
to format time zones with a "Z" and convert the time to the UTC time zone. - #931 Usage of
Period
objects in rounding functions is explicitly documented.
BUG FIXES
- #1036
%within%
now correctly works with flipped intervals - #1085
as_datetime()
now preserves the time zone of the POSIXt input. - #1072 Names are now handled correctly when combining multiple Period or Interval objects.
- #1003 Correctly handle r and R formats in locales which have no p format
- #1074 Fix concatination of named Period, Interval and Duration vectors.
- #1044 POSIXlt results returned by
fast_strptime()
andparse_date_time2()
now have a recycledisdst
field. - #1069 Internal code handling the addition of period months and years no longer generates partially recycled POSIXlt objects.
- Fix rounding of POSIXlt objects
- #1007 Internal lubridate formats are no longer propagated to stamp formater.
train
argument inparse_date_time
now takes effect. It was previously ignored.- #1004 Fix
c.POSIXct
andc.Date
on empty single POSIXct and Date vectors. - #1013 Fix c(
POSIXct
,POSIXlt
) heterogeneous concatenation. - #1002 Parsing only with format
j
now works on numeric inputs. stamp()
now correctly errors when no formats could be guessed.- Updating a date with timezone (e.g.
tzs = "UTC"
) now returns a POSIXct.
INTERNALS
lubridate
is now relying ontimechange
package for update and time-zone computation. Google's CCTZ code is no longer part of the package.lubridate
's updating logic is now built on top oftimechange
package.- Change implementation of
c.Period
,c.Duration
andc.Interval
from S4 to S3.
Lubridate 1.7.10
Version 1.7.10
NEW FEATURES
fast_strptime()
andparse_date_time2()
now accept multiple formats and apply them in turn
BUG FIXES
- #926 Fix incorrect division of intervals by months involving leap years
- Fix incorrect skipping of digits during parsing of the
%z
format
Lubridate 1.7.9
Lubridate 1.7.8
NEW FEATURES
- (breaking) Year and month durations now assume 365.25 days in a year consistently in conversion and constructors. Particularly
dyears(1) == years(1)
is nowTRUE
. - Format and print methods for 0-length objects are more consistent.
- New duration constructor
dmonths()
to complement other duration constructors. duration()
constructor now acceptsmonths
andyears
arguments.- #629 Added
format_ISO8601()
methods. - #672 Eliminate all partial argument matches
- #674
as_date()
now ignores thetz
argument - #675
force_tz()
,with_tz()
,tz<-
convert dates to date-times - #681 New constants
NA_Date_
andNA_POSIXct_
which parallel built-in primitive constants. - #681 New constructors
Date()
andPOSIXct()
which parallel built-in primitive constructors. - #695 Durations can now be compared with numeric vectors.
- #707 Constructors return 0-length inputs when called with no arguments
- #713 (breaking)
as_datetime()
always returns aPOSIXct()
- #717 Common generics are now defined in
generics
dependency package. - #719 Negative Durations are now displayed with leading
-
. - #829
%within%
throws more meaningful messages when applied on unsupported classes - #831 Changing hour, minute or second of Date object now yields POSIXct.
- #869 Propagate NAs to all internal components of a Period object
BUG FIXES
- #682 Fix quarter extraction with small
fiscal_start
s. - #703
leap_year()
works with objects supported byyear()
. - #778
duration()/period()/make_difftime()
work with repeated units c.Period
concatenation doesn't fail with empty components.- Honor
exact = TRUE
argument inparse_date_time2
, which was so far ignored.
Lubridate 1.7.4
NEW FEATURES
- #658
%within%
now accepts a list of intervals, in which case an instant is checked if it occurs within any of the supplied intervals.
CHANGES
- #661 Throw an error on invalid multi-unit rounding.
- #633
%%
on intervals relies on%m+
arithmetic and doesn't produce NAs when intermediate computations result in non-existent dates. tz()
always returns "UTC" whentzone
attribute cannot be inferred.
BUG FIXES
Lubridate 1.7.3
Lubridate 1.7.2
NEW FEATURES
- Durations, Periods and difftimes are now comparable with each other.
interval
constructor accepts start and end character vectors in ISO 8601 format- #362 Add support for ISO 8601 formats in interval constructor
- #622 Add support for ISO 8601 formats in periods and durations constructor
CHANGES
- Correct license to the originally intended GPL (>= 2)