/* ------------------------------------------- EventTimer ---------------------------------------------- */ $(document).ready(function(){ var nowdate = 20171020; //var nowdate = new Date("20161224"); //$('#test').html(nowdate); $(".app_timer").each(function(index, target){ var appenddate = $(this).attr("app_date"); if (appenddate < nowdate){ $(this).html('

申し込み受付は終了しました。

'); //$(this).hide(); } else { var y = appenddate.substr(0,4); //2016 var m = Number(appenddate.substr(4,2)); //01 var d = Number(appenddate.substr(6,2)); //02 var wl = ["日","月","火","水","木","金","土"]; var ymd = new Date(y+"/"+m+"/"+d); var w = wl[ymd.getDay()] ; var aed = y +"年"+ m + "月" + d + "日" + "(" + w + ")"; $(this).html('

郵便往復はがき(私製をのぞく)で申し込み
観覧申し込み方法等の詳細


締切日
'+ aed +'必着

'); //$(this).show(); } }); $(".closed_timer").each(function(index, target){ var closeddate = $(this).attr("closed_date"); if (closeddate < nowdate){ $(this).html('

終了しました。

'); } }); $(".event_timer").each(function(index, target){ var enddate = $(this).attr("event_date"); if (enddate <= nowdate){ $(this).hide(); } }); });