Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ Config/testthat/edition: 3
Encoding: UTF-8
LazyData: true
Roxygen: list(markdown = TRUE)
RoxygenNote: 7.3.3
SystemRequirements: A system with zoneinfo data (e.g.
/usr/share/zoneinfo). On Windows the zoneinfo included with R is used.
Collate:
Expand Down Expand Up @@ -105,3 +104,4 @@ Collate:
'update.r'
'vctrs.R'
'zzz.R'
Config/roxygen2/version: 8.1.0
66 changes: 38 additions & 28 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -268,32 +268,42 @@ exportMethods(format_ISO8601)
exportMethods(reclass_timespan)
exportMethods(rep)
exportMethods(show)
importFrom(generics,as.difftime)
importFrom(generics,intersect)
importFrom(generics,setdiff)
importFrom(generics,union)
importFrom(methods,"coerce<-")
importFrom(methods,"slot<-")
importFrom(methods,Arith)
importFrom(methods,Compare)
importFrom(methods,allNames)
importFrom(methods,callGeneric)
importFrom(methods,initialize)
importFrom(methods,is)
importFrom(methods,new)
importFrom(methods,setClass)
importFrom(methods,setGeneric)
importFrom(methods,show)
importFrom(methods,slot)
importFrom(methods,slotNames)
importFrom(methods,validObject)
importFrom(stats,na.omit)
importFrom(stats,setNames)
importFrom(stats,update)
importFrom(timechange,time_add)
importFrom(timechange,time_force_tz)
importFrom(timechange,time_get)
importFrom(timechange,time_update)
importFrom(utils,packageVersion)
importFrom(utils,read.delim)
importFrom(generics,
as.difftime,
intersect,
setdiff,
union
)
importFrom(methods,
"coerce<-",
"slot<-",
Arith,
Compare,
allNames,
callGeneric,
initialize,
is,
new,
setClass,
setGeneric,
show,
slot,
slotNames,
validObject
)
importFrom(stats,
na.omit,
setNames,
update
)
importFrom(timechange,
time_add,
time_force_tz,
time_get,
time_update
)
importFrom(utils,
packageVersion,
read.delim
)
useDynLib(lubridate, .registration=TRUE)
14 changes: 14 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,20 @@ Version 1.9.5.9999 (dev)
* Fix `month<-` assignment by month name. "April" and "May" were missing from
the lookup table, which produced `NA` for those names and incorrect month
numbers for June through December.
* Behaviour change: the period and duration string parser now returns `NA`
for malformed input that used to give a silent value: a lone `.` before a
unit (`".h"` was 0), an ISO 8601 designator without a number (`"PTM"` was 1
minute) or used twice (`"P1D1D"` was 2 days), a `T` with nothing before it
(`"T1H"`) or after it (`"P1DT"`), and nested parentheses
(`"1h (2h (3h) 4h) 5h"` was 10 hours). Lubridate shorthand such as
`"day day"` and `"10DT10M"` is unaffected.
* Fix two `interval()` examples that spanned 2.5 years instead of 2.5 hours:
`"2008-05-11/P2H30M"` and `"08 05 11/P 2h 30m"` read `M` and `m` as months.
They now use `"PT2H30M"` and `"30min"`.
* Behaviour change: in an ISO 8601 period written without `T`, an `H` or `S`
designator now starts the time part, so a following `M` means minutes.
`period("P2H30M")` was 2 hours and 30 months and is now 2 hours and 30
minutes.


Version 1.9.5
Expand Down
4 changes: 2 additions & 2 deletions R/intervals.r
Original file line number Diff line number Diff line change
Expand Up @@ -201,11 +201,11 @@ unique.Interval <- function(x, ...) {
#' interval("2007-03-01T13:00:00Z/2008-05-11T15:30:00Z")
#' interval("2007-03-01T13:00:00Z/P1Y2M10DT2H30M")
#' interval("P1Y2M10DT2H30M/2008-05-11T15:30:00Z")
#' interval("2008-05-11/P2H30M")
#' interval("2008-05-11/PT2H30M")
#'
#' ### More permissive parsing (as long as there are no intermittent / characters)
#' interval("2008 05 11/P2hours 30minutes")
#' interval("08 05 11/P 2h 30m")
#' interval("08 05 11/P 2h 30min")
#'
#' is.interval(period(months = 1, days = 15)) # FALSE
#' is.interval(interval(ymd(20090801), ymd(20090809))) # TRUE
Expand Down
4 changes: 2 additions & 2 deletions man/Duration-class.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions man/Interval-class.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions man/Period-class.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/Timespan-class.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions man/as.duration.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions man/as.period.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 0 additions & 5 deletions man/date_utils.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/duration.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion man/hidden_aliases.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 6 additions & 6 deletions man/interval.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 7 additions & 6 deletions man/lubridate-package.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/make_datetime.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/minute.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 0 additions & 4 deletions man/origin.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading