pingjiang / datejs

Automatically exported from code.google.com/p/datejs
Other
0 stars 0 forks source link

Date isBefore fails #80

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Get two dates, ie. Fri 24 July 2009 5:00:00 and Fri 24 July 2009 5:30:00
2. use date1.isBefore(date2)

What is the expected output? What do you see instead?
You'd expect it to return true, as it's half hour earlier, instead it
returns false

What version of the product are you using? On what operating system?
Datejs 1.0 Alpha-1 on MacOSX 10.5.7 using Firefox 3.5.1

Please provide any additional information below.

Original issue reported on code.google.com by brend...@gmail.com on 24 Jul 2009 at 7:28

GoogleCodeExporter commented 9 years ago
Please ensure you are using the latest build from svn 
(http://www.datejs.com/svn/).

The following appears to work correctly.

Example

var date1 = Date.parse("Fri 24 July 2009 5:00:00");
var date2 = Date.parse("Fri 24 July 2009 5:30:00");

console.log("date1", date1);
console.log("date2", date2);

console.log("isBefore", date1.isBefore(date2));

Hope this helps.

Original comment by geoff%co...@gtempaccount.com on 27 Jul 2009 at 3:05