Added credit for date function