Package org.htmlunit.javascript.host
Class DateCustom
- java.lang.Object
-
- org.htmlunit.javascript.host.DateCustom
-
public final class DateCustom extends java.lang.Object
Contains some missing features of Rhino NativeDate.
-
-
Constructor Summary
Constructors Modifier Constructor Description private
DateCustom()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description private static long
getDateValue(org.htmlunit.corejs.javascript.Scriptable thisObj)
static java.lang.String
toLocaleDateString(org.htmlunit.corejs.javascript.Context context, org.htmlunit.corejs.javascript.Scriptable scope, org.htmlunit.corejs.javascript.Scriptable thisObj, java.lang.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 java.lang.String
toLocaleTimeString(org.htmlunit.corejs.javascript.Context context, org.htmlunit.corejs.javascript.Scriptable scope, org.htmlunit.corejs.javascript.Scriptable thisObj, java.lang.Object[] args, org.htmlunit.corejs.javascript.Function function)
Converts a date to a string, returning the "time" portion using the current locale's conventions.
-
-
-
Method Detail
-
toLocaleDateString
public static java.lang.String toLocaleDateString(org.htmlunit.corejs.javascript.Context context, org.htmlunit.corejs.javascript.Scriptable scope, org.htmlunit.corejs.javascript.Scriptable thisObj, java.lang.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 java.lang.String toLocaleTimeString(org.htmlunit.corejs.javascript.Context context, org.htmlunit.corejs.javascript.Scriptable scope, org.htmlunit.corejs.javascript.Scriptable thisObj, java.lang.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)
-
-