(function($) {
////プラグイン定義
//$.fn.basic = function(options){
//
// //引数を設定する
// var defaults = {
// text : 'This is basic plugin!!!'
// };
//
//
// var setting = $.extend(defaults, options);
//
// //アラートを表示
// alert(setting.text);
//
// //メソッドチェーン対応(thisを返す)
// return(this);
//};
//
//$.fn.extend = ({
$fn.extend = ({
//名前:メシッド
clearValue ; function (){
return this.each(function () {
this.value = '';
}
}
});
})(jQuery);
function isToday(strDate){
//var aaa = strDate.val().trim().split("/");
//alert(date1[0]);
//var intYear = strDate[0]*1;
//var intMon = strDate[1]*1;
//var intDay = strDate[2]*1;
}
$(function () {
//必須チェック
$('#login').click(function(){
$.hoge("hi","hiroshi");
// isToday();
//$("#contents").basic({
// text : 'これはbascプラグインでの表示です!'
//});
$('#txtdate1').hoge();
var today = $('#txtdate1').val().trim();
if( isToday(today)) {
}else{
};
var strDate = $('#txtdate1').val().trim().split("/");
//alert(date1[0]);
var intYear = strDate[0]*1;
var intMon = strDate[1]*1;
var intDay = strDate[2]*1;
//alert(inputedDate=date1[2]);//01
//alert(inputedDate=date1[2]*1);//1になってくれた
var today = new Date();
if(intDay !== today.getDate())
{
alert("日付が現在日と一致してない");
return fasle;
}else{
//月が同じ?
}
if(intDay >= today.getDate())
{
alert("日付が現在日よりすぎてる");
}
if(intDay <= today.getDate())
{
alert("日付が現在日より前");
}
//alert(today);
//alert(today.getYear());
alert(today.getFullYear());
alert(today.getMonth()+1);//0から //5
alert(today.getDate());//1 一桁ものは、考慮が必要ね
})
});