Comments (5)
You are correct, last day of wasn't added until 5.3 according to the comments on http://us.php.net/manual/en/datetime.formats.relative.php
If you would like, feel free to fork the project, and submit a pull request with your modifications. If not I should have some time to look into/fix this issue over the weekend.
Thank you for pointing this out.
from when.
Is this fixed?
I have this error:
Warning: DateTime::modify() [datetime.modify]: Failed to parse time string (last day of 1 month) at position 9 (o): The timezone could not be found in the database in /home/figure8/domains/billing.figure8.be/external/When.php on line 624
from when.
Hi Frederik,
No, not fixed.
I use the modification mentioned in the post, this works with the
earlier PHP version.
So clause around line 624 in my version of When.php is this:
if($interval == "month")
{
//cjb 'last day of 1 month' does not work
//$this->try_date->modify('last day of ' . $this->interval . ' ' .
$interval);
//$this->try_date->modify('+ ' . $this->interval . ' ' . $interval);
for ($i=0; $i< $this->interval; $i++)
{
$this->try_date->modify('+ 28 days');
$this->try_date->setDate($this->try_date->format('Y'),
$this->try_date->format('m'), $this->try_date->format('t'));
}
}
Does that help?
Chris
On 11/10/2011 1:41 AM, Frederik Heyninck wrote:
Is this fixed?
I have this error:Warning: DateTime::modify() [datetime.modify]: Failed to parse time string (last day of 1 month) at position 9 (o): The timezone could not be found in the database in /home/figure8/domains/billing.figure8.be/external/When.php on line 624
Reply to this email directly or view it on GitHub:
#5 (comment)
from when.
It fixes it, thx.
from when.
This works, but it doesn't give accurate dates. Which is whay I turned to "last day of" in the first place Perhaps i'm doing something wrong?
from when.
Related Issues (20)
- Can't traverse year boundary using WEEKLY interval HOT 2
- Week of month support? HOT 4
- New version code HOT 6
- Every three months by first Monday starting January 7 2019 misses occurrences HOT 1
- Reference to non-existent object variable ($thisClone->limit) HOT 1
- `bysetpos` excludes the first occurence HOT 4
- Getting the next occurance or rule from NOW HOT 3
- Support for PHP 5.6 HOT 1
- FREQ=MONTHLY;UNTIL not working HOT 1
- ErrorException: implode(): Passing glue string after array is deprecated. HOT 1
- Updated Instructions ? HOT 8
- Is 0 allowed in the BYDAY rule with the day name? HOT 1
- Edge case producing results beyond UNTIL HOT 1
- Front-end design for user input HOT 6
- `$startDate` and `$endDate` could be accepted as `instanceof \DateTimeImmutable` HOT 1
- Unable to understand 'BYSETPOS' in the Docs HOT 3
- weekly every 2 or 3 or 4th week on mo, tu, we not possible? HOT 2
- Repeat dates weekly with more one day on week HOT 1
- Daily and getOccurrencesBetween HOT 4
- No error is generated if RRULE has no FREQ
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from when.