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

Method dayOfWeek

packages/graph/src/TemporalTypes.ts:113–118  ·  view source on GitHub ↗

* Get the day of week (1=Monday, 7=Sunday).

()

Source from the content-addressed store, hash-verified

111 * Get the day of week (1=Monday, 7=Sunday).
112 */
113 public get dayOfWeek(): number {
114 const date = new Date(this.#year, this.#month - 1, this.#day);
115 const dow = date.getDay();
116 // Convert from JS (0=Sunday) to ISO (1=Monday, 7=Sunday)
117 return dow === 0 ? 7 : dow;
118 }
119
120 /**
121 * Get the quarter (1-4).

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected