AutoYADM commit: 2025-06-25 13:38:00
This commit is contained in:
parent
7b4191c181
commit
14ba21e960
3 changed files with 14 additions and 6 deletions
4
.config/fish/functions/date_fmt.fish
Normal file
4
.config/fish/functions/date_fmt.fish
Normal file
|
@ -0,0 +1,4 @@
|
|||
function date_fmt --wraps=date_format --description 'alias date_fmt=date_format'
|
||||
date_format $argv
|
||||
|
||||
end
|
7
.config/fish/functions/date_format.fish
Normal file
7
.config/fish/functions/date_format.fish
Normal file
|
@ -0,0 +1,7 @@
|
|||
function date_format --description 'Format date for task'
|
||||
if not date -d "$argv" +%Y-%m-%dT%H:%M &>/dev/null
|
||||
date +%Y-%m-%dT%H:%M
|
||||
else
|
||||
date -d "$argv" +%Y-%m-%dT%H:%M
|
||||
end
|
||||
end
|
|
@ -1,7 +1,4 @@
|
|||
function dfmt --description 'Format date for task'
|
||||
if not date -d "$argv" +%Y-%m-%dT%H:%M &>/dev/null
|
||||
date +%Y-%m-%dT%H:%M
|
||||
else
|
||||
date -d "$argv" +%Y-%m-%dT%H:%M
|
||||
end
|
||||
function dfmt --wraps=date_format --description 'alias dfmt=date_format'
|
||||
date_format $argv
|
||||
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue