Skip to main content

parse_hms

Function parse_hms 

Source
pub fn parse_hms(s: &str) -> Result<Angle, AstroError>
Expand description

Parse a string as hours-minutes-seconds.

Accepts formats like 12:34:56, 12h34m56s, 12 hours 34 min 56 sec. Returns the angle with the value interpreted as hours (1h = 15 degrees).

Use this for Right Ascension values. The result can exceed 24h if the input does.