#!/usr/bin/env python3 """Standalone synthetic fixture; standard library only. No network, credentials or user paths.""" import json, math, statistics, sys, platform, datetime import calendar from datetime import date,timedelta months=[(2027,m) for m in range(1,7)] skip=[date(y,m,31).isoformat() for y,m in months if calendar.monthrange(y,m)[1]>=31] clamp=[date(y,m,min(31,calendar.monthrange(y,m)[1])).isoformat() for y,m in months] last=[date(y,m,calendar.monthrange(y,m)[1]).isoformat() for y,m in months] rolling=[date(2027,1,31)+timedelta(days=30*i) for i in range(6)] # Keep anchor31 rather than using previous clamped date28 as next desired day. a=date(2027,1,31);drift=[] for m in range(1,7): if m==1:d=a else:d=date(2027,m,min(d.day,calendar.monthrange(2027,m)[1])) drift.append(d.isoformat()) result={'window':'January through June2027 inclusive, not six valid occurrences','skipInvalid31':skip,'clampOriginal31':clamp,'lastDay':last,'every30Days':[d.isoformat() for d in rolling],'recursiveClampDrifts':drift,'leapFebruaryLastDay':date(2028,2,calendar.monthrange(2028,2)[1]).isoformat(),'anchor30FirstThree':[date(2027,m,min(30,calendar.monthrange(2027,m)[1])).isoformat() for m in [1,2,3]],'scope':'Date-only local calendar fixture; no scheduler registered, no emails or payments; timezone/DST and holiday adjustment not applied.'} assert skip==['2027-01-31','2027-03-31','2027-05-31'] and clamp[1]=='2027-02-28' and drift[2]=='2027-03-28' print(json.dumps({"fixtureCreatedOn":"2026-10-15","executedAt":datetime.datetime.now(datetime.timezone.utc).isoformat(),"synthetic":True,"runtime":platform.python_version(),"result":result},ensure_ascii=False,indent=2))