pub fn version_string(build_date: &str, git_hash: &str) -> StringExpand description
Returns the version string in the format “yyyy-mm-dd (hash)”.
Both values are typically injected at build time via build.rs using
env!("BUILD_DATE") and env!("GIT_HASH"), then passed in here.
§Example
ⓘ
// This example is marked `ignore` because `BUILD_DATE` and `GIT_HASH` are
// environment variables injected at compile time by `build.rs`. They are
// not available in the doctest environment, so the example cannot be run
// as a test. It is provided for illustration purposes only.
const BUILD_DATE: &str = env!("BUILD_DATE");
const GIT_HASH: &str = env!("GIT_HASH");
let v = jt_consoleutils::version::version_string(BUILD_DATE, GIT_HASH);