From: Steven Baltakatei Sandoval Date: Thu, 2 Jul 2020 21:53:00 +0000 (+0000) Subject: chore(unitproc):timeDuration:Added missing comment about exit 2 X-Git-Tag: 0.2.0~1 X-Git-Url: https://zdv2.bktei.com/gitweb/BK-2020-03.git/commitdiff_plain/17ccc034e358135f360e9d9c242cfb26868c52b5?hp=--cc chore(unitproc):timeDuration:Added missing comment about exit 2 --- 17ccc034e358135f360e9d9c242cfb26868c52b5 diff --git a/unitproc/bktemp-timeDuration b/unitproc/bktemp-timeDuration index 56f382c..21c9d69 100644 --- a/unitproc/bktemp-timeDuration +++ b/unitproc/bktemp-timeDuration @@ -10,12 +10,13 @@ timeDuration(){ # Ref/Attrib: ISO-8601:2004(E), §4.4.4.2 Representations of time intervals by duration and context information # Note: "1 month" ("P1M") is assumed to be "30 days" (see ISO-8601:2004(E), §2.2.1.2) # Usage: timeDuration [1:seconds] ([2:precision]) - # Version: 1.0.2 + # Version: 1.0.3 # Input: arg1: seconds as base 10 integer >= 0 (ex: 3601) # arg2: precision level (optional; default=2) # Output: stdout: ISO-8601 duration string (ex: "P1H1S", "P2Y10M15DT10H30M20S") # exit code 0: success # exit code 1: error_input + # exit code 2: error_unknown # Example: 'timeDuration 111111 3' yields 'P1DT6H51M' # Depends: date 8 (gnucoreutils), yell, local returnState argSeconds argPrecision remainder precision witherPrecision