Xojo.Core.Date Comparsion

Can some one check this

dim cur_date As New Xojo.Core.Date(2016, 5, 10, Xojo.Core.TimeZone.Current)
dim max_date as New Xojo.Core.Date(2050, 12, 31, Xojo.Core.TimeZone.Current)

cur_date > max_date = True

I am getting True result from above condition


thanks it is working

but did not find any documentation about it

we should use SecondsFrom1970 for Xojo.Core.Date comparision

For any object you should use comparable value.

You generally want to compare what’s in the boxes not the boxes

I think all the object implement Compare operator so there is no need to compare with some property of object

Those don’t
You can see thats not documented on http://developer.xojo.com/xojo-core-date

Oh I see it now thanks it is documented

Is there a reason Xojo.Core.Date does not have a Compare method?

You can compare SecondsFrom1970.

or SQLDate or SQLDateTime?

Right. I was wondering if there was a reason why direct date comparisons was left out.