For Programmers: Free Programming Magazines  


Home > Archive > PHP Smarty Templates > February 2005 > html_select_date









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author html_select_date
pete M

2005-02-01, 4:01 pm

Getting a bit with the following lines in html_select_date

The current production version I'm using Smarty.2.5 (yes olde site) has

if (!preg_match('/^\d{4}-\d{1,2}-\d{1,2}$/', $time)) {

whilst the upgrade I'm going to do (2.6.6) has


if (!preg_match('/^\d{0,4}-\d{0,2}-\d{0,2}$/', $time)) {

This makes me very nervous as I'm dealing with pre epoch dates (and not
a REgular Expressions expert ;-( ).

What i want to confirm is whether the month and days can be single as
well as double digit dates on version 2.6.6

ie 1980-1-1 will work as well as 1980-01-01

tia

Pete
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com