Package org.htmlunit.javascript.host
Class DateCustom
java.lang.Object
org.htmlunit.javascript.host.DateCustom
Contains some missing features of Rhino NativeDate.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static long
getDateValue
(org.htmlunit.corejs.javascript.Scriptable thisObj) static String
toLocaleDateString
(org.htmlunit.corejs.javascript.Context context, org.htmlunit.corejs.javascript.Scriptable scope, org.htmlunit.corejs.javascript.Scriptable thisObj, Object[] args, org.htmlunit.corejs.javascript.Function function) Converts a date to a string, returning the "date" portion using the operating system's locale's conventions.static String
toLocaleTimeString
(org.htmlunit.corejs.javascript.Context context, org.htmlunit.corejs.javascript.Scriptable scope, org.htmlunit.corejs.javascript.Scriptable thisObj, Object[] args, org.htmlunit.corejs.javascript.Function function) Converts a date to a string, returning the "time" portion using the current locale's conventions.
-
Constructor Details
-
DateCustom
private DateCustom()
-
-
Method Details
-
toLocaleDateString
public static String toLocaleDateString(org.htmlunit.corejs.javascript.Context context, org.htmlunit.corejs.javascript.Scriptable scope, org.htmlunit.corejs.javascript.Scriptable thisObj, Object[] args, org.htmlunit.corejs.javascript.Function function) Converts a date to a string, returning the "date" portion using the operating system's locale's conventions.- Parameters:
context
- the JavaScript contextscope
- the scopethisObj
- the scriptableargs
- the arguments passed into the methodfunction
- the function- Returns:
- converted string
-
toLocaleTimeString
public static String toLocaleTimeString(org.htmlunit.corejs.javascript.Context context, org.htmlunit.corejs.javascript.Scriptable scope, org.htmlunit.corejs.javascript.Scriptable thisObj, Object[] args, org.htmlunit.corejs.javascript.Function function) Converts a date to a string, returning the "time" portion using the current locale's conventions.- Parameters:
context
- the JavaScript contextscope
- the scopethisObj
- the scriptableargs
- the arguments passed into the methodfunction
- the function- Returns:
- converted string
-
getDateValue
private static long getDateValue(org.htmlunit.corejs.javascript.Scriptable thisObj)
-