Open davidh71 opened 2 years ago
found my problem in the above - silly mistake. My apologies
I would like some clarity on the getOccurrencesBetween behavior. If i run this - i don't get any dates ON, or AFTER the end date
$r->startDate(new DateTime("20220902"))
->freq("daily")
->interval( 1 );
$occurrences = $r->getOccurrencesBetween(new DateTime("20220903"),new DateTime("20220907"));
var_export($occurrences);
but when i use weekly, it includes days ON the end date
$r->startDate(new DateTime("20220902"))
->freq("weekly")
->byday("mo,tu,we,th,fr,sa,su")
->interval( 1 );
$occurrences = $r->getOccurrencesBetween(new DateTime("20220903"),new DateTime("20220907"));
var_export($occurrences);
Is there a reason 'between' is inconsistent with the end date?
Hi. I noticed the same thing too. Using the latest version of when ( v3.1.5) So for 'daily' . i just added 1 more day for the $dateEnd.
Weekly does not have this issue.
Definitely looks like a bug. I'm open to looking at PRs if someone figures out the issue.
Wow ... a reply from the man himself. You have created a great library .... Just 2 php files.... What a genius.
PR -> For php, I am in the noob - intermediate
range .... Too dumb for this kind of work.
Once again ... a great library...
I've just started using the library and it's great! The below doesn't work and I'm wondering if my approach is wrong or a defect. I would expect to get 2 results back - and get nothing. Many Thanks!