A fun little command-line tool to represent dates in a unique, secret-code-style hexadecimal format. Built with Rust.
stardate is a simple CLI utility that can do two things:
- Encode: It takes the current date (e.g., August 30, 2025), formats it as a single number (
0302025), and converts it to its hexadecimal representation (9eadc9). - Decode: It takes a hexadecimal stardate (like
7eadc9) and converts it back into a human-readable date (1-30-2025,
This was created as a fun project to make everyday dates look a bit more unique.
- Simple Encoding: Get the current date's "stardate" with a single command.
- Easy Decoding: Quickly translate any stardate back to a regular date.
- Input Validation: Rejects invalid characters and malformed stardates.
- Case-Insensitive: Decodes hexadecimal input whether you use
7EADC9oraeadc9. - Blazingly Fast: It's written in Rust!
To get the hexadecimal stardate for today, just run the command without any arguments:
$ stardate
9eadc9(Example run on August 30, 2025)
To convert a stardate back to a date, provide it as an argument:
it handles uppercase and lowercase letters gracefully:
$ stardate 7EADC9
8-30-2025The tool will let you know if you provide an invalid stardate:
$ stardate 'not-a-hex-code'
Error: Input 'not-a-hex-code' contains invlid characters. Only 0-9 and A-F are allowed.To get started, you'll need to have the Rust toolchain installed.
- Clone
git clone https://github.com/your-username/stardate.git
cd stardate- Build the project:
cargo build --release- Run the executable:
You will find the compiled binary in the
target/release/directory.
./target/release/stardate
``
For easier access, you can move this file to a directory in your system's `PATH`.
## License
This project is licensed under the MIT License. See the `LICENSE` file for details