Fix date to prevent argument out of range error