Fix logic on determining date for APEL interface.

Pull to fix logic when determining the APEL interface.