Uploaded image for project: 'Groovy'
  1. Groovy
  2. GROOVY-4788

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

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 1.7.8
    • 1.8.0, 2.0-beta-3, 1.7.11
    • groovy-jdk
    • None

    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)

      Attachments

        Activity

          People

            paulk Paul King
            hlship Howard Lewis Ship
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: