From 77726c4b1664dde2c2c07c059c4ee4646c81fab4 Mon Sep 17 00:00:00 2001 From: Daylin Morgan Date: Wed, 25 Sep 2024 12:06:55 -0500 Subject: [PATCH] change time helpers --- home/private_dot_config/zsh/conf.d/aliases.zsh | 7 +++---- home/private_dot_config/zsh/functions/executable_today | 4 ++++ 2 files changed, 7 insertions(+), 4 deletions(-) create mode 100644 home/private_dot_config/zsh/functions/executable_today diff --git a/home/private_dot_config/zsh/conf.d/aliases.zsh b/home/private_dot_config/zsh/conf.d/aliases.zsh index b2e995a..2634aa2 100644 --- a/home/private_dot_config/zsh/conf.d/aliases.zsh +++ b/home/private_dot_config/zsh/conf.d/aliases.zsh @@ -19,10 +19,9 @@ alias mkrt='make -C $(git rev-parse --show-toplevel)' alias mk="make" alias mkc="make -C" -alias yyyymmdd='date +%Y%m%d' -alias ds='date +%Y-%m-%d' -alias ts='date +%Y-%m-%dT%H:%M:%SZ' -alias today="date +'%Y.%m.%d'" +# alias yyyymmdd='date +%Y%m%d' +# alias ds='date +%Y-%m-%d' +alias timestamp='date +%Y-%m-%dT%H:%M:%SZ' # url encode/decode alias urldecode='python3 -c "import sys, urllib.parse as ul; \ diff --git a/home/private_dot_config/zsh/functions/executable_today b/home/private_dot_config/zsh/functions/executable_today new file mode 100644 index 0000000..1b03c5f --- /dev/null +++ b/home/private_dot_config/zsh/functions/executable_today @@ -0,0 +1,4 @@ +#!/usr/bin/env zsh + +local sep=${1:-} +date "+%Y${sep}%m${sep}%d"