Version 15.42.2

This commit is contained in:
Antonio Cañas Vargas 2015-11-21 21:21:16 +01:00
parent a875a3fc59
commit fd72a2e8a8
2 changed files with 5 additions and 4 deletions

View File

@ -699,8 +699,8 @@ function DrawCurrentMonth (id,FirstDayOfWeek,TimeUTC,CurrentPlcCod,
/*****************************************************************************/
/******************************* Draw a month ********************************/
/*****************************************************************************/
// FirstDayOfWeek == 0 (monday) <==> Sunday is the last day of the week
// FirstDayOfWeek == 6 (sunday) <==> Sunday is the first day of the week
// FirstDayOfWeek == 0 ==> Weeks from Monday to Sunday
// FirstDayOfWeek == 6 ==> Weeks from Sunday to Saturday
function DrawMonth (id,FirstDayOfWeek,YearToDraw,MonthToDraw,CurrentMonth,CurrentDay,
CurrentPlcCod,DrawingCalendar,PrintView,
@ -750,7 +750,7 @@ function DrawMonth (id,FirstDayOfWeek,YearToDraw,MonthToDraw,CurrentMonth,Curren
If it's 0 then write 1 box of the previous month.
If it's 1 then write 0 boxes of the previous month. */
if ((DayOfWeek = (GetDayOfWeekMondayFirst (Yea,Mon,1) - FirstDayOfWeek) % 7) == 0)
if ((DayOfWeek = (GetDayOfWeekMondayFirst (Yea,Mon,1) + 7 - FirstDayOfWeek) % 7) == 0)
Day = 1;
else {
if (Mon <= 1) {

View File

@ -111,11 +111,12 @@
/****************************** Public constants *****************************/
/*****************************************************************************/
#define Log_PLATFORM_VERSION "SWAD 15.42.1 (2015/11/21)"
#define Log_PLATFORM_VERSION "SWAD 15.42.2 (2015/11/21)"
// Number of lines (includes comments but not blank lines) has been got with the following command:
// nl swad*.c swad*.h css/swad*.css py/swad*.py js/swad*.js soap/swad*.h sql/swad*.sql | tail -1
/*
Version 15.42.2: Nov 21, 2015 Fixed bug in JavaScript code to draw months. (? lines)
Version 15.42.1: Nov 21, 2015 Calendar is drawn depending on user's preference about first day of the week. (187523 lines)
Version 15.42: Nov 21, 2015 New option in preferences to select first day of the week. (187520 lines)
3 changes necessary in database: