Skip to content

Commit

Permalink
reorder date_range args
Browse files Browse the repository at this point in the history
  • Loading branch information
ritchie46 committed Jan 26, 2022
1 parent 3c69f2f commit 7eb556c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions polars/polars-core/src/frame/groupby/dynamic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -394,11 +394,11 @@ mod test {
.and_hms(3, 0, 0)
.timestamp_millis();
let range = date_range(
"date",
start,
stop,
Duration::parse("30m"),
ClosedWindow::Both,
"date",
TimeUnit::Milliseconds,
)
.into_series();
Expand Down Expand Up @@ -440,11 +440,11 @@ mod test {
.and_hms(3, 0, 0)
.timestamp_millis();
let range = date_range(
"_upper_boundary",
start,
stop,
Duration::parse("1h"),
ClosedWindow::Both,
"_upper_boundary",
TimeUnit::Milliseconds,
)
.into_series();
Expand All @@ -458,11 +458,11 @@ mod test {
.and_hms(2, 0, 0)
.timestamp_millis();
let range = date_range(
"_lower_boundary",
start,
stop,
Duration::parse("1h"),
ClosedWindow::Both,
"_lower_boundary",
TimeUnit::Milliseconds,
)
.into_series();
Expand Down
2 changes: 1 addition & 1 deletion polars/polars-core/src/time.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ pub fn in_nanoseconds_window(ndt: &NaiveDateTime) -> bool {
}

pub fn date_range(
name: &str,
start: i64,
stop: i64,
every: Duration,
closed: ClosedWindow,
name: &str,
tu: TimeUnit,
) -> DatetimeChunked {
Int64Chunked::new_vec(
Expand Down
2 changes: 1 addition & 1 deletion py-polars/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@ fn py_date_range(
"ms" => TimeUnit::Milliseconds,
_ => panic!("{}", "expected one of {'ns', 'ms'}"),
};
polars_core::time::date_range(start, stop, Duration::parse(every), closed.0, name, tu)
polars_core::time::date_range(name, start, stop, Duration::parse(every), closed.0, tu)
.into_series()
.into()
}
Expand Down

0 comments on commit 7eb556c

Please sign in to comment.