I was refering to the screenshot I posted many posts above, nevermind.
This is the code in calendar.c with ConvertStrings added by me (without them, the week days were translated in the onscreen date but not on the log; with them, they're translated on the log but missing altogether in the date onscreen)
Abd this is the relevant bit in sulan_shipslog
This is the code in calendar.c with ConvertStrings added by me (without them, the week days were translated in the onscreen date but not on the log; with them, they're translated on the log but missing altogether in the date onscreen)
Code:
// KK -->
string GetDayName(int weekday)
{
string tmpstr = "Sunday";
switch(weekday)
{
case 0: tmpstr = XI_ConvertString("Sunday"); break;
case 1: tmpstr = XI_ConvertString("Monday"); break;
case 2: tmpstr = XI_ConvertString("Tuesday"); break;
case 3: tmpstr = XI_ConvertString("Wednesday"); break;
case 4: tmpstr = XI_ConvertString("Thursday"); break;
case 5: tmpstr = XI_ConvertString("Friday"); break;
case 6: tmpstr = XI_ConvertString("Saturday"); break;
}
return tmpstr;
}
// Returns: 0 - Sunday, 1 - Monday, ..., 6 - Saturday
int GetWeekday(int day, int month, int year)
{
int wday;
int a = (14 - month) / 12;
int y = year - a;
int m = month + (12 * a) - 2;
if (IsGregorian(day, month, year))
wday = (day + y + makeint(y / 4) - makeint(y / 100) + makeint(y / 400) + makeint((31 * m) / 12)) % 7;
else
wday = (5 + day + y + makeint(y / 4) + makeint((31 * m) / 12)) % 7;
return wday;
}
Code:
sDateTime=TranslateString("", "On")+" "+GetDayName(GetWeekday(GetDataDay(), GetDataMonth(), GetDataYear()))+", "+GetHumanDate(GetDataYear(), GetDataMonth(), GetDataDay())+" "+tmp;
return sDateTime;
}