perl isvaliddate function

Dan Langille dan at langille.org
Sat Oct 25 19:50:32 UTC 2014


On Oct 25, 2014, at 2:21 PM, B. Estrade <estrabd at gmail.com> wrote:

> Looks fine to just get it working. If you wanted to be more efficient, I believe there is a way to use the core POSIX::strfmtime in a way that would verify that the date you start with is the same date as the one returned after the format.  This core function is also very useful for date addition and subtraction.
> 
> I don't have time at this moment to create a proof of concept, but if you're interested let me know and I will when I have a minute.

Yes, please, when you have time, please try that proof for me.  I would appreciate that.

FYI: I believe all dates within the ports tree must be YYYY-MM-DD so using something like that would be useful.

Comparing the starting date to the supplied date is good too, to catch edge cases like the first example.

— 
Dan Langille

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 333 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://lists.freebsd.org/pipermail/freebsd-hackers/attachments/20141025/45285fa6/attachment.sig>


More information about the freebsd-hackers mailing list