DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=26922>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=26922

public static boolean DateUtils.equals(Date dt1, Date dt2) ?

           Summary: public static boolean DateUtils.equals(Date dt1, Date
                    dt2) ?
           Product: Commons
           Version: 2.0 Final
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: Lang
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]


Hello,

In org.apache.commons.lang.StringUtils, we can find StringUtils.equals(?,?). 
org.apache.commons.lang.time.DateUtils should have the same. Like this :

    /**
     * <p>Compares two Dates, returning <code>true</code> if they are equal.</p>
     *
     * <p><code>null</code>s are handled without exceptions. Two 
<code>null</code>
     * references are considered to be equal.</p>
     *
     * <pre>
     * DateUtils.equals(null, null)   = true
     * DateUtils.equals(null, "abc")  = false
     * DateUtils.equals("abc", null)  = false
     * DateUtils.equals("abc", "abc") = true
     * DateUtils.equals("abc", "ABC") = false
     * </pre>
     *
     * @see java.util.Date#equals(Object)
     * @param dt1  the first Date, may be null
     * @param dt2  the second Date, may be null
     * @return <code>true</code> if the Dates are equal or both 
<code>null</code>
     */
          public static boolean equals(Date dt1, Date dt2) {
              return (dt1 == null ? dt2 == null : dt1.equals(dt2));
          }

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to