chore(unitproc):dateShort:Add version, semicolons
authorSteven Baltakatei Sandoval <baltakatei@gmail.com>
Fri, 10 Jul 2020 19:17:54 +0000 (19:17 +0000)
committerSteven Baltakatei Sandoval <baltakatei@gmail.com>
Fri, 10 Jul 2020 19:17:54 +0000 (19:17 +0000)
unitproc/bktemp-dateShort

index 4212b358c89ab2e5f8b4a1d718bd2cfad5711b01..5757eae859c8961c5cc528bb9d68877b49777b5a 100644 (file)
@@ -1,5 +1,4 @@
 #!/bin/bash
-
 # Desc: Template to display date
 
 yell() { echo "$0: $*" >&2; }      #o Yell, Die, Try Three-Fingered Claw technique
@@ -8,10 +7,10 @@ try() { "$@" || die "cannot $*"; } #o
 dateShort(){
     # Desc: Date without separators (YYYYmmdd)
     # Usage: dateShort ([str date])
-    # Version: 1.1.1
+    # Version: 1.1.2
     # Input: arg1: 'date'-parsable timestamp string (optional)
     # Output: stdout: date (ISO-8601, no separators)
-    # Depends: yell
+    # Depends: bash 5.0.3, date 8.30, yell()
     local argTime timeCurrent timeInput dateCurrentShort
 
     argTime="$1";
@@ -30,8 +29,8 @@ dateShort(){
        else
            ### F: Time argument not valid; exit
            yell "ERROR:Invalid time argument supplied. Exiting."; exit 1;
-       fi
-    fi
+       fi;
+    fi;
     # Construct and deliver separator-les date string    
     dateCurrentShort="$(date -d "$timeInput" +%Y%m%d)"; # Produce separator-less current date with resolution 1 day.
     echo "$dateCurrentShort";