com.gargoylesoftware.htmlunit.javascript.host
Class DateCustom

java.lang.Object
  extended by com.gargoylesoftware.htmlunit.javascript.host.DateCustom

public final class DateCustom
extends Object

Contains some missing features of Rhino NativeDate.

Version:
$Revision: 8587 $
Author:
Ahmed Ashour, Ronald Brill

Method Summary
static String toLocaleDateString(net.sourceforge.htmlunit.corejs.javascript.Context context, net.sourceforge.htmlunit.corejs.javascript.Scriptable thisObj, Object[] args, net.sourceforge.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(net.sourceforge.htmlunit.corejs.javascript.Context context, net.sourceforge.htmlunit.corejs.javascript.Scriptable thisObj, Object[] args, net.sourceforge.htmlunit.corejs.javascript.Function function)
          Converts a date to a string, returning the "time" portion using the current locale's conventions.
static String toUTCString(net.sourceforge.htmlunit.corejs.javascript.Context context, net.sourceforge.htmlunit.corejs.javascript.Scriptable thisObj, Object[] args, net.sourceforge.htmlunit.corejs.javascript.Function function)
          Converts a date to a UTC string.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

toLocaleDateString

public static String toLocaleDateString(net.sourceforge.htmlunit.corejs.javascript.Context context,
                                        net.sourceforge.htmlunit.corejs.javascript.Scriptable thisObj,
                                        Object[] args,
                                        net.sourceforge.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 context
thisObj - the scriptable
args - the arguments passed into the method
function - the function
Returns:
converted string

toLocaleTimeString

public static String toLocaleTimeString(net.sourceforge.htmlunit.corejs.javascript.Context context,
                                        net.sourceforge.htmlunit.corejs.javascript.Scriptable thisObj,
                                        Object[] args,
                                        net.sourceforge.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 context
thisObj - the scriptable
args - the arguments passed into the method
function - the function
Returns:
converted string

toUTCString

public static String toUTCString(net.sourceforge.htmlunit.corejs.javascript.Context context,
                                 net.sourceforge.htmlunit.corejs.javascript.Scriptable thisObj,
                                 Object[] args,
                                 net.sourceforge.htmlunit.corejs.javascript.Function function)
Converts a date to a UTC string. Special version for IE

Parameters:
context - the JavaScript context
thisObj - the scriptable
args - the arguments passed into the method
function - the function
Returns:
converted string


Copyright © 2002–2013 Gargoyle Software Inc.. All rights reserved.