Add support for multiple input formats

Momentjs supports using an array for the input format. This patch makes it
possible to use that for this component as well. If an array is given
instead of a scalar value, the first one will be used as the output (or
display) format.