lightweight date formatting in js