Skip to content

[Feature Request] Built-in, English-like handling of Dates #634

@iocouto

Description

@iocouto

It would be wonderful if Hyperscript could abstract away the complexity that is dealing with dates in Javascript. I would love to be able to do:

set startDate to 2025-01-29
set finishDate to (startDate + 7 days)

In order to be able to handle all kinds of date calculations, we'd need to have words like:

  • today
  • year, month, day, hour and minutes

That way we'd be able to do:

if the month of birthDate is the month of today then
  if the day of birthDate is the day of today then
    send birthdayGreetings to #welcomeMsg
  end
end

And the complexity of dealing with localised date and time calculations could be abstracted by introducing the keyword local, like this:

set startDate to local today

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