[HtmlUnit] SVN: [15516] trunk/htmlunit/src

rbri--- via HtmlUnit-develop <[email protected]> Sun, 12 Aug 2018 12:32:27 +0000
Newsgroups gmane.comp.java.htmlunit.devel
Message-ID <[email protected]>
Revision: 15516
          http://sourceforge.net/p/htmlunit/code/15516
Author:   rbri
Date:     2018-08-12 12:32:23 +0000 (Sun, 12 Aug 2018)
Log Message:
-----------
method Date.toUTCString() is available in Rhino; remove our own impl

Modified Paths:
--------------
    trunk/htmlunit/src/changes/changes.xml
    trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/DateCustom.java

Modified: trunk/htmlunit/src/changes/changes.xml
===================================================================
--- trunk/htmlunit/src/changes/changes.xml	2018-08-10 18:13:24 UTC (rev 15515)
+++ trunk/htmlunit/src/changes/changes.xml	2018-08-12 12:32:23 UTC (rev 15516)
@@ -8,12 +8,15 @@
 
     <body>
         <release version="2.33" date="xxxx, 2018" description="Bugfixes">
+            <action type="update" dev="rbri">
+                Method Date.toUTCString() is available in Rhino; remove our own impl.
+            </action>
             <action type="fix" dev="rbri" issue="1979" due-to="Atsushi Nakagawa">
                 Fix the order of the windows returned by WebClient.getTopLevelWindows()
                 to be again the same as WebClient.getWebWindows().
             </action>
             <action type="fix" dev="rbri" issue="1980" due-to="Atsushi Nakagawa">
-                Improved support for javascript named function expressions.
+                Improved support for javascript named function expressions (core-js).
             </action>
             <action type="fix" dev="rbri" issue="1982" due-to="Steve Harney">
                 DomNodeIterator no longer traverses uncles of root node.

Modified: trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/DateCustom.java
===================================================================
--- trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/DateCustom.java	2018-08-10 18:13:24 UTC (rev 15515)
+++ trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/DateCustom.java	2018-08-12 12:32:23 UTC (rev 15516)
@@ -19,9 +19,7 @@
 
 import java.util.Date;
 import java.util.Locale;
-import java.util.TimeZone;
 
-import org.apache.commons.lang3.time.DateFormatUtils;
 import org.apache.commons.lang3.time.FastDateFormat;
 
 import com.gargoylesoftware.htmlunit.BrowserVersion;
@@ -39,8 +37,6 @@
  */
 public final class DateCustom {
 
-    private static final TimeZone UTC_TIME_ZONE = TimeZone.getTimeZone("UTC");
-
     private DateCustom() { }
 
     /**
@@ -94,20 +90,6 @@
         return format.format(getDateValue(thisObj));
     }
 
-    /**
-     * Converts a date to a UTC string. Special version for IE
-     * @param context the JavaScript context
-     * @param thisObj the scriptable
-     * @param args the arguments passed into the method
-     * @param function the function
-     * @return converted string
-     */
-    public static String toUTCString(
-            final Context context, final Scriptable thisObj, final Object[] args, final Function function) {
-        final Date date = new Date(getDateValue(thisObj));
-        return DateFormatUtils.format(date, "EEE, d MMM yyyy HH:mm:ss z", UTC_TIME_ZONE, Locale.ENGLISH);
-    }
-
     private static long getDateValue(final Scriptable thisObj) {
         final Date date = (Date) Context.jsToJava(thisObj, Date.class);
         return date.getTime();


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot