Javascript Time Functions
A quick note on converting javascript time stamps to human-readable format. I had been working on a travel calculator with new Google Maps v3 which required this for UI.
The following function takes a javascript Date object as a parameter and converts it to a human-readable string.
The functions themselves are simplistic. But can be tedious to work out in a pinch. Also, the pluralise function is a good starting point for converting other values to human-friendly names. While it won’t cover all edge cases it services the majority.