Initial directory structure.
Initial import of the library
Created TimeSpan class and added some nifty lambda application for cleaner syntactic solution to fromNow/ago.
Removing redundant methods
Removal of old datejs.googlecode.com project files. New project starting with source from http://www.datejs.com/.
Initial commit of source from date-js.googlecode.com (Revision 136).

Project SVN hosted exclusively at datejs.googlecode.com. Please see http://www.datejs.com/ for more information. 
Added new TimePeriod object to time-debug.js. The TimePeriod object is similar to TimeSpan, but includes Months and Years properties. A TimePeriod is a relative difference between two dates. A TimeSpan is an exact millisecond difference between two dates. 

A TimePeriod is created by passing a startDate and endDate into the constructor. The return object contains the following properties:

.years
.month
.days
.hours
.minutes
.seconds
.milliseconds

NOTE: We might combine the TimePeriod and TimeSpan objects into one Duration object. The Duration object would include two properties; Duration.relative and Duration.fixed.


Removed .getAgeInYears(). Please use TimePeriod object. 

Example:

var myBirthday = new Date(1973,1,20);
var tp = new TimePeriod(myBirthday, Date.now());
alert(tp.years);


Removed the .getAge() function from sugarpak.js.
Fixed the following Issues

http://code.google.com/p/datejs/issues/detail?id=1&can=1
http://code.google.com/p/datejs/issues/detail?id=2&can=1
http://code.google.com/p/datejs/issues/detail?id=7&can=1

Corrected minor issue in JSBuilder with CultureInfo files not passing JSLINT.

Completed approx 90% of the corrections recommended by JSLINT for parser-debug.js.
Added static variables for each of the dayNames and monthNames (+ abbreviated for both) which all return their number value.

Example

Date.SUNDAY     // return 0
Date.MONDAY     // return 1
Date.MON        // return 1
Date.OCTOBER    // return 9
Date.OCT        // return 9


Added Date.dayName and Date.monthName (+ abbreviated for both) public functions to Date class.

Example

Date.monday()   // returns monday of the current week
Date.mon()
Date.march()    // returns march of the current year
Date.mar()

The Date.dayName functions automatically perform a correction for the culture-specific firstDayOfWeek.

Example

// Assume firstDayOfWeek = 0 and today is Saturday.
Date.sunday()   // return Sunday from -6 days ago

// Assume firstDayOfWeek = 1 and today is Saturday.
Date.sunday()   // return Sunday +1 from now ("tomorrow")


Added static functions Date.getDayName(number) and Date.getMonthName(number). The existing instance functions 

Date.prototype.getDayName() and Date.prototype.getMonthName() now call their static equivalent. The static functions allow 

for the retrieval of the culture-specific name strings without having to create a Date object. 

The Boolean "abbreviated" param is optional.

Example

Date.getDayName(1)         // returns "Monday"
Date.getDayName(1, true)   // returns "Mon"

Date.getmonthName(9)       // returns "October"
Date.getmonthName(9, true) // returns "Oct"

// with static variable for dayOfWeek or month parameter...
Date.getDayName(Date.MONDAY)            // returns "Monday"
Date.getDayName(Date.MON)               // returns "Monday"
Date.getDayName(Date.MONDAY, true)      // returns "Mon"

Date.getmonthName(Date.OCTOBER)         // returns "October"
Date.getmonthName(Date.OCT)             // returns "October"
Date.getmonthName(Date.OCTOBER, true)   // returns "Oct"



Added new .moveToNthOccurrence(dayOfWeek, occurrence) function. The moveToNthOccurrence function moves the date to the next 

n'th occurrence of the dayOfWeek starting from the beginning of the current month. The number (-1) is a magic number and 

will return the final occurrence of (last instance of) the dayOfWeek in the month. 

The occurrence param is optional.

Example

Date.today().moveToNthOccurrence(0)     // returns first instance of Sunday in the current month.
Date.today().moveToNthOccurrence(0, 1)  // returns first instance of Sunday in the current month.
Date.today().moveToNthOccurrence(0, 2)  // returns second instance of Sunday in the current month.
Date.today().moveToNthOccurrence(0, 30) // returns 30th instance of Sunday from the start of the current month.

Date.today().moveToNthOccurrence(0, -1) // returns final(last) instance of Sunday in the current month.


Added new .first(), .second(), .third(), .forth(), .fifth() and .final() functions to SugarPak. The functions provide an 

expressive alternative to using the .moveToNthOccurrence() function. 

Example

Date.today().first().sunday()   // returns first instance of Sunday in the current month.
Date.today().fourth().sunday()  // returns fourth instance of Sunday in the current month.
Date.today().final().sunday()   // returns the final(last) instance of Sunday in the current month.

// Abbreviations too...
Date.today().final().sun()

// Throws RangeError Exception if nth occurrence does not exist in current month.
Date.today().fifth().sunday()   // throws RangeError exception.
// "RangeError: Sunday does not occur 5 times in the month of November 2007."

// Combine with Date.monthName functions
Date.march().final().thursday() // return final Thursday in March of this year.
Date.jan().first().mon()        // return first Monday in this year. 


Fixed bug in parser when just a dayname string is passed. Now corrects for culture-specific firstDayOfWeek.

Example

Date.parse('monday') // "en-US" firstDayOfWeek = 0
Date.parse('Montag') // "de-DE" firstDayOfWeek = 1
Added .setTimeToNow() function which resets the time of this Date object to the current time ('now').

.setTimeToNow() is the functional opposite of .clearTime().

Example

Date.today()                 // no time
Date.now()                   // time is set to now
Date.today().setTimeToNow()  // equivalent to Date.now()
Moved Date.now() and Date.today() to core-debug.js from sugarpak-debug.js.
added .getElapsed() which returns the number of milliseconds between this date and now or optional 'date' parameter. Can be used kind of like a Timer.

Confirmed everything is passing JSLINT in whitespace strict mode, except a couple issues with Parser (Dan??? I know you're reading this. Please SVN up before Commit).

Added a few more strings in .CultureInfo to the list of strings to be translated.

Example

"morning"
"noon"
"night"
"midnight"
"mid-night"
"evening"
"final"
"future"


Did some clean-up in TimeSpan and TimePeriod. Both now include full support for .get*() and .set*() functions. 

Regenerated all /build/ files. Updated www.datejs.com/test/ directory.
Fixed Date.parse("12PM") bug. See http://code.google.com/p/datejs/issues/detail?id=10&can=1

Added some "12PM" tests to /test/time.html

Fixed Date.parse("last january") bug. See http://groups.google.com/group/datejs/browse_thread/thread/dbda1a080f28e1be

Completely removed Date.now() from the project because of potential collision with ECMA 4 Date.now(). See Discussion at http://groups.google.com/group/datejs/browse_thread/thread/dbda1a080f28e1be
Big time list of changes

======
======


Added support for "Week 30".

The week will start on the first 'monday' of the current year.

Example

Date.parse('Week 0');   // returns "Monday, January 01, 2007"
Date.parse('Week 1');   // returns "Monday, January 08, 2007"
Date.parse('Week 30');  // returns "Monday, July 30, 2007"
Date.parse('Week 52');  // returns "Monday, December 31, 2007"

If you add a direction indicator such as "+ or -" the parser will interpret the week start as of today. 

Example 

Date.parse("+1 week"); // "one week from today"
Date.parse("week +1"); // "one week from today"

Date.parse("-1 week"); // "one week ago"
Date.parse("week -1"); // "one week ago"

http://groups.google.com/group/datejs/browse_thread/thread/89f9e6f8da8d04e6?hl=en

================================================

Added support for '@'. Example

Date.parse('monday @ 8:15pm');

================================================

Added new Relative Date and Time tests.

http://www.datejs.com/relative_date_and_time/

================================================

Added support for "hence" in the parser. 

Date.parse('1 week hence'); // one week from now

================================================

Fixed Date.parse("12PM") bug. See http://code.google.com/p/datejs/issues/detail?id=10&can=1

Added some "12PM" tests to /test/time.html

================================================

Fixed Date.parse("last january") bug. See http://groups.google.com/group/datejs/browse_thread/thread/dbda1a080f28e1be
================================================

Completely removed Date.now() from the project because of potential collision with ECMA 4 Date.now(). See Discussion at http://groups.google.com/group/datejs/browse_thread/thread/dbda1a080f28e1be

================================================
Added the .at() function. Accepts either a time string or time config object. 

Example:

Date.today().at("6:15 pm");
Date.today().at({hour: 18, minute: 15});

-----------

Added Date.tomorrow() and Date.yesterday() to sugarpak.

As well as abbreviations

Date.tod(); // today
Date.yes(); // yesterday
Date.tom(); // tomorrow

-----------

Moved the core into a Closure and created $D, $P and $C private variables.

$D = Date;
$P = Date.prototype;
$C = Date.prototype.CultureInfo;

Creating private variables saved approx 1.2k.

-----------

Added support for a few numerical date formats.

Date.parse("07012004"); // "MMddyyyy"

-----------

Added more tests to the Ruby Chronic Comparison.
Added .next() and .last() <static> functions to the Date object

Example

Date.last().friday(); // returns last friday
Date.next().friday(); // returns next friday

// Same as the following
Date.today().next().friday(); // next friday
Added check within .parse() that will just return the parameter if it's already a Date object.

-----------------------

Added boolean parameter to .clearTime() that will clone the Date instance before clearing time. 

Example

var d1 = new Date();
var d2 = d1.clearTime(true); // clone the d1 and clear the time.
Removed Boolean parameter from .clearTime(). The boolean previously instructed .clearTime() to .clone() itself before clearing the time, but now you should explicitly call .clone() before calling .clearTime().

Example

// Old
var d1 = new Date();
var d2 = d1.clearTime(true);

// New
var d1 = new Date();
var d2 = d1.clone().clearTime();
Added Parser support for "last October 1".

Example

Date.parse("last october 1");
Date.parse(:last october 2");
Fixed bug when parsing "Tue Nov 20 08:00:00 UTC 2007".

Added new test for the above string into /test/date_and_time/.