开发者

flex - querying a date var and changing minutes

I'm trying to find out what the time is through a Date var and changing the hours in it. Does anyone know how to do that? I guess in 开发者_Go百科pseudo-code i would like something like this:

function updateTime(d:Date)Void
{
  Var nowTime:Date() = new Date();
  if (d.getHour() < nowTime.getHour()+1)
     d = nowTime;
}

Thanks!


if you want to change hours there is a function setHours(). Than it will be like this :

d.setHours(nowTime.getHour());
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜