Commit 32dd1de1 authored by Bryan Cazabonne's avatar Bryan Cazabonne
Browse files

Fixed format symbols for year, month, day in DateComponents#toString().

parent 54a7314f
......@@ -21,6 +21,9 @@
</properties>
<body>
<release version="11.0" date="TBD" description="TBD">
<action dev="bryan" type="fix" issue="835">
Fixed format symbols for year, month, day in DateComponents#toString().
</action>
<action dev="thomas" type="fix" issue="668">
Added a new event detector for angular separation as seen from the spacecraft.
</action>
......
......@@ -18,6 +18,8 @@ package org.orekit.time;
import java.io.Serializable;
import java.text.DecimalFormat;
import java.text.DecimalFormatSymbols;
import java.util.Locale;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
......@@ -119,11 +121,14 @@ public class DateComponents implements Serializable, Comparable<DateComponents>
/** Factory for non-leap years. */
private static final MonthDayFactory COMMON_YEAR_FACTORY = new CommonYearFactory();
/** Formatting symbols used in {@link #toString()}. */
private static final DecimalFormatSymbols US_SYMBOLS = new DecimalFormatSymbols(Locale.US);
/** Format for years. */
private static final DecimalFormat FOUR_DIGITS = new DecimalFormat("0000");
private static final DecimalFormat FOUR_DIGITS = new DecimalFormat("0000", US_SYMBOLS);
/** Format for months and days. */
private static final DecimalFormat TWO_DIGITS = new DecimalFormat("00");
private static final DecimalFormat TWO_DIGITS = new DecimalFormat("00", US_SYMBOLS);
/** Offset between J2000 epoch and modified julian day epoch. */
private static final int MJD_TO_J2000 = 51544;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment