ActionScript 3 Working with Date and Time Today's start date, at midnight


Example

function today(date:Date = null):Date {
    if (date == null)
        date = new Date();

    return new Date(date.fullYear, date.month, date.date, 0, 0, 0, 0);
}