utils: Rename gcal_clear_datetime to gcal_clear_date_time

To keep it consistent with the rest of the API.
This commit is contained in:
Georges Basile Stavracas Neto
2019-04-26 13:27:37 -03:00
parent 21c74baed8
commit ab1c0b6ca4
18 changed files with 37 additions and 100 deletions
-59
View File
@@ -634,65 +634,6 @@ icaltime_compare_with_current (const icaltimetype *date1,
return result;
}
/**
* get_start_of_week:
* @date: an #icaltimetype
*
* Retrieves the start of the week that @date
* falls in. This function already takes the
* first weekday into account.
*
* Returns: (transfer full): a #GDateTime with
* the start of the week.
*/
GDateTime*
get_start_of_week (icaltimetype *date)
{
icaltimetype *new_date;
GDateTime *dt;
new_date = g_new0 (icaltimetype, 1);
*new_date = icaltime_from_day_of_year (icaltime_start_doy_week (*date, get_first_weekday () + 1),
date->year);
new_date->is_date = 0;
new_date->hour = 0;
new_date->minute = 0;
new_date->second = 0;
dt = g_date_time_new_local (new_date->year,
new_date->month,
new_date->day,
0, 0, 0);
g_clear_pointer (&new_date, g_free);
return dt;
}
/**
* get_end_of_week:
* @date: an #icaltimetype
*
* Retrieves the end of the week that @date
* falls in. This function already takes the
* first weekday into account.
*
* Returns: (transfer full): a #GDateTime with
* the end of the week.
*/
GDateTime*
get_end_of_week (icaltimetype *date)
{
GDateTime *week_start, *week_end;
week_start = get_start_of_week (date);
week_end = g_date_time_add_days (week_start, 7);
g_clear_pointer (&week_start, g_date_time_unref);
return week_end;
}
/**
* is_clock_format_24h:
*