From 4429eb67e925b2c48d25fbeeb97b5156156b9522 Mon Sep 17 00:00:00 2001 From: Vitalie Spinu Date: Sat, 13 Dec 2014 19:47:52 -0800 Subject: [PATCH] [Fix #251] Correct computaton of weeks --- R/accessors-week.r | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/R/accessors-week.r b/R/accessors-week.r index 586d911a..758e402a 100644 --- a/R/accessors-week.r +++ b/R/accessors-week.r @@ -21,13 +21,11 @@ NULL #' week(x) <- 54 #' week(x) > 3 week <- function(x) - yday(x) %/% 7 + 1 - + (yday(x) - 1) %/% 7 + 1 "week<-" <- function(x, value) x <- x + days((value - week(x)) * 7) - isoweek <- function(x){ xday <- ISOdate(year(x), month(x), day(x), tz = tz(x)) dn <- 1 + (wday(x) + 5) %% 7