Skip to content

Commit

Permalink
Bump version to 0.12.6
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcoGorelli committed Feb 15, 2024
1 parent e94f9dc commit ff028ec
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "polars_xdt"
version = "0.12.5"
version = "0.12.6"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
Expand Down
10 changes: 10 additions & 0 deletions polars_xdt/functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,7 @@ def offset_by(
│ 2023-09-01 ┆ 2bd ┆ 2023-09-05 │
│ 2024-01-04 ┆ -3bd ┆ 2024-01-01 │
└────────────┴──────┴──────────────┘
"""
expr = parse_into_expr(expr)
if (
Expand Down Expand Up @@ -237,6 +238,7 @@ def is_workday(
│ 2023-05-01 ┆ true │
│ 2023-09-09 ┆ false │
└────────────┴────────────┘
"""
expr = parse_into_expr(expr)
weekmask = get_weekmask(weekend)
Expand Down Expand Up @@ -323,6 +325,7 @@ def from_local_datetime(
│ 2020-10-10 02:00:00 ┆ Africa/Kigali ┆ 2020-10-10 00:00:00 UTC │
│ 2020-10-09 20:00:00 ┆ America/New_York ┆ 2020-10-10 00:00:00 UTC │
└─────────────────────┴──────────────────┴─────────────────────────┘
"""
expr = parse_into_expr(expr)
from_tz = parse_into_expr(from_tz, str_as_lit=True)
Expand Down Expand Up @@ -389,6 +392,7 @@ def to_local_datetime(
│ 2020-10-10 00:00:00 UTC ┆ Africa/Kigali ┆ 2020-10-10 02:00:00 │
│ 2020-10-10 00:00:00 UTC ┆ America/New_York ┆ 2020-10-09 20:00:00 │
└─────────────────────────┴──────────────────┴─────────────────────┘
"""
expr = parse_into_expr(expr)
time_zone = parse_into_expr(time_zone, str_as_lit=True)
Expand Down Expand Up @@ -447,6 +451,7 @@ def format_localized(
│ 2024-08-24 00:00:00 ┆ субота, 24 серпня 2024 │
│ 2024-10-01 00:00:00 ┆ вівторок, 01 жовтня 2024 │
└─────────────────────┴──────────────────────────┘
"""
expr = parse_into_expr(expr)
return expr.register_plugin(
Expand Down Expand Up @@ -485,6 +490,7 @@ def to_julian_date(expr: str | pl.Expr) -> pl.Expr:
│ 2013-01-01 00:30:00 ┆ 2456293.5208333335 │
│ 2024-01-07 13:18:51 ┆ 2460317.0547569445 │
└─────────────────────┴────────────────────┘
"""
expr = parse_into_expr(expr)
return expr.register_plugin(
Expand Down Expand Up @@ -554,6 +560,7 @@ def ceil(
│ 2024-08-24 00:00:00 ┆ 2024-09-01 00:00:00 │
│ 2024-10-01 00:00:00 ┆ 2024-10-01 00:00:00 │
└─────────────────────┴─────────────────────┘
"""
expr = parse_into_expr(expr)
truncated = expr.dt.truncate(every)
Expand Down Expand Up @@ -600,6 +607,7 @@ def day_name(expr: str | pl.Expr, locale: str | None = None) -> pl.Expr:
│ 2020-10-25 00:00:00 ┆ Sunday ┆ dimanche ┆ неділя │
│ 2020-10-26 00:00:00 ┆ Monday ┆ lundi ┆ понеділок │
└─────────────────────┴──────────────────┴─────────────────┴────────────────────┘
"""
expr = parse_into_expr(expr)
if locale is None:
Expand Down Expand Up @@ -645,6 +653,7 @@ def month_name(expr: str | pl.Expr, locale: str | None = None) -> pl.Expr:
│ 2020-10-25 00:00:00 ┆ October ┆ octobre ┆ жовтня │
│ 2020-11-26 00:00:00 ┆ November ┆ novembre ┆ листопада │
└─────────────────────┴────────────────────┴───────────────────┴──────────────────────┘
"""
expr = parse_into_expr(expr)
if locale is None:
Expand Down Expand Up @@ -701,6 +710,7 @@ def workday_count(
│ 2023-05-01 ┆ 2023-05-02 ┆ 1 │
│ 2023-09-09 ┆ 2023-12-30 ┆ 80 │
└────────────┴────────────┴─────────────────┘
"""
start_dates = parse_into_expr(start_dates)
end_dates = parse_into_expr(end_dates)
Expand Down
1 change: 1 addition & 0 deletions polars_xdt/ranges.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ def date_range( # noqa: PLR0913
│ 2023-01-09 │
│ 2023-01-10 │
└────────────┘
"""
if weekend == ("Sat", "Sun"):
weekend_int = [6, 7]
Expand Down
1 change: 1 addition & 0 deletions polars_xdt/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ def parse_into_expr(
Returns
-------
polars.Expr
"""
if isinstance(expr, pl.Expr):
pass
Expand Down

0 comments on commit ff028ec

Please sign in to comment.