Skip to content

getUnixMicrosecond

getUnixMicrosecond(): string
import { getUnixMicrosecond } from "@northguild/gmt/unix/get";

Return the current microsecond from the Unix timestamp in UTC as a zero-padded string.

  • Uses Temporal.Now.instant() converted to UTC zoned date time.
  • Returns zero-padded string to 3 digits.
  • Returns “” on failure.

current microsecond string (zero-padded to 3 digits) or “” on failure

getUnixMicrosecond() // "456"
getUnixMicrosecond() // "" (on failure)

unix/get/getUnixMicrosecond.ts