Skip to content
Snippets Groups Projects
  1. Jun 22, 2020
  2. Jun 18, 2020
  3. Jun 15, 2020
    • Evangelos Ribeiro Tzaras's avatar
      gcal-date-time-utils: Fix week start · 18e31d5f
      Evangelos Ribeiro Tzaras authored
      In locales where the first weekday is a monday, the previous code
      had a off by one error determining the week a sunday is in.
      The problem ultimately arose because in the
      `gcal_date_time_get_start_of_week()` function the variable
      `n_days_after_week_start` would become negative (-1 in this case) making
      the following `g_date_time_add_days (date, -n_days_after_week_start)`
      add 1 day resulting in `start_of_week` being set to the start of the
      following week.
      
      The solution was to make sure `n_days_after_week_start` would be
      positive by adding 7 to it. The variable is taken modulo 7 hence this
      should not introduce any bugs.
      
      Fixes #583
      
      
      (cherry picked from commit 07f544b7)
      18e31d5f
  4. Apr 17, 2020
  5. Apr 16, 2020
  6. Apr 14, 2020