PEAR is archived and read-only

This mirror preserves historical PEAR package releases and metadata so existing references remain available.

Home » HTML » HTML_QuickForm » Bug #9600

date element problem with _createOptionList function

Details

Submitted2006-12-12 16:40 UTC
Fromsstratiev at gmail dot com
StatusWont fix
PackageHTML_QuickForm
PHP Version4.3.6
OSWindows XP Media Edition
Roadmaps(Not assigned)

Comments

[2006-12-12 16:40 UTC] sstratiev at gmail dot com

Description:
------------
This problem/feature regards the _createOptionList at dates.php file.

when _createOptionList generates the dropdowns, visualy it shows the values with leading zeroes -> 2007-01-01 for example. But when i see the html code the <option> value attribute is without the leading zero - <option value = 1>.
I have problem on the linux server with the strtotime function as it expects leading zeroes and it cannot convert the dates & times properly.

Is't it a good idea the option element values to be with leading 0, so every time converting function can use them.

$options[$i] = sprintf('%02d', $i);

can be

$value = sprintf('%02d', $i);
$options[$value] = $value;

Tell me what you think about this as you are far more familiar with the class and it's usage.

[2006-12-13 00:18 UTC] sstratiev at gmail dot com

ok, i will use mktime. 10x for the reponse