Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic

Re: formatting dates

by Albannach (Prior)
on Oct 06, 2003 at 13:19 UTC ( #296927=note: print w/replies, xml ) Need Help??

in reply to formatting dates

I would use the regex by reflex, I think the unpack is pretty cool, and for yet more TIMTOWTDI, this is just ammo for those that like to benchmark substr against regexen:
$date = 'yyyymmdd'; substr($date,$_,0) = '-' for(6,4);
Update: stupid typo fixed

I'd like to be able to assign to an luser

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://296927]
[choroba]: unit tests++
[choroba]: The only problem you can't solve by adding more tests is the problem of having too many tests.
[stevieb]: choroba Been there, done that :) Better too many than not enough though!
[stevieb]: I very often write a base set of unit tests before writing any code. It helps dictate the API, and ensures my earliest of ideas stay on track.

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (10)
As of 2017-07-21 20:05 GMT
Find Nodes?
    Voting Booth?
    I came, I saw, I ...

    Results (335 votes). Check out past polls.