Wiki › Component

Time data (chaipat.cc)

Article
From Chaipat's knowledge graph

The time data of chaipat.cc lets the site answer questions about when: "what did he work on last year?", "two months ago", "21 Oct 2024 – 1 May 2025". It is generated by scripts/build-time-ttl.mjs into data/time.ttl, a fourth file of the knowledge graph beside the hand-written and generated ones.

What it holds

  • Years. A cj:Year for every year of his work, aligned with OWL-Time (a year is a proper interval), each linked to the next. The reasoner adds the year before and every earlier year.
  • Months of work. For every work with a commit history, a cj:Activity for each month it had commits: how many, and on which days. These come from the full history of each repository (scripts/repo-activity.mjs) and, for this site, from its own repository every day in CI.
  • Which years a work and a role were active in, read from those months.

Keeping the catalog current

The entity/resource catalog includes years and relationships derived from this file, not only projects and written articles. Both the weekly repository refresh and the daily site-date workflow rebuild the dependent GitHub graph, then time.ttl, then the wiki graph and search index. They validate and commit those outputs together, including data/wiki/search.json. The catalog snapshot must be generated after time data changes because validation compares it with the complete loaded graph, inferred relationships included.

How questions use it

The question engine turns the words of a question into a range of dates: relative ones ("this year", "the past six months", "since last year"), named ones ("in March 2025", "early 2024", "Q3 2025") and written dates at the precision given ("on 5 March 2025", "from 2024-10-21 to 2025-05-01"). A work counts when one of its days with commits falls in the range, so a project touched in 2024 and again in 2026 is not counted as busy in 2025. The number of commits is given only when every month counted lies wholly inside the range.