(inputs: &[Box<dyn Value>])
| 315 | } |
| 316 | |
| 317 | pub fn date_monthname(inputs: &[Box<dyn Value>]) -> Box<dyn Value> { |
| 318 | let date = inputs[0].as_date().unwrap(); |
| 319 | let parsed_date = DateTime::from_timestamp(date, 0).unwrap(); |
| 320 | let month_name = match parsed_date.month() { |
| 321 | 1 => "January", |
| 322 | 2 => "February", |
| 323 | 3 => "March", |
| 324 | 4 => "April", |
| 325 | 5 => "May", |
| 326 | 6 => "June", |
| 327 | 7 => "July", |
| 328 | 8 => "August", |
| 329 | 9 => "September", |
| 330 | 10 => "October", |
| 331 | 11 => "November", |
| 332 | 12 => "December", |
| 333 | _ => "", |
| 334 | } |
| 335 | .to_string(); |
| 336 | |
| 337 | Box::new(TextValue::new(month_name)) |
| 338 | } |
| 339 | |
| 340 | pub fn date_hour(inputs: &[Box<dyn Value>]) -> Box<dyn Value> { |
| 341 | let date = inputs[0].as_date_time().unwrap(); |
nothing calls this directly
no test coverage detected
searching dependent graphs…