Nodejs Date Format splitYmd()

Here you can find the source of splitYmd()

Method Source Code

Number.prototype.splitYmd=function(){

      var time=(this+"");
      var dates=[];
      dates.push(time.slice(0,4));/*from   ww  w .  j a v  a2s.c  o  m*/
      dates.push(time.slice(4,6));
      dates.push(time.slice(6,8));
      return dates;
}

Related

  1. Format(fmt)
    Date.prototype.Format = function(fmt) {
      var o = {
        "M+" : this.getMonth() + 1,
        "d+" : this.getDate(),
        "h+" : this.getHours(),
        "m+" : this.getMinutes(),
        "s+" : this.getSeconds(),
        "q+" : Math.floor((this.getMonth() + 3) / 3),
        "S" : this.getMilliseconds()
    ...
    
  2. Format(fmt)
    Date.prototype.Format = function (fmt) {
        var o = {
            "m+": this.getMonth() + 1,
            "d+": this.getDate(),
            "h+": this.getHours(),
            "i+": this.getMinutes(),
            "s+": this.getSeconds(),
            "q+": Math.floor((this.getMonth() + 3) / 3),
            "S": this.getMilliseconds()
    ...
    
  3. Format(fmt)
    Date.prototype.Format = function (fmt) {
      var o = {
        "M+": this.getMonth() + 1, 
        "d+": this.getDate(), 
        "h+": this.getHours(), 
        "m+": this.getMinutes(), 
        "s+": this.getSeconds(), 
        "q+": Math.floor((this.getMonth() + 3) / 3), 
        "S": this.getMilliseconds() 
    ...
    
  4. Format(fmt)
    Date.prototype.Format = function (fmt) { 
      var o = {
        'M+': this.getMonth() + 1,
        'd+': this.getDate(), 
        'h+': this.getHours(),
        'm+': this.getMinutes(),
        's+': this.getSeconds(),
        'q+': Math.floor((this.getMonth() + 3) / 3),
        'S': this.getMilliseconds()
    ...