Commons Lang
  1. Commons Lang
  2. LANG-123

[lang] Unclear javadoc for DateUtils.iterator()

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0
    • Fix Version/s: 2.2
    • Component/s: None
    • Labels:
      None
    • Environment:

      Operating System: All
      Platform: All

      Description

      The javadoc for DateUtils.iterator() seems to say that the iterator returned
      will only have two dates: the start date and the end date. If it iterates over
      more dates, which interval is use: hour, day, week or something else?

      "For instance, passing Thursday, July 4, 2002 and a RANGE_MONTH_SUNDAY will
      return an Iterator that starting with Sunday, June 30, 2002 iterates over every
      day (at midnight) until with Saturday, August 3, 2002."

      Also the Date version of the method does not say that the iterator returns
      Calendar and not Date as I would have expected given the method signature.

        Activity

        Hide
        Stephen Colebourne added a comment -

        Javadoc enhanced in svn 394555

        We might want to consider deprecating these iterator methods as being a bit
        rubbish though.

        Show
        Stephen Colebourne added a comment - Javadoc enhanced in svn 394555 We might want to consider deprecating these iterator methods as being a bit rubbish though.
        Hide
        Henri Yandell added a comment -

        Definitely unclear. Reading the comment, I'm not sure I know what the code does

        Show
        Henri Yandell added a comment - Definitely unclear. Reading the comment, I'm not sure I know what the code does

          People

          • Assignee:
            Unassigned
            Reporter:
            Hack Kampbjorn
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development