MCPcopy Create free account
hub / github.com/AmrDeveloper/GQL / date_monthname

Function date_monthname

crates/gitql-std/src/datetime/mod.rs:317–338  ·  view source on GitHub ↗
(inputs: &[Box<dyn Value>])

Source from the content-addressed store, hash-verified

315}
316
317pub 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
340pub fn date_hour(inputs: &[Box<dyn Value>]) -> Box<dyn Value> {
341 let date = inputs[0].as_date_time().unwrap();

Callers

nothing calls this directly

Calls 1

as_dateMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…