Skip to content

Comments

Daterange with times has quotes#31

Merged
belamov merged 5 commits intobelamov:masterfrom
vatsake:master
Mar 18, 2025
Merged

Daterange with times has quotes#31
belamov merged 5 commits intobelamov:masterfrom
vatsake:master

Conversation

@vatsake
Copy link
Contributor

@vatsake vatsake commented Mar 18, 2025

When retrieving datetime ranges from the database, they are returned as strings with double quotes.
Laravel compares the strings.
image

Currently magic method returns string without quotes.

public function __toString()
{
return "{$this->fromBound}{$this->from},{$this->to}{$this->toBound}";
}

@belamov belamov self-assigned this Mar 18, 2025
@belamov
Copy link
Owner

belamov commented Mar 18, 2025

seems legit, it affects timestamp range only because of space inside, i only tested it with date range
thanks a lot!

@belamov belamov merged commit 00a57d8 into belamov:master Mar 18, 2025
27 checks passed
@belamov belamov requested review from belamov and removed request for belamov March 18, 2025 11:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants