@anonymous-matomo-user opened this Issue on December 14th 2010

The toString() method is hard-coded to "Y-m-d" format. It should accept an override with a default parameter of Y-m-d for backwards compatibility.

@anonymous-matomo-user commented on December 21st 2010

Attachment: Patch to close this ticket.

@robocoder commented on December 14th 2010 Contributor

mrisher: What's your use case?

btw if we change the method signature, this should be uniform across Period.php and Period/*.php.

@anonymous-matomo-user commented on December 20th 2010

Sorry, I had replied but received a bug.

I agree about changing the other Period/* files. This syntax matches that of Date.php so for consistency it seems worth adding.

The use case is, I have a downstream data provider that is being merged into a plugin, and it requires a specific date format with a different delimiter.

I can make the change and check in; should I attach Patch files here or do it in SVN?

Thank you,

@mattab commented on December 20th 2010 Member

please attach your patch, thanks

@anonymous-matomo-user commented on December 21st 2010

Period.php, Day.php, and Range.php have toString() methods, so I have updated those.
Week.php, Month.php, and Year.php do not have a toString() method, so I have not changed those in this fix.

@mattab commented on January 16th 2011 Member

(In [3755]) Fixes #1888
Note: Year Period is not toStringable - does it still solve your use case?

This Issue was closed on January 16th 2011
Powered by GitHub Issue Mirror