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

Function date_hour

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

Source from the content-addressed store, hash-verified

338}
339
340pub fn date_hour(inputs: &[Box<dyn Value>]) -> Box<dyn Value> {
341 let date = inputs[0].as_date_time().unwrap();
342 let date_time = DateTime::from_timestamp(date, 0);
343 let dt = date_time.unwrap().time();
344 Box::new(IntValue::new(dt.hour() as i64))
345}
346
347pub fn date_minute(inputs: &[Box<dyn Value>]) -> Box<dyn Value> {
348 let date = inputs[0].as_date_time().unwrap();

Callers

nothing calls this directly

Calls 1

as_date_timeMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…