Formatter

class Formatter : NSObject, NSCopying, NSCoding
  • ISO 8601 date formatter.

    Declaration

    Swift

    private static let iso8601Formatter: DateFormatter
  • Returns a ISO-8601 representation of provided date.

    Declaration

    Swift

    class func is8601FormattedDate(date: Date) -> String

    Parameters

    date

    <#date description#>

    Return Value

    <#return value description#>

  • Return formatted string represent how long time elapsed since provided date. eg, 2 MINS AGO if provided date is withing now and Yesterday. Otherwise, returned date string representation.

    Declaration

    Swift

    class func formattedStringForElapsedTimeSince(sinceDate: Date) -> String

    Parameters

    sinceDate

    <#sinceDate description#>

    Return Value

    <#return value description#>

  • Declaration

    Swift

    class func formattedTimeStampStringForElapsedTimeSince(sinceDate: Date) -> String

    Parameters

    sinceDate

    <#sinceDate description#>

    Return Value

    <#return value description#>

  • Return a formatted string represting time part of specified date. eg, 12:45 PM

    Declaration

    Swift

    class func formattedTimeFromDate(d: Date) -> String

    Parameters

    d

    <#d description#>

    Return Value

    <#return value description#>

  • Return a formatted date string representation of specified date. eg, 12 JUN

    Declaration

    Swift

    class func formattedDateFromDate(d: Date) -> String

    Parameters

    d

    <#d description#>

    Return Value

    <#return value description#>

  • returns the date of format 13th Jul 2018

    Declaration

    Swift

    class func formattedDateWithYearFormat(d: Date) -> String

    Parameters

    d

    date to be formatted

    Return Value

  • <#Description#>

    Declaration

    Swift

    class func formattedCountNumberFrom(number: Int) -> String

    Parameters

    number

    <#number description#>

    Return Value

    <#return value description#>

  • Return a formatted date string representation of specified date. eg, 12th NOV, 3:45 PM

    Declaration

    Swift

    class func convertToOrdinalDateFormat(date: Date) -> String
  • Undocumented

    Declaration

    Swift

    class func convertToOrdinalDateFormatWithoutTime(date: Date) -> String