{"record":{"id":"1ffbe56b9933e910","repo":"TheAlgorithms/Python","slug":"year-out-of-range-there-has-to-be-some-sort-of-li","errorCode":null,"errorMessage":"Year out of range. There has to be some sort of limit...right?","messagePattern":"Year out of range\\. There has to be some sort of limit\\.\\.\\.right\\?","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"maths/zellers_congruence.py","lineNumber":118,"sourceCode":"        raise ValueError(\"Date separator must be '-' or '/'\")\n\n    # Get day\n    d: int = int(date_input[3] + date_input[4])\n    # Validate\n    if not 0 < d < 32:\n        raise ValueError(\"Date must be between 1 - 31\")\n\n    # Get second separator\n    sep_2: str = date_input[5]\n    # Validate\n    if sep_2 not in [\"-\", \"/\"]:\n        raise ValueError(\"Date separator must be '-' or '/'\")\n\n    # Get year\n    y: int = int(date_input[6] + date_input[7] + date_input[8] + date_input[9])\n    # Arbitrary year range\n    if not 45 < y < 8500:\n        raise ValueError(\n            \"Year out of range. There has to be some sort of limit...right?\"\n        )\n\n    # Get datetime obj for validation\n    dt_ck = datetime.date(int(y), int(m), int(d))\n\n    # Start math\n    if m <= 2:\n        y = y - 1\n        m = m + 12\n    # maths var\n    c: int = int(str(y)[:2])\n    k: int = int(str(y)[2:])\n    t: int = int(2.6 * m - 5.39)\n    u: int = int(c / 4)\n    v: int = int(k / 4)\n    x: int = int(d + k)\n    z: int = int(t + u + v + x)","sourceCodeStart":100,"sourceCodeEnd":136,"githubUrl":"https://github.com/TheAlgorithms/Python/blob/f5988cc09713315817df6a7e327e258013a94440/maths/zellers_congruence.py#L100-L136","documentation":"Error \"Year out of range. There has to be some sort of limit...right?\" thrown in TheAlgorithms/Python.","triggerScenarios":"Thrown at maths/zellers_congruence.py:118 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Enter a year within the supported range of the algorithm."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"f5988cc09713315817df6a7e327e258013a94440","analyzedAt":"2026-08-14T17:30:07.041Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}