Skip to content

Commit

Permalink
fixed vec_ptype2() for yearweek and yearquarter
Browse files Browse the repository at this point in the history
closes #299
  • Loading branch information
earowang committed Jan 24, 2024
1 parent 88b1e51 commit 5f23d9b
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Type: Package
Package: tsibble
Title: Tidy Temporal Data Frames and Tools
Version: 1.1.3
Version: 1.1.4
Authors@R:
c(person(given = "Earo",
family = "Wang",
Expand Down
4 changes: 4 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# tsibble 1.1.4

* Fixed `vec_ptype2()` for `yearweek` and `yearquarter` for non-default week start. (#299)

# tsibble 1.1.3

* Fixed the argument of `.full` in `*_gaps()` when inputs like `T`, `F` are valid. (#275)
Expand Down
2 changes: 1 addition & 1 deletion R/yearquarter.R
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ vec_ptype2.yearquarter.yearquarter <- function(x, y, ...) {
if (fiscal_start(x) != fiscal_start(y)) {
abort("Can't combine <yearquarter> with different `fiscal_start`.")
}
new_yearquarter()
new_yearquarter(fiscal_start = fiscal_start(x))
}

#' @export
Expand Down
2 changes: 1 addition & 1 deletion R/yearweek.R
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ vec_ptype2.yearweek.yearweek <- function(x, y, ...) {
if (week_start(x) != week_start(y)) {
abort("Can't combine <yearweek> with different `week_start`.")
}
new_yearweek()
new_yearweek(week_start = week_start(x))
}

#' @export
Expand Down

0 comments on commit 5f23d9b

Please sign in to comment.