Though I haven't verified that these functions actually work, here's what it looks like they are doing.
The first function tells you how long ago a Unix timestamp was (converting the number of seconds into groups as large as hours).
The second takes a Unix timestamp and converts it to either: 1) a plain "today/yesterday/tomorrow" reference, along with the hour and minute, or b) a "Month Day, Hour:Minute" representation.
If you want to decode these functions yourself, why not just look up the functions you didn't know, e.g. [man]time()[/man], [man]date/man, etc. ?
EDIT: Also, when posting PHP code, please use the board's [PHP][/PHP] bbcode tags - they make the code much, much easier to read (as well as aiding the diagnosis of syntax errors). You should edit your post now and add these bbcode tags to help others in reading/analyzing your code.