Suman R. answered 10/13/20
Java and Computer Science Tutor
You can use "date" linux command to get the current date and time. Not sure what you mean set a custom function. you can make any command small even with options added using alias.
for eg:
date will give you a response like 'Tue Oct 13 15:59:50 EDT 2020'
date +"%B %d %y %l:%M:%S %p" will give 'October 13 20 3:59:50 PM'
you can create an alias like below
alias mydate='date +"%B %d %y %l:%M:%S %p"'
now when you run the command mydate you will get the result in new format.