質問: 1) { return month+"/"+date +"("+myWeekTbl[week]+")"; } else { return month+"/"+date +"("+myWeekTbl[week]+")"; } }
回答: 始めの7行で既に望む結果は得られているように読めます。 ``` thisDay = new Date(); timeStamp = thisDay.getTime(); myMonth = thisDay.getMonth() + 1; myDate = thisDay.getDate(); myHours = thisDay.getHours(); myDay = thisDay.getDay(); myWeekTbl = new Array( "日","月","火","水","木","金","土" ); ``` 下記APIについて調べる事をお勧めします。 * Date.prototype.getMonth() - JavaScript | MDN * Date.prototype.getDate() - JavaScript | MDN * Date.prototype.getDay() - JavaScript | MDN Re: syu_2016 さん