Welcome Guest, Not a member yet? Register   Sign In
Code needed to convert human date input from web form to UNIX timestamp
#5

[eluser]bretticus[/eluser]
Just looked "under the hood" and I can see that human_to_unix() is definately not a wrapper for strtotime(). This function is made to go in the opposite direction of unix_to_human(). strtotime() may be more versatile being a native php function with much variation detection built in.

I'd suggest giving the user a calendar control of some kind though since that is easy for the user and enforces a date/time format. Codeigniter has a built in library for doing this server-side. jquery has a nice plugin for doing this client side. Both seem fairly easy to implement.


Messages In This Thread
Code needed to convert human date input from web form to UNIX timestamp - by El Forum - 06-21-2009, 01:00 AM



Theme © iAndrew 2016 - Forum software by © MyBB