/* Checks if @date1 is less than or equal to @date2, and swap the values if this is not the case.  */
void g_date_order(GDate *date1, GDate *date2)
/* Checks if @date1 is less than or equal to @date2, and swap the values if this is not the case.  */
void g_date_order(GDate *date1, GDate *date2)
{
  g_return_if_fail (g_date_valid (date1));
  g_return_if_fail (g_date_valid (date2));
  if (g_date_compare (date1, date2) > 0)
    {
      GDate tmp = *date1;
      *date1 = *date2;
      *date2 = tmp;
    }
}