groovy
  1. groovy
  2. GROOVY-4788

The clearTime() method added to java.*.Date should return the modified Date for a more fluent API

    Details

    • Type: Improvement Improvement
    • Status: Closed Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 1.7.8
    • Fix Version/s: 1.8.0, 2.0-beta-3, 1.7.11
    • Component/s: groovy-jdk
    • Labels:
      None
    • Number of attachments :
      0

      Description

      I have some test code using this. It looks like this:

      def auctionStart = new Date()

      auctionStart.clearTime()

      def callStart = auctionStart.plus(10)

      I'd prefer it to look like:

      def auctionStart = new Date().clearTime()

      def callStart = auctionStart.plus(10)

        Activity

        Hide
        Paul King added a comment -

        Thanks for the suggestion. Added.

        Show
        Paul King added a comment - Thanks for the suggestion. Added.
        Hide
        Paul King added a comment -

        The original fix wasn't applied to trunk but now has been.

        Show
        Paul King added a comment - The original fix wasn't applied to trunk but now has been.

          People

          • Assignee:
            Paul King
            Reporter:
            Howard M. Lewis Ship
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: