Skip to content

parseDayOfWeekFromDate

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

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

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

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

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

plain/parse/parseDayOfWeekFromDate.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.