function myDateFormat(dt){

  var  dayno    =  dt.getDate() ;
  var  monthno  =  dt.getMonth() ;
  var  yearno   =  dt.getFullYear() ;
  
  // Convert dayno to daystr
  // Example 2 to "2nd"
  
  var  daystr ;
  if       ((dayno == 1) 
            || 
            (dayno == 21)     
            || 
            (dayno == 31)
            )
            {daystr  =  dayno + "日"}
  else  if  ((dayno == 2)
             ||
             (dayno == 22)
            )
            {daystr  =  dayno + "日"}  
  else  if  ((dayno == 3)
             ||
             (dayno == 23)
            )
            {daystr  =  dayno + "日"}
  else      {daystr  =  dayno + "日"}
  
  // Convert monthno to monthstr
  // Example 0 to "January"
  
  if        (monthno ==  0)  {monthstr  =  "1月 "}
  else  if  (monthno ==  1)  {monthstr  =  "2月 "}
  else  if  (monthno ==  2)  {monthstr  =  "3月 "}
  else  if  (monthno ==  3)  {monthstr  =  "4月 "}
  else  if  (monthno ==  4)  {monthstr  =  "5月 "}
  else  if  (monthno ==  5)  {monthstr  =  "6月 "}
  else  if  (monthno ==  6)  {monthstr  =  "7月 "}
  else  if  (monthno ==  7)  {monthstr  =  "8月 "}
  else  if  (monthno ==  8)  {monthstr  =  "9月 "}
  else  if  (monthno ==  9)  {monthstr  =  "10月 "}
  else  if  (monthno == 10)  {monthstr  =  "11月 "}
  else  if  (monthno == 11)  {monthstr  =  "12月 "}    

  // Generate a string with spaces
  
  var dtstr  =  yearno + " " + monthstr + " " + daystr
  
  return  dtstr
}


     

var  today  =  new Date() ;
document.write(myDateFormat(today));



 