Wiki › Component

Time data (ask.chaipat.cc)

Component

The time data of ask.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.

In the knowledge graph

Time data and the 4 things it is linked to. Open any dot for its page, or explore it in the full graph.

As data

Everything on this page is read from triples in the knowledge graph. These are the 11 it states about Time data, and 2 more its ontology implies; the console runs SPARQL over the whole graph, here in your browser.

Download
@prefix id: <https://ask.chaipat.cc/id/> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix cj: <https://ask.chaipat.cc/ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .

id:SiteTime
    a cj:Component ;
    rdfs:label "Time data (ask.chaipat.cc)" ;
    cj:shortLabel "Time data" ;
    cj:componentOf id:ThisSite ;
    cj:sourceFile "scripts/build-time-ttl.mjs" ;
    cj:uses id:NodeJS , id:GitHubActions ;
    cj:description "Generates the years of his work and every work's months of work (commits, and the days that had them) from the repositories' histories, so questions about any span of dates find the work done in it." ;
    cj:implements id:OWLTime ;
    cj:article "https://ask.chaipat.cc/wiki/SiteTime"^^xsd:anyURI ;
    cj:implementationDigest "sha256:31632cdc8acc1571b134f97813012e499a0f66966fd0fd0c638fe28e1a07e6bb" .