def aggregationToMonthsSeconds(interval):
 seconds = (interval.get('microseconds', 0) * 1e-06)
 seconds += (interval.get('milliseconds', 0) * 0.001)
 seconds += interval.get('seconds', 0)
 seconds += (interval.get('minutes', 0) * 60)
 seconds += ((interval.get('hours', 0) * 60) * 60)
 seconds += (((interval.get('days', 0) * 24) * 60) * 60)
 seconds += ((((interval.get('weeks', 0) * 7) * 24) * 60) * 60)
 months = interval.get('months', 0)
 months += (12 * interval.get('years', 0))
 return {'months': months, 'seconds': seconds}

def aggregationToMonthsSeconds ( interval ) : seconds = ( interval . get ( 'microseconds' , 0 ) * 1e-06 ) seconds += ( interval . get ( 'milliseconds' , 0 ) * 0.001 ) seconds += interval . get ( 'seconds' , 0 ) seconds += ( interval . get ( 'minutes' , 0 ) * 60 ) seconds += ( ( interval . get ( 'hours' , 0 ) * 60 ) * 60 ) seconds += ( ( ( interval . get ( 'days' , 0 ) * 24 ) * 60 ) * 60 ) seconds += ( ( ( ( interval . get ( 'weeks' , 0 ) * 7 ) * 24 ) * 60 ) * 60 ) months = interval . get ( 'months' , 0 ) months += ( 12 * interval . get ( 'years' , 0 ) ) return { 'months' : months , 'seconds' : seconds }
return the number of months and seconds from an aggregation dict that represents a date and time .