This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Return a formated string from a date Object mimicking PHP's date() functionality | |
* | |
* @param {string} format "Y-m-d H:i:s" or similar PHP-style date format string | |
* @param {* | null} date Date Object, Datestring, or milliseconds | |
* | |
*/ | |
function date(format, date) { | |
if (!date || date === "") { | |
date = new Date(); |