Skip to content

Commit

Permalink
build(deps): bump chrono from 0.4.19 to 0.4.31 (#95)
Browse files Browse the repository at this point in the history
* build(deps): bump chrono from 0.4.19 to 0.4.31

Bumps [chrono](https://github.com/chronotope/chrono) from 0.4.19 to 0.4.31.
- [Release notes](https://github.com/chronotope/chrono/releases)
- [Changelog](https://github.com/chronotope/chrono/blob/main/CHANGELOG.md)
- [Commits](chronotope/chrono@v0.4.19...v0.4.31)

---
updated-dependencies:
- dependency-name: chrono
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>

* fix: don't use deprecated functions

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Matthijs Brobbel <[email protected]>
  • Loading branch information
dependabot[bot] and mbrobbel authored Dec 4, 2023
1 parent 2901c7e commit a2a5023
Show file tree
Hide file tree
Showing 2 changed files with 227 additions and 30 deletions.
221 changes: 197 additions & 24 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

36 changes: 30 additions & 6 deletions rs/src/parse/expressions/literals.rs
Original file line number Diff line number Diff line change
Expand Up @@ -491,8 +491,16 @@ fn parse_timestamp(
variations: Option<extension::simple::type_variation::ResolutionResult>,
) -> diagnostic::Result<Literal> {
let dt = to_date_time(*x)?;
if dt < chrono::NaiveDate::from_ymd(1000, 1, 1).and_hms(0, 0, 0)
|| dt >= chrono::NaiveDate::from_ymd(10000, 1, 1).and_hms(0, 0, 0)
if dt
< chrono::NaiveDate::from_ymd_opt(1000, 1, 1)
.unwrap()
.and_hms_opt(0, 0, 0)
.unwrap()
|| dt
>= chrono::NaiveDate::from_ymd_opt(10000, 1, 1)
.unwrap()
.and_hms_opt(0, 0, 0)
.unwrap()
{
diagnostic!(
y,
Expand Down Expand Up @@ -521,8 +529,16 @@ fn parse_timestamp_tz(
variations: Option<extension::simple::type_variation::ResolutionResult>,
) -> diagnostic::Result<Literal> {
let dt = to_date_time(*x)?;
if dt < chrono::NaiveDate::from_ymd(1000, 1, 1).and_hms(0, 0, 0)
|| dt >= chrono::NaiveDate::from_ymd(10000, 1, 1).and_hms(0, 0, 0)
if dt
< chrono::NaiveDate::from_ymd_opt(1000, 1, 1)
.unwrap()
.and_hms_opt(0, 0, 0)
.unwrap()
|| dt
>= chrono::NaiveDate::from_ymd_opt(10000, 1, 1)
.unwrap()
.and_hms_opt(0, 0, 0)
.unwrap()
{
diagnostic!(
y,
Expand Down Expand Up @@ -551,8 +567,16 @@ fn parse_date(
variations: Option<extension::simple::type_variation::ResolutionResult>,
) -> diagnostic::Result<Literal> {
let dt = to_date_time((*x as i64).saturating_mul(24 * 60 * 60 * 1_000_000))?;
if dt < chrono::NaiveDate::from_ymd(1000, 1, 1).and_hms(0, 0, 0)
|| dt >= chrono::NaiveDate::from_ymd(10000, 1, 1).and_hms(0, 0, 0)
if dt
< chrono::NaiveDate::from_ymd_opt(1000, 1, 1)
.unwrap()
.and_hms_opt(0, 0, 0)
.unwrap()
|| dt
>= chrono::NaiveDate::from_ymd_opt(10000, 1, 1)
.unwrap()
.and_hms_opt(0, 0, 0)
.unwrap()
{
diagnostic!(
y,
Expand Down

0 comments on commit a2a5023

Please sign in to comment.