Class 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.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • DateCustom

        private DateCustom()
    • 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 context
        scope - the scope
        thisObj - the scriptable
        args - the arguments passed into the method
        function - 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 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)