Skip to content

Commit

Permalink
Added comments to DateToTimestampTransformer
Browse files Browse the repository at this point in the history
  • Loading branch information
Chandlerdea committed Dec 3, 2017
1 parent d448f37 commit 31c67cf
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions DateTransfomer/DateToTimestampTransformer.swift
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@ public final class DateToTimestampTransformer: ValueTransformer {

// MARK: - Public Methods

/**
Transforms a `Date` into a timestamp (3 minutes ago, 1 week ago....)
- parameter date: The date, in the past, that the timestamp is referencing
- returns: A string timestamp
*/
public func transformDate(_ date: Date) -> String? {
return self.transformedValue(date) as? String
}
Expand Down

0 comments on commit 31c67cf

Please sign in to comment.