#include "misc.h"
#include "ui_fileops.h"
+#include <langinfo.h>
+
gdouble get_zoom_increment(void)
{
return ((options->image.zoom_increment != 0) ? (gdouble)options->image.zoom_increment / 100.0 : 1.0);
#endif
}
+/**
+ * @brief Returns integer representing first_day_of_week
+ * @returns Integer in range 1 to 7
+ *
+ * Uses current locale to get first day of week
+ *
+ * Sunday == 1
+ */
+gint date_get_first_day_of_week()
+{
+ return nl_langinfo(_NL_TIME_FIRST_WEEKDAY)[0];
+}
+
/* vim: set shiftwidth=8 softtabstop=0 cindent cinoptions={1s: */
gchar *expand_tilde(const gchar *filename);
int runcmd(gchar *cmd);
gchar *decode_geo_parameters(const gchar *input_text);
-
+gint date_get_first_day_of_week();
#endif /* MISC_H */
/* vim: set shiftwidth=8 softtabstop=0 cindent cinoptions={1s: */
#include <glib/gprintf.h>
#include <math.h>
+#include "misc.h"
#include "pan-util.h"
#include "pan-view.h"
#include "pan-view-filter.h"
days = pan_date_value(dt, PAN_DATE_LENGTH_DAY);
dt = pan_date_to_time(year, month, 1);
col = pan_date_value(dt, PAN_DATE_LENGTH_WEEK);
+ col = col - (date_get_first_day_of_week() - 1);
+ if (col < 0) col = col + 7;
row = 1;
x = PAN_BOX_BORDER;