Skip to content

Commit

Permalink
added conversion into xcsdate format
Browse files Browse the repository at this point in the history
  • Loading branch information
czechboy0 committed Jan 20, 2016
1 parent 352e709 commit ee02cc4
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions Source/TimeUtils.swift
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,14 @@ public extension NSDate {

return formatter.dateFromString(date)
}

class public func XCSStringFromDate(date: NSDate) -> String? {
// XCS date formatter
let formatter = NSDateFormatter()
formatter.dateFormat = "yyyy-MM-dd'T'HH:mm:ss.SSSZZZZ"

return formatter.stringFromDate(date)
}
}

public class TimeUtils {
Expand Down

0 comments on commit ee02cc4

Please sign in to comment.