{
  "schemaVersion": 1,
  "slug": "turkey-defrost-time-calculator",
  "category": "cooking",
  "kind": "implementation",
  "independentValidation": false,
  "implementationHash": "55415053248e6e0bfa2d5ff534ca4f324cfdc279231874e99ac0557e4d8788cd",
  "provenance": "Generated from the calculation contract used by the published page. Publication is not external validation.",
  "sourceFiles": [
    "data/calculators/turkey-defrost-time-calculator.json",
    "src/engine.js"
  ],
  "runtimeSource": "/sources/engine.txt",
  "runtimeHash": "5c888d8898afbdee36267bb9977829e1e2ac568f6677c8ee87469c139864645c",
  "scope": "The compute function records implemented equations, constants, lookup tables and custom rules. Inputs record defaults and allowed values; outputs record precision and units. Defaults are examples, not recommendations. General background references are not evidence for this specific algorithm.",
  "publishedFormula": {
    "formula": "H = w×r; D = H÷24; n_w = ⌈2H⌉",
    "vars": [
      [
        "w",
        "Turkey weight (kg)"
      ],
      [
        "r",
        "Method rate (h/kg)"
      ],
      [
        "H",
        "Defrost time (h)"
      ],
      [
        "D",
        "Defrost time (days)"
      ],
      [
        "n_w",
        "Water changes"
      ]
    ],
    "note": "These are approximate planning times: refrigerator thawing uses 12 hours/kg, while cold-water thawing uses 30 minutes/lb. Keep the refrigerator at 40°F or below; for cold water, keep the turkey wrapped, submerge it in cold tap water and change the water every 30 minutes. Cook immediately after cold-water thawing. Never thaw on the counter or in hot water. “Ready at” is shown in UTC and is only an estimate. Source: USDA FSIS, https://www.fsis.usda.gov/food-safety/safe-food-handling-and-preparation/poultry/happy-thanksgiving."
  },
  "externalEvidence": null,
  "contract": {
    "compute": "const rate = method === 'water' ? 0.5*2.2046226218 : 12; const hours = weightKg*rate; const now = new Date(); const ready = new Date(now.getTime() + hours*3600000); return { hours, days: hours/24, readyAt: ready.toISOString().slice(0,16).replace('T',' ') + ' UTC', waterChanges: method === 'water' ? Math.max(0, Math.ceil(hours*2)-1) : 0 };",
    "inputs": [
      {
        "name": "weightKg",
        "type": "number",
        "default": 6,
        "min": 1,
        "max": 30,
        "step": 0.1,
        "slider": true
      },
      {
        "name": "method",
        "type": "select",
        "default": "fridge",
        "options": [
          {
            "value": "fridge"
          },
          {
            "value": "water"
          }
        ]
      }
    ],
    "outputs": [
      {
        "name": "hours",
        "precision": 1,
        "unit": "h"
      },
      {
        "name": "days",
        "precision": 2,
        "unit": "days"
      },
      {
        "name": "readyAt",
        "precision": 0,
        "unit": "",
        "type": "text"
      },
      {
        "name": "waterChanges",
        "precision": 0,
        "unit": ""
      }
    ],
    "interpret": null
  }
}
