Skip to content

parseDayFromDateTime

  • The core functions, which every industry uses.
parseDayFromDateTime(value: string): string

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

  • Returns zero-padded string for day.
  • Returns "" for invalid input.
ParameterTypeDescription
valuestringISO datetime string

Day (01-31) or "" on invalid input

import { parseDayFromDateTime } from "@northguild/gmt/plain/parse";
parseDayFromDateTime("2024-03-15T12:30:00") // "15"
output 

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