Skip to content

parseMillisecondFromZoned

parseMillisecondFromZoned(value: string): string

Return the millisecond (0-999) from a zoned datetime string.

  • Returns zero-padded string for millisecond.
  • Returns "" for invalid input.
ParameterTypeDescription
valuestringISO zoned datetime string (e.g., “2024-03-15T14:30:45.123+00:00[UTC]”)

Millisecond (000-999) or "" on invalid input

import { parseMillisecondFromZoned } from "@northguild/gmt/zoned/parse";
parseMillisecondFromZoned("2024-03-15T14:30:45.123+00:00[UTC]") // "123"
output 

zoned/parse/parseMillisecondFromZoned.ts