Class JRDataUtils


  • public final class JRDataUtils
    extends Object
    Author:
    Lucian Chirita (lucianc@users.sourceforge.net)
    • Method Detail

      • getIsoDateFormat

        public static DateFormat getIsoDateFormat()
      • getLocaleCode

        public static String getLocaleCode​(Locale locale)
      • getLocale

        public static Locale getLocale​(String code)
      • 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 translate
        tz - the timezone to translate to
        Returns:
        the date translated to the specified timezone