PageSourceSearch

https://vizops360.ai/assets/dateRange-D4P230DK.js

js vizops360.ai collected 2026-10-05 13:53:30 UTC 2,482 bytes, 1 lines download raw bytes

1const y=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function u(t,n,o){return`${t}-${String(n).padStart(2,"0")}-${String(o).padStart(2,"0")}`}function b(t,n){return new Date(Date.UTC(t,n,0)).getUTCDate()}function i(t){const[n,o,e]=t.split("-").map(Number);return`${e} ${y[o-1]} ${String(n).slice(2)}`}function s(t,n){return`${i(t)} - ${i(n)}`}function m(t,n,o=0){const e=t*12+(n-1)-o,a=Math.floor(e/12),r=e%12+1,c=u(a,r,1),l=u(a,r,b(a,r));return{from:c,to:l,label:s(c,l)}}function D(t,n,o){const e=t*12+(n-1)-(o>=21?0:1),a=Math.floor(e/12),r=e%12+1,c=e+1,l=Math.floor(c/12),h=c%12+1;return{from:u(a,r,21),to:u(l,h,20),label:"Current Pay Cycle (21st - 20th)"}}function f(t="Asia/Kolkata"){return new Intl.DateTimeFormat("en-CA",{timeZone:t}).format(new Date)}function M(t=f()){const[n,o,e]=t.split("-").map(Number);return[{key:"this_month",range:m(n,o,0)},{key:"last_month",range:m(n,o,1)},{key:"month_before",range:m(n,o,2)},{key:"pay_cycle",range:D(n,o,e)}].map(a=>({...a,range:T(a.range,t)}))}function T(t,n=f()){if(t.to<=n)return t;const o=t.from<=n?t.from:n,e=t.label===s(t.from,t.to);return{from:o,to:n,label:e?s(o,n):t.label}}function S(t,n){if(!n||t.from>=n)return t;const o=t.to>=n?t.to:n,e=t.label===s(t.from,t.to);return{from:n,to:o,label:e?s(n,o):t.label}}function d(t,n){const[o,e]=t<=n?[t,n]:[n,t];return{from:o,to:e,label:s(o,e)}}function C(t,n){const o=t.year*12+(t.month-1)+n;return{year:Math.floor(o/12),month:(o%12+12)%12+1}}function $(t){const[n,o]=t.split("-").map(Number);return{year:n,month:o}}const g=["January","February","March","April","May","June","July","August","September","October","November","December"],U=["SUN","MON","TUE","WED","THU","FRI","SAT"];function N(t){const o=new Date(Date.UTC(t.year,t.month-1,1)).getUTCDay(),e=[];for(let a=0;a<42;a++){const r=new Date(Date.UTC(t.year,t.month-1,1-o+a));e.push({iso:r.toISOString().slice(0,10),day:r.getUTCDate(),inMonth:r.getUTCMonth()+1===t.month&&r.getUTCFullYear()===t.year})}return e}function A(t){if(!t)return"";const[n,o,e]=t.split("-").map(Number);return`${y[o-1]} ${e}, ${n}`}function p(t,n){const o=new Date(`${t}T00:00:00Z`);return o.setUTCDate(o.getUTCDate()+n),o.toISOString().slice(0,10)}function w(t,n=f()){const o=Math.max(1,Math.floor(t));return{from:p(n,-(o-1)),to:n,label:`Last ${o} day${o===1?"":"s"}`}}function O(t,n){return{from:t,to:t,label:n}}export{g as M,U as W,C as a,M as b,p as c,S as d,d as e,w as f,N as g,A as l,$ as m,s as r,O as s,f as t};

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.