MCPcopy Create free account
hub / github.com/codemix/graph / get

Method get

packages/graph/src/TemporalTypes.ts:141–160  ·  view source on GitHub ↗

* Get a component property of this date.

(property: string)

Source from the content-addressed store, hash-verified

139 * Get a component property of this date.
140 */
141 public get(property: string): unknown {
142 switch (property) {
143 case "year":
144 return this.year;
145 case "month":
146 return this.month;
147 case "day":
148 return this.day;
149 case "week":
150 return this.week;
151 case "dayOfWeek":
152 return this.dayOfWeek;
153 case "quarter":
154 return this.quarter;
155 case "ordinalDay":
156 return this.ordinalDay;
157 default:
158 return null;
159 }
160 }
161
162 /**
163 * Convert to ISO string (YYYY-MM-DD).

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected