net.sf.jasperreports.engine.util
Class JRDataUtils

java.lang.Object
  extended by net.sf.jasperreports.engine.util.JRDataUtils

public final class JRDataUtils
extends Object

Version:
$Id: JRDataUtils.java 5180 2012-03-29 13:23:12Z teodord $
Author:
Lucian Chirita (lucianc@users.sourceforge.net)

Field Summary
static double JULIAN_0000
           
static double JULIAN_1900
           
 
Method Summary
static double getExcelSerialDayNumber(Date date, Locale locale, TimeZone timeZone)
           
static double getGregorianToJulianDay(int year, int month, int day)
           
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 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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
Method Detail

getLocaleCode

public static String getLocaleCode(Locale locale)

getLocale

public static Locale getLocale(String code)

getTimeZoneId

public static String getTimeZoneId(TimeZone tz)

getTimeZone

public static TimeZone getTimeZone(String id)

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


Copyright © 2012. All Rights Reserved.