Finding the Day within the Year
Monday, August 11th, 2008Unlike many other great languages, ActionScript 3 does not have a method for finding a date’s day within a year. For example, February 10, 2008, is the 41st day in the year. Here is my solution:
function getDayOfYear(date:Date):Number {
var monthLengths:Array = new Array (31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31);
// A […]


