Development
MySQL Date time Regex
This regex validates only MySQL Datetime format.
[js]^[0-9]{4}-(((0[13578]|(10|12))-(0[1-9]|[1-2][0-9]|3[0-1]))|(02-(0[1-9]|[1-2][0-9]))|((0[469]|11)-(0[1-9]|[1-2][0-9]|30)))(T|\s)(([0-1][0-9])|(2[0-3])):([0-5][0-9]):([0-5][0-9])$[/js]
Matches 2009-01-01 23:59:59; 2009-03-31 14:59:59; 0000-01-01 00:00:00
Don’t matches 2009/03/31 24:30:00; 2009-30-01 10:30:00AM; 0000-00-00 00:00:00
With time as optional
[js]([0-9]{4}-(((0[13578]|(10|12))-(0[1-9]|[1-2][0-9]|3[0-1]))|(02-(0[1-9]|[1-2][0-9]))|((0[469]|11)-(0[1-9]|[1-2][0-9]|30)))(T|\s)(([0-1][0-9])|(2[0-3])):([0-5][0-9]):([0-5][0-9]))|[0-9]{4}-(((0[13578]|(10|12))-(0[1-9]|[1-2][0-9]|3[0-1]))|(02-(0[1-9]|[1-2][0-9]))|((0[469]|11)-(0[1-9]|[1-2][0-9]|30)))[/js]
Matches 2009-01-01; 2009-03-31 14:59:59
Don’t matches 24:30:00
You can do a quick test in RegexPal.
YUI CSS Footer at the bottom
I use YUI CSS grids to build templates. So this time I need to stick the footer at the botoom, and I tried some techniques, but I need to do an hybrid of these to find the solution.
Ajax logins: why?
I’m starting this new blog with this little suggestion: avoid ajax logins.
Ajax it’s really cool and handy, I know, but for a login page only can be useful in very particular cases. In the rest, only helps to save time to the hackers when do brute force on your site.
How works an ajax login?
The users fills [...]