List of utility methods to do String Format
toFormattedString(include_time)Date.prototype.toFormattedString = function(include_time) str = this.getFullYear() + "." + Date.padded2(this.getMonth()+1) + "." + Date.padded2(this.getDate()); if (include_time) { str += " " + this.getHours() + ":" + this.getPaddedMinutes() } return str; | |
toFormattedString(include_time)Date.prototype.toFormattedString = function(include_time) str = Date.padded2(this.getDate()) + " " + Date.months[this.getMonth()] + " " + this.getFullYear(); if (include_time) { str += " " + this.getHours() + ":" + this.getPaddedMinutes() } return str; | |
toFormattedString(include_time)Date.prototype.toFormattedString = function(include_time) var str = Date.padded2(this.getDate()) + "/" + Date.padded2(this.getMonth() + 1) + "/" + this.getFullYear(); return str; | |
toFormattedString(include_time)Date.prototype.toFormattedString = function(include_time){ str = this.getDate() + "/" + (this.getMonth() + 1) + "/" + this.getFullYear(); if (include_time) { str += " " + this.getHours() + ":" + this.getPaddedMinutes() } return str; Date.parseFormattedString = function (string) { var regexp = '([0-9]{1,2})/(([0-9]{1,2})/(([0-9]{4})( ([0-9]{1,2}):([0-9]{2})? *)?)?)?'; var d = string.match(new RegExp(regexp, "i")); if (d==null) return Date.parse(string); ... | |
toFormattedString(include_time)Date.prototype.toFormattedString = function(include_time){ str = this.getDate() + "/" + (this.getMonth() + 1) + "/" + this.getFullYear(); if (include_time) { str += " " + this.getHours() + ":" + this.getPaddedMinutes() } return str; Date.parseFormattedString = function (string) { var regexp = '([0-9]{1,2})/(([0-9]{1,2})/(([0-9]{4})( ([0-9]{1,2}):([0-9]{2})? *)?)?)?'; var d = string.match(new RegExp(regexp, "i")); if (d==null) return Date.parse(string); ... | |
toFormattedString(include_time)Date.prototype.toFormattedString = function(include_time){ str = this.getDate() + "/" + (this.getMonth() + 1) + "/" + this.getFullYear(); if (include_time) { str += " ? + this.getHours() + ":" + this.getPaddedMinutes() } return str; Date.parseFormattedString = function (string) { var regexp = '([0-9]{1,2})/(([0-9]{1,2})/(([0-9]{4})( ??([0-9]{1,2}):([0-9]{2})? *)?)?)?'; var d = string.match(new RegExp(regexp, "i")); if (d==null) return Date.parse(string); ... | |
toFormattedString(include_time)Date.prototype.toFormattedString = function(include_time){ str = this.getDate() + "/" + (this.getMonth() + 1) + "/" + this.getFullYear(); if (include_time) { hour=this.getHours(); str += " " + this.getAMPMHour() + ":" + this.getPaddedMinutes() } return str; Date.parseFormattedString = function (string) { var regexp = '([0-9]{1,2})/(([0-9]{1,2})/(([0-9]{4})( ([0-9]{1,2}):([0-9]{2})? *)?)?)?'; var d = string.match(new RegExp(regexp, "i")); if (d==null) return Date.parse(string); ... | |
toFormattedString(include_time)Date.prototype.toFormattedString = function(include_time){ str = this.getDate() + "/" + (this.getMonth() + 1) + "/" + this.getFullYear(); if (include_time) { str += " " + this.getHours() + ":" + this.getPaddedMinutes() } return str; Date.parseFormattedString = function (string) { var regexp = '([0-9]{1,2})/(([0-9]{1,2})/(([0-9]{4})( ([0-9]{1,2}):([0-9]{2})? *)?)?)?'; var d = string.match(new RegExp(regexp, "i")); if (d==null) return Date.parse(string.replace(/\ ... | |
toFormattedString(include_time)Date.prototype.toFormattedString = function(include_time) { var hour; var str = this.getFullYear() + "-" + Date.padded2(this.getMonth() + 1) + "-" +Date.padded2(this.getDate()); if (include_time) { hour = Date.padded2(this.getHours()); str += " " + hour + ":" + this.getPaddedMinutes(); return str; }; ... | |
toFormattedString(include_time)Date.prototype.toFormattedString = function(include_time){ str = Date.padded2(this.getDate()) + "/" + Date.padded2(this.getMonth() + 1) + "/" + this.getFullYear(); if (include_time) { str += " " + this.getHours() + ":" + this.getPaddedMinutes(); return str; Date.parseFormattedString = function(string) { var regexp = "([0-9]{2})/([0-9]{2})/([0-9]{4})" + ... |