SkilVaultSign inStart free

Catalogue / note-block-dates

note-block-dates

Older skill: source not recordedSignedDerives the calendar date of Orca Note blocks by parsing the name of the page that contains them, and produces UNIX epoch-second timestamps for the current moment plus the two local midnights bracketing today, so any today question becomes a bounded interval test. Use when the user asks what date a…
---
name: note-block-dates
description: >
  Derives the calendar date of Orca Note blocks by parsing the name of the page that contains them, and produces UNIX epoch-second timestamps for the current moment plus the two local midnights bracketing today, so any today question becomes a bounded interval test. Use when the user asks what date a block or page belongs to, whether something falls on today, or wants epoch seconds for now, the start of today, or the start of tomorrow. Not for creating or editing notes, converting between time zones, or extracting dates from the wording of a block.
license: MIT
---

Reading Dates from Orca Note Page Names

Sort the request first

Every request this skill handles reduces to one of two intents, and choosing correctly up front decides everything downstream:

  • A dating intent — "what date does this block carry?", "which day is this page for?" The answer comes from the containing page's name. Use the first route.
  • A clock intent — "is this from today?", "give me the epoch time for now or for midnight." The answer comes from shell timestamp arithmetic. Use the second route.

A request can need both, as in "did anything labeled yesterday get written today?". Run the routes separately and keep the two answers distinct; the closing sections explain why they differ in kind.

Route one — date blocks through the page that holds them

The operative rule is deliberately narrow: this workflow takes a block's date to be whatever calendar date can be parsed out of the name of the page containing it, and it consults nothing else. That is a choice of method, not a description of Orca Note's data model — the tool exposes page names, so page names are where this workflow looks.

  1. Work out which page holds the target block or blocks. One page is one unit of work: every block on a page shares the same containing name, so batch the question per page.
  2. Call get_page for that page. The call is a pure read — it returns the page's record with its name included, mutates nothing, and needs no optional parameters for this task.
  3. Pull the page name from the response and attempt to parse it as a calendar date. Whole-date shapes such as 2026-11-18, Nov 18, 2026, and 18 November 2026 parse. A dated name is not the private habit of daily-journal pages — wherever such a name appears, if it parses, it qualifies under this rule.
  4. When the name parses, that calendar date answers the question for every block on the page. This is why batching matters: one get_page call settles ten blocks as cheaply as one.
  5. When the name does not parse, the lookup simply produces no date. Report that outcome as it stands: this page name is not a date, so this route returns nothing for its blocks. Do not fish for a substitute in the block's wording, and do not declare the block permanently undateable — the method has a blind spot here, which is different from the block lacking a date by nature.

Worked example. One get_page call for the page named 2026-11-18 returns that name along with blocks email the venue and confirm caterer headcount; both blocks therefore carry the date 2026-11-18. A second call for the page named Backlog, holding renew passport, returns a name that parses as no date — the honest answer for that block is that the method yields no date.

Route two — epoch seconds for now and today's edges

All work here is done by read-only date invocations; each prints a single line to standard output and changes nothing. Every value is UNIX epoch seconds — never milliseconds.

| Value needed | macOS / BSD date | GNU date, usual on Linux | | --- | --- | --- | | Current moment | date +%s | date +%s | | Local midnight opening today, inclusive lower edge | date -v0H -v0M -v0S +%s | date -d "today 00:00:00" +%s | | Local midnight opening tomorrow, exclusive upper edge | date -v+1d -v0H -v0M -v0S +%s | date -d "tomorrow 00:00:00" +%s | | Calendar date of an epoch value TS, for sanity checks | date -r TS +%F | date -d @TS +%F |

Reasoning behind the table:

  • Two implementations. BSD and GNU date spell the same requests differently. If a command fails with an unrecognized option, you are on the other implementation — switch columns and retry.
  • The plus sign in +1d is load-bearing on BSD. Without it, the bare 1 is read as a day-of-month assignment, landing you on the first of the current month rather than one day ahead.
  • Each midnight is requested independently on purpose. Stepping a fixed 86400 seconds from today's edge assumes every local day lasts exactly 24 hours, and daylight-saving shifts make some days 23 or 25; asking date for tomorrow's midnight directly is immune to both.
  • The %F format prints YYYY-MM-DD, the same shape as typical dated page names, which keeps cross-checks between the two routes string-comparable.

Worked check on a machine at fixed offset UTC+2, local date 2026-11-18: today's opening midnight is 1794952800, tomorrow's is 1795039200, and 1794986100 (09:15 that morning) sits between them. The value 1795039200 itself does not qualify — it is the first second of tomorrow.

Putting the routes together

Match the comparison to the kind of evidence you hold, because the two kinds are not interchangeable.

Evidence is an epoch timestamp — a creation or modification instant, or any number the user hands over. Compute both edges from the table and test lower ≤ t < upper. The lower edge is inside today; the upper edge is the first instant of tomorrow and therefore outside; anything below the lower edge is yesterday or earlier. Never settle the question on the lower bound alone — that weaker test also admits every future instant. If work spans a midnight, recompute both edges before the next verdict.

Evidence is a date parsed from a page name. Compare it against today's local calendar date as plain strings — date +%F prints today in the identical 2026-11-18 shape — and treat the verdict as a statement about the day the page's name labels, nothing more.

Keep the kinds apart even when they coexist. A page-name date is a label chosen by a person; a timestamp is a measured instant. On local date 2026-11-18, a block created at 09:15 on the page named 2026-11-17 has page-name date 2026-11-17 and, at the same time, a creation instant inside today's window. Both facts are true, and each answers a different question. Do not convert a page-name date into a timestamp, and do not pass either kind of evidence off as the other.

What this skill must not do

  • Write nothing: the only tool call is get_page and the only shell use is the date table above. Never create, rename, edit, or delete any page or block in the course of this work.
  • Invent nothing: never extract a date from a block's wording; an unparseable page name ends the route with no result, not with a guess.
  • Issue no one-sided verdicts: never classify a timestamp as today using a lower bound alone; always use the half-open interval with a freshly computed upper edge.
  • Relabel nothing: never present a page-name date as a record of when a block was written or changed.

Scope and credit

This skill does not cover converting between time zones, reading dates out of block text, or fetching block creation and modification records — any timestamp you test must already be in hand, and the page-name rule is a limit of this workflow rather than a claim about where Orca Note keeps dates. The skill is an independent rewording that carries forward the MIT-licensed orcanote-date skill by sethyuan (orcanote-agent-skills), preserving its page-name dating procedure and its now-and-midnight timestamp commands.