Package net.sf.jasperreports.engine.util
Class JRDataUtils
- java.lang.Object
-
- net.sf.jasperreports.engine.util.JRDataUtils
-
public final class JRDataUtils extends Object
- Author:
- Lucian Chirita (lucianc@users.sourceforge.net)
-
-
Field Summary
Fields Modifier and Type Field Description static String
ISO_DATE_PATTERN
static double
JULIAN_0000
static double
JULIAN_1900
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static double
getExcelSerialDayNumber(Date date, Locale locale, TimeZone timeZone)
static double
getGregorianToJulianDay(int year, int month, int day)
static DateFormat
getIsoDateFormat()
static Locale
getLocale(String code)
static String
getLocaleCode(Locale locale)
static TimeZone
getTimeZone(String id)
static String
getTimeZoneId(TimeZone tz)
static boolean
isLeapYear(int year)
static TimeZone
resolveFormatTimeZone(String timeZoneId, TimeZone reportTimeZone)
static Date
translateToTimezone(Date value, TimeZone tz)
Returns a translated date value that has the same fields in a specified timezone as the passed value in the default timezone.
-
-
-
Field Detail
-
JULIAN_0000
public static final double JULIAN_0000
- See Also:
- Constant Field Values
-
JULIAN_1900
public static final double JULIAN_1900
- See Also:
- Constant Field Values
-
ISO_DATE_PATTERN
public static final String ISO_DATE_PATTERN
- See Also:
- Constant Field Values
-
-
Method Detail
-
getIsoDateFormat
public static DateFormat getIsoDateFormat()
-
resolveFormatTimeZone
public static TimeZone resolveFormatTimeZone(String timeZoneId, TimeZone reportTimeZone)
-
getExcelSerialDayNumber
public static double getExcelSerialDayNumber(Date date, Locale locale, TimeZone timeZone)
-
getGregorianToJulianDay
public static double getGregorianToJulianDay(int year, int month, int day)
-
isLeapYear
public static boolean isLeapYear(int year)
-
translateToTimezone
public static Date translateToTimezone(Date value, TimeZone tz)
Returns a translated date value that has the same fields in a specified timezone as the passed value in the default timezone.- Parameters:
value
- the value to translatetz
- the timezone to translate to- Returns:
- the date translated to the specified timezone
-
-