bigskysoftware / bigskysoftware/_hyperscript
[Feature Request] Built-in, English-like handling of Dates
- Vorherrschende Sprache
- JavaScript
- Sterne
- 3.8k
- Forks
- 171
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
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
```
Beitragsleitfaden
Für dieses Repository ist kein Beitragsleitfaden indexiert
Rechercherichtung
Beginnen Sie mit der Prüfung der angeforderten Syntax und Beispiele in Issue #634. Definieren Sie den Abschluss anhand der Unterstützung von Datumsliteralen, Datumsarithmetik, dem Zugriff auf Datumsteile und lokalisierten Werten wie `local today`; das Issue nennt keine Implementierungsdateien oder Tests, daher müssen zunächst die relevanten Parser- und Runtime-Einstiegspunkte gefunden werden.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- javascript
- Bereich
- web-dev
- Issue-Typ
- Feature
- Schwierigkeit
- 5/5
- Geschätzter Aufwand
- Über eine Woche
- Aktivitätsstatus
- Ruhig
- Klarheit
- Muss geklärt werden
- Anfängerfreundlichkeit
- 35/100