#1018: Allow relative min and max values using strtotime syntax in
AgaviDateTimeValidator
-------------------------+--------------------------------------------------
 Reporter:  david        |       Owner:  dominik   
     Type:  enhancement  |      Status:  new       
 Priority:  normal       |   Milestone:  1.0       
Component:  validation   |     Version:  1.0.0beta7
 Severity:  major        |    Keywords:            
Has_patch:  0            |  
-------------------------+--------------------------------------------------
 {{{
 <parameter name="min">+1 week</parameter>
 }}}
 (same for {{{max}}})

 To achieve that, we change the current parsing implementation for
 {{{min}}}/{{{max}}} to always use {{{strtotime()}}} unless the given
 string contains a dot (for milliseconds).

 That way, it's also possible to specify timezones directly in the string,
 e.g. "last monday this month 08:00UTC" (although we could allow timezones
 themselves by extending the format string internally to allow Z values).

 Mind the system timezone when doing this; we need to set PHP's timezone to
 the timezone on the current locale, and then change it back afterwards, as
 {{{strtotime()}}} is {{{date_default_timezone_get()}}} aware.

-- 
Ticket URL: <http://trac.agavi.org/ticket/1018>
Agavi <http://www.agavi.org/>
An MVC Framework for PHP5


_______________________________________________
Agavi Tickets Mailing List
[email protected]
http://lists.agavi.org/mailman/listinfo/tickets

Reply via email to