Skip to content

getUnixMillisecond

getUnixMillisecond(): string

Return the current millisecond 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.

current millisecond string (zero-padded to 3 digits)

import { getUnixMillisecond } from "@northguild/gmt/unix/get";
getUnixMillisecond() // "123"
output 

unix/get/getUnixMillisecond.ts