forked from as3/as3-utils
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathCalendar.as
More file actions
23 lines (23 loc) · 753 Bytes
/
Calendar.as
File metadata and controls
23 lines (23 loc) · 753 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
/**
* User: John Lindquist
* Date: 3/16/11
* Time: 11:27 AM
*/
package utils.date
{
/**
* Calendar is an exception to the "package-level function" rule
*
* This class provides common dates (today, yesterday, tomorrow, last Sunday, next Thursday, the first of the year, the first of June, etc)
* all based on "now"
*
* To determine whether or not a date belongs in "Calendar", simply ask yourself, "Is this date based on 'now'?"
*
* These properties will leverage many of the package-level functions such as "getNextDay", etc, but will simply be based on "now"
*/
public class Calendar
{
public var now:Date = new Date();
public var today:Date = new Date(now.getFullYear(), now.getMonth(), now.getDate(), 0, 0, 0, 0);
}
}