Skip to content

[P3] Time as a standard effect (now, epoch, formatting) #28

Description

@ecto

The hyperpolyglot ml sheet's entire dates/time section is none
for Loon today: no current time, no unix epoch, no date types.

Proposal

Add a Time standard effect (parallels IO, Rand):

[Time.now]            ; Instant
[Time.epoch]          ; Int  (seconds since 1970-01-01)
[Time.format inst "%Y-%m-%d"]  ; Str

Effects-based design keeps it testable (mock with a handler).

Acceptance criteria

  • Effect, builtin, or both — declared and documented in
    ref/effects.loon.
  • A test that overrides Time.now via a handler.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions