Package apple.foundation.enums
Class NSFormattingContext
- java.lang.Object
-
- apple.foundation.enums.NSFormattingContext
-
public final class NSFormattingContext extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description static longBeginningOfSentenceThe capitalization context if a date or date symbol is to be formatted with capitalization appropriate for the beginning of a sentence.static longDynamicThe capitalization context is determined dynamically from the set {NSFormattingContextStandalone, NSFormattingContextBeginningOfSentence, NSFormattingContextMiddleOfSentence}.static longListItemThe capitalization context if a date or date symbol is to be formatted with capitalization appropriate for a list or menu item.static longMiddleOfSentenceThe capitalization context if a date or date symbol is to be formatted with capitalization appropriate for the middle of a sentence.static longStandaloneThe capitalization context if a date or date symbol is to be formatted with capitalization appropriate for stand-alone usage such as an isolated name on a calendar page.static longUnknownThe capitalization context to be used is unknown (this is the default value).
-
-
-
Field Detail
-
Unknown
public static final long Unknown
The capitalization context to be used is unknown (this is the default value).- See Also:
- Constant Field Values
-
Dynamic
public static final long Dynamic
The capitalization context is determined dynamically from the set {NSFormattingContextStandalone, NSFormattingContextBeginningOfSentence, NSFormattingContextMiddleOfSentence}. For example, if a date is placed at the beginning of a sentence, NSFormattingContextBeginningOfSentence is used to format the string automatically. When this context is used, the formatter will return a string proxy that works like a normal string in most cases. After returning from the formatter, the string in the string proxy is formatted by using NSFormattingContextUnknown. When the string proxy is used in stringWithFormat:, we can determine where the %@ is and then set the context accordingly. With the new context, the string in the string proxy will be formatted again and be put into the final string returned from stringWithFormat:.- See Also:
- Constant Field Values
-
Standalone
public static final long Standalone
The capitalization context if a date or date symbol is to be formatted with capitalization appropriate for stand-alone usage such as an isolated name on a calendar page.- See Also:
- Constant Field Values
-
ListItem
public static final long ListItem
The capitalization context if a date or date symbol is to be formatted with capitalization appropriate for a list or menu item.- See Also:
- Constant Field Values
-
BeginningOfSentence
public static final long BeginningOfSentence
The capitalization context if a date or date symbol is to be formatted with capitalization appropriate for the beginning of a sentence.- See Also:
- Constant Field Values
-
MiddleOfSentence
public static final long MiddleOfSentence
The capitalization context if a date or date symbol is to be formatted with capitalization appropriate for the middle of a sentence.- See Also:
- Constant Field Values
-
-