Formats a date safely, returning a fallback value (na) when the input
is NULL or NA.
Arguments
- x
Date or coercible to
Date.- fmt
Date format passed to
base::format().- na
Fallback string if the input is missing.
Examples
whapi_fmt_date(Sys.Date())
#> [1] "10/09/2025"
#> "31/08/2025"
whapi_fmt_date(NA)
#> [1] "-"
#> "-"
