Skip to content

Commit

Permalink
bash/bash_aliases: Added epoch2date' and date2epoch'.
Browse files Browse the repository at this point in the history
  • Loading branch information
blackwinter committed Nov 3, 2017
1 parent c950e04 commit 1c1094c
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions bash/bash_aliases
Original file line number Diff line number Diff line change
Expand Up @@ -138,5 +138,13 @@ function pdfcat() {
pdftk "$1"/*.pdf cat output "${2:-$1}".pdf
}

function date2epoch() {
date "+%s" -d "$1"
}

function epoch2date() {
date +"%Y/%m/%d %H:%M:%S" -d "@${1:0:10}"
}

### LOAD CUSTOM FILE
[ -f ~/.bash_aliases.mine ] && . ~/.bash_aliases.mine

0 comments on commit 1c1094c

Please sign in to comment.