Typescript Get Max Date In Array Javascript Methods For Querying