Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

__DATE__ should have day prefixed with space #896

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

import java.text.DateFormatSymbols;
import java.util.Calendar;
import java.util.Locale;

import org.eclipse.cdt.core.parser.IToken;

Expand All @@ -33,10 +34,14 @@ private char[] createDate() {
char[] charArray;
StringBuilder buffer = new StringBuilder("\""); //$NON-NLS-1$
Calendar cal = Calendar.getInstance();
DateFormatSymbols dfs = new DateFormatSymbols();
DateFormatSymbols dfs = new DateFormatSymbols(Locale.ENGLISH);
buffer.append(dfs.getShortMonths()[cal.get(Calendar.MONTH)]);
Torbjorn-Svensson marked this conversation as resolved.
Show resolved Hide resolved
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$
Torbjorn-Svensson marked this conversation as resolved.
Show resolved Hide resolved
}
buffer.append(dom);
buffer.append(" "); //$NON-NLS-1$
buffer.append(cal.get(Calendar.YEAR));
buffer.append("\""); //$NON-NLS-1$
Expand Down
Loading