Tiny JavaScript date formatter