CBQE-2346: new date functions

Change-Id: Iddbf694b8ab2a47f6cb87eb8ff58a8b8923422aa
Reviewed-on: http://review.couchbase.org/41226
Tested-by: buildbot <build@couchbase.com>
Reviewed-by: Ketaki Gangal <ketakigangal@gmail.com>