The following code add’s a format function to the Date objects prototype. It simulates the PHP date.format() function. Date.prototype.format = function(format) { var returnStr = ”; var replace = Date.replaceChars; for (var i = 0; i < format.length; i++) { var curChar = format.charAt(i); if (i – 1 >= 0 && format.charAt(i – 1) == [...]
Pages
Categories
Archives