org.eclipse.birt.core.script
Class NativeDateTimeSpan

java.lang.Object
  extended by org.mozilla.javascript.ScriptableObject
      extended by org.eclipse.birt.core.script.NativeDateTimeSpan
All Implemented Interfaces:
java.io.Serializable, org.mozilla.javascript.ConstProperties, org.mozilla.javascript.debug.DebuggableObject, org.mozilla.javascript.Scriptable

public class NativeDateTimeSpan
extends org.mozilla.javascript.ScriptableObject

The static DateTimeSpan object provides methods to determine the amount of time between two date/times, and to add or subtract time spans. Provides a set of functions for working with the difference between two dates.

See Also:
Serialized Form

Field Summary
protected static java.util.logging.Logger logger
          logger used to log syntax errors.
 
Fields inherited from class org.mozilla.javascript.ScriptableObject
CONST, DONTENUM, EMPTY, PERMANENT, READONLY, UNINITIALIZED_CONST
 
Fields inherited from interface org.mozilla.javascript.Scriptable
NOT_FOUND
 
Constructor Summary
NativeDateTimeSpan()
          The zero-argument constructor used by Rhino runtime to create instances
 
Method Summary
 java.lang.String getClassName()
           
static java.lang.Object jsStaticFunction_addDate(java.lang.Object start, int years, int months, int days)
           
static java.lang.Object jsStaticFunction_addTime(java.lang.Object start, int hours, int minutes, int seconds)
           
static int jsStaticFunction_days(java.lang.Object start, java.lang.Object end)
           
static int jsStaticFunction_hours(java.lang.Object start, java.lang.Object end)
           
static int jsStaticFunction_minutes(java.lang.Object start, java.lang.Object end)
           
static int jsStaticFunction_months(java.lang.Object start, java.lang.Object end)
           
static int jsStaticFunction_seconds(java.lang.Object start, java.lang.Object end)
           
static java.lang.Object jsStaticFunction_subDate(java.lang.Object start, int years, int months, int days)
           
static java.lang.Object jsStaticFunction_subTime(java.lang.Object start, int hours, int minutes, int seconds)
           
static int jsStaticFunction_years(java.lang.Object start, java.lang.Object end)
           
protected static java.util.Date toDate(java.lang.Object value)
          convert java script object to double
protected static int toInt(java.lang.Object value)
          convert java script object to int
 
Methods inherited from class org.mozilla.javascript.ScriptableObject
associateValue, callMethod, callMethod, defineClass, defineClass, defineClass, defineConst, defineConstProperty, defineFunctionProperties, defineProperty, defineProperty, defineProperty, defineProperty, delete, delete, deleteProperty, deleteProperty, equivalentValues, get, get, getAllIds, getAssociatedValue, getAttributes, getAttributes, getAttributes, getAttributes, getClassPrototype, getDefaultValue, getDefaultValue, getFunctionPrototype, getGetterOrSetter, getIds, getObjectPrototype, getParentScope, getProperty, getProperty, getPropertyIds, getPrototype, getTopLevelScope, getTopScopeValue, has, has, hasInstance, hasProperty, hasProperty, isConst, isSealed, put, put, putConst, putConstProperty, putProperty, putProperty, redefineProperty, sealObject, setAttributes, setAttributes, setAttributes, setAttributes, setGetterOrSetter, setParentScope, setPrototype
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

protected static java.util.logging.Logger logger
logger used to log syntax errors.

Constructor Detail

NativeDateTimeSpan

public NativeDateTimeSpan()
The zero-argument constructor used by Rhino runtime to create instances

Method Detail

getClassName

public java.lang.String getClassName()
Specified by:
getClassName in interface org.mozilla.javascript.Scriptable
Specified by:
getClassName in class org.mozilla.javascript.ScriptableObject

toDate

protected static java.util.Date toDate(java.lang.Object value)
convert java script object to double

Parameters:
value - js object
Returns:
double value

toInt

protected static int toInt(java.lang.Object value)
convert java script object to int

Parameters:
value - js object
Returns:
int value

jsStaticFunction_years

public static int jsStaticFunction_years(java.lang.Object start,
                                         java.lang.Object end)

jsStaticFunction_months

public static int jsStaticFunction_months(java.lang.Object start,
                                          java.lang.Object end)

jsStaticFunction_days

public static int jsStaticFunction_days(java.lang.Object start,
                                        java.lang.Object end)

jsStaticFunction_hours

public static int jsStaticFunction_hours(java.lang.Object start,
                                         java.lang.Object end)

jsStaticFunction_minutes

public static int jsStaticFunction_minutes(java.lang.Object start,
                                           java.lang.Object end)

jsStaticFunction_seconds

public static int jsStaticFunction_seconds(java.lang.Object start,
                                           java.lang.Object end)

jsStaticFunction_addDate

public static java.lang.Object jsStaticFunction_addDate(java.lang.Object start,
                                                        int years,
                                                        int months,
                                                        int days)

jsStaticFunction_addTime

public static java.lang.Object jsStaticFunction_addTime(java.lang.Object start,
                                                        int hours,
                                                        int minutes,
                                                        int seconds)

jsStaticFunction_subDate

public static java.lang.Object jsStaticFunction_subDate(java.lang.Object start,
                                                        int years,
                                                        int months,
                                                        int days)

jsStaticFunction_subTime

public static java.lang.Object jsStaticFunction_subTime(java.lang.Object start,
                                                        int hours,
                                                        int minutes,
                                                        int seconds)


Copyright © 2008 Actuate Corp. All rights reserved.