public int CompareTo(DateTime other) { return((int)(value.getTime() - other.value.getTime())); }
void foo5(object obj) { //dynamic result = obj; //JsArray data = new JsArray(); JsArray reminders = new JsArray();// DataUtils.toArray(result.PatientReminder); JsObject reminder; JsDate now = new JsDate(); JsDate startOfToday = new JsDate(now.getFullYear(), now.getMonth(), now.getDate(), 0, 0, 0, 0); JsDate dueDate; foreach (dynamic item in reminders) { dueDate = new JsDate(item.DueDate["$t"]); reminder = new JsObject(); reminder["Due"] = item.DueDate["$t"]; reminder["Done"] = item.PrevDate["$t"]; reminder["Subject"] = item.Description["$t"]; reminder["PastDue"] = dueDate.getTime() < startOfToday.getTime() ? "red" : ""; data.push(reminder); } //bool success = true; //if (success != null) //{ // success(data); //} }