Skip to content

parseDayOfWeekFromDateTime

  • The core functions, which every industry uses.
parseDayOfWeekFromDateTime(value: string): number | null

Return the day of week (1-7) for a given ISO 8601 datetime string.

  • Monday=1 through Sunday=7.
  • Returns null for invalid input.
ParameterTypeDescription
valuestringISO datetime string

Day of week (1-7) or null on invalid input

import { parseDayOfWeekFromDateTime } from "@northguild/gmt/plain/parse";
parseDayOfWeekFromDateTime("2024-01-01T12:00:00") // 1 (Monday)
output 

plain/parse/parseDayOfWeekFromDateTime.ts

Accessibility
© 2026 NorthGuild · Licences

Code examples: MIT-0. Packages: MIT. Third-party data and components: their own licences, credited where they appear. Everything else: © 2026 NorthGuild, all rights reserved.