{"_id":"@alighamdan/prayertimes","name":"@alighamdan/prayertimes","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"@alighamdan/prayertimes","version":"1.0.0","description":"get real times of salah with its end time","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"build":"tsc"},"keywords":["adhan","prayer-times","pray","times","islam"],"author":{"name":"ali ghamdan"},"license":"ISC","packageManager":"pnpm@10.33.0","repository":{"type":"git","url":"git+https://github.com/ali-ghamdan/prayer-times.git"},"bugs":{"url":"https://github.com/ali-ghamdan/prayer-times/issues"},"homepage":"https://github.com/ali-ghamdan/prayer-times#readme","dependencies":{"suncalc":"^1.9.0"},"devDependencies":{"@types/node":"^25.5.2","@types/suncalc":"^1.9.2","typescript":"^6.0.2"},"_id":"@alighamdan/prayertimes@1.0.0","gitHead":"7271c819603a1bddddad084b80f26a4cfe099695","_nodeVersion":"22.22.0","_npmVersion":"10.9.4","dist":{"integrity":"sha512-WEAhmZrDiU8/82PrzmjLs96hqlEVtj238cZ2MiFzgtttrUJy7M3P5lTCK1qJ59mzsy7SYrYNK0D2fNJfsT4qag==","shasum":"25e209146f573961150dae3c2959fb3143238362","tarball":"https://registry.npmjs.org/@alighamdan/prayertimes/-/prayertimes-1.0.0.tgz","fileCount":7,"unpackedSize":6534,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIHeRSFH5jCDHCkh+4Na1MLY+COyoljU5iiS2GN9glpELAiEA1l6t9Qf17WZczRFdihkvS2k+xJoyMLLMXxGtbEzCceA="}]},"_npmUser":{"name":"alighamdan","email":"alialkhojah50@proton.me"},"directories":{},"maintainers":[{"name":"alighamdan","email":"alialkhojah50@proton.me"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/prayertimes_1.0.0_1775590227730_0.6463145328746185"},"_hasShrinkwrap":false}},"time":{"created":"2026-04-07T19:30:27.634Z","1.0.0":"2026-04-07T19:30:27.876Z","modified":"2026-04-07T19:30:28.078Z"},"maintainers":[{"name":"alighamdan","email":"alialkhojah50@proton.me"}],"description":"get real times of salah with its end time","homepage":"https://github.com/ali-ghamdan/prayer-times#readme","keywords":["adhan","prayer-times","pray","times","islam"],"repository":{"type":"git","url":"git+https://github.com/ali-ghamdan/prayer-times.git"},"author":{"name":"ali ghamdan"},"bugs":{"url":"https://github.com/ali-ghamdan/prayer-times/issues"},"license":"ISC","readme":"# Prayer Times\n\nA TypeScript library for calculating Islamic prayer times based on geographic coordinates using the [SunCalc](https://github.com/mourner/suncalc) library.\n\n## Features\n\n- Calculates daily Islamic prayer times (Fajr, Doha, Duhr, Asr, Maghrib, Isha)\n- Includes Last Third of Night calculation\n- Location-based calculations using latitude/longitude\n- Returns precise start and end times for each prayer period\n\n## Installation\n\n```bash\nnpm install @alighamdan/prayertimes\nyarn add @alighamdan/prayertimes\npnpm install @alighamdan/prayertimes\n```\n\n## Usage\n\n```typescript\nimport prayerTimes from \"@alighamdan/prayertimes\";\n\n// Calculate prayer times for a specific date and location\nconst times = prayerTimes(\n  new Date(), // Date\n  lat, // Latitude\n  long, // Longitude\n);\n\n// Access individual prayer times\nconsole.log(times.fajr.start);\nconsole.log(times.fajr.end);\n```\n\n## API\n\n### `prayerTimes(date, latitude, longitude)`\n\n**Parameters:**\n\n- `date`: Date object for which to calculate prayer times\n- `latitude`: Geographic latitude coordinate\n- `longitude`: Geographic longitude coordinate\n\n**Returns:**\nAn object containing the following prayer periods:\n\n| Prayer             | Description                                                                            |\n| ------------------ | -------------------------------------------------------------------------------------- |\n| `fajr`             | Dawn prayer (starts at Fajr, ends at Sunrise)                                          |\n| `doha`             | Forenoon prayer window (Sunrise + 15min to Duhr - 10min)                               |\n| `duhr`             | Midday prayer (starts at Solar Noon, ends at Asr)                                      |\n| `asr`              | Afternoon prayer (calculated using shadow length method)                               |\n| `maghrib`          | Sunset prayer (starts at Sunset, ends at Nautical Dusk)                                |\n| `isha`             | Night prayer (starts at Nautical Dusk, ends at midpoint between Maghrib and next Fajr) |\n| `lastThirdOfNight` | Special time for voluntary prayers (starts 2/3 through the night, ends at next Fajr)   |\n\nEach prayer object contains:\n\n- `start`: Date when the prayer period begins\n- `end`: Date when the prayer period ends\n\n## Calculation Method\n\n- **Fajr angle**: -14.5°\n- **Asr**: Calculated using shadow length method based on object height and sun angle at Duhr\n- **Isha**: Midpoint between Maghrib and the next day's Fajr\n- **Last Third of Night**: Last third of the night period (Maghrib to next Fajr)\n\n## Tech Stack\n\n- TypeScript\n- SunCalc (solar position calculations)\n- Node.js\n\n## License\n\nAll rights are for muslims\n","readmeFilename":"README.md","_rev":"1-2d8e1822da85feb8d8e1173a30acfbe8"}