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

System.currentTimeSecond() method request

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Closed
    • Trivial
    • Resolution: Fixed
    • None
    • 2.4.0-beta-2
    • groovy-jdk

    Description

      such a method added to the System class would be extremely useful. An example use case is setting the lastModified date of a file where dividing the milliseconds by 1000 results in a BigDecimal object instead of a long. Of course one could simply cast it to a long, but having a method like this is a far more groovy solution.

      A method like this would also go a long way towards eliminating boilerplate with regards to date objects and any time-related functions in general.

      Attachments

        Activity

          People

            paulk Paul King
            abrarsyed Abrar Syed
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: