extract midnights