Created
          June 1, 2016 14:29 
        
      - 
      
 - 
        
Save bdkosher/4107e8f499e2d3e1d2adab0c25c77508 to your computer and use it in GitHub Desktop.  
    For those curious to know when Robert Trujillo's stint with Metallica will (or did) surpass Jason Newsted's.
  
        
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | def today = new Date() | |
| def date(str) { Date.parse('yyyyMMdd', str) } | |
| def newstedStint = date('20010117') - date('19861108') | |
| def trujilloStint = today - date('20030224') | |
| def diff = newstedStint - trujilloStint | |
| // FIXME: "1 days" --> "1 day" | |
| println "Trujillo's stint ${diff < 0 ? 'surpassed Newsted\'s ' + Math.abs(diff) + ' days ago' : 'will surpass Newsted\'s in ' + diff + ' days'} on ${(today + diff).format('MMM d, yyyy')}" | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment