All pastes #10659 Raw Edit

Unnamed

public text v1 · immutable
#10659 ·published 2005-04-30 15:22 UTC
rendered paste body
#ifdef HAVE__NL_TIME_FIRST_WEEKDAY
  week_start = nl_langinfo (_NL_TIME_FIRST_WEEKDAY);
  private_data->week_start = *((unsigned char *) week_start) % 7;
#else
  /* Translate to calendar:week_start:0 if you want Sunday to be the
   * first day of the week to calendar:week_start:1 if you want Monday
   * to be the first day of the week, and so on.
   */                                                             
  week_start = _("calendar:week_start:0");

  if (strncmp (week_start, "calendar:week_start:", 20) == 0)
    private_data->week_start = *(week_start + 20) - '0';
  else
    private_data->week_start = -1;

  if (private_data->week_start < 0 || private_data->week_start > 6)
    {
      g_warning ("Whoever translated calendar:week_start:0 did so wrongly.\n");
      private_data->week_start = 0;
    }