You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Paul Benedict (JIRA)" <ji...@apache.org> on 2010/02/27 04:32:05 UTC

[jira] Resolved: (LANG-594) DateUtils equal & compare functions up to most significant field

     [ https://issues.apache.org/jira/browse/LANG-594?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Paul Benedict resolved LANG-594.
--------------------------------

    Resolution: Fixed

Added new methods: truncatedEquals and truncatedCompareTo

> DateUtils equal & compare functions up to most significant field
> ----------------------------------------------------------------
>
>                 Key: LANG-594
>                 URL: https://issues.apache.org/jira/browse/LANG-594
>             Project: Commons Lang
>          Issue Type: New Feature
>          Components: lang.*
>            Reporter: Paul Benedict
>            Assignee: Paul Benedict
>            Priority: Minor
>             Fix For: 3.0
>
>
> 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. timestamps).
> {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.