开发者

get the next day and previous day of a selecteddate on flex!

开发者 https://www.devze.com 2023-03-24 04:45 出处:网络
I was wondering if there is a function/method to get next and previous date of a selected day something like getpreviousday hh or something?

I was wondering if there is a function/method to get next and previous date of a selected day something like getpreviousday hh or something? all I could find is function that people created themselves, I thought m开发者_开发知识库aybe there is already a built-in function.


Use this ActionScript DateUtils library.

There is a DateAdd method you can use:

var currentDate : Date = new Date();
var nextDate : Date = DateUtils.dateAdd('date',1,currentDate);
var previousDate : Date = DateUtils.dateAdd('date',-1,currentDate);


You can use the DateUtil from here: DateUtils at code.google.com

Further www.flextras.com mentioned the link for ActionScript Dateutils.

0

精彩评论

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