Meta Interview Question

Date structure related code and query