dotfiles/.config/scripts/date/timestamp-discord

13 lines
217 B
Bash
Executable File

#!/bin/bash
time="$1"
if [ -z "$1" ]; then
time="now"
fi
unix="$(date -d "$time" +%s)"
wl-copy "<t:${unix}> <t:${unix}:R>"
echo "The discord timestamp for:"
date -d "@${unix}"
echo "is copied to the clipboard"