While working to compare two dates
using the ObjectUtil.dateCOmpare method, I found that it
works in a way contrary to my understanding about it.
According to Flex documentation,
If ObjectUtil.dateCompare(a,b), then
this method should return
This method returned '1' when ,
var a:Date = new Date('06/15/2010')
var b:Date = new Date('04/04/2010')
From my understanding , it should return '-1', as b is the date which is prior to/before a
Please reply back, if someone can clarify about this.
Looks like you have the result reversed for when a does not equal b.
int — 0 if a and b are equal (or both are null); -1 if a is before b (or b is null); 1 if a is after b (or a is null).