Skip to content

precision

  • The core functions, which every industry uses.
  • truncateNanoseconds: Truncate nanoseconds since the Unix epoch to the precision a store can actually hold.
  • fromArrowLocalTimestamp: Convert the int64 of an Apache Arrow Timestamp column that has no timezone to a wall-clock date-time string.
  • fromArrowTimestamp: Convert the int64 of an Apache Arrow Timestamp column that has a timezone to a UTC instant string.
  • fromDotNetTicks: Convert .NET DateTime.Ticks back to an ISO 8601 instant string.
  • fromExcelSerial: Convert an Excel day serial back to an ISO 8601 instant string.
  • fromFileTime: Convert a Windows FILETIME back to an ISO 8601 instant string.
  • fromNanoseconds: Convert nanoseconds since the Unix epoch back to an ISO 8601 string.
  • fromNtpTimestamp: Convert a 64-bit NTP timestamp (RFC 5905) back to an ISO 8601 instant string.
  • fromParquetInt96: Convert a Parquet INT96 timestamp back to an ISO 8601 instant string.
  • fromPgMicroseconds: Convert PostgreSQL’s internal timestamptz value back to an ISO 8601 instant string.
  • fromProtoDuration: Convert a protobuf google.protobuf.Duration record back to an ISO 8601 duration string.
  • fromProtoTimestamp: Convert a protobuf google.protobuf.Timestamp record back to an ISO 8601 instant string.
  • toArrowLocalTimestamp: Convert an ISO 8601 plain date-time to the int64 of an Apache Arrow Timestamp column that has no timezone.
  • toArrowTimestamp: Convert an ISO 8601 instant string to the int64 of an Apache Arrow Timestamp column that has a timezone.
  • toDotNetTicks: Convert an ISO 8601 instant string to .NET DateTime.Ticks.
  • toExcelSerial: Convert an ISO 8601 instant string to an Excel day serial.
  • toFileTime: Convert an ISO 8601 instant string to a Windows FILETIME.
  • toNanoseconds: Convert an ISO 8601 instant string to nanoseconds since the Unix epoch.
  • toNtpTimestamp: Convert an ISO 8601 instant string to a 64-bit NTP timestamp (RFC 5905).
  • toParquetInt96: Convert an ISO 8601 instant string to a Parquet INT96 timestamp record.
  • toPgMicroseconds: Convert an ISO 8601 instant string to PostgreSQL’s internal timestamptz value.
  • toProtoDuration: Convert an ISO 8601 duration string to a protobuf google.protobuf.Duration record.
  • toProtoTimestamp: Convert an ISO 8601 instant string to a protobuf google.protobuf.Timestamp record.
  • formatNanoseconds: Format nanoseconds since the Unix epoch as a decimal string, for JSON and other text transports.
  • fromKsuid: Read the instant a KSUID carries (segmentio/ksuid, ksuid.go and base62.go).
  • fromObjectId: Read the creation second a MongoDB ObjectId carries (mongodb/specifications bson-objectid/objectid.md, § Specification and § Timestamp Field).
  • fromSnowflake: Read the instant a Snowflake id carries, using a layout the caller supplies.
  • fromUlid: Read the instant a ULID carries (ulid/spec README, § Components and § Canonical String Representation).
  • fromUuidTimestamp: Read the instant a version 1, 6 or 7 UUID carries (RFC 9562 §5.1, §5.6, §5.7).
  • ulidTimestampPrefix: The first 10 characters of every ULID minted in the same millisecond as an instant, for range scans over stored ULID text (ulid/spec README, § Components and § Encoding).
  • uuidV7TimestampPrefix: The first 13 characters of every version 7 UUID minted in the same millisecond as an instant, for range scans over stored UUID text (RFC 9562 §5.7, §6.11).
  • parseNanoseconds: Parse a decimal string produced by formatNanoseconds — typically one field of a JSON payload — back to nanoseconds since the Unix epoch.
  • isValidInstant: Validate whether a string is an ISO 8601 instant string the precision/ namespace accepts.
  • isValidInt64NanosecondDateTime: Validate whether a string is a plain date-time whose epoch-nanosecond count, read as if it were UTC (Arrow’s rule for a zoneless timestamp), fits an int64: the check to run before toArrowLocalTimestamp(dateTime, "nanosecond").
  • isValidInt64NanosecondInstant: Validate whether a string is an instant whose epoch-nanosecond count fits an int64: the check to run before toArrowTimestamp(isoString, "nanosecond").
  • isValidNanoPattern: Validate whether a string is a nanosecond timestamp parseNanoseconds will parse.
  • isValidNanoseconds: Validate whether a value is an epoch-nanosecond bigint the precision/ namespace accepts.
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.