Skip to content

Commit 4b171f6

Browse files
author
maechler
committed
2 little improvements (Suharto Anggono, on R-devel)
git-svn-id: https://svn.r-project.org/R/trunk@87382 00db46b3-68df-0310-9c12-caf00c1e9a41
1 parent 00e4191 commit 4b171f6

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/library/base/R/dates.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ Summary.Date <- function (..., na.rm)
203203
ok <- switch(.Generic, max = , min = , range = TRUE, FALSE)
204204
if (!ok) stop(gettextf("%s not defined for \"Date\" objects", .Generic),
205205
domain = NA)
206-
.Date(NextMethod(.Generic), oldClass(...elt(1L)))
206+
.Date(NextMethod(.Generic), oldClass(..1))
207207
}
208208

209209
`[.Date` <- function(x, ..., drop = TRUE)

src/library/base/R/datetime.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -394,7 +394,7 @@ format.POSIXlt <- function(x, format = "", usetz = FALSE,
394394
}
395395
} else np <- 0L
396396
## need list `[` method here to get 1:3 ~ {sec, min, hour}:
397-
times <- unlist(`names<-`(unclass(x)[1L:3L], NULL))[f0]
397+
times <- unlist(unclass(x)[1L:3L], use.names=FALSE)[f0]
398398
format[f0] <-
399399
if(all(times[is.finite(times)] == 0)) "%Y-%m-%d"
400400
else if(np == 0L) "%Y-%m-%d %H:%M:%S"

0 commit comments

Comments
 (0)