Skip to content

Commit

Permalink
[Fix #490] Correctly compute length of period in months
Browse files Browse the repository at this point in the history
  • Loading branch information
Tim Goodman committed Mar 2, 2017
1 parent a338a41 commit 697e01e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion R/coercion.r
Original file line number Diff line number Diff line change
Expand Up @@ -547,7 +547,7 @@ seconds_to_unit <- function(secs, unit = "second"){
minute = secs / 60,
hour = secs / 3600,
day = secs / 86400,
month = secs / (86400 * 365.25)/12,
month = secs / (86400 * 365.25 / 12),
week = secs / (86400 * 7),
year = secs / (86400 * 365.25),
stop("invalid unit ", unit))
Expand Down

0 comments on commit 697e01e

Please sign in to comment.