Skip to content

Provide convenience constructors for Civil types #20

@spyoungtech

Description

@spyoungtech

Notably, Jiff does not provide a Time::now, Date::now (or Date::today), or DateTime::now constructor like it does for Timestamp or Zoned.

This may be for good reason, but ergonomically I think users could reasonably expect the following interfaces:

today := Date.today()
now := DateTime.now()
current_time := Time.now()

These should be equivalent to:

today := Zoned.now().to_date()
now := Zoned.now().to_datetime()
current_time := Zoned.now().to_time()

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions