{
  "endpoint": "https://otherworldlabs.com/monthly-calendar-weekday-counts-and-working-days/api.json",
  "page": "https://otherworldlabs.com/monthly-calendar-weekday-counts-and-working-days/",
  "what_it_answers": "For a month and a year a reader types, which weekday every date of that month falls on, how many days the month holds, how many of each weekday are in it, and how many of those are working days once the reader types the weekdays their own week does not work and the individual dates they are off. It also counts the working days left from a day of the month the reader names, to the last day of that month inclusive.",
  "shape": "A static document, not a service. There is no request to make and nothing is posted anywhere: this file is the engine written out so that an agent re-doing the arithmetic gets the same answer the page gets. The page's own flat answer is the function apiOutputs in its core script, and every output named below is a field of it.",
  "units": "Whole days, weekday names, and nothing else. This engine computes no duration, no money, no rate, no area, no weight and no percentage: there is no hour, no minute, no punch, no threshold, no amount and no percentage figure anywhere in it.",
  "the_page_supplies_no_figure": "Every input is the reader's own: the month, the year, the seven weekday switches, every date typed as a day off, the name given to each one, and the day counted from. The page supplies no holiday of any kind - no federal, state, national, religious, school or bank holiday, no holiday list, no holiday calendar, no observed-day rule and no substitute-day rule - and it never says that any day is or is not a holiday anywhere. It supplies no leave, paid-time-off, vacation, sick-day, accrual, carry-over or entitlement figure or rule, and makes no claim about what any employer, contract, union agreement or law provides. It names no payroll period, pay date, cut-off, notice period or deadline rule. It never says a date is a business day, a banking day, a settlement day, a court day, a filing day or a delivery day for any purpose. It names no school term, semester, half-term or exam date, no religious observance, fast, feast or lunar date, nothing astronomical, nothing seasonal, nothing about daylight, no time zone and no clock-change rule. It publishes no week-numbering convention as anybody's standard. The only rules it supplies are the Gregorian weekday rule and the leap-year rule, which are deterministic, verifiable and the same for everybody.",
  "state": {
    "shape": "{ month, year, workMon, workTue, workWed, workThu, workFri, workSat, workSun, daysOffCount, daysOff: [ { d, m, y, name }, ... ], fromDay }",
    "month_and_year": "Integers. The month is read inside 1 to 12 and the year inside 1900 to 2199. Out of range in EITHER direction is read as not typed, and never pulled to the nearest value the control offers: a year nobody typed is not a year this engine will answer for. Both must be read before any figure is reported, because there is no weekday without a year and the engine never assumes the current one.",
    "the_seven_switches": "workMon to workSun, one per weekday, Monday first. A switch reading the string 1, the number 1 or true is a weekday the reader's own week works; anything else is a weekday it does not. A switch the state does not carry at all is read as worked, which is the position the control ships in. The page supplies nobody's working week: the shipped position is Monday to Friday on, and it is a starting position rather than a claim.",
    "daysOff": "An array of up to ten typed days off. Only the first daysOffCount of them are read; an object the array does not carry is read as a row with nothing on it. Each row is a day d, a month m, a year y and a name. Leave m or y blank and the engine reads the month and the year being counted, so the common case is typing a day number alone.",
    "daysOffCount_blank": "With daysOffCount blank or unreadable, no row is read. That is deliberate: a count the engine cannot read is not a licence to read rows the reader may have left behind after lowering the count.",
    "no_count_only_field": "There is NO input for a count of days off without their dates, and that absence is a decision rather than an omission. A count carries no date, so it can be sorted into none of the four kinds, and subtracting it from the working days would subtract twice every day off that falls on a weekday the reader already does not work - which is the one arithmetic error this engine exists to make structurally impossible. The page prints a line inside its days-off input block telling a reader who holds only a count to leave the dates empty and read the working days as a gross figure.",
    "fromDay": "An integer day of the month, 1 to 31, optional. The day typed is counted in and the count runs to the last day of the month. A day past the end of the month being counted is reported as past the end and the count is zero.",
    "dayList": "A SECOND SPELLING of the same state, and the same function: { dayList: [ { date, weekday, pattern, offName }, ... ] }. From the reader's spelling the engine builds exactly this list - one entry a date of the month, carrying the date as YYYY-MM-DD, its weekday as a label whose leading number is the weekday's place in a Monday-first week, the word Worked or Not worked for whether the reader's week works that weekday, and the name of the day off if it is one - and then tallies it. A caller may hand the list in instead of the month and the year. Nothing is added by it: every state reachable through it with a full month in it is a state the page's own controls reach, the tally is the same function over the same entries, and the page's own test suite asserts that the two spellings answer identically at every swept state. It exists because the workbook sold beside this page keeps one row a date, which IS this list, and S13 reads that workbook against this engine over it. The differences, all of them reported rather than hidden: with a day list given, daysInMonth is 0, monthComplete is false and waiting is false, because a list is not a named month; every one of the five typedOff counts is 0 whatever the caller typed, because no day-off row is read in this spelling; and a list entry whose pattern reads neither Worked nor Not worked is a date whose kind nobody has answered yet, counted in rowsUnanswered and in none of the four kinds. The third worked example prints every one of those figures for a day-list state. The sentence here said Two differences until 2026-10-25, and nothing published was wrong but the count in it (REVIEW-round1.md M-5)."
  },
  "inputs": [
    {
      "name": "month",
      "label": "The month you are counting",
      "type": "integer",
      "control": "month",
      "offered": { "min": 1, "max": 12, "step": 1 },
      "blank_means": "no month: every figure is withheld and the glance says so",
      "note": "The page never assumes a month."
    },
    {
      "name": "year",
      "label": "The year that month falls in",
      "type": "integer",
      "control": "year",
      "offered": { "min": 1900, "max": 2199, "step": 1 },
      "blank_means": "no year: every figure is withheld and the glance says so",
      "note": "There is no weekday without a year and the page never assumes the current one. The range is set where it is so that no Julian-to-Gregorian transition falls inside it."
    },
    {
      "name": "workMon",
      "label": "Monday, in the week you keep",
      "type": "flag",
      "control": "workMon",
      "offered": { "values": ["1", "0"] },
      "blank_means": "worked, which is the position the control ships in",
      "note": "Yours. The page supplies nobody's working week."
    },
    {
      "name": "workTue",
      "label": "Tuesday, in the week you keep",
      "type": "flag",
      "control": "workTue",
      "offered": { "values": ["1", "0"] },
      "blank_means": "worked, which is the position the control ships in",
      "note": "Yours. The page supplies nobody's working week."
    },
    {
      "name": "workWed",
      "label": "Wednesday, in the week you keep",
      "type": "flag",
      "control": "workWed",
      "offered": { "values": ["1", "0"] },
      "blank_means": "worked, which is the position the control ships in",
      "note": "Yours. The page supplies nobody's working week."
    },
    {
      "name": "workThu",
      "label": "Thursday, in the week you keep",
      "type": "flag",
      "control": "workThu",
      "offered": { "values": ["1", "0"] },
      "blank_means": "worked, which is the position the control ships in",
      "note": "Yours. The page supplies nobody's working week."
    },
    {
      "name": "workFri",
      "label": "Friday, in the week you keep",
      "type": "flag",
      "control": "workFri",
      "offered": { "values": ["1", "0"] },
      "blank_means": "worked, which is the position the control ships in",
      "note": "Yours. The page supplies nobody's working week."
    },
    {
      "name": "workSat",
      "label": "Saturday, in the week you keep",
      "type": "flag",
      "control": "workSat",
      "offered": { "values": ["1", "0"] },
      "blank_means": "worked, which is the position the control ships in; the shipped position of this one control is not worked",
      "note": "Yours. The page supplies nobody's working week."
    },
    {
      "name": "workSun",
      "label": "Sunday, in the week you keep",
      "type": "flag",
      "control": "workSun",
      "offered": { "values": ["1", "0"] },
      "blank_means": "worked, which is the position the control ships in; the shipped position of this one control is not worked",
      "note": "Yours. The page supplies nobody's working week."
    },
    {
      "name": "daysOffCount",
      "label": "How many days off you are typing",
      "type": "integer",
      "control": "daysOffCount",
      "offered": { "min": 0, "max": 10, "step": 1 },
      "blank_means": "no row is read",
      "note": "Lowering the count leaves the rows below it out of the reading without clearing them."
    },
    {
      "name": "daysOff[].d",
      "label": "Its day",
      "type": "integer",
      "control": "offDay0 to offDay9",
      "offered": { "min": 1, "max": 31, "step": 1 },
      "blank_means": "the row is waiting for a day of the month and is in no count",
      "note": "Yours. The page publishes no day of its own."
    },
    {
      "name": "daysOff[].m",
      "label": "the month it is in",
      "type": "integer",
      "control": "offMonth0 to offMonth9",
      "offered": { "min": 1, "max": 12, "step": 1 },
      "blank_means": "the month being counted",
      "note": "Type a different month and the row is reported as outside the month being counted rather than dropped."
    },
    {
      "name": "daysOff[].y",
      "label": "the year it is in",
      "type": "integer",
      "control": "offYear0 to offYear9",
      "offered": { "min": 1900, "max": 2199, "step": 1 },
      "blank_means": "the year being counted",
      "note": "Type a different year and the row is reported as outside the month being counted rather than dropped."
    },
    {
      "name": "daysOff[].name",
      "label": "Your name for it",
      "type": "text",
      "control": "offName0 to offName9",
      "offered": { "maxlength": 40 },
      "blank_means": "the day off is still counted and the table prints the words no name typed",
      "note": "Yours. The page supplies no name for any day off, because it supplies no day off."
    },
    {
      "name": "fromDay",
      "label": "Count the working days left from this day of the month",
      "type": "integer",
      "control": "fromDay",
      "offered": { "min": 1, "max": 31, "step": 1 },
      "blank_means": "the working days left are the working days of the whole month",
      "note": "The day typed is counted in."
    }
  ],
  "rounding": {
    "what_is_rounded": "Nothing, and there is nothing to round. Every figure this engine computes is a count of whole days or the identity of a weekday, so no figure it reports has a fractional part, and there is no cent, no half-cent, no negative half-cent and no rounding rule anywhere on this page or in the workbook sold beside it.",
    "the_only_rounding_function": "A typed figure is read with parseFloat and then Math.round, once, before it is tested against its range: a month typed 3.6 is read as 4 and a day typed 2.4 is read as 2. Math.round is half toward positive infinity on the double, so a typed 2.5 is read as 3 and a typed -2.5 as -2; every range on this page starts at or above 1, so a negative half is out of range and read as not typed in any case. That is the whole of the rounding in this engine.",
    "integer_division": "The leap rule and the weekday rule use integer arithmetic only: the remainder of a division by 4, by 100, by 400 and by 7, and Math.floor on a division by 4, by 100 and by 400. No float is involved in either and no tolerance is needed for either.",
    "no_tolerance": "Because every output is an integer count of days, the comparison between this engine, the workbook's three routes and any reimplementation is exact. There is no half-cent band and no epsilon: a disagreement of one is a disagreement.",
    "why_it_is_said_here": "An agent re-doing this arithmetic has nothing to round and should round nothing. A figure with a decimal point in it is not a figure this engine produced."
  },
  "formulas": {
    "daysInMonth": "31 in January, March, May, July, August, October and December; 30 in April, June, September and November; in February 29 when the year is a leap year and 28 when it is not.",
    "isLeap": "y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0). So 2024 and 2000 are leap years and 1900 and 2100 are not. The page's own test suite executes this against 2100, against 2000, against 2024 and against every year of the offered range.",
    "the_weekday_of_a_date": "Sakamoto's method, which is the Gregorian weekday rule written as arithmetic: t = [0,3,2,5,0,3,5,1,4,6,2,4]; yy = (m < 3 ? y - 1 : y); sundayZero = (yy + floor(yy/4) - floor(yy/100) + floor(yy/400) + t[m-1] + d) % 7, which is 0 for a Sunday. No Date object, no locale and no time zone is involved, so the answer cannot read differently on another machine. The page's own index is Monday-first: weekdayNumber = ((sundayZero + 6) % 7) + 1, so 1 is Monday and 7 is Sunday. The suite cross-checks all 109,573 dates of the offered range against Date.UTC and reports 0 disagreements.",
    "the_day_list": "One entry for each date 1 to daysInMonth, carrying the date, its weekday label, the word Worked or Not worked read off the switch for that weekday, and the name of the day off if the reader typed that date off. A date typed off with no name of its own carries the word off in that column, because a day list entry is a day off exactly when its name column is not empty - which is the rule the workbook's own record sheet follows.",
    "the_four_kinds": "Over the day list, each entry with a date and a pattern of Worked or Not worked lands in exactly one of four: Worked (pattern Worked, name empty); Not worked, because of the week you keep (pattern Not worked, name empty); Off, because you typed that date (pattern Worked, name not empty); Off on both counts (pattern Not worked, name not empty). The four are a partition of the dates that carry an answer, which is why a date typed off that was already not worked is counted once and never twice.",
    "nonWorkingDays": "offByPatternOnly + offByTypedDateOnly + offByBoth.",
    "the_weekday_counts": "datesOnWeekdayN is how many entries with a date carry a weekday label whose leading number is N. workedOnWeekdayN is how many of those are of the first kind. The seven datesOnWeekdayN add to datesWithWeekday, and on a state built from a month and a year that equals daysCounted, because every date of a month has a weekday.",
    "workingDaysLeft": "How many entries of the first kind have a day of the month at or after fromDay, counting the day typed in. With fromDay blank it is every entry of the first kind, which is workedDays. With fromDay past the end of the month it is 0 and fromDayPastEnd is true.",
    "the_typed_rows": "Each read row of daysOff is one of: nothing typed on it; waiting for a day of the month, counted in typedOffIncomplete; waiting for a month and a year, counted in typedOffWaiting; no such date, when the day is past the end of the month and year it names, which is how the thirty-first of February is reported; waiting for the month you are counting, when the row carries a full date of its own and the month or the year of the page itself is not typed, counted in typedOffWaiting as well; outside the month you are counting, when it names a real date that this month does not contain; a repeat of a date already typed; or counted. Only a counted row takes a date out of the working days, and a row in any other state is reported in the page's own section G rather than dropped without a word."
  },
  "completeness": {
    "an_entry_is_complete": "when the month and the year are both read: a month inside 1 to 12 and a year inside 1900 to 2199. There is no weekday without a year, so that is the whole of the rule.",
    "what_that_withholds": "Every computed figure on the page. While the month or the year is missing, the four headline tiles print the words not yet and no figure, the weekday counts and the four kinds print the same words, the table of dates prints no date and one placeholder row whose first cell names which of the month and the year is not typed, the month is not laid out and the sentence in its place names the same thing, the two sentences that say the figures add up are not printed at all, and the working is dashed. The sentence saying which of the two is missing prints in the glance, above where the figures would be. Every sentence named here is selected by which of the two inputs is unread and none of them is a fixed string: a placeholder that named the month while a month was typed is what REVIEW-round2.md's B-1 was, and it is corrected in the engine rather than described away here.",
    "what_it_does_not_withhold": "The reader's own typed days off, read back to them in the page's section G with the state the page put each one in. Every figure in one of those rows is a figure the reader typed in that state.",
    "there_is_no_second_condition": "Unlike a page that prices something, this page has no second input whose absence withholds a figure: with the month and the year read, every output below is reported. A week with every day switched off reports zero working days, which is an answer and not a withheld figure, and the whole month as non-working days; the identity still holds.",
    "the_day_list_spelling": "A state carrying a dayList is never waiting, because the list is the answer to what the dates are. daysInMonth is 0 in that spelling, since a list is not a named month, and an entry whose pattern reads neither Worked nor Not worked is counted in rowsUnanswered and in none of the four kinds."
  },
  "states": [
    {
      "state": "a month with no year",
      "reached_when": "the month is read and the year is not, in either direction of its range",
      "printed": "no figure anywhere on the page; the glance prints the sentence saying no year is typed and that there is no weekday without a year, and every other sentence that stands in for a withheld figure names the year as the field that is missing and never the month: the dated table's placeholder row, the sentence in place of the month's layout, and the three dashed lines of the working"
    },
    {
      "state": "a date that exists in no year",
      "reached_when": "a day off's day is past the end of the month and year that row names, which is how the thirty-first of February arrives",
      "printed": "the row is reported in section G as no such date and is excluded from every count; typedOffImpossible counts it"
    },
    {
      "state": "a typed day off on a weekday already not worked",
      "reached_when": "a counted day off falls on a date whose weekday switch is off",
      "printed": "that date is of the fourth kind, Off on both counts; it is taken out once, it appears in the table of dates and in the typed list alike, and offByBoth counts it"
    },
    {
      "state": "a typed day off outside the month being counted",
      "reached_when": "a day off names a real date whose month or year is not the month and year being counted",
      "printed": "the row is reported in section G as outside the month and is counted in none of the four kinds; typedOffOutsideMonth counts it"
    },
    {
      "state": "the same date typed off twice",
      "reached_when": "two read rows resolve to one date",
      "printed": "the first is counted and the second is named in section G as a repeat; typedOffDuplicate counts it and the day is taken out once"
    },
    {
      "state": "a weekly pattern with all seven days switched off",
      "reached_when": "every one of the seven switches reads 0",
      "printed": "workedDays is 0 and prints as 0, nonWorkingDays is the days in the month, and the four kinds still add back to it. It is an answer and not an error"
    },
    {
      "state": "a day counted from that is past the end of the month",
      "reached_when": "fromDay is read and is greater than daysInMonth",
      "printed": "fromDayPastEnd is true, workingDaysLeft is 0, and the page says so in words"
    },
    {
      "state": "a day off with a name and no day",
      "reached_when": "a read row carries a name or a month or a year and no readable day",
      "printed": "the row is reported in section G as waiting for a day of the month; typedOffIncomplete counts it"
    },
    {
      "state": "a day off with a day of the month and nowhere to put it",
      "reached_when": "a read row carries a readable day of its own, no month or year of its own, and the month or the year being counted is not typed - which is what happens when the reader types the day off before choosing the month",
      "printed": "the row is reported in section G as waiting for a month and a year; typedOffWaiting counts it, and the page prints one sentence saying those rows cannot be placed until a month and a year are typed. It is NOT reported as waiting for a day of the month: the day is the one thing the row carries"
    }
  ],
  "outputs": [
    { "name": "daysInMonth", "type": "integer", "of": "how many days the month and year being counted hold: 28, 29, 30 or 31. 0 while the month or the year is not read, and 0 in the day-list spelling, where there is no named month." },
    { "name": "monthComplete", "type": "boolean", "of": "whether both the month and the year were read inside the ranges the controls offer." },
    { "name": "waiting", "type": "boolean", "of": "whether the page is withholding every computed figure. True exactly when monthComplete is false in the reader's spelling, and always false in the day-list spelling." },
    { "name": "daysCounted", "type": "integer", "of": "how many day-list entries carry a date. On a state built from a month and a year this equals daysInMonth; in the day-list spelling it is however many entries of the list carry one." },
    { "name": "rowsAnswered", "type": "integer", "of": "how many dated entries carry a pattern reading Worked or Not worked. Every date of a named month does, because the pattern is read off the reader's own switch; a workbook row whose answer has not been given yet does not." },
    { "name": "rowsUnanswered", "type": "integer", "of": "how many dated entries carry no answer to whether the week works that weekday. daysCounted less rowsAnswered, and 0 on every state the page's own controls reach." },
    { "name": "workedDays", "type": "integer", "of": "the first kind: dates whose weekday the reader's week works and which the reader did not type off. These are the working days of the month." },
    { "name": "offByPatternOnly", "type": "integer", "of": "the second kind: dates whose weekday the reader's week does not work and which the reader did not type off." },
    { "name": "offByTypedDateOnly", "type": "integer", "of": "the third kind: dates whose weekday the reader's week works and which the reader typed off." },
    { "name": "offByBoth", "type": "integer", "of": "the fourth kind: dates whose weekday the reader's week does not work AND which the reader typed off. Counted once here and in no other kind, which is the double-count this engine exists to make impossible." },
    { "name": "nonWorkingDays", "type": "integer", "of": "the second, third and fourth kinds added. workedDays plus nonWorkingDays equals rowsAnswered, and equals daysInMonth on every state the page's controls reach." },
    { "name": "daysTypedOff", "type": "integer", "of": "how many dated entries carry a name in the day-off column: the dates of the month the reader actually took out. Not the number of rows typed, because a row may name no date, a date outside the month, or a date already typed." },
    { "name": "datesWithWeekday", "type": "integer", "of": "how many dated entries carry a weekday label whose leading number is 1 to 7. Equals daysCounted on every state the page's controls reach." },
    { "name": "workedWithWeekday", "type": "integer", "of": "how many of those are of the first kind. Equals workedDays on every state the page's controls reach." },
    { "name": "datesOnWeekday1", "type": "integer", "of": "how many Mondays the month holds." },
    { "name": "workedOnWeekday1", "type": "integer", "of": "how many of those Mondays are working days." },
    { "name": "datesOnWeekday2", "type": "integer", "of": "how many Tuesdays the month holds." },
    { "name": "workedOnWeekday2", "type": "integer", "of": "how many of those Tuesdays are working days." },
    { "name": "datesOnWeekday3", "type": "integer", "of": "how many Wednesdays the month holds." },
    { "name": "workedOnWeekday3", "type": "integer", "of": "how many of those Wednesdays are working days." },
    { "name": "datesOnWeekday4", "type": "integer", "of": "how many Thursdays the month holds." },
    { "name": "workedOnWeekday4", "type": "integer", "of": "how many of those Thursdays are working days." },
    { "name": "datesOnWeekday5", "type": "integer", "of": "how many Fridays the month holds." },
    { "name": "workedOnWeekday5", "type": "integer", "of": "how many of those Fridays are working days." },
    { "name": "datesOnWeekday6", "type": "integer", "of": "how many Saturdays the month holds." },
    { "name": "workedOnWeekday6", "type": "integer", "of": "how many of those Saturdays are working days." },
    { "name": "datesOnWeekday7", "type": "integer", "of": "how many Sundays the month holds." },
    { "name": "workedOnWeekday7", "type": "integer", "of": "how many of those Sundays are working days." },
    { "name": "workingDaysLeft", "type": "integer", "of": "how many working days run from the day of the month typed as fromDay, counting that day in, to the last day of the month. workedDays with fromDay blank; 0 with fromDay past the end of the month; 0 while the page waits." },
    { "name": "weekdaysWorked", "type": "integer", "of": "how many of the seven switches read as worked, 0 to 7. The reader's own week, counted." },
    { "name": "typedOffRows", "type": "integer", "of": "how many of the read day-off rows carry anything at all, in whatever state the engine put them." },
    { "name": "typedOffImpossible", "type": "integer", "of": "how many read rows name a date that exists in no year." },
    { "name": "typedOffOutsideMonth", "type": "integer", "of": "how many read rows name a real date that the month being counted does not contain." },
    { "name": "typedOffDuplicate", "type": "integer", "of": "how many read rows repeat a date an earlier row already named." },
    { "name": "typedOffIncomplete", "type": "integer", "of": "how many read rows carry something - a name, a month or a year - and no readable day of the month of their own, so the row is waiting for a day. A row whose own day IS readable and whose month and year are not is NOT counted here: it is a row with nowhere to put a day, counted in typedOffWaiting, and section G prints it as waiting for a month and a year. The two were published as this one field until 2026-10-25, and the sentence gated on it named only the first, which is what a second implementation written from this file disagreed with the page about at twelve states." },
    { "name": "typedOffWaiting", "type": "integer", "of": "how many read rows cannot be placed until a month and a year are read: a row whose own day is readable and whose month and year are not, while the month being counted is not typed either, and a row carrying a full date of its own while the month being counted is not typed. Section G prints the first as waiting for a month and a year and the second as waiting for the month you are counting, and the page prints one sentence for both." },
    { "name": "fromDayPastEnd", "type": "boolean", "of": "whether the day typed as fromDay is past the end of the month being counted." }
  ],
  "worked_example": {
    "why": "one month worked end to end, with a day off on a worked weekday, a day off on a weekday already not worked, the same date typed twice, and a day counted from. Every figure below is this engine's own answer for the state above it.",
    "state": {
      "month": "11",
      "year": "2026",
      "workMon": "1", "workTue": "1", "workWed": "1", "workThu": "1", "workFri": "1",
      "workSat": "0", "workSun": "0",
      "daysOffCount": "3",
      "daysOff": [
        { "d": "27", "m": "", "y": "", "name": "Office closed" },
        { "d": "1", "m": "", "y": "", "name": "a Sunday already not worked" },
        { "d": "27", "m": "", "y": "", "name": "typed again by mistake" }
      ],
      "fromDay": "10"
    },
    "outputs": {
      "daysInMonth": 30,
      "monthComplete": true,
      "waiting": false,
      "daysCounted": 30,
      "rowsAnswered": 30,
      "rowsUnanswered": 0,
      "workedDays": 20,
      "offByPatternOnly": 8,
      "offByTypedDateOnly": 1,
      "offByBoth": 1,
      "nonWorkingDays": 10,
      "daysTypedOff": 2,
      "datesWithWeekday": 30,
      "workedWithWeekday": 20,
      "workingDaysLeft": 14,
      "weekdaysWorked": 5,
      "typedOffRows": 3,
      "typedOffImpossible": 0,
      "typedOffOutsideMonth": 0,
      "typedOffDuplicate": 1,
      "typedOffIncomplete": 0,
      "typedOffWaiting": 0,
      "fromDayPastEnd": false,
      "datesOnWeekday1": 5,
      "workedOnWeekday1": 5,
      "datesOnWeekday2": 4,
      "workedOnWeekday2": 4,
      "datesOnWeekday3": 4,
      "workedOnWeekday3": 4,
      "datesOnWeekday4": 4,
      "workedOnWeekday4": 4,
      "datesOnWeekday5": 4,
      "workedOnWeekday5": 3,
      "datesOnWeekday6": 4,
      "workedOnWeekday6": 0,
      "datesOnWeekday7": 5,
      "workedOnWeekday7": 0
    },
    "read_it_back": "November 2026 holds 30 days. The first of November is a Sunday, so the month runs over six week rows beginning on Monday. Five Mondays, four each of Tuesday to Saturday and five Sundays make 30. Nine of those dates fall on a Saturday or a Sunday, which this reader's week does not work; one of the nine, the first, was also typed off, so it is of the fourth kind and the other eight are of the second. The twenty-seventh is a Friday the week works and was typed off, so it is the one date of the third kind. 20 + 8 + 1 + 1 = 30. The third row repeats the twenty-seventh and is named as a repeat, so daysTypedOff is 2 and not 3. From the tenth to the thirtieth there are 14 working days."
  },
  "second_worked_example": {
    "why": "the leap rule at a century year, a week with every day switched off, a day off that exists in no year, a day off outside the month, and a day counted from that is past the end of the month. Every figure below is this engine's own answer for the state above it.",
    "state": {
      "month": "2",
      "year": "2100",
      "workMon": "0", "workTue": "0", "workWed": "0", "workThu": "0", "workFri": "0",
      "workSat": "0", "workSun": "0",
      "daysOffCount": "2",
      "daysOff": [
        { "d": "31", "m": "2", "y": "2100", "name": "typed off a wrong form" },
        { "d": "5", "m": "3", "y": "2100", "name": "a real date, not in this month" }
      ],
      "fromDay": "31"
    },
    "outputs": {
      "daysInMonth": 28,
      "monthComplete": true,
      "waiting": false,
      "daysCounted": 28,
      "rowsAnswered": 28,
      "rowsUnanswered": 0,
      "workedDays": 0,
      "offByPatternOnly": 28,
      "offByTypedDateOnly": 0,
      "offByBoth": 0,
      "nonWorkingDays": 28,
      "daysTypedOff": 0,
      "datesWithWeekday": 28,
      "workedWithWeekday": 0,
      "workingDaysLeft": 0,
      "weekdaysWorked": 0,
      "typedOffRows": 2,
      "typedOffImpossible": 1,
      "typedOffOutsideMonth": 1,
      "typedOffDuplicate": 0,
      "typedOffIncomplete": 0,
      "typedOffWaiting": 0,
      "fromDayPastEnd": true,
      "datesOnWeekday1": 4,
      "workedOnWeekday1": 0,
      "datesOnWeekday2": 4,
      "workedOnWeekday2": 0,
      "datesOnWeekday3": 4,
      "workedOnWeekday3": 0,
      "datesOnWeekday4": 4,
      "workedOnWeekday4": 0,
      "datesOnWeekday5": 4,
      "workedOnWeekday5": 0,
      "datesOnWeekday6": 4,
      "workedOnWeekday6": 0,
      "datesOnWeekday7": 4,
      "workedOnWeekday7": 0
    },
    "read_it_back": "2100 is divisible by 4 and by 100 and not by 400, so it is not a leap year and February holds 28 days. 28 is four weeks exactly, so each weekday falls four times. Every switch is off, so no date is of the first kind: workedDays is 0 and prints as 0, and all 28 dates are of the second kind. 0 + 28 + 0 + 0 = 28. Neither typed row reaches the month: the thirty-first of February exists in no year and the fifth of March is a real date this month does not contain, so daysTypedOff is 0 and both rows are named in the page's section G. The day counted from is the thirty-first, which is past the end of a 28-day month, so fromDayPastEnd is true and workingDaysLeft is 0."
  },
  "third_worked_example": {
    "why": "the second spelling, so an agent can see that the day list is the same function. The day list below is the one the first worked example's state builds, with one entry's pattern left unanswered, which is a state only a workbook row reaches.",
    "state": {
      "dayList": [
        { "date": "2026-11-01", "weekday": "7 Sunday", "pattern": "Not worked", "offName": "a Sunday already not worked" },
        { "date": "2026-11-02", "weekday": "1 Monday", "pattern": "Worked", "offName": "" },
        { "date": "2026-11-03", "weekday": "2 Tuesday", "pattern": "", "offName": "" },
        { "date": "2026-11-27", "weekday": "5 Friday", "pattern": "Worked", "offName": "Office closed" }
      ]
    },
    "outputs": {
      "daysInMonth": 0,
      "monthComplete": false,
      "waiting": false,
      "daysCounted": 4,
      "rowsAnswered": 3,
      "rowsUnanswered": 1,
      "workedDays": 1,
      "offByPatternOnly": 0,
      "offByTypedDateOnly": 1,
      "offByBoth": 1,
      "nonWorkingDays": 2,
      "daysTypedOff": 2,
      "datesWithWeekday": 4,
      "workedWithWeekday": 1,
      "workingDaysLeft": 1,
      "weekdaysWorked": 7,
      "typedOffRows": 0,
      "typedOffImpossible": 0,
      "typedOffOutsideMonth": 0,
      "typedOffDuplicate": 0,
      "typedOffIncomplete": 0,
      "typedOffWaiting": 0,
      "fromDayPastEnd": false,
      "datesOnWeekday1": 1,
      "workedOnWeekday1": 1,
      "datesOnWeekday2": 1,
      "workedOnWeekday2": 0,
      "datesOnWeekday3": 0,
      "workedOnWeekday3": 0,
      "datesOnWeekday4": 0,
      "workedOnWeekday4": 0,
      "datesOnWeekday5": 1,
      "workedOnWeekday5": 0,
      "datesOnWeekday6": 0,
      "workedOnWeekday6": 0,
      "datesOnWeekday7": 1,
      "workedOnWeekday7": 0
    },
    "read_it_back": "Four dates, three of them answered. The second is of the first kind. The first is of the fourth kind, because its pattern is Not worked and its name column is not empty. The fourth is of the third kind. The third carries no answer to whether the week works a Tuesday, so it is in rowsUnanswered and in none of the four kinds, which is why 1 + 0 + 1 + 1 = 3 and not 4. The weekday counts read off the labels and still add to datesWithWeekday, and workedOnWeekdayN counts only dates of the FIRST kind, so the Friday and the Sunday above - one of them off because the date was typed, one off on both counts - count in datesOnWeekday and in neither workedOnWeekday. workingDaysLeft is 1 with no day counted from: it is workedDays, because a day list carries no day of the month to count from. daysInMonth is 0 and weekdaysWorked is 7, because a day list carries no named month and no switches: those two are the reader's spelling's own figures and an agent should not read them off a day-list state."
  },
  "limits": [
    "No holiday of any kind is supplied: no federal, state, national, religious, school or bank holiday, no holiday list, no holiday calendar, no observed-day rule, no substitute-day rule, and no claim that any day is or is not a holiday anywhere. Every day off is a date the reader typed.",
    "No leave, paid time off, vacation, sick-day, accrual, carry-over or entitlement figure or rule, and no claim about what any employer, contract, union agreement or law provides.",
    "No payroll period, pay date, cut-off, notice period or deadline rule, and no claim that a date is a business day, a banking day, a settlement day, a court day, a filing day or a delivery day for any purpose.",
    "No school term, semester, half-term or exam date; no religious observance, fast, feast or lunar date; nothing astronomical, seasonal or about daylight; no time zone and no clock-change rule.",
    "No week-numbering convention is presented as anybody's standard. The page states that its weeks begin on Monday and prints no week number.",
    "This engine computes no money, rate, price, cost, wage or amount of any kind, and not one figure it returns is one. The workbook sold beside it names no money figure and no cell of it carries a currency format. The page that carries this engine prints one money figure and one only - the price of the workbook, in its offer section - and the sentence that used to stand here said the page printed none anywhere, three lines above the price it prints (REVIEW-round1.md B-3).",
    "No duration is measured. There is no hour, no minute, no punch, no threshold and no elapsed time: this engine counts whole days.",
    "It will not turn a count of days off into dates. A count does not say which dates it is, and subtracting it would subtract twice every day off already falling on a weekday the reader does not work.",
    "The offered year range is 1900 to 2199 and no state outside it is reachable or answerable. A year outside it is read as a year not typed.",
    "Nothing is stored and nothing is sent. No figure is kept in the browser, no account is asked for and no name is asked for but the reader's own name for their own day off, which is gone when the tab closes."
  ]
}
