-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
dateRange without end date problem #898
Comments
Mmm I tried but I can't replicate, it works fine to me. |
It replicates also with How to see full request to my |
What's an example of a child page? Do you define the date there? |
I don't know what happened, but it's working on my home Mac machine after Need to check on Windows machine where it happen. |
Please check the Grav version specifically, see if they are in sync. |
Yep I also got it working by using the format of the child page you use (setting the date manually) |
Versions are equal. I'm using one git repo with full site copy. Hah... it reproduces on my Windows machine in the same way. No matter what date format is setting in post. p.s. Just updated to |
I think I found a spot where problem starts: Setting $date = date('d-m-Y', strtotime('now +21 years'));
echo $date . "<br>"; //15-06-2037
$date = date('d-m-Y', strtotime('now +22 years'));
echo $date; //01-01-1970 Specifications: Strange, because I'm using PHP 5.6 x64. |
Related to getgrav#898 I can't find better way to remove it with DRY principle 😑 With smaller code we need to check a value for each `$this->items` iteration. Also it can be used with `PHP_INT_MAX` with previous version of this code.
Ok so this problem is specific to 32-bit systems, where the dates end on Testing the PR |
* Remove end date check if not specified (better 32-bit support) Related to #898 I can't find better way to remove it with DRY principle 😑 With smaller code we need to check a value for each `$this->items` iteration. Also it can be used with `PHP_INT_MAX` with previous version of this code. * Include endpoints
Merged PR |
Hello!
This issue related to:
#274
#275
I'm trying to show some posts from blog to in a home modular page depending to start date and found a bug with
dateRange
filter. Blog has 2 posts with 2013 and 2016 years.My section
frontmatter.yaml
:Markdown:
With this settings I see both posts, it's fine.
But without end date in
frontmatter.yaml
:I see no posts at all.
Env:
The text was updated successfully, but these errors were encountered: