valid_date bug?

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

valid_date bug?

stevepiercy
Is this a bug in the valid_date tag?

[Valid_Date: '2005-2-32'] -> False
[Valid_Date: '2005-2-31'] -> True

The tag ought to correctly validate months with fewer than 31 days and February for leap years.

--steve
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Steve Piercy               Web Site Builder               Soquel, CA
<[hidden email]>                   <http://www.StevePiercy.com>

--
------------------------------
Lasso Support: http://support.omnipilot.com/
Search the list archives: http://www.listsearch.com/lassotalk.lasso
Manage your list subscription:  
http://www.listsearch.com/lassotalk.lasso?manage
Reply | Threaded
Open this post in threaded view
|

Re: valid_date bug?

Olivier Miossec

Steve Piercy - Web Site Builder ?crit:

> Is this a bug in the valid_date tag?
>
> [Valid_Date: '2005-2-32'] -> False
> [Valid_Date: '2005-2-31'] -> True
>
> The tag ought to correctly validate months with fewer than 31 days and February for leap years.
>
> --steve
Which version ?

---
Olivier Miossec
AIM/ichat omiossec
--
http://www.lasso-developpeur.net
--

--
------------------------------
Lasso Support: http://support.omnipilot.com/
Search the list archives: http://www.listsearch.com/lassotalk.lasso
Manage your list subscription:  
http://www.listsearch.com/lassotalk.lasso?manage
Reply | Threaded
Open this post in threaded view
|

Re: valid_date bug?

Bil Corry
In reply to this post by stevepiercy
> Which version ?

All of them.  Well, at least the last couple.


For Lasso, 2005-2-31 is a valid date.  Try it:

        date: '2005-2-31';

        // returns 03/03/2005 00:00:00


> The tag ought to correctly validate
> months with fewer than 31 days and February for leap years.

We rolled our own for AutoValidate that does exactly that.  But it really should
already be built into Lasso.


- Bil

------

Bil Corry
[hidden email]

Enterprise internet application development and security consulting
  http://www.fivegeeks.com/

Tools for Rapid Lasso Development
  http://www.lassoware.com/
 
-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On Behalf Of
Olivier Miossec
Sent: Saturday, May 21, 2005 11:51 AM
To: [hidden email]
Subject: Re: valid_date bug?


Steve Piercy - Web Site Builder icrit:

> Is this a bug in the valid_date tag?
>
> [Valid_Date: '2005-2-32'] -> False
> [Valid_Date: '2005-2-31'] -> True
>
> The tag ought to correctly validate months with fewer than 31 days and
February for leap years.
>
> --steve
Which version ?

---
Olivier Miossec
AIM/ichat omiossec
--
http://www.lasso-developpeur.net
--



--
------------------------------
Lasso Support: http://support.omnipilot.com/
Search the list archives: http://www.listsearch.com/lassotalk.lasso
Manage your list subscription:  
http://www.listsearch.com/lassotalk.lasso?manage
Reply | Threaded
Open this post in threaded view
|

Re: valid_date bug?

Olivier Miossec
In reply to this post by stevepiercy

Bil Corry ?crit:

> > Which version ?
>
> All of them.  Well, at least the last couple.
>
>
> For Lasso, 2005-2-31 is a valid date.  Try it:
>
> date: '2005-2-31';
>
> // returns 03/03/2005 00:00:00

Lasso seem to only test the date format and not test if the date is valid
for a calendar.
I build a little tools that can be extended.

http://www.lasso-developpeur.net/2;51401D040cc5107D09WrH1307199;1.lasso

---
Olivier Miossec
AIM/ichat omiossec
--
http://www.lasso-developpeur.net
--

--
------------------------------
Lasso Support: http://support.omnipilot.com/
Search the list archives: http://www.listsearch.com/lassotalk.lasso
Manage your list subscription:  
http://www.listsearch.com/lassotalk.lasso?manage