Functiondojo.date.compare

dojo.require("dojo.date");
defined in dojo/date.js

Returns 0 if equal, positive if a > b, else negative.

Usage

function (/*Date*/ date1, /*Date?*/ date2, /*String?*/ portion) (view source)
parametertypedescription
date1Dateobject
date2DateOptional. object. If not specified, the current Date is used.
portionStringOptional. A string indicating the "date" or "time" portion of a Date object. Compares both "date" and "time" by default. One of the following: "date", "time", "datetime"