 
 /// This class bundles together the values which will be used to set a cookie in the outgoing response
 public struct Cookie {
+    
+    public enum Expiration {
+        case session
+        case relativeSeconds(Int)
+        case absoluteSeconds(Int)
+        case absoluteDate(String)
+    }
+    
 	public let name: String?
 	public let value: String?
 	public let domain: String?
-	public let expires: String?
-	public let expiresIn: Double // seconds from now. may be negative. 0.0 means no expiry (session cookie)
+	public let expires: Expiration?
 	public let path: String?
 	public let secure: Bool?
 	public let httpOnly: Bool?

				cookieLine.append(cookie.name!.stringByEncodingURL)
				cookieLine.append("=")
				cookieLine.append(cookie.value!.stringByEncodingURL)
				if cookie.expiresIn != 0.0 {
					let formattedDate = try! formatDate(now + secondsToICUDate(Int(cookie.expiresIn)*60),
					                                    format: "%a, %d-%b-%Y %T GMT", timezone: "GMT")
					cookieLine.append(";expires=" + formattedDate)
				}
				if let path = cookie.path {
					cookieLine.append("; path=" + path)
				}

			self.value = value
			self.domain = domain
			self.expires = expires
			self.path = path
			self.secure = secure
			self.httpOnly = httpOnly
