Lubridate Versions Save

Make working with dates in R just that little bit easier

v1.7.0

6 years ago

NEW FEATURES

  • #438 New function force_tzs for "enforcement" of heterogeneous time zones.
  • #438 New function local_time for the retrieval of local day time in different time zones.
  • #560 New argument cutoff_2000 for parsing functions to indicate 20th century cutoff for y format.
  • #257 New week_start parameter in wday and wday<- to set week start.
  • #401 New parameter locale in wday. Labels of the returned factors (when label=TRUE) now respect current locale.
  • #508 New parameter locale in month. Labels of the returned factors (when label=TRUE) now respect current locale.
  • #485 quarter gained a new argument fiscal_start to address the issue of different fiscal conventions.
  • #492 New functions epiweek and epiyear.
  • #509 New parameter week_start to floor_date, ceiling_date and round_date.
  • #519 Support fractional units in duration and period string constructors.
  • #502 Support rounding to fractions of a seconds.
  • #529 Internal parser now ignores the case of alpha months (B format)
  • #535 Rounding to season is now supported.
  • #536 as_date and as_datetime now understand character vectors.
  • New parsing parameters to parse_date_time - train=TRUE and drop=FALSE which allow more refined control of the format guessing. Formats are no longer dropped in the process by default, process which resulted in surprising behavior on several occasions (#516,#308,#307).

CHANGES

  • #401 [Breaking Change] Labels returned by wday and month are now in current locale. The abbreviated labels in English locales have been changed to standard abbreviations (Tues -> Tue, Thurs -> Thu etc.).
  • #469 Throw warning in with_tz on invalid timezone.
  • #572 B and b formats no longer match numeric months. This corresponds to the original intent, and was always documented as such.

BUG FIXES

  • #314, #407, #499 Make days, dhours, round_date work when the methods package is not loaded.
  • #543 Make wday work on character inputs as it is the case with all other day accessors.
  • #566 Comparing durations and periods no-longer infloops.
  • #556 Fix incorrect scoring of y format when it's the last in format order (as in mdy).
  • #584 Fix interval by period division.
  • #559 Parsing of alpha-months in English locales now drops correctly to low level C parsing. Thus, parsing with multiple orders containing m and b formats now works correctly.
  • #570, #574 Fix broken date() when called with missing argument.
  • #567 Fix year update and rounding for leap years.
  • #545 Fix wrong locale selection in stamp.
  • #466 Fix wrong formats within ymd_h family of functions.
  • #472 Printing method for duration doesn't throw format error on fractional seconds.
  • #475 character<> comparisons is no longer slow.
  • #483 Fix add_duration_to_date error when duration first element is NA.
  • #486 ceiling_date handles NA properly.
  • #491 make_datetime respects tz argument and is much faster now.
  • #507 Period and duration parsers now understand 0 units.
  • #524 Correctly compute length of period in months (issue #490)
  • #525 Fix to prevent day<-, minute<-, etc. from producing an error when length(x) is 0 (issue #517)
  • #530 parse_date_time now throw warnings only for actual parsing errors (input with all NAs are silent)
  • #534 Fix arithmetics with large numbers
  • #554 Fix tests when running in non-English locales

v1.6.0

7 years ago

NEW FEATURES

  • #464 New function semester to extract semesters form date-time objects.
  • #459 Flexible C-level parsing for periods and durrations has been implemented; period and duration constructors now accept string as first argument. Same parsing rules apply to the 'unit' parameter in rounding functions.
  • #459 Comparison between character vectors and periods/durations is now possible.
  • #287 C-level and derivative parsers now handle English months (%b and %B formats) irrespective of the current locale.
  • #327 C-level and derivative parsers now handles English AM/PM indicator irrespective of the current locale.
  • #417 hms, hm, ms gained new argument roll=TRUE which rolls minutes and seconds bigger than 59 towards higher units.
  • #445 Division of intervals by periods is now accurate.
  • #442 round_date, floor_date and ceiling_date now support rounding to multiple of units.
  • #422 New parsing function yq for parsing most common version of quarter strings.
  • #422 New format q for parsing quarters in all lubridate parsing functions.
  • #441 Comparison between POSIXt and Date objects is now possible.
  • #437 New function as_datetime to coerce to POSIXct object. A counterpart of as_date.
  • #412 New function make_date to produce Date objects. A counterpart of make_datetime.
  • #443 Behavior of ceiling_date for Date objects was changed to what most of the users expect. Rounding up by months now produces first day of the next months even for first day of the month.
  • #268 round_date, ceiling_date, and floor_date now accept "quarter", "bimonth", and "halfyear" as unit options.
  • #418 C level parsing functions understand 24:00:00 in datetime strings.

CHANGES

  • Low letter specs for HMS (hms,hm,ms) in parse_date_time and related functions are now deprecated.
  • #445 No more warning on occasional imprecise period length conversions. Imprecise arithmetics with periods is extensively documented.
  • pretty.* family of functions were renamed and are no longer exported. If you need to use them, use lubridate:::pretty_* versions.
  • change_on_boundary argument in ceiling_date does not allow for global option anymore.
  • as.duration, as.numeric don't show "only estimate" messages on conversion from periods. The occasional approximate conversion is documented and deemed common knowledge.
  • as.numeric with unit="month" now works on duration objects.
  • #403 Update on Date objects now return POSIXct instead of POSIXlt.
  • #411 format mdy or myd beginning with "January" or "Jan" now parsing correctly
  • here and olson_time_zones were deprecated in favor of new and base OlsonNames respectively.
  • Internally, S4 Compare and Ops generics were cleaned and simplified.
  • #456 Evaluation output in documentation examples was removed.

BUG FIXES

  • #463 Fix NA subscripting error in %m+% when rollback is involved.
  • #462 Non-numeric or non-character arguments are disallowed as arguments to period and duration constructors.
  • #458 When year is missing in parsing, return consistently year 0.
  • #448 Correctly handle missing months and days in C parser.
  • #450 Fix incorrect handling of DST gaps in date_decimal and decimal_date.
  • #420 as.numeric correctly converts periods to (approximate) numeric time lengths.

v1.5.6

8 years ago

NEW FEATURES

  • #390 ceiling_date gains new argument change_on_boundary to allow ceiling on boundary of date-time objects.
  • C parser can now produce a list of date-time components suitable for POSIXlt constructors.
  • parse_date_time2 and fast_strptime gain new lt argument to control type of output.
  • #373 New date and date<- additions to the year, month etc family of accessors.
  • #365 New very fast datetime constructor make_datetime (dropin replacement of ISOdatetime).
  • #344 force_tz and with_tz can handle data.frames component-wise.
  • #355 New as_date replacement of as.Date with more intuitive behavior with non-UTC timezones.
  • #333 hms parsers now handle negative components.

CHANGES

  • #391 ymd family of functions return Date object when tz argument is NULL (new default) and POSIXct otherwise.
  • #364 Remove epoch functions.
  • For consistency with base:strptime fast_strptime now returns POSIXlt object. That is, its lt argument defaults to TRUE.

BUG FIXES

  • interval constructor treats timezones correctly and works with UTC whenever meaningful.
  • #371 as.period correctly computes months with intervals spanning multiple years.
  • #388 time_length and add_with_rollback now work correctly with missing intervals.
  • #394 fast_strptime and parse_date_time2 correctly treat non-UTC time zones.
  • #399 floor_date and round_date are not preserving tz component for larger than day units

v1.5.0

8 years ago

This is a extensive bug fix release with no major known bugs left. The lubridate package should be now faster, more stable and more user friendly.

There are two notable changes to the UI. First, new_zzz style constructors, such as new_interval, new_period etc., were absorbed by interval, period etc. constructors without affecting the flexibility or backward compatibility. Second, new argument exact to parse_date_time allows direct specification of the formats and thus avoids guessing and training of the formats behind the scene.

NEW FEATURES

  • New time_length method.
  • Added isoyear function to line up with isoweek.
  • #326 Added exact = TRUE option to parse_date_time for faster and much more flexible specification of formats.
  • New simple argument to fit_to_timeline and update methods mostly intended for internal use.
  • #315 implement unique method for interval class
  • #295 New args preserve_hms and roll_to_first in rollback function.
  • #303 New quarter option in floor_date and friends.
  • #348 New as.list.Interval S3 method.
  • #278 Added settors and accessors for qday (quarter day).

CHANGES

  • New maintainer Vitalie Spinu (@vspinu)
  • Time span constructors were re-factored; new_interval, new_period, new_duration, new_difftime were deprecated in favour of the more powerful interval, period, duration and make_difftime functions.
  • eseconds, eminutes etc. were deprecated in favour of dsecons, dminutes etc.
  • Many documentation improvements.
  • New testthat conventions are adopted. Tests are now in test/testthat.
  • Internally isodate was replaced with a much faster parse_date_time2(paste(...)) alternative
  • #325 Lubridate's trunc, ceiling and floor functions have been optimised and now are relying on R's trunc.POSIXct whenever possible.
  • #285 Algebraic computations with negative periods are behaving asymmetrically with respect to their positive counterparts.
  • Made necessary changes to accommodate new zoo-based fst objects.

BUG FIXES

  • #360 Fix c parser for Z (zulu) indicator.
  • #322 Explicitly encode formatted string with enc2utf8.
  • #302 Allow parsing long numbers such as 20140911000000 as date+time
  • #349 Fix broken interval -> period conversion.
  • #336 Fix broken interval-> period conversion with negative diffs.
  • #227 Treat "days" and "years" units specially for pretty.point.
  • #286 %m+-% correctly handles dHMS period components.
  • #323 Implement coercion methods for Duration class.
  • #226 Propagate NAs in int_standardize
  • #235 Fix integer division with months and years.
  • #240 Make ceiling_date skip day light gap.
  • #254 Don't preprocess a/A formats if expressly specified by the user.
  • #289 Check for valid day-months combinations in C parser.
  • #306 When needed double guess with preproc_wday=T.
  • #308 Document sparce format guessing in parse_date_time.
  • #313 Fixed and optimized fit_to_timeline function.
  • #311 Always use UTC in isoweek computation
  • #294 Don't use years in seconds_to_period.
  • Values on $<- assignment for periods are now properly recycled.
  • Correctly handle NA subscripting in round_date.

v1.4.0

8 years ago

CHANGES

  • #219 In interval use UTC when tzone is missing.
  • #255 Parse yy > 68 as 19yy to comply with strptime.

BUG FIXES

  • #266 Include time-zones.R in coercion.R.
  • #251 Correct computation of weeks.
  • #262 Document that month boundary is the first second of the month.
  • #270 Add check for empty unit names in standardise_lt_names.
  • #276 Perform conversion in as.period.period if unit != NULL.
  • #284 Compute periods in as.period.interval without recurring to modulo arithmetic.
  • #272 Update examples for hms, hm and ms for new printing style.
  • #236 Don't allow zeros in month and day during parsing.
  • #247 Uninitialized index was mistakenly used in subseting.
  • #229 guess_formats now matches flex regexp first.
  • dmilliseconds now correctly returns a Duration object.
  • Fixed setdiff for discontinuous intervals.