/**@class android.text.format.DateFormat @extends java.lang.Object Utility class for producing strings with formatted date/time. <p>Most callers should avoid supplying their own format strings to this class' {@code format} methods and rely on the correctly localized ones supplied by the system. This class' factory methods return appropriately-localized {@link java.text.DateFormat} instances, suitable for both formatting and parsing dates. For the canonical documentation of format strings, see {@link java.text.SimpleDateFormat}. <p>In cases where the system does not provide a suitable pattern, this class offers the {@link #getBestDateTimePattern} method. <p>The {@code format} methods in this class implement a subset of Unicode <a href="http://www.unicode.org/reports/tr35/#Date_Format_Patterns">UTS #35</a> patterns. The subset currently supported by this class includes the following format characters: {@code acdEHhLKkLMmsyz}. Up to API level 17, only {@code adEhkMmszy} were supported. Note that this class incorrectly implements {@code k} as if it were {@code H} for backwards compatibility. <p>See {@link java.text.SimpleDateFormat} for more documentation about patterns, or if you need a more complete or correct implementation. Note that the non-{@code format} methods in this class are implemented by {@code SimpleDateFormat}. */ var DateFormat = { /** @deprecated Use a literal {@code '} instead. @removed */ QUOTE : "39", /** @deprecated Use a literal {@code 'a'} instead. @removed */ AM_PM : "97", /** @deprecated Use a literal {@code 'a'} instead; 'A' was always equivalent to 'a'. @removed */ CAPITAL_AM_PM : "65", /** @deprecated Use a literal {@code 'd'} instead. @removed */ DATE : "100", /** @deprecated Use a literal {@code 'E'} instead. @removed */ DAY : "69", /** @deprecated Use a literal {@code 'h'} instead. @removed */ HOUR : "104", /** @deprecated Use a literal {@code 'H'} (for compatibility with {@link SimpleDateFormat} and Unicode) or {@code 'k'} (for compatibility with Android releases up to and including Jelly Bean MR-1) instead. Note that the two are incompatible. @removed */ HOUR_OF_DAY : "107", /** @deprecated Use a literal {@code 'm'} instead. @removed */ MINUTE : "109", /** @deprecated Use a literal {@code 'M'} instead. @removed */ MONTH : "77", /** @deprecated Use a literal {@code 'L'} instead. @removed */ STANDALONE_MONTH : "76", /** @deprecated Use a literal {@code 's'} instead. @removed */ SECONDS : "115", /** @deprecated Use a literal {@code 'z'} instead. @removed */ TIME_ZONE : "122", /** @deprecated Use a literal {@code 'y'} instead. @removed */ YEAR : "121", /**Returns true if times should be formatted as 24 hour times, false if times should be formatted as 12 hour (AM/PM) times. Based on the user's chosen locale and other preferences. @param {Object {Context}} context the context to use for the content resolver @return {Boolean} true if 24 hour time format is selected, false otherwise. */ is24HourFormat : function( ) {}, /**Returns true if times should be formatted as 24 hour times, false if times should be formatted as 12 hour (AM/PM) times. Based on the user's chosen locale and other preferences. @param {Object {Context}} context the context to use for the content resolver @param {Number} userHandle the user handle of the user to query. @return {Boolean} true if 24 hour time format is selected, false otherwise. @hide */ is24HourFormat : function( ) {}, /**Returns true if the specified locale uses a 24-hour time format by default, ignoring user settings. @param {Object {Locale}} locale the locale to check @return {Boolean} true if the locale uses a 24 hour time format by default, false otherwise @hide */ is24HourLocale : function( ) {}, /**Returns the best possible localized form of the given skeleton for the given locale. A skeleton is similar to, and uses the same format characters as, a Unicode <a href="http://www.unicode.org/reports/tr35/#Date_Format_Patterns">UTS #35</a> pattern. <p>One difference is that order is irrelevant. For example, "MMMMd" will return "MMMM d" in the {@code en_US} locale, but "d. MMMM" in the {@code de_CH} locale. <p>Note also in that second example that the necessary punctuation for German was added. For the same input in {@code es_ES}, we'd have even more extra text: "d 'de' MMMM". <p>This method will automatically correct for grammatical necessity. Given the same "MMMMd" input, this method will return "d LLLL" in the {@code fa_IR} locale, where stand-alone months are necessary. Lengths are preserved where meaningful, so "Md" would give a different result to "MMMd", say, except in a locale such as {@code ja_JP} where there is only one length of month. <p>This method will only return patterns that are in CLDR, and is useful whenever you know what elements you want in your format string but don't want to make your code specific to any one locale. @param {Object {Locale}} locale the locale into which the skeleton should be localized @param {String} skeleton a skeleton as described above @return {String} a string pattern suitable for use with {@link java.text.SimpleDateFormat}. */ getBestDateTimePattern : function( ) {}, /**Returns a {@link java.text.DateFormat} object that can format the time according to the context's locale and the user's 12-/24-hour clock preference. @param {Object {Context}} context the application context @return {Object {java.text.DateFormat}} the {@link java.text.DateFormat} object that properly formats the time. */ getTimeFormat : function( ) {}, /**Returns a String pattern that can be used to format the time according to the context's locale and the user's 12-/24-hour clock preference. @param {Object {Context}} context the application context @hide */ getTimeFormatString : function( ) {}, /**Returns a String pattern that can be used to format the time according to the context's locale and the user's 12-/24-hour clock preference. @param {Object {Context}} context the application context @param {Number} userHandle the user handle of the user to query the format for @hide */ getTimeFormatString : function( ) {}, /**Returns a {@link java.text.DateFormat} object that can format the date in short form according to the context's locale. @param {Object {Context}} context the application context @return {Object {java.text.DateFormat}} the {@link java.text.DateFormat} object that properly formats the date. */ getDateFormat : function( ) {}, /**Returns a {@link java.text.DateFormat} object that can format the date in long form (such as {@code Monday, January 3, 2000}) for the context's locale. @param {Object {Context}} context the application context @return {Object {java.text.DateFormat}} the {@link java.text.DateFormat} object that formats the date in long form. */ getLongDateFormat : function( ) {}, /**Returns a {@link java.text.DateFormat} object that can format the date in medium form (such as {@code Jan 3, 2000}) for the context's locale. @param {Object {Context}} context the application context @return {Object {java.text.DateFormat}} the {@link java.text.DateFormat} object that formats the date in long form. */ getMediumDateFormat : function( ) {}, /**Gets the current date format stored as a char array. Returns a 3 element array containing the day ({@code 'd'}), month ({@code 'M'}), and year ({@code 'y'})) in the order specified by the user's format preference. Note that this order is <i>only</i> appropriate for all-numeric dates; spelled-out (MEDIUM and LONG) dates will generally contain other punctuation, spaces, or words, not just the day, month, and year, and not necessarily in the same order returned here. */ getDateFormatOrder : function( ) {}, /**Given a format string and a time in milliseconds since Jan 1, 1970 GMT, returns a CharSequence containing the requested date. @param {Object {CharSequence}} inFormat the format string, as described in {@link android.text.format.DateFormat} @param {Number} inTimeInMillis in milliseconds since Jan 1, 1970 GMT @return {Object {java.lang.CharSequence}} a {@link CharSequence} containing the requested text */ format : function( ) {}, /**Given a format string and a {@link java.util.Date} object, returns a CharSequence containing the requested date. @param {Object {CharSequence}} inFormat the format string, as described in {@link android.text.format.DateFormat} @param {Object {Date}} inDate the date to format @return {Object {java.lang.CharSequence}} a {@link CharSequence} containing the requested text */ format : function( ) {}, /**Indicates whether the specified format string contains seconds. Always returns false if the input format is null. @param {Object {CharSequence}} inFormat the format string, as described in {@link android.text.format.DateFormat} @return {Boolean} true if the format string contains {@link #SECONDS}, false otherwise @hide */ hasSeconds : function( ) {}, /**Test if a format string contains the given designator. Always returns {@code false} if the input format is {@code null}. Note that this is intended for searching for designators, not arbitrary characters. So searching for a literal single quote would not work correctly. @hide */ hasDesignator : function( ) {}, /**Given a format string and a {@link java.util.Calendar} object, returns a CharSequence containing the requested date. @param {Object {CharSequence}} inFormat the format string, as described in {@link android.text.format.DateFormat} @param {Object {Calendar}} inDate the date to format @return {Object {java.lang.CharSequence}} a {@link CharSequence} containing the requested text */ format : function( ) {}, /**Strips quotation marks from the {@code formatString} and appends the result back to the {@code formatString}. @param {Object {SpannableStringBuilder}} formatString the format string, as described in {@link android.text.format.DateFormat}, to be modified @param {Number} index index of the first quote @return {Number} the length of the quoted text that was appended. @hide */ appendQuotedText : function( ) {}, };