PageSourceSearch

https://www.aipictors.com/assets/get-weeks-in-month.js

js aipictors.com collected 2026-10-01 12:00:01 UTC 626 bytes, 1 lines download raw bytes

1const g=(a,e)=>{const o=[],t=new Date(a,e,0).getDate();for(let n=1;n<=t;n+=1)new Date(a,e-1,n).getDay()===1&&o.push(n);return o};function l(a,e){return g(a,e).length}function u(a,e,o){const t=new Date(a,e-1,o),n=new Date(t);n.setDate(t.getDate()-(t.getDay()+6)%7);const s=n.getFullYear(),D=n.getMonth()+1,r=g(s,D),d=n.getDate(),c=r.findIndex(y=>y===d)+1;return{year:s,month:D,weekIndex:Math.max(c,1)}}function h(a=new Date){const e=new Date(a),o=new Date(e);o.setDate(e.getDate()-(e.getDay()+6)%7);const t=new Date(o);return t.setDate(o.getDate()-7),u(t.getFullYear(),t.getMonth()+1,t.getDate())}export{u as a,h as b,l as g};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.