Code needed to convert human date input from web form to UNIX timestamp |
[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-20-2009, 06:30 PM
Code needed to convert human date input from web form to UNIX timestamp - by El Forum - 06-20-2009, 07:25 PM
Code needed to convert human date input from web form to UNIX timestamp - by El Forum - 06-20-2009, 07:43 PM
Code needed to convert human date input from web form to UNIX timestamp - by El Forum - 06-20-2009, 08:46 PM
Code needed to convert human date input from web form to UNIX timestamp - by El Forum - 06-21-2009, 01:00 AM
|