         var flag = 0
         
         //30日分繰り返すループ
-        for(var i = 0; i < 30; i++){
+        for(var i = 0; i < monthrange.length; i++){
+            print(i)
             let shiftdb = ShiftDB()
             let shiftdetaildb = ShiftDetailDB()
             

    var number = 6
    
    let TEST = "aaa"
    
    
    //ワンクール分のシフトをShiftDetailDBとShiftDBへ記録する
    func ShiftDBOneCoursRegist(importname: String, importpath: String, update: Bool){
        
        let documentPath: String = NSBundle.mainBundle().pathForResource(TEST, ofType: "xlsx")!
        let spreadsheet: BRAOfficeDocumentPackage = BRAOfficeDocumentPackage.open(documentPath)

                    shiftdetaildb.month = JudgeYearAndMonth().startcoursmonth
                    date++
                    
                    if(date > monthrange.length){
                        date = 1
                        flag = 1
                    }
