# pathdate-rs
A tiny CLI tool to generate a path-safe ISO8601-like date/datetime/timestamp.
## Examples
### Bash Shell
```bash
cargo install pathdate
# Create file: some-command-2026-04-01-T0715L.txt
some-command > some-command-$(pathdate).txt
some-command > some-command-$(pdate).txt
```
### Fish Shell
```fish
cargo install pathdate
some-command > some-command-(pathdate).txt
some-command > some-command-(pdate).txt
some-command > some-command-(pathdate --utc).txt
```
## Full API
```shell
> pathdate --help
> pdate --help
Generate a path-safe ISO8601-like date/datetime/timestamp.
Usage: pdate [OPTIONS]
Options:
--utc Use UTC instead of local time
--tz <TIMEZONE> Use a specific IANA timezone (e.g. America/New_York). Overrides --utc
--date Output date only (no time component)
--sec Include seconds in the output
--ms Include milliseconds in the output (implies --sec)
--format <FORMAT> Use a custom chrono format string (overrides all other format flags)
--no-newline Do not print a trailing newline
--tight Remove all delimiters (produces e.g. 20260401T1230L)
--epoch Print seconds since the Unix epoch (1970-01-01T00:00:00Z)
--epoch-ms Print milliseconds since the Unix epoch
-h, --help Print help
-V, --version Print version
```
## Examples
```
+ pathdate
2026-04-01-T1005L
+ pathdate --utc
2026-04-01-T1405Z
+ pathdate --date-only
2026-04-01
+ pathdate --seconds
2026-04-01-T10-05-29L
+ pathdate --sec --utc
2026-04-01-T14-05-29Z
+ pathdate --ms
2026-04-01-T10-05-29-377L
+ pathdate --epoch
1775052329
+ pathdate --epoch-ms
1775052329401
```