Most often you use a pattern, i.e. a sequence of pattern elements. The type of pattern is derived from the type (or possibly types) of the included pattern elements. The type affects the interpretation of ambiguous pattern elements, such as MM (minute or month). In case a single type is not derivable, defaults take effect. For instance, a single
MM, or together with other date pattern elements, is interpreted as month. But with other time pattern elements,
MM is interpreted as minute.
General pattern elements have any type. Most non-literal pattern elements have only one type. For example, D stands for day of month (1-2 digits) and has type date only.
s stands for sign (minus sign if the value is negative, nothing otherwise) and has type
num.
MM has type
time (for minutes) or
date (for months).