Skip to main content

is_timezone_name

Function is_timezone_name 

Source
fn is_timezone_name(name: &str) -> bool
Expand description

Test a string against the tzfile naming rules, narrowed to what every name the database ships actually uses.

A name is one to three /-separated components. Draining the remainder afterwards is what rejects a fourth, leaving the whole test one pass over the string.