Handling Nil Values
Set a fallback for nil
input
Nil Fallback
Add custom fallback to HumanizeTime.format_seconds/2
for nil values.
opts = [
nil_fallback: "No current data."
]
> HumanizeTime.format_seconds(nil, opts)
# "No current data."
Set a fallback for nil
input
Add custom fallback to HumanizeTime.format_seconds/2
for nil values.
opts = [
nil_fallback: "No current data."
]
> HumanizeTime.format_seconds(nil, opts)
# "No current data."