Skip to content

Instantly share code, notes, and snippets.

@Jarvvski
Created March 14, 2017 03:15
Show Gist options
  • Select an option

  • Save Jarvvski/93ccae7ea210592e29d1c1709ac91119 to your computer and use it in GitHub Desktop.

Select an option

Save Jarvvski/93ccae7ea210592e29d1c1709ac91119 to your computer and use it in GitHub Desktop.
int bSearchCmp (const void * a, const void * b) {
Date *_dateA = a;
Date *_dateB = b;
if (_dateA->year == _dateB->year && _dateA->month == _dateB->month &&
_dateA->day == _dateB->day)
return 0;
else if (_dateA->year < _dateB->year)
return -1;
else return 1;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment