* completely in the future, but it's likely to be a specialized
* version of the general Xapian query syntax:
*
- * http://xapian.org/docs/queryparser.html
+ * https://xapian.org/docs/queryparser.html
*
* As a special case, passing either a length-zero string, (that is ""),
* or a string consisting of a single asterisk (that is "*"), will
C.notmuch_message_set_flag(self.message, C.notmuch_message_flag_t(flag), v)
}
-// TODO: wrap notmuch_message_get_date
+/* Get the timestamp (seconds since the epoch) of 'message'.
+ *
+ * Return status:
+ *
+ * NOTMUCH_STATUS_SUCCESS: Timestamp successfully retrieved
+ *
+ * NOTMUCH_STATUS_NULL_POINTER: The 'message' argument is NULL
+ *
+ */
+func (self *Message) GetDate() (int64, Status) {
+ if self.message == nil {
+ return -1, STATUS_NULL_POINTER
+ }
+ timestamp := C.notmuch_message_get_date(self.message)
+ return int64(timestamp), STATUS_SUCCESS
+}
/* Get the value of the specified header from 'message'.
*