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

Function date_extract_date

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

Source from the content-addressed store, hash-verified

251}
252
253pub fn date_extract_date(inputs: &[Box<dyn Value>]) -> Box<dyn Value> {
254 let argument_type = inputs[0].data_type();
255 if argument_type.is_date() {
256 return inputs[0].clone();
257 }
258 let timestamp = inputs[0].as_date_time().unwrap();
259 Box::new(DateValue::new(timestamp))
260}
261
262pub fn date_current_date(_inputs: &[Box<dyn Value>]) -> Box<dyn Value> {
263 let timestamp = Utc::now().timestamp();

Callers

nothing calls this directly

Calls 3

as_date_timeMethod · 0.80
data_typeMethod · 0.45
is_dateMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…