addressed Inci's comments
diff --git a/asterix-doc/src/site/markdown/aql/allens.md b/asterix-doc/src/site/markdown/aql/allens.md
new file mode 100644
index 0000000..4367d77
--- /dev/null
+++ b/asterix-doc/src/site/markdown/aql/allens.md
@@ -0,0 +1,224 @@
+# AsterixDB Temporal Functions: Allen's Relations #
+
+## About Allen's Relations ##
+
+AsterixDB supports Allen's relations over interval types. Allen's relations are also called Allen's interval algebra. There are totally 13 base relations described by this algebra, and all of them are supported in AsterixDB (note that `interval-equals` is supported by the `=` comparison symbol so there is no extra function for it). 
+
+A detailed description of Allen's relations can be found from its [wikipedia entry](http://http://en.wikipedia.org/wiki/Allen's_interval_algebra). 
+
+## Allen's Relations Functions ##
+
+### interval-before, interval-after ###
+
+ * Syntax:
+
+        interval-before(interval1, interval2)
+        interval-after(interval1, interval2)
+
+ * These two functions check whether an interval happens before/after another interval. 
+ * Arguments:
+   * `interval1`, `interval2`: two intervals to be compared
+ * Return Value:
+   
+   A `boolean` value. Specifically, `interval-before(interval1, interval2)` is true if and only if `interval1.end < interval2.start`, and `interval-after(interval1, interval2)` is true if and only if `interval1.start > interval2.end`. If any of the two inputs is `null`, `null` is returned.
+
+ * Examples:
+
+        let $itv1 := interval-from-date("2000-01-01", "2005-01-01")
+        let $itv2 := interval-from-date("2005-05-01", "2012-09-09")
+        return {"interval-before": interval-before($itv1, $itv2), "interval-after": interval-after($itv2, $itv1)}
+        
+ * The expected result is:
+
+        { "interval-before": true, "interval-after": true }
+
+### interval-meets, interval-met-by ###
+
+ * Syntax:
+
+        interval-meets(interval1, interval2)
+        interval-met-by(interval1, interval2)
+
+ * These two functions check whether an interval meets with another interval. 
+ * Arguments:
+   * `interval1`, `interval2`: two intervals to be compared
+ * Return Value:
+   
+   A `boolean` value. Specifically, `interval-meets(interval1, interval2)` is true if and only if `interval1.end = interval2.start`, and `interval-met-by(interval1, interval2)` is true if and only if `interval1.start = interval2.end`. If any of the two inputs is `null`, `null` is returned.
+
+ * Examples:
+
+        let $itv1 := interval-from-date("2000-01-01", "2005-01-01")
+        let $itv2 := interval-from-date("2005-01-01", "2012-09-09")
+        let $itv3 := interval-from-date("2006-08-01", "2007-03-01")
+        let $itv4 := interval-from-date("2004-09-10", "2006-08-01")
+        return {"meets": interval-meets($itv1, $itv2), "metby": interval-met-by($itv3, $itv4)}
+
+ * The expected result is:
+ 
+        { "meets": true, "metby": true }
+
+
+### interval-overlaps, interval-overlapped-by, interval-overlapping ###
+
+ * Syntax:
+
+        interval-overlaps(interval1, interval2)
+        interval-overlapped-by(interval1, interval2)
+        interval-overlaping(interval1, interval2)
+
+ * These functions check whether two intervals overlap with each other.
+ * Arguments:
+   * `interval1`, `interval2`: two intervals to be compared
+ * Return Value:
+   
+   A `boolean` value. Specifically, `interval-overlaps(interval1, interval2)` is true if and only if
+
+        interval1.start < interval2.start
+        AND interval2.end > interval1.end
+        AND interval1.end > interval2.start
+
+
+    `interval-overlapped-by(interval1, interval2)` is true if and only if
+
+        interval2.start < interval1.start
+        AND interval1.end > interval2.end
+        AND interval2.end > interval1.start
+
+
+    `interval-overlapping(interval1, interval2)` is trun if
+
+        (interval2.start >= interval1.start
+        AND interval2.start < interval1.end)
+        OR
+        (interval2.end > interval1.start
+        AND interval2.end <= interval.end)
+
+     For all these functions, if any of the two inputs is `null`, `null` is returned.
+
+     Note that `interval-overlaps` and `interval-overlapped-by` are following the Allen's relations on the definition of overlap. `interval-overlapping` is a syntax sugar for the case that the intersect of two intervals is not empty.
+
+ * Examples:
+
+        let $itv1 := interval-from-date("2000-01-01", "2005-01-01")
+        let $itv2 := interval-from-date("2004-05-01", "2012-09-09")
+        let $itv3 := interval-from-date("2006-08-01", "2007-03-01")
+        let $itv4 := interval-from-date("2004-09-10", "2006-12-31")
+        return {"interval-overlaps": interval-overlaps($itv1, $itv2), "interval-overlapped-by": interval-overlapped-by($itv3, $itv4), "interval-overlapping-1": interval-overlapping($itv1, $itv2), "interval-overlapping-2": interval-overlapping($itv3, $itv4)}
+        
+ * The expected result is:
+ 
+        { "interval-overlaps": true, "interval-overlapped-by": true, "interval-overlapping-1": true, "interval-overlapping-2": true }
+
+
+### interval-starts, interval-started-by ###
+
+ * Syntax:
+
+        interval-starts(interval1, interval2)
+        interval-started-by(interval1, interval2)
+
+ * These two functions check whether one interval starts with the other interval.
+ * Arguments:
+   * `interval1`, `interval2`: two intervals to be compared
+ * Return Value:
+   
+   A `boolean` value. Specifically, `interval-starts(interval1, interval2)` returns true if and only if
+
+        interval1.start = interval2.start
+        AND interval1.end <= interval2.end
+
+
+     `interval-started-by(interval1, interval2)` returns true if and only if
+
+        interval1.start = interval2.start
+        AND interval2.end <= interval1.end
+
+     For both functions, if any of the two inputs is `null`, `null` is returned.
+
+ * Examples:
+
+        let $itv1 := interval-from-date("2000-01-01", "2005-01-01")
+        let $itv2 := interval-from-date("2000-01-01", "2012-09-09")
+        let $itv3 := interval-from-date("2006-08-01", "2007-03-01")
+        let $itv4 := interval-from-date("2006-08-01", "2006-08-01")
+        return {"interval-starts": interval-starts($itv1, $itv2), "interval-started-by": interval-started-by($itv3, $itv4)}
+
+ * The expected result is:
+ 
+        { "interval-starts": true, "interval-started-by": true }
+
+
+### interval-covers, interval-covered-by ###
+
+ * Syntax:
+
+        interval-covers(interval1, interval2)
+        interval-covered-by(interval1, interval2)
+
+ * These two functions check whether one interval covers the other interval.
+ * Arguments:
+   * `interval1`, `interval2`: two intervals to be compared
+ * Return Value:
+   
+   A `boolean` value. Specifically, `interval-covers(interval1, interval2)` is true if and only if
+
+        interval1.start <= interval2.start
+        AND interval2.end >= interval1.end
+
+
+     `interval-covered-by(interval1, interval2)` is true if and only if
+
+        interval2.start <= interval1.start
+        AND interval1.end >= interval2.end
+
+     For both functions, if any of the two inputs is `null`, `null` is returned.
+
+ * Examples:
+
+        let $itv1 := interval-from-date("2000-01-01", "2005-01-01")
+        let $itv2 := interval-from-date("2000-03-01", "2004-09-09")
+        let $itv3 := interval-from-date("2006-08-01", "2007-03-01")
+        let $itv4 := interval-from-date("2004-09-10", "2012-08-01")
+        return {"interval-covers": interval-covers($itv1, $itv2), "interval-covered-by": interval-covered-by($itv3, $itv4)}
+        
+ * The expected result is:
+ 
+        { "interval-covers": true, "interval-covered-by": true }
+
+
+### interval-ends, interval-ended-by ###
+
+* Syntax:
+
+        interval-ends(interval1, interval2)
+        interval-ended-by(interval1, interval2)
+
+ * These two functions check whether one interval ends with the other interval.
+ * Arguments:
+   * `interval1`, `interval2`: two intervals to be compared
+ * Return Value:
+   
+   A `boolean` value. Specifically, `interval-ends(interval1, interval2)` returns true if and only if
+
+        interval1.end = interval2.end
+        AND interval1.start >= interval2.start
+
+    `interval-ended-by(interval1, interval2)` returns true if and only if
+
+        interval2.end = interval1.end
+        AND interval2.start >= interval1.start
+
+    For both functions, if any of the two inputs is `null`, `null` is returned.
+
+* Examples:
+
+        let $itv1 := interval-from-date("2000-01-01", "2005-01-01")
+        let $itv2 := interval-from-date("1998-01-01", "2005-01-01")
+        let $itv3 := interval-from-date("2006-08-01", "2007-03-01")
+        let $itv4 := interval-from-date("2006-09-10", "2007-03-01")
+        return {"interval-ends": interval-ends($itv1, $itv2), "interval-ended-by": interval-ended-by($itv3, $itv4) }
+        
+* The expected result is:
+
+        { "interval-ends": true, "interval-ended-by": true }
diff --git a/asterix-doc/src/site/markdown/index.md b/asterix-doc/src/site/markdown/index.md
index 5357ecf..226e3fb 100644
--- a/asterix-doc/src/site/markdown/index.md
+++ b/asterix-doc/src/site/markdown/index.md
@@ -31,7 +31,7 @@
 This document presents a tiny "social data warehousing" example and uses it as a backdrop for describing, by example, the key features of AsterixDB.
 By working through this document, you will learn how to define the artifacts needed to manage data in AsterixDB, how to load data into the system, how to use most of the basic features of its query language, and how to insert and delete data dynamically.
 
-3. [Asterix Data Model (ADM)](aql/datamodel.html), [Asterix Functions](aql/functions.html), and [Asterix Query Language (AQL)](aql/manual.html) :
+3. [Asterix Data Model (ADM)](aql/datamodel.html), [Asterix Functions](aql/functions.html), [Asterix functions for Allen's Relations](aql/allens.html), and [Asterix Query Language (AQL)](aql/manual.html) :
 These are reference documents that catalog the primitive data types and built-in functions available in AQL and the reference manual for AQL itself.
 
 5. [REST API to AsterixDB](api.html) :
diff --git a/asterix-doc/src/site/site.xml b/asterix-doc/src/site/site.xml
index f016e09..778db1b 100644
--- a/asterix-doc/src/site/site.xml
+++ b/asterix-doc/src/site/site.xml
@@ -75,6 +75,7 @@
       <item name="Asterix Data Model (ADM)" href="aql/datamodel.html"/>
       <item name="Asterix Query Language (AQL)" href="aql/manual.html"/>
       <item name="AQL Functions" href="aql/functions.html"/>
+      <item name="AQL Allen's Relations Functions" href="aql/allens.html"/>
       <item name="AQL Support of Similarity Queries" href="aql/similarity.html"/>
       <item name="Accessing External Data" href="aql/externaldata.html"/>
       <item name="REST API to AsterixDB" href="api.html"/>