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

Function date_day_of_week

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

Source from the content-addressed store, hash-verified

357}
358
359pub fn date_day_of_week(inputs: &[Box<dyn Value>]) -> Box<dyn Value> {
360 let date = inputs[0].as_date().unwrap();
361 let parsed_date = DateTime::from_timestamp(date, 0).unwrap();
362 let value = parsed_date.weekday().number_from_sunday().into();
363 Box::new(IntValue::new(value))
364}
365
366pub fn date_day_of_month(inputs: &[Box<dyn Value>]) -> Box<dyn Value> {
367 let date = inputs[0].as_date().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…