diff options
author | rubidium <rubidium@openttd.org> | 2006-08-15 16:55:40 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2006-08-15 16:55:40 +0000 |
commit | a0b4a29a575b3bf8e3a7573924fa917603d26abc (patch) | |
tree | 01a9595835d95746ba82d0ce12e16c393bd99f4e /strings.c | |
parent | 1cc6e186f06f98c76b43f94a787abaec7f024cd7 (diff) | |
download | openttd-a0b4a29a575b3bf8e3a7573924fa917603d26abc.tar.xz |
(svn r5919) -Cleanup: use the type Date when the variable really is a date
Diffstat (limited to 'strings.c')
-rw-r--r-- | strings.c | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -326,12 +326,12 @@ static char *FormatNoCommaNumber(char *buff, int32 number) } -static char *FormatYmdString(char *buff, uint16 number) +static char *FormatYmdString(char *buff, Date date) { const char *src; YearMonthDay ymd; - ConvertDateToYMD(number, &ymd); + ConvertDateToYMD(date, &ymd); for (src = GetStringPtr(ymd.day + STR_01AC_1ST - 1); (*buff++ = *src++) != '\0';) {} buff[-1] = ' '; @@ -342,12 +342,12 @@ static char *FormatYmdString(char *buff, uint16 number) return FormatNoCommaNumber(buff, BASE_YEAR + ymd.year); } -static char *FormatMonthAndYear(char *buff, uint16 number) +static char *FormatMonthAndYear(char *buff, Date date) { const char *src; YearMonthDay ymd; - ConvertDateToYMD(number, &ymd); + ConvertDateToYMD(date, &ymd); for (src = GetStringPtr(STR_MONTH_JAN + ymd.month); (*buff++ = *src++) != '\0';) {} buff[-1] = ' '; @@ -355,11 +355,11 @@ static char *FormatMonthAndYear(char *buff, uint16 number) return FormatNoCommaNumber(buff, BASE_YEAR + ymd.year); } -static char *FormatTinyDate(char *buff, uint16 number) +static char *FormatTinyDate(char *buff, Date date) { YearMonthDay ymd; - ConvertDateToYMD(number, &ymd); + ConvertDateToYMD(date, &ymd); buff += sprintf(buff, " %02i-%02i-%04i", ymd.day, ymd.month + 1, BASE_YEAR + ymd.year); return buff; |