Class DateCustom

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

public final class DateCustom extends Object
Contains some missing features of Rhino NativeDate.
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    private
     
  • Method Summary

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

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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 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
    • getDateValue

      private static long getDateValue(org.htmlunit.corejs.javascript.Scriptable thisObj)