public void ParseTime(string text, string timezone, TimeFormat timeFormat, DateTimeCallback callback) { //TODO: handle this with DateConverter if SearchMode is local. Dictionary<string, string> parameters = new Dictionary<string, string>(); parameters["text"] = text; parameters["dateFormat"] = ((int)timeFormat).ToString(); if (!string.IsNullOrEmpty(timezone)) parameters["timezone"] = timezone; GetResponse("rtm.time.parse", parameters, (response) => { callback(response.Time.Time); }); }
public void ParseTime(string text, string timezone, TimeFormat timeFormat, DateTimeCallback callback) { Dictionary<string, string> parameters = new Dictionary<string, string>(); parameters["text"] = text; parameters["dateFormat"] = ((int)timeFormat).ToString(); if (!string.IsNullOrEmpty(timezone)) parameters["timezone"] = timezone; GetResponse("rtm.time.parse", parameters, (response) => { callback(response.Time.Time); }); }