Because this is code is in an if statement which checks for "||" in the format.  The single format cases use a standard formatter which work for both printing and parsing.  This code creates a formatter which uses all of the formats to parse a date but only the first format for printing a date