gerrit: add age query args

Signed-off-by: Joey Armstrong <jarmstrong@linuxfoundation.org>
Change-Id: I4c01d5c40d427506de9b6c45b9392ffeb5dacc37
diff --git a/gerrit/bin/gerrit.sh b/gerrit/bin/gerrit.sh
index 4e51869..b12d0bf 100755
--- a/gerrit/bin/gerrit.sh
+++ b/gerrit/bin/gerrit.sh
@@ -55,52 +55,6 @@
 }
 
 ## -----------------------------------------------------------------------
-## Usage: $0 --repo voltha-go --search --wip
-## -----------------------------------------------------------------------
-function do_gerrit_search_orig()
-{
-    local -n ref_urls=$1   ; shift
-    local -n ref_repos=$1   ; shift
-    local -n ref_status=$1 ; shift
-
-    ref_urls=()
-
-    # local stem='https://gerrit.opencord.org/q/project:voltha-go+status:open'
-    local stem='https://gerrit.opencord.org/q/'
-
-    local -a common=()
-    [[ -v me ]] && { common+=("${me[@]}"); }
-    common+=("${ref_status[@]}")
-
-    local repo
-    for repo in "${ref_repos[@]}";
-    do
-        local -a args=()
-        args+=("project:${repo}")
-        args+=("${common[@]}")
-
-        local url="$stem"
-        url+="$(join_by '+' "${args[@]}")"
-        ref_urls+=("$url")
-    done
-
-    if [[ ${#ref_urls[@]} -eq 0 ]]; then
-        local -a args=()
-        args=("${common[@]}")
-
-        local url="$stem"
-        url+="$(join_by '+' "${args[@]}")"
-        ref_urls+=("$url")
-    fi
-
-    # --debug)  declare -g -i debug=1 ;;
-    # --search) declare -g -i search=1 ;;
-    # --wip)    declare -g -i status_is_open=1 ;;
-
-    return
-}
-
-## -----------------------------------------------------------------------
 ## Intent: Iterate over --admin values and generate repositories
 ## -----------------------------------------------------------------------
 function gen_admin_urls()
@@ -294,11 +248,30 @@
             ;;
 
         ## Modes
+        --age) # https://gerrit-review.googlesource.com/Documentation/user-search.html
+            arg="$1"; shift
+            add_filter_age "$arg"
+            ;;
+
+        ## FMT: 2006-01-02[ 15:04:05[.890][ -0700]]; 
+        --after|--since) # https://gerrit-review.googlesource.com/Documentation/user-search.html            
+            arg="$1"; shift
+            add_filter_after "$arg"
+            ;;
+
+        ## FMT: 2006-01-02[ 15:04:05[.890][ -0700]]; 
+        --before) # https://gerrit-review.googlesource.com/Documentation/user-search.html            
+            arg="$1"; shift
+            add_filter_before "$arg"
+            ;;
+
+        ## Modes
         --debug)
             # shellcheck disable=SC2034
             declare -g -i argv_debug=1
             declare -g -i debug=1
             ;;
+
         --search) declare -g -i argv_search=1 ;;
 
         --me)