mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
__DATE__ should have day prefixed with space
The documentation for GCC, and other compilers, stipulates that __DATE__ with a day of month less than 10 should be prefixed by a space, not a zero. Contributed by STMicroelectronics Signed-off-by: Torbjörn Svensson <torbjorn.svensson@st.com>
This commit is contained in:
parent
78d9a35bdd
commit
3b6f1359f0
1 changed files with 5 additions and 1 deletions
|
@ -36,7 +36,11 @@ public final class DateMacro extends DynamicMacro {
|
|||
DateFormatSymbols dfs = new DateFormatSymbols();
|
||||
buffer.append(dfs.getShortMonths()[cal.get(Calendar.MONTH)]);
|
||||
buffer.append(" "); //$NON-NLS-1$
|
||||
append(buffer, cal.get(Calendar.DAY_OF_MONTH));
|
||||
int dom = cal.get(Calendar.DAY_OF_MONTH);
|
||||
if (dom < 10) {
|
||||
buffer.append(" "); //$NON-NLS-1$
|
||||
}
|
||||
buffer.append(dom);
|
||||
buffer.append(" "); //$NON-NLS-1$
|
||||
buffer.append(cal.get(Calendar.YEAR));
|
||||
buffer.append("\""); //$NON-NLS-1$
|
||||
|
|
Loading…
Add table
Reference in a new issue