{"repo":"arashm/JDate","free":true,"listed":false,"github":"https://github.com/arashm/JDate","clone":"git clone https://github.com/arashm/JDate.git","description":"A Jalali to Gregorian converter in Javascript with support of formatting output","language":"JavaScript","stars":94,"topics":["jalali","jdate","gregorian-converter","solar","calendar"],"license":"MIT","category":"productivity","readme_excerpt":"JDate ===== A Jalali to Gregorian converter in JavaScript with support of formatting output Installation Install from npm: Both ES modules and CommonJS are supported: For the browser, grab a build from the lib directory (or a CDN) and load it with a tag, which defines a global JDate : The full version is useful for debugging. You may want to use the minified version in production as it is smaller. Both ship with external source maps. File Format Used by ---- ------ ------- lib/jdate.mjs ESM import lib/jdate.cjs CommonJS require lib/jdate.js IIFE , sets window.JDate lib/jdate.min.js IIFE, minified , CDN AMD/RequireJS is no longer supported as of 1.3.0. The bundles target ES2019, so Internet Explorer is no longer supported either — use 1.2.x if you need either. TypeScript Types ship with the package — there is no @types/jalali-date to install, and nothing to configure. The library itself stays JavaScript; the declarations are hand written in types/jdate.d.ts and emitted per module format, so import and require each get the shape they actually receive at runtime. Under require , the same types come through a namespace on the class: The constructor is typed as four overloads, so the argument mistakes that fail quietly at runtime fail at compile time instead — new JDate([1396, 8]) builds an Invalid Date rather than throwing, and is rejected here because JalaliDate is a three-element tuple. Config entry counts stay a runtime check, so that a name list inferred as string[] rather th","default_branch":null,"files":null,"tree":[],"storefront":"/r/arashm","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/arashm/JDate/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}