diff --git a/lib/compatible_date.sh b/lib/compatible_date.sh index 75748b0..e2f0ac3 100755 --- a/lib/compatible_date.sh +++ b/lib/compatible_date.sh @@ -37,7 +37,7 @@ date_today () { local exit_status=$? if [ $exit_status -ne 0 ]; then - echo "ERROR: ${0##*/}:date_today failed to produce date string" >&2 + echo "ERROR: ${0##*/}:$FUNCNAME failed to produce date string" >&2 return $exit_status fi @@ -53,7 +53,7 @@ dateTime_now_locale () { local exit_status=$? if [ $exit_status -ne 0 ]; then - echo "ERROR: ${0##*/}:dateTime_now_locale failed to produce date string" >&2 + echo "ERROR: ${0##*/}:$FUNCNAME failed to produce date string" >&2 return $exit_status fi @@ -69,7 +69,7 @@ dateTime_now_canonical () { local exit_status=$? if [ $exit_status -ne 0 ]; then - echo "ERROR: ${0##*/}:dateTime_now_canonical failed to produce date string" >&2 + echo "ERROR: ${0##*/}:$FUNCNAME failed to produce date string" >&2 return $exit_status fi @@ -87,7 +87,7 @@ dateTime_max32_canonical () { dateTime_openssl2canonical () { local in_date="$1" if [ -z "${in_date}" ] ; then - echo "ERROR: ${0##*/}:dateTime_openssl2canonical requires command-line arg" >&2 + echo "ERROR: ${0##*/}:$FUNCNAME requires command-line arg" >&2 return 1 fi @@ -104,7 +104,7 @@ dateTime_openssl2canonical () { local exit_status=$? if [ $exit_status -ne 0 ]; then - echo "ERROR: ${0##*/}:dateTime_openssl2canonical failed to convert date string ${in_date}" >&2 + echo "ERROR: ${0##*/}:$FUNCNAME failed to convert date string ${in_date}" >&2 return $exit_status fi @@ -116,7 +116,7 @@ dateTime_openssl2canonical () { dateTime_apache2canonical () { local in_date="$1" if [ -z "${in_date}" ] ; then - echo "ERROR: ${0##*/}:dateTime_openssl2canonical requires command-line arg" >&2 + echo "ERROR: ${0##*/}:$FUNCNAME requires command-line arg" >&2 return 1 fi @@ -133,7 +133,7 @@ dateTime_apache2canonical () { local exit_status=$? if [ $exit_status -ne 0 ]; then - echo "ERROR: ${0##*/}:dateTime_openssl2canonical failed to convert date string ${in_date}" >&2 + echo "ERROR: ${0##*/}:$FUNCNAME failed to convert date string ${in_date}" >&2 return $exit_status fi @@ -145,7 +145,7 @@ dateTime_apache2canonical () { dateTime_canonical2secs () { local in_date="$1" if [ -z "${in_date}" ] ; then - echo "ERROR: ${0##*/}:dateTime_canonical2secs requires command-line arg" >&2 + echo "ERROR: ${0##*/}:$FUNCNAME requires command-line arg" >&2 return 1 fi @@ -165,7 +165,7 @@ dateTime_canonical2secs () { local exit_status=$? if [ $exit_status -ne 0 ]; then - echo "ERROR: ${0##*/}:dateTime_canonical2secs failed to convert date string ${in_date}" >&2 + echo "ERROR: ${0##*/}:$FUNCNAME failed to convert date string ${in_date}" >&2 return $exit_status fi @@ -177,7 +177,7 @@ dateTime_canonical2secs () { dateTime_secs2canonical () { local in_secs="$1" if [ -z "${in_secs}" ] ; then - echo "ERROR: ${0##*/}:dateTime_secs2canonical requires command-line arg" >&2 + echo "ERROR: ${0##*/}:$FUNCNAME requires command-line arg" >&2 return 1 fi @@ -193,7 +193,7 @@ dateTime_secs2canonical () { local exit_status=$? if [ $exit_status -ne 0 ]; then - echo "ERROR: ${0##*/}:dateTime_secs2canonical failed to convert seconds ${in_secs}" >&2 + echo "ERROR: ${0##*/}:$FUNCNAME failed to convert seconds ${in_secs}" >&2 return $exit_status fi