Package net.sf.jasperreports.engine.util
Class JRDataUtils
- java.lang.Object
-
- net.sf.jasperreports.engine.util.JRDataUtils
-
public final class JRDataUtils extends java.lang.Object- Author:
- Lucian Chirita (lucianc@users.sourceforge.net)
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringISO_DATE_PATTERNstatic doubleJULIAN_0000static doubleJULIAN_1900
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static doublegetExcelSerialDayNumber(java.util.Date date, java.util.Locale locale, java.util.TimeZone timeZone)static doublegetGregorianToJulianDay(int year, int month, int day)static java.text.DateFormatgetIsoDateFormat()static java.util.LocalegetLocale(java.lang.String code)static java.lang.StringgetLocaleCode(java.util.Locale locale)static java.util.TimeZonegetTimeZone(java.lang.String id)static java.lang.StringgetTimeZoneId(java.util.TimeZone tz)static booleanisLeapYear(int year)static java.util.TimeZoneresolveFormatTimeZone(java.lang.String timeZoneId, java.util.TimeZone reportTimeZone)static java.util.DatetranslateToTimezone(java.util.Date value, java.util.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 java.lang.String ISO_DATE_PATTERN
- See Also:
- Constant Field Values
-
-
Method Detail
-
getIsoDateFormat
public static java.text.DateFormat getIsoDateFormat()
-
getLocaleCode
public static java.lang.String getLocaleCode(java.util.Locale locale)
-
getLocale
public static java.util.Locale getLocale(java.lang.String code)
-
getTimeZoneId
public static java.lang.String getTimeZoneId(java.util.TimeZone tz)
-
getTimeZone
public static java.util.TimeZone getTimeZone(java.lang.String id)
-
resolveFormatTimeZone
public static java.util.TimeZone resolveFormatTimeZone(java.lang.String timeZoneId, java.util.TimeZone reportTimeZone)
-
getExcelSerialDayNumber
public static double getExcelSerialDayNumber(java.util.Date date, java.util.Locale locale, java.util.TimeZone timeZone)
-
getGregorianToJulianDay
public static double getGregorianToJulianDay(int year, int month, int day)
-
isLeapYear
public static boolean isLeapYear(int year)
-
translateToTimezone
public static java.util.Date translateToTimezone(java.util.Date value, java.util.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
-
-