import { Pipe, PipeTransform } from '@angular/core'

@Pipe({
  name: 'duration',
})
export class DurationPipe implements PipeTransform {
  transform(start: string, finish: string): number {
    return (new Date(finish).valueOf() - new Date(start).valueOf()) / 1000 / 60
  }
}
