(prefix_format: Option<&str>, starts: Option<Geotime>)
| 421 | |
| 422 | impl TimerangePrefix { |
| 423 | pub fn new(prefix_format: Option<&str>, starts: Option<Geotime>) -> Self { |
| 424 | match prefix_format { |
| 425 | Some(format) => match starts { |
| 426 | Some(ts) => match format { |
| 427 | "START_YEAR" => Self::StartYear(ts), |
| 428 | "START_YEAR_MONTH" => Self::StartYearMonth(ts), |
| 429 | _ => Self::None(ts), |
| 430 | }, |
| 431 | None => Self::None(Geotime::now()), |
| 432 | }, |
| 433 | None => Self::None(Geotime::now()), |
| 434 | } |
| 435 | } |
| 436 | |
| 437 | pub fn date_string(&self) -> String { |
| 438 | let ts = match self { |
nothing calls this directly
no outgoing calls
no test coverage detected