/* Returns: the number of days between @date1 and @date2  */
gint g_date_days_between(const GDate *d1, const GDate *d2)
/* Returns: the number of days between @date1 and @date2  */
gint g_date_days_between(const GDate *d1, const GDate *d2)
{
  g_return_val_if_fail (g_date_valid (d1), 0);
  g_return_val_if_fail (g_date_valid (d2), 0);
  return (gint)g_date_get_julian (d2) - (gint)g_date_get_julian (d1);
}