Class NSDateIntervalFormatter

  • All Implemented Interfaces:
    NSCoding, NSCopying, NSObject

    public class NSDateIntervalFormatter
    extends NSFormatter
    NSDateIntervalFormatter is used to format the range between two NSDates in a locale-sensitive way. NSDateIntervalFormatter returns nil and NO for all methods in NSFormatter.
    • Constructor Detail

      • NSDateIntervalFormatter

        protected NSDateIntervalFormatter​(org.moe.natj.general.Pointer peer)
    • Method Detail

      • accessInstanceVariablesDirectly

        public static boolean accessInstanceVariablesDirectly()
      • allocWithZone

        public static java.lang.Object allocWithZone​(org.moe.natj.general.ptr.VoidPtr zone)
      • automaticallyNotifiesObserversForKey

        public static boolean automaticallyNotifiesObserversForKey​(java.lang.String key)
      • cancelPreviousPerformRequestsWithTarget

        public static void cancelPreviousPerformRequestsWithTarget​(java.lang.Object aTarget)
      • cancelPreviousPerformRequestsWithTargetSelectorObject

        public static void cancelPreviousPerformRequestsWithTargetSelectorObject​(java.lang.Object aTarget,
                                                                                 org.moe.natj.objc.SEL aSelector,
                                                                                 java.lang.Object anArgument)
      • classFallbacksForKeyedArchiver

        public static NSArray<java.lang.String> classFallbacksForKeyedArchiver()
      • classForKeyedUnarchiver

        public static org.moe.natj.objc.Class classForKeyedUnarchiver()
      • debugDescription_static

        public static java.lang.String debugDescription_static()
      • description_static

        public static java.lang.String description_static()
      • hash_static

        public static long hash_static()
      • instanceMethodSignatureForSelector

        public static NSMethodSignature instanceMethodSignatureForSelector​(org.moe.natj.objc.SEL aSelector)
      • instancesRespondToSelector

        public static boolean instancesRespondToSelector​(org.moe.natj.objc.SEL aSelector)
      • isSubclassOfClass

        public static boolean isSubclassOfClass​(org.moe.natj.objc.Class aClass)
      • keyPathsForValuesAffectingValueForKey

        public static NSSet<java.lang.String> keyPathsForValuesAffectingValueForKey​(java.lang.String key)
      • new_objc

        public static java.lang.Object new_objc()
      • resolveClassMethod

        public static boolean resolveClassMethod​(org.moe.natj.objc.SEL sel)
      • resolveInstanceMethod

        public static boolean resolveInstanceMethod​(org.moe.natj.objc.SEL sel)
      • setVersion_static

        public static void setVersion_static​(long aVersion)
      • superclass_static

        public static org.moe.natj.objc.Class superclass_static()
      • version_static

        public static long version_static()
      • calendar

        public NSCalendar calendar()
        default is the calendar of the locale
      • dateStyle

        public long dateStyle()
        default is NSDateIntervalFormatterNoStyle
      • dateTemplate

        public java.lang.String dateTemplate()
        default is an empty string
      • locale

        public NSLocale locale()
        default is [NSLocale currentLocale]
      • setCalendar

        public void setCalendar​(NSCalendar value)
        default is the calendar of the locale
      • setDateStyle

        public void setDateStyle​(long value)
        default is NSDateIntervalFormatterNoStyle
      • setDateTemplate

        public void setDateTemplate​(java.lang.String value)
        default is an empty string
      • setLocale

        public void setLocale​(NSLocale value)
        default is [NSLocale currentLocale]
      • setTimeStyle

        public void setTimeStyle​(long value)
        default is NSDateIntervalFormatterNoStyle
      • setTimeZone

        public void setTimeZone​(NSTimeZone value)
        default is [NSTimeZone defaultTimeZone]
      • stringFromDateToDate

        public java.lang.String stringFromDateToDate​(NSDate fromDate,
                                                     NSDate toDate)
        If the range smaller than the resolution specified by the dateTemplate, a single date format will be produced. If the range is larger than the format specified by the dateTemplate, a locale-specific fallback will be used to format the items missing from the pattern. For example, if the range is 2010-03-04 07:56 - 2010-03-04 19:56 (12 hours) - The pattern jm will produce for en_US, "7:56 AM - 7:56 PM" for en_GB, "7:56 - 19:56" - The pattern MMMd will produce for en_US, "Mar 4" for en_GB, "4 Mar" If the range is 2010-03-04 07:56 - 2010-03-08 16:11 (4 days, 8 hours, 15 minutes) - The pattern jm will produce for en_US, "3/4/2010 7:56 AM - 3/8/2010 4:11 PM" for en_GB, "4/3/2010 7:56 - 8/3/2010 16:11" - The pattern MMMd will produce for en_US, "Mar 4-8" for en_GB, "4-8 Mar"
      • stringFromDateInterval

        public java.lang.String stringFromDateInterval​(NSDateInterval dateInterval)
      • timeStyle

        public long timeStyle()
        default is NSDateIntervalFormatterNoStyle
      • timeZone

        public NSTimeZone timeZone()
        default is [NSTimeZone defaultTimeZone]