Skip to content

Commit b6c10b9

Browse files
Jacques TagneJacques Tagne
authored andcommitted
adding the date type in the librairy
1 parent bf28d6b commit b6c10b9

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

argsparse.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@
105105
## @code
106106
## file directory pipe terminal socket link char unsignedint uint
107107
## integer int hexa ipv4 ipv6 ip hostname host portnumber port
108-
## username group
108+
## username group date
109109
## @endcode
110110
##
111111
## @li "exclude:<option> <option>" @n
@@ -843,6 +843,10 @@ argsparse_check_option_type() {
843843
group)
844844
getent group "$value" >/dev/null 2>&1
845845
;;
846+
date)
847+
date --date "$value" >/dev/null 2>&1
848+
return
849+
;;
846850
*)
847851
# Invoke user-defined type-checking function if available.
848852
if ! declare -f "check_option_type_$option_type" >/dev/null

0 commit comments

Comments
 (0)