Node.js examples for Date:Date Format
Returns a formatted post Date for a given timestamp
/**/*from w w w. ja va 2s. co m*/ * Date.getPostDate() * Returns a formatted postDate for a given timestamp * * @timestamp * Optional timestamp for which to return a post date, if none is specified, * current post date will be used */ Date.prototype.getPostDate = function() { //declare vars return this.getMonth() + '_' + this.getDate() + '_' + this.getFullYear(); };