I don't have to remember today's date, NuShell has me covered
Make use of NuShell's `date from-human` to simplify your terminal workflows.
This is the first of many posts where I will share smaller tidbits of what makes my life easier. It should make yours too!
NuShell "from-human"
You probably have read or heard me talking about NuShell before. It is my shell of choice for things like this from-human date parser. It is so simple, yet so elegant that it helps me concentrate on my task at hand without worrying about my tools.
This is part of the date command:
nu ⌁ : help date
Date-related commands.
You must use one of the following subcommands. Using this command as-is will only produce this help message.
Search terms: time, now, today, tomorrow, yesterday, weekday, weekday_name, timezone
Usage:
> date
Subcommands:
date from-human - Convert a human readable datetime string to a datetime.
date humanize - Print a 'humanized' format for the date, relative to now.
date list-timezone - List supported time zones.
date now - Get the current date.
date to-timezone - Convert a date to a given time zone.
Flags:
-h, --help: Display the help message for this command
Input/output types:
╭───┬─────────┬────────╮
│ # │ input │ output │
├───┼─────────┼────────┤
│ 0 │ nothing │ string │
╰───┴─────────┴────────╯And it does what you'd expect, handle anything date related. And the subcommand of from-human feels like talking to the computer in our human language to do exactly what we need: "What date was 'last monday'?":
🏠
nu ⌁ : echo "last monday" | date from-human
Mon, 22 Sep 2025 11:23:41 -0400 (4 days ago)This is not just a text response, it is a datetime object that can do all sorts of things; but I won't focus on those in this post.
Remembering dates without knowing the day
Here is where things get exciting: I want to do things without having to change my command. Sounds silly, but hear me out (or read me out, probably better in this format): I want my commands to be available to me by pressing ctrl + r on my keyboard and not having to worry about changing my commands. Here is a prime example of my workflow of every week:
- Create my timesheets during the week using my FancyKimai or FancyAbak CLIs:
abak timesheet set --context client1 --description "did some work" -h 1
- Approve my week's hours using the same tools, which depends on a starting date and an end date:
abak timesheet approve -s 2025-09-22 -e 2025-09-28
The part where I set my timesheet for the current day is easy, I don't need or want to change that. But typing in the date for my approvals every week gets old. Here is where my workflow got MUCH better:
🏠
nu ⌁ : abak timesheet approve -s (echo "last monday" | date from-human | format date "%Y-%m-%d") -e (echo "Sunday" | date from-human | format date "%Y-%m-%d")There we go! No need to fiddle with dates anymore, I just need to run this and it will grab 'Last Monday' until 'This Sunday'. Even better, I have converted this into an alias to make my life even simpler:
nu ⌁ : alias abakapprove = abak timesheet approve -s (echo "last monday" | date from-human | format date "%Y-%m-%d") -e (echo "Sunday" | date from-human | format date "%Y-%m-%d")
🏠
nu ⌁ : abakapprove
Here are the timesheet entries to be approved:There we go, simpler and faster workflows using the tools I already know and love. No need to reinvent the wheel here.