commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Henri Yandell (JIRA)" <>
Subject [jira] Updated: (LANG-594) DateUtils equal & compare functions up to most significant field
Date Fri, 26 Feb 2010 04:32:30 GMT


Henri Yandell updated LANG-594:

    Fix Version/s:     (was: 3.0)

Moving to 3.1 until code shows up.

Date code in general has the "the JDK is so buggy that we'll spend ages maintaining this"
warning. Still, does seem basic enough to be worth the cost.

> DateUtils equal & compare functions up to most significant field
> ----------------------------------------------------------------
>                 Key: LANG-594
>                 URL:
>             Project: Commons Lang
>          Issue Type: New Feature
>          Components: lang.*
>            Reporter: Paul Benedict
>            Assignee: Paul Benedict
>            Priority: Minor
>             Fix For: 3.1
> DateUtils.truncate() is great to get rid of all data except the most significant field.
I suggest two new methods to perform comparisons of the like. This would be especially useful
in integration tests with databases where precision is based on the column type (date vs.
> {code} 
> DateUtils.equals(Date d1, Date d2, int field);
> DateUtils.compareTo(Date d1, Date d2, int field);
> {code}

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message