v1.3.0
Bug fixes to the conversion and month arithmetic, and a rebuilt toolchain. Published to npm as jalali-date@1.3.0.
Bug fixes
fixedToGregorianpassed an array where three arguments were expected, making the January/February branch unreachable and returning out-of-range days such as[2021, 2, 0]for Jan 31. Round-tripping every valid date from 1600–2400 now succeeds.- The setters assigned to
inputinstead of_d, sogetDay()and the day-name format identifiers kept reporting the weekday the instance was constructed with.inputnow stays as the original constructor argument and_dis what the setters keep in sync. fixMonthcarried month overflow into the year with an inverted sign, sosetMonth(13)moved back a year instead of forward.daysInMonthhad the same inverted carry, plus a normalization that mapped month 0 onto اسفند and reported 30 days for فروردین. It remains zero-based; the README now documents how that differs fromgetMonth().
Breaking changes
- AMD/RequireJS is no longer supported. esbuild has no UMD output, so the browser bundles are plain IIFEs.
- IE11 is no longer supported. The bundles target ES2019.
mainnow points atlib/jdate.cjsrather than the development bundle, which had been shipping a 62 KB file with an inline source map as the package entry point.
Build
webpack and babel-loader are replaced by a single esbuild script. Four bundles are served behind an exports map — lib/jdate.mjs (ESM), lib/jdate.cjs (CommonJS), lib/jdate.js and lib/jdate.min.js (IIFE, sets window.JDate). The minified bundle drops from 36,293 to 5,047 bytes, mostly because Babel is no longer downleveling to ES5. files, engines and sideEffects are added so the published tarball contains only lib/ and metadata.
Development moved to ESLint 10 flat config, Jest 30 and npm (from Yarn).
Full changelog: 1.2.0...1.3.0