how can i know the ticket of the Reports is out of date through a code

how can i know the ticket of the Reports is out of date through a code

how can i know the ticket of the Reports is out of date through a code,i need a code marking the ticket is out of date