#!/usr/bin/env bash
set -euo pipefail
set -x  # Print each command before running it

cargo build --release

RUN="./target/release/pathdate"

# --- Defaults ---------------------------------------------------------------
$RUN
$RUN --no-newline      # suppress newline via long flag
echo ""

# --- UTC ---------------------------------------------------------------------
$RUN --utc

# --- Named timezones ---------------------------------------------------------
$RUN --tz UTC
$RUN --tz America/New_York
$RUN --tz America/Los_Angeles
$RUN --tz Europe/London
$RUN --tz Europe/Paris
$RUN --tz Asia/Tokyo
$RUN --tz Asia/Kolkata
$RUN --tz Australia/Sydney
$RUN --tz Pacific/Auckland

# --- Date only ---------------------------------------------------------------
$RUN --date
$RUN --date-only
$RUN --date --utc
$RUN --date --tz Asia/Tokyo

# --- Seconds -----------------------------------------------------------------
$RUN --sec
$RUN --seconds
$RUN --sec --utc
$RUN --sec --tz Europe/Berlin

# --- Milliseconds ------------------------------------------------------------
$RUN --ms
$RUN --milliseconds
$RUN --ms --utc
$RUN --ms --tz America/Chicago

# --- Tight -------------------------------------------------------------------
$RUN --tight
$RUN --tight --utc
$RUN --tight --sec
$RUN --tight --ms
$RUN --tight --date
$RUN --tight --tz Asia/Seoul

# --- Combinations: tight + precision -----------------------------------------
$RUN --tight --sec --utc
$RUN --tight --ms --utc
$RUN --tight --sec --tz America/Denver

# --- Epoch -------------------------------------------------------------------
$RUN --epoch
$RUN --epoch
$RUN --epoch-ms
$RUN --epoch-ms

# --- Custom format -----------------------------------------------------------
$RUN --format "%Y/%m/%d"
$RUN --format "%Y/%m/%d %H:%M:%S"
$RUN --format "%Y%m%d-%H%M%S"
$RUN --format "%A, %B %e %Y"          # e.g. "Wednesday, April  1 2026"
$RUN --format "%s"                    # Unix epoch via chrono format
$RUN --format "%Y-%m-%dT%H:%M:%SZ" --utc

# --- Custom format + tz ------------------------------------------------------
$RUN --format "%H:%M" --tz America/New_York
$RUN --format "%H:%M" --tz Asia/Tokyo

# --- No-newline variations on a few combos -----------------------------------
$RUN --utc --sec
$RUN --utc --ms
$RUN --date --tight
$RUN --tight --ms --tz Europe/Amsterdam
