[TYPO3-mvc] Fluid and localized dates
Xavier Perseguers
typo3 at perseguers.ch
Sat May 23 13:35:16 CEST 2009
Hi,
I started using Fluid this morning and I really enjoy.
Now, in my model I defined (a few months ago) dates as being of class
LocaleDateTime where this class basically extends DateTime and supports
the strftime() method on it, allowing me to get localized output which
is not possible with standard DateTime objects.
The problem is that I don't like this and would like instead to use
standard DateTime objects as I had to create a LocaleDateTimeValidator
for Fluid and I dislike it even more :-)
1) Is there a plan to support localized dates? For instance adding a
strftime method to the class and first converting the date as a
timestamp and then passing it to strftime(). That may be not "correct"
in all cases but should work quite well in most case (after all there's
no 100% way with this)
2) How may I use the standard DateTimeViewHelper from my code, that is
without using it in a template. I read that it takes only one argument,
the format but the date to format itself is given as child. Should a
syntax with an date attribute be added?
Thanks
--
Xavier Perseguers
http://xavier.perseguers.ch/en
One contribution a day keeps the fork away
More information about the TYPO3-project-typo3v4mvc
mailing list