/* Returns: TRUE if the date is the last day of the month  */
gboolean g_date_is_last_of_month(const GDate *d)
/* Returns: TRUE if the date is the last day of the month  */
gboolean g_date_is_last_of_month(const GDate *d)
{
  gint idx;
  g_return_val_if_fail (g_date_valid (d), FALSE);
  if (!d->dmy) 
    g_date_update_dmy (d);
  g_return_val_if_fail (d->dmy, FALSE);  
  idx = g_date_is_leap_year (d->year) ? 1 : 0;
  if (d->day == days_in_months[idx][d->month]) return TRUE;
  else return FALSE;
}