[TYPO3-dev] ADOdb extended dates prototype v0.0.4

Christoph Koehler christoph.koehler at gmail.com
Fri Jun 1 06:20:41 CEST 2007


Hey all,

Here is version 0.0.4:
http://www.zerodeviation.net/t3x-extdates-0_0_4.t3x

Two bugs fixed:
-Thanks David for pointing out the one that occured with empty user date  
format field
-Thanks to Mario for pointing out that timezone adjustments are nonesense  
since the timestamp is computed on the server anyway

See my reply to David below:


> - If the date format in the user->setup is left empty, any  
> date/time-field is filled with "<br />". It seems this is caused by  
> class.tx_extdates_date.php (line 679).

Fixed, thanks!

> - The date/time format in user->setup should IMO definitely be a  
> selector box, not just a text field. Of course it's nice to have  
> "unlimited flexibility", but I guess this will just cause unnecessary  
> problems. If needed, any format can still be set with TSconfig, although  
> I did not test this.

Alright, I can live with that.

> - Furthermore, I suggest to offer _two_ selector boxes, one for  
> date-format and one for time-format and two further boxes for date  
> separators and time separators. The formats should always be displayed  
> with an example for the not-so-PHP-savvy.

Kind of ugly, but I know the date() function. It makes sense for the  
majority of users.

> - It's not easy to decide which formats should be offered as  
> "predefined". Here's my suggestion:
>
> Date Formats (always display with an example)
> =============================================
> d.m.Y       30.09.2007
> m.d.Y       09.30.2007
> Y.m.d       2007.09.30
> j.n.y       30.9.07
> n.j.y       9.30.07
> y.n.j       07.9.30
> d. F Y      30. September 2007     (Date Separator has no effect)
> F d, Y      September 30, 2007     (Date Separator has no effect)
> d. M y      30. Sep 07             (Date Separator has no effect)
> M d, y      Sep 30, 07             (Date Separator has no effect)

Ok for the numerical ones. Very much opposed to the ones without date  
separator, because the input strings are parsed based on this format,  
which means that a) people would have to enter dates the way they show and  
b) it would collapse because I am right now only making computations based  
on numerical values.

> Date Separators
> ===============
> .
> /
> -

Alright, sounds good to me.


> Time Formats (always display with an example)
> =============================================
> H:i:s       07:14:38
> h:i:s A     07:14:38 AM
> G:i:s       7:14:38
> g:i:s A     7:14:38 AM
>
> Time Separators
> ===============
> :
> .

Again not sure about the non-standard forms with AM/PM, because the user  
will have to enter dates like that. This ones makes more sense than the  
one above though, so I would be willing to work it out if the majority  
thinks it's necessary.


> - All these settings should have a default value, since we must not  
> assume that the first thing a user does is check/set these values. I  
> suggest to take the first values listed above as defaults.

Default value should be taken from the install tool and TSConfig first, so  
an empty selector box should be the default in my opinion.

> - All these settings should also be definable in user TSconfig

Definitely.

> - One thing that probably should be answered by a core-dev for this to  
> enter the core: what happenes if the sys-ext 'adodb' is not installed?  
> Should there be some kind of fallback or should we make sure adodb  
> cannot be uninstalled (e.g. move it to the contrib folder like  
> scriptaculous?).

Right now the file is simply included with a require_once. It doesn't  
matter whether the extension is loaded, so I assume it can be the same way  
if it's included in the core.

> P.S. I'll be out-of-office for the next 3 weeks... :-)

Hope you enjoy your time off!

Christoph





More information about the TYPO3-dev mailing list