Returns date in requested format.
formatDate(dateStr, format)
dateStr |
string or number, date in common format |
format |
string, format to output |
The str argument can be any standard date or unix epoch, which is used to
create JavaScript Date object. The format can contain following elements: mm, dd, yyyy, mon in any order with
any formatting characters. For example 'mm.dd.yyyy', 'dd-mm-yyyy', 'mon dd, yyyy'
For best cross browser compatibility you should define dateStr either as UNIX time or as full date
and time with time zone in the following format: "2013/12/21 19:03:59 PST".