3 releases (breaking)

0.3.0 Feb 14, 2024
0.2.0 Feb 12, 2024
0.1.0 Feb 10, 2024

#93 in Date and time

Download history 141/week @ 2024-02-10 49/week @ 2024-02-17 29/week @ 2024-02-24 4/week @ 2024-03-02 7/week @ 2024-03-09 1/week @ 2024-03-16 1/week @ 2024-03-23 58/week @ 2024-03-30 9/week @ 2024-04-06

68 downloads per month

GPL-2.0-or-later

28KB
452 lines

Crates.io Build Test

🎂 Bday 🎉

Easily remember and see upcoming birthdays 🎂

Features

  • Show how far away birthdays are
  • Support for dates without specifying the year
  • Support for timezones, so you can wish your friends a happy birthday when the clock hits midnight in their country
  • Blazingly fast, even with large datasets ⚡️

Usage

# Adds a birthday
$ bday add --name "Hiyajo Maho" --date 02/11/1989
Added entry for Hiyajo Maho, born: 02/11/1989

# Adds a birthday, without specifying the year
$ bday add --name "Akiha Rumiho" --date 03/04
Added entry for Akiha Rumiho, born: 03/04

# List all birthdays
$ bday list
╭───┬──────────────┬─────────────┬─────────┬─────────────╮
│ # │ Name         │ Date        │ Age     │ In          │
├───┼──────────────┼─────────────┼─────────┼─────────────┤
│ 1 │ Hiyajo Maho  │ 02 November │ 34 🡒 35 │ in 8 months │
├───┼──────────────┼─────────────┼─────────┼─────────────┤
│ 2 │ Akiha Rumiho │ 03 April    │ ?       │ in 2 months │
╰───┴──────────────┴─────────────┴─────────┴─────────────╯

# List birthdays that will occur before a date
$ bday list --before 15/05/2024
╭───┬──────────────┬──────────┬─────┬─────────────╮
│ # │ Name         │ Date     │ Age │ In          │
├───┼──────────────┼──────────┼─────┼─────────────┤
│ 1 │ Akiha Rumiho │ 03 April │ ?   │ in 2 months │
╰───┴──────────────┴──────────┴─────┴─────────────╯

# List only the n birthdays closest to today
$ bday list --limit 1
╭───┬──────────────┬──────────┬─────┬─────────────╮
│ # │ Name         │ Date     │ Age │ In          │
├───┼──────────────┼──────────┼─────┼─────────────┤
│ 1 │ Akiha Rumiho │ 03 April │ ?   │ in 2 months │
╰───┴──────────────┴──────────┴─────┴─────────────╯

Display the birthdays that will happen in the next 7 days
A personal favorite of mine is adding this to my ~/.bashrc to display upcoming birthdays.

bday -f /tmp/aaa.toml list --before $(date -d "+7 days" "+%Y-%m-%d") 2> /dev/null

Note that this displays nothing if no birthdays are coming up.

Installation

With Cargo

cargo install bday

From source

git clone "https://github.com/Matthieu-LAURENT39/bday"
cd bday
cargo install --path .

Special thanks

This project was inspired by IonicaBizau's "birthday" tool.
I wanted to try making my own version in Rust as a learning experience.

License

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

Dependencies

~5–14MB
~143K SLoC