getOrganizationAge.tsx 292 B

12345678
  1. import moment from 'moment';
  2. import {Organization} from 'sentry/types';
  3. export default function getOrganizationAge(organization: Organization) {
  4. const dateCreated = moment(organization.dateCreated).utc().startOf('day');
  5. return moment().utc().startOf('day').diff(dateCreated, 'days');
  6. }