         self.view.addGestureRecognizer(myTap)
     }
     
+    var tapanimationbuttonflag = false      //タップをした際にbuttontilearray内に今日の日付が含まれているかを記録
+    
     func today(){
         let today = NSDate()
         let date = ReturnYearMonthDayWeekday(today)         //日付を西暦,月,日,曜日に分けて取得

            }else if judgeswipe == -1 && currentsplitdate.weekday == 7 {
                self.AnimationDayButton(button, beforeposition: positionX-300, afterpositon: positionX, positionY: positionY, buttonsize: buttonSize)
            }

            buttonobjectarray.append(button)
        }
    }
    
    //日付ボタンをタップした際に呼ばれる関数
    func TapDayButton(sender: UIButton){
        let currentsplitday = ReturnYearMonthDayWeekday(currentnsdate) //日付を西暦,月,日,曜日に分けて取得

        //タップした日付ボタンと表示中の日付の配列位置を比較
        let tagindex = buttontilearray.indexOf(String(sender.tag))
        let currentdayindex = buttontilearray.indexOf(String(currentsplitday.day))

        let compareunit = calendar.compareDate(currentnsdate, toDate: today, toUnitGranularity: .Day)
        
        currentnsdate = today
        
        if buttontilearray.contains(String(date.day)) == false {
            tapanimationbuttonflag = true
        }
        
        if compareunit == .OrderedAscending {           //currentnsdateが今日より小さい(前の日付)場合
            
            self.AnimationDayLabel(20, afterposition: 8)
