Skip to content

Commit

Permalink
fix ceiling_date return type when unit = "week"
Browse files Browse the repository at this point in the history
  • Loading branch information
shrektan authored Sep 27, 2016
1 parent d561bf1 commit d11aa4a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion R/round.r
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ round_date <- function(x, unit = "second") {
}

reclass_date_maybe <- function(new, orig, unit){
if(is.Date(orig) && !unit %in% c("day", "month", "year")) as.POSIXct(new)
if(is.Date(orig) && !unit %in% c("day", "week", "month", "year")) as.POSIXct(new)
else reclass_date(new, orig)
}

Expand Down

0 comments on commit d11aa4a

Please sign in to comment.