GDateWeekday
g_date_get_weekday (const GDate *d)
{
- g_return_val_if_fail (d != NULL, G_DATE_BAD_WEEKDAY);
g_return_val_if_fail (g_date_valid (d), G_DATE_BAD_WEEKDAY);
if (!d->julian)
GDateMonth
g_date_get_month (const GDate *d)
{
- g_return_val_if_fail (d != NULL, G_DATE_BAD_MONTH);
g_return_val_if_fail (g_date_valid (d), G_DATE_BAD_MONTH);
if (!d->dmy)
GDateYear
g_date_get_year (const GDate *d)
{
- g_return_val_if_fail (d != NULL, G_DATE_BAD_YEAR);
g_return_val_if_fail (g_date_valid (d), G_DATE_BAD_YEAR);
if (!d->dmy)
GDateDay
g_date_get_day (const GDate *d)
{
- g_return_val_if_fail (d != NULL, G_DATE_BAD_DAY);
g_return_val_if_fail (g_date_valid (d), G_DATE_BAD_DAY);
if (!d->dmy)
guint32
g_date_get_julian (const GDate *d)
{
- g_return_val_if_fail (d != NULL, G_DATE_BAD_JULIAN);
g_return_val_if_fail (g_date_valid (d), G_DATE_BAD_JULIAN);
if (!d->julian)
{
gint index;
- g_return_val_if_fail (d != NULL, 0);
g_return_val_if_fail (g_date_valid (d), 0);
if (!d->dmy)
guint day;
GDate first;
- g_return_val_if_fail (d != NULL, 0);
g_return_val_if_fail (g_date_valid (d), 0);
if (!d->dmy)
guint day;
GDate first;
- g_return_val_if_fail (d != NULL, 0);
g_return_val_if_fail (g_date_valid (d), 0);
if (!d->dmy)
{
guint j, d4, L, d1, w;
- g_return_val_if_fail (d != NULL, 0);
g_return_val_if_fail (g_date_valid (d), 0);
if (!d->julian)
g_date_days_between (const GDate *d1,
const GDate *d2)
{
- g_return_val_if_fail (d1 != NULL, 0);
- g_return_val_if_fail (d2 != NULL, 0);
-
g_return_val_if_fail (g_date_valid (d1), 0);
g_return_val_if_fail (g_date_valid (d2), 0);
}
void
-g_date_clear (GDate *d, guint ndates)
+g_date_clear (GDate *d, guint ndates)
{
g_return_if_fail (d != NULL);
g_return_if_fail (ndates != 0);
gboolean
g_date_is_first_of_month (const GDate *d)
{
- g_return_val_if_fail (d != NULL, FALSE);
g_return_val_if_fail (g_date_valid (d), FALSE);
if (!d->dmy)
{
gint index;
- g_return_val_if_fail (d != NULL, FALSE);
g_return_val_if_fail (g_date_valid (d), FALSE);
if (!d->dmy)
void
g_date_add_days (GDate *d, guint ndays)
{
- g_return_if_fail (d != NULL);
g_return_if_fail (g_date_valid (d));
if (!d->julian)
void
g_date_subtract_days (GDate *d, guint ndays)
{
- g_return_if_fail (d != NULL);
g_return_if_fail (g_date_valid (d));
if (!d->julian)
guint years, months;
gint index;
- g_return_if_fail (d != NULL);
g_return_if_fail (g_date_valid (d));
if (!d->dmy)
guint years, months;
gint index;
- g_return_if_fail (d != NULL);
g_return_if_fail (g_date_valid (d));
if (!d->dmy)
g_date_add_years (GDate *d,
guint nyears)
{
- g_return_if_fail (d != NULL);
g_return_if_fail (g_date_valid (d));
if (!d->dmy)
g_date_subtract_years (GDate *d,
guint nyears)
{
- g_return_if_fail (d != NULL);
g_return_if_fail (g_date_valid (d));
if (!d->dmy)
{
GDateWeekday day;
- g_return_if_fail (d != NULL);
g_return_if_fail (g_date_valid (d));
g_return_if_fail (tm != NULL);
const GDate *min_date,
const GDate *max_date)
{
- g_return_if_fail (date);
g_return_if_fail (g_date_valid (date));
+
if (min_date != NULL)
g_return_if_fail (g_date_valid (min_date));
if (max_date != NULL)
g_date_order (GDate *date1,
GDate *date2)
{
- g_return_if_fail (date1 != NULL);
- g_return_if_fail (date2 != NULL);
g_return_if_fail (g_date_valid (date1));
g_return_if_fail (g_date_valid (date2));
GError *error = NULL;
gsize retval;
- g_return_val_if_fail (d != NULL, 0);
g_return_val_if_fail (g_date_valid (d), 0);
g_return_val_if_fail (slen > 0, 0);
g_return_val_if_fail (format != 0, 0);