Skip to content

Epoch microseconds #33

@ptomato

Description

@ptomato

Bringing microseconds back!

Advantages:

I learned today that Postgres uses 6 decimals of precision for its timestamps and elapsed times. Temporal.Duration supports microseconds just fine, but for epoch microseconds in Instant and ZonedDateTime you have to use a slightly annoying calculation: tc39/proposal-temporal#2849 (comment)

Concerns:

Feature was previously removed for space concerns. When adding new features in a follow-up proposal we have to prioritize what to add.

Prior art:

Previously in Temporal, we had Temporal.Instant.fromEpochMicroseconds(), Instant.prototype.epochMicroseconds, Temporal.ZonedDateTime.prototype.epochMicroseconds. They were removed in 2024 (tc39/proposal-temporal#2849) as part of cutting the size of Temporal to fit on resource-constrained devices.

Constraints / corner cases:

N/A

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions