Przejdź do treści
Biblioteka skilli
Dane i analityka · Konwersja i formaty

resolve-time

/resolve-time

Zamienia względne tokeny dat, np. last-2w albo yesterday, na konkretne daty początku i końca, liczone od bieżącej lub podanej daty.

Repozytorium
weather-skills ↗
Licencja
MIT
Ostatnia zmiana repozytorium
24.10.2026

Ocena i bezpieczeństwo

100/ 100Klasa: dobry
Format25 / 25
Frontmatter z nazwą i opisem, poprawna nazwa, opis do 1024 znaków, nazwa zgodna z folderem.
Odkrywalność25 / 25
Opis mówi, kiedy użyć skilla, ma sensowną długość i jest w 3. osobie.
Treść35 / 35
Co najmniej 150 słów i do 500 linii, nagłówki, listy kroków, przykłady albo kod.
Higiena15 / 15
Bez zaślepek typu TODO, bez ścieżek Windows, z licencją.
Ryzykobrak sygnałów w skanie
Pliki w paczce
3
Skrypty
2
Komentarze HTML
0
Adresy URL w SKILL.md
0
Przestarzałość

Brak sygnałów. Repozytorium zmienione 24.10.2026, bez odwołań do wycofanych modeli i API.

Licencja

MIT, otwarta: można używać i zmieniać, z zachowaniem informacji o autorze.

Co sprawdzić przed instalacją
  • 2 skrypty w paczce. Przejrzyj je przed instalacją, bo Claude może je uruchomić.

Skrypty: scripts/resolve.py, tests/test_resolve_time.py

Co robi i kiedy

Zamienia względne tokeny dat, np. last-2w albo yesterday, na konkretne daty początku i końca, liczone od bieżącej lub podanej daty.

Oryginalny opis (EN)

Turn a relative date token (last-2w, latest, yesterday, last-dekad, this-month, now-3d) into absolute YYYY-MM-DD start/end or single-day values, from the current UTC date or a given as-of date. Use before a fetch when the user asked for a relative window instead of explicit dates.

Jak działa

  1. Usage
Sekcje z nagłówków SKILL.md, w oryginale · 40 linii, 365 słów
Podgląd SKILL.md
---
name: resolve-time
description: "Turn a relative date token (last-2w, latest, yesterday, last-dekad, this-month, now-3d) into absolute YYYY-MM-DD start/end or single-day values, from the current UTC date or a given as-of date. Use before a fetch when the user asked for a relative window instead of explicit dates."
license: MIT
compatibility: Requires Python 3.12 and uv.
allowed-tools: Bash(uv run ${CLAUDE_SKILL_DIR}/scripts/resolve.py *)
metadata:
  version: "0.0.4"
  catalog-group: agent-tooling
---

# resolve-time

Does the calendar math for a relative date token and prints the absolute dates a fetcher accepts.

## Usage

```bash
uv run ${CLAUDE_SKILL_DIR}/scripts/resolve.py QUERY [--as-of YYYY-MM-DD] [--emit flags|iso|json]
```

### Arguments
- `query` (positional) — a token, any case; not free English. Map the phrase yourself:
  - `latest` / `now` / `today`, `yesterday`, `now-<N>d|w|m|y` (one day N units before).
  - `last-<N>d|w|m|y` — rolling inclusive window ending on the as-of day (`last-2w` = 14 days; "the last month" = `last-30d`).
  - `this-week|dekad|month|year` — period start through the as-of day.
  - `last-week|dekad|month|year` — the previous complete period.
  - `YYYY-MM-DD`, `YYYY-MM-DD/YYYY-MM-DD`, `YYYY-MM`, `YYYY` — absolute; months and years are the full period.
- `--as-of` — the day to count from. Default: today's UTC date.
- `--emit` — stdout format. Default: `flags`.
  - `flags`: `--start-time START --end-time END`, or `--date DAY` for a single-day token.
  - `iso`: `START/END`, or `DAY`.
  - `json`: keys `query`, `as_of`, `start_time`, `end_time`, `date` (null for ranges), `time` (`date` or `range`), `flags`.

### Output
One line on stdout; `as_of=YYYY-MM-DD` on stderr. All ranges are inclusive. Unknown tokens, free text, and `--as-of none` exit 2.

### Notes
- Weeks are ISO weeks (Monday to Sunday). Dekads are days 1–10, 11–20, and 21 to month end. Months and years clamp the day (31 Mar minus 1 month is 28/29 Feb).
- `last-week|dekad|month|year` never includes the period containing the as-of day, even when the as-of day is its last day; pass the next day as `--as-of` to get it.
- The token `latest` is today's date, not the newest published data. Observations lag real time (CHIRPS 2–7 days, ERA5 about 6). For them, pass the fetcher's `--probe-latest` result as `--as-of` so the window ends on published data. A probe that printed `none` makes `--as-of none` exit 2.
- A range fetcher's one-day window is `--start-time D --end-time D`, not this skill's `--date D`.
- In zsh, an unquoted `$T` holding the `flags` output is not split into words. Use `--emit iso` and pass `"${T%/*}"` and `"${T#*/}"`, which works in bash and zsh.

### Example
```bash
T=$(uv run ${CLAUDE_SKILL_DIR}/scripts/resolve.py last-dekad --as-of 2026-10-13 --emit iso)
```
Sets `T=2026-10-01/2026-10-10`, the last complete dekad on or before 13 October 2026.
Pliki w paczce (3)
  • SKILL.md 3 KB
  • scripts/resolve.py 7 KB
  • tests/test_resolve_time.py 6 KB

Wersje

W bazie nie ma innych skilli o nazwie resolve-time.

Migawka bazy z 13.11.2026 · wersja paczki a3b09a7edfb0 (skrót SHA-256 całej paczki)

Pobrania w ostatnich 30 dniach: 0 · ranking

Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.

Podobne skille

  • 100temporal
    Zamienia nazwane okresy czasu, np. dziś, w zeszłym tygodniu czy ostatnie 30 dni, na konkretne zakresy dat ISO.
  • 90mariadb-date-time-functions
    Opisuje funkcje dat i czasu MariaDB: arytmetykę, różnice, formatowanie i czas Unix do zapytań SQL.

Uwagi i zgłoszenia

Wiadomość trafi do Bartosza Sokolińskiego. Adres e-mail jest potrzebny tylko do odpowiedzi. Szczegóły w polityce prywatności.