public final class GDateUtils extends Object
Modifier and Type | Class and Description |
---|---|
static class |
GDateUtils.GDateFormat
Date formats.
|
Modifier and Type | Field and Description |
---|---|
static double |
DATE_COMPARISON_PRECISION
Precision for dates comparison (0.5 nanoseconds).
|
static String |
DATE_WITH_NAN
ERROR MESSAGE when DATE is NaN
|
static int |
DAY_MAX_FRAC_DIGITS
Number of fractional digits to keep on a number of days for getting nanosecond precision.
|
static String |
DECIMAL_SYMBOL
Symbol to be used as decimal separator for dates.
|
static String |
DURATION_ISO8601_E
regex for ISO8601 French
|
static String |
DURATION_ISO8601_F
regex for ISO8601 French
|
static int |
HOUR_MAX_FRAC_DIGITS
Number of fractional digits to keep on a number of hours for getting nanosecond precision.
|
static double |
HOURS_2_SECS
Hours to seconds multiplier.
|
static String |
ISO8601_REGEX_STR
similiar block string to ISO8601
|
static int |
MICRO_SEC_MAX_FRAC_DIGITS
Number of fractional digits to keep on a number of microseconds for getting nanosecond precision.
|
static double |
MICROSECS_2_SECS
Microseconds to seconds multiplier.
|
static int |
MILI_SEC_MAX_FRAC_DIGITS
Number of fractional digits to keep on a number of milliseconds for getting nanosecond precision.
|
static double |
MILISECS_2_SECS
Milliseconds to seconds multiplier.
|
static int |
MIN_MAX_FRAC_DIGITS
Number of fractional digits to keep on a number of minutes for getting nanosecond precision.
|
static double |
MINS_2_SECS
Minutes to seconds multiplier.
|
static String |
MINUS_SYMBOL
Symbol "minus" for dates.
|
static int |
NANO_SEC_MAX_FRAC_DIGITS
Number of fractional digits to keep on a number of nanoseconds for getting nanosecond precision.
|
static double |
NANOSECS_2_SECS
Nanoseconds to seconds multiplier.
|
static int |
SEC_MAX_FRAC_DIGITS
Number of fractional digits to keep on a number of seconds for getting nanosecond precision.
|
static String |
SUFIX1950
Suffix to indicate that the date's origin is: 01/01/1950 00h00m00s.
|
static String |
SUFIX2000
Suffix to indicate that the date's origin is: 01/01/2000 00h00m00s.
|
static String |
ZERO_DOT
0.
|
Modifier and Type | Method and Description |
---|---|
static String |
getFormatedValue(double value,
Integer maxIntDigits,
Integer minIntDigits,
Integer maxFracDigits,
Integer minFracDigits)
Generation of a decimal formatter to represents decimal numbers with a minimum and a maximum number of
digits in the integer part and in the fractional part.
|
static String |
getFormatedValue(double value,
int maxFracDigits,
int minFracDigits)
Generation of a decimal formatter to represents decimal numbers with a minimum and a maximum number of
digits.
|
static int[] |
getSubSeconds(double seconds)
Get the integer number of seconds, milliseconds, microseconds, and nanoseconds of a given real number
of seconds.
|
public static final double DATE_COMPARISON_PRECISION
public static final double NANOSECS_2_SECS
public static final double MICROSECS_2_SECS
public static final double MILISECS_2_SECS
public static final double MINS_2_SECS
public static final double HOURS_2_SECS
public static final int NANO_SEC_MAX_FRAC_DIGITS
public static final int MICRO_SEC_MAX_FRAC_DIGITS
public static final int MILI_SEC_MAX_FRAC_DIGITS
public static final int SEC_MAX_FRAC_DIGITS
public static final int MIN_MAX_FRAC_DIGITS
public static final int HOUR_MAX_FRAC_DIGITS
public static final int DAY_MAX_FRAC_DIGITS
public static final String SUFIX2000
public static final String SUFIX1950
public static final String MINUS_SYMBOL
public static final String DECIMAL_SYMBOL
public static final String ISO8601_REGEX_STR
public static final String DURATION_ISO8601_F
public static final String DURATION_ISO8601_E
public static final String DATE_WITH_NAN
public static final String ZERO_DOT
public static int[] getSubSeconds(double seconds)
seconds
- the real number of secondspublic static String getFormatedValue(double value, int maxFracDigits, int minFracDigits)
value
- the value to format.maxFracDigits
- maximum number of fractional digitsminFracDigits
- minimum number of fractional digitspublic static String getFormatedValue(double value, Integer maxIntDigits, Integer minIntDigits, Integer maxFracDigits, Integer minFracDigits)
value
- the value to format.maxIntDigits
- maximum number of digits for the integer partminIntDigits
- minimum number of digits for the integer partmaxFracDigits
- maximum number of digits for the fractional partminFracDigits
- minimum number of digits for the fractional partCopyright © 2024. All rights reserved.