At 01:46 PM 6/27/02 -0400, S. Isaac Dealey wrote:
>function validDate(mydate) {
>         if (not 
> ReFind(mydate,"[0-9][0-9]?/[0-9][0-9]?/[0-9][0-9][0-9][0-9]")) { return 
> "Inavlid Date Mask"; }
>         var day = listfirst(mydate,"/");
>         var month = listgetat(mydate,2,"/");
>         var year = listlast(mydate, "/");
>         tempdate = CreateDate(year,month,1);
>         if (day gt daysinmonth(tempdate)) { return "Date exceeds days in 
> month."; }
>         return CreateDate(year,month,day);
>}

Wow!  This is why I read this list.  It shows me how much better other 
people are at CF than I am.  :)  Thanks.  I'd like to be able to accept any 
mask (mm/dd/yyyy, dd/mm/yyyy, yyyy/mm/dd - depending on the customer) so I 
guess I could add something to read the mask first and the pull the 
information out in the correct order.

Thanks!

T

______________________________________________________________________
This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to