In Scala, is it possible to get number of days between XMLGregorianCalendar? I cannot find any methods in this class that gets the range of two dates. If not how are you guys doing it?
            Asked
            
        
        
            Active
            
        
            Viewed 765 times
        
    0
            
            
        - 
                    Possible duplicate of [Java, Calculate the number of days between two dates](http://stackoverflow.com/questions/7103064/java-calculate-the-number-of-days-between-two-dates) – shmosel Jan 06 '17 at 04:22
1 Answers
0
            
            
        Ah I guess not I just went with this instead and it works fine:
val range:Long = (toDate.toGregorianCalendar.getTimeInMillis - fromDate.toGregorianCalendar.getTimeInMillis) / (1000 * 60 * 60 * 24)
 
    
    
        jonprasetyo
        
- 3,356
- 3
- 32
- 48