dotfiles/.config/fish/functions/dfmt.fish

7 lines
196 B
Fish

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
end