Class DateCustom

java.lang.Object
org.htmlunit.javascript.host.DateCustom

public final class DateCustom extends Object
Contains some missing features of Rhino NativeDate.
Author:
Ahmed Ashour, Ronald Brill, Frank Danek
  • Method Summary

    Modifier and Type
    Method
    Description
    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.

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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 context
      scope - the scope
      thisObj - the scriptable
      args - the arguments passed into the method
      function - 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 context
      scope - the scope
      thisObj - the scriptable
      args - the arguments passed into the method
      function - the function
      Returns:
      converted string