Class NSDateComponentsFormatter

All Implemented Interfaces:
NSCoding, NSObjectProtocol, ObjCProtocol

public class NSDateComponentsFormatter
extends NSFormatter
  • Constructor Details

    • NSDateComponentsFormatter

      public NSDateComponentsFormatter()
    • NSDateComponentsFormatter

      protected NSDateComponentsFormatter​(NSObject.Handle h, long handle)
    • NSDateComponentsFormatter

      protected NSDateComponentsFormatter​(NSObject.SkipInit skipInit)
  • Method Details

    • getUnitsStyle

      public NSDateComponentsFormatterUnitsStyle getUnitsStyle()
    • setUnitsStyle

      public void setUnitsStyle​(NSDateComponentsFormatterUnitsStyle v)
    • getAllowedUnits

      public NSCalendarUnit getAllowedUnits()
    • setAllowedUnits

      public void setAllowedUnits​(NSCalendarUnit v)
    • getZeroFormattingBehavior

      public NSDateComponentsFormatterZeroFormattingBehavior getZeroFormattingBehavior()
    • setZeroFormattingBehavior

      public void setZeroFormattingBehavior​(NSDateComponentsFormatterZeroFormattingBehavior v)
    • getCalendar

      public NSCalendar getCalendar()
    • setCalendar

      public void setCalendar​(NSCalendar v)
    • getReferenceDate

      public NSDate getReferenceDate()
      Since:
      Available in iOS 11.0 and later.
    • setReferenceDate

      public void setReferenceDate​(NSDate v)
      Since:
      Available in iOS 11.0 and later.
    • allowsFractionalUnits

      public boolean allowsFractionalUnits()
    • setAllowsFractionalUnits

      public void setAllowsFractionalUnits​(boolean v)
    • getMaximumUnitCount

      public long getMaximumUnitCount()
    • setMaximumUnitCount

      public void setMaximumUnitCount​(long v)
    • collapsesLargestUnit

      public boolean collapsesLargestUnit()
    • setCollapsesLargestUnit

      public void setCollapsesLargestUnit​(boolean v)
    • includesApproximationPhrase

      public boolean includesApproximationPhrase()
    • setIncludesApproximationPhrase

      public void setIncludesApproximationPhrase​(boolean v)
    • includesTimeRemainingPhrase

      public boolean includesTimeRemainingPhrase()
    • setIncludesTimeRemainingPhrase

      public void setIncludesTimeRemainingPhrase​(boolean v)
    • getFormattingContext

      public NSFormattingContext getFormattingContext()
    • setFormattingContext

      public void setFormattingContext​(NSFormattingContext v)
    • format

      public String format​(NSObject obj)
    • format

      public String format​(NSDateComponents components)
    • format

      public String format​(NSDate startDate, NSDate endDate)
    • format

      public String format​(double ti)