Skip to content
This repository has been archived by the owner on Jan 8, 2020. It is now read-only.

Improve ease-of-use for i18n DateFormat view helper #2534

Closed
zfbot opened this issue Sep 28, 2012 · 5 comments
Closed

Improve ease-of-use for i18n DateFormat view helper #2534

zfbot opened this issue Sep 28, 2012 · 5 comments
Assignees
Labels

Comments

@zfbot
Copy link

zfbot commented Sep 28, 2012

Jira Information

Original Issue:ZF2-488
Issue Type:Improvement
Reporter:RalfEggert
Created:08/22/12
Assignee:
Components:Zend\I18n

Description

Two things make the use of the DateFormat view helper a little complicated.

  1. I always need to pass the $dateType and $timeType since the defaults do not feed my needs. The NumberFormat and CurrencyFormat have setters and getters for $formatStyle and $formatType (NumberFormat) and $currencyCode (CurrencyFormat). I would love to have some setters and getters for DateFormat as well.
  2. I need to pass a DateTime object to the DateFormat view helper. Passing just a date string like from mysql (YYYY-MM-DD HH:II:SS) does not output anything. I would love to have a check that could be added to DateFormat view helper that creates a DateTime object automatically when a date string is passed.
@zfbot
Copy link
Author

zfbot commented Sep 28, 2012

(Originally posted by: RalfEggert on 08/22/12)

feed my needs should be called fit my needs... ;-)

@zfbot
Copy link
Author

zfbot commented Sep 28, 2012

This issue was ported from the ZF2 Jira Issue Tracker at
http://framework.zend.com/issues/browse/ZF2-488

Known GitHub users mentioned in the original message or comment:
@RalfEggert

@ghost ghost assigned DASPRiD Sep 28, 2012
@ralphschindler
Copy link
Member

Is this still an issue, or can we close?

@RalfEggert
Copy link
Contributor

Well, I created my own view helper now which simplifies the usage of the DateFormat view helper.

Yes, you can close it, if no one else wants it.

@ralphschindler
Copy link
Member

Ok, well, it sounds like the use case is complex enough to warrant either an RFC or a Pull Request. I'll close this particular issue in favor of one of those, if they ever appear.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

4 participants