不希望日历在星期天开始

时间:2015-11-23 00:55:06

标签: actionscript-3 date calendar

当我点击图标时,我有一个显示日历的代码。不幸的是,日历是在星期天开始的。我想在周一开始这一周。

我知道如何通过修改我的代码来做到这一点吗?

import box;

var nM:int = 0;
var row:Number = 0;
var holder_txt:MovieClip = new MovieClip;
var myDate = new Date( thisDate.getFullYear(), thisDate.getMonth() + nM );
var startDay = myDate.getDay();

for ( var t:int = 0; t < getDays(myDate); t++ ) 
{
    myArray[t] = (t+1);

    var textNum:String = myArray[t];
    var square:MovieClip = new box();

    square.name = textNum;
    square.texter.text = textNum;
    square.x = (startDay) * 75;
    square.y = (row+1) * 65;

    holder_txt.addChild(square);

    startDay++; 
    if( startDay >= 7 ) { startDay = 0; row++; }

}

0 个答案:

没有答案