strftime for JavaScript