Allow flexible date inputs #124

Closed
Guite opened this Issue Sep 30, 2011 · 5 comments

Projects

None yet

4 participants

@Guite
Zikula Project member

It should be possible to enter also other syntax forms of dates, for example using only one digit for the month instead of having to prepend a 0.

In this (German) thread there is a possible patch mentioned.

Follower of this CoZi ticket

@jusuff
Zikula Project member

Will I be able to find this as "Mentioning you" ticket?
Nope.
And with @jusuff ?

@espaan

The DateUtil lib currently hold:

        $dateMap = array('d' => array('regex' => '(\d{2})', 'type' => 'day'),
                'e' => array('regex' => '(\d{1,2})', 'type' => 'day'),
                'm' => array('regex' => '(\d{2})', 'type' => 'month'),
                'y' => array('regex' => '(\d{2})', 'type' => 'year'),
                'Y' => array('regex' => '(\d{4})', 'type' => 'year'),
                'g' => array('regex' => '(\d{2})', 'type' => 'year'),
                'G' => array('regex' => '(\d{4})', 'type' => 'year'),
                'H' => array('regex' => '(\d{2})', 'type' => 'hour'),
                'I' => array('regex' => '(\d{2})', 'type' => 'hour'),
                'l' => array('regex' => '(\d{1,2})', 'type' => 'hour'),
                'M' => array('regex' => '(\d{2})', 'type' => 'minute'),
                'S' => array('regex' => '(\d{2})', 'type' => 'second'));

So with the e you can already enter days in 1 or 2 numbers. The PHP strftime function also has no format option for a single digit month number, see http://php.net/manual/en/function.strftime.php
So is it wise to add a single digit month value, since PHP date functions do not support it.

@cmfcmf
Zikula Project member

I'm voting for not implementing this because as @espaan said, even strftime does not support it.

@ghost

For Zikula, we're moving to Symfony2 forms anyway, so the entire pnForms thing is deprecated anyway.

@ghost ghost closed this Jul 18, 2013
@espaan
@Guite Guite modified the milestone: Discarded Tickets Aug 21, 2016
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment