eccys301 downloadsFetches current prayer times using the Aladhan API and saves them to a note.
The Prayer Times Plugin fetches and displays daily prayer times in Obsidian. It uses the Aladhan API to ensure accurate schedules based on your chosen location. Customize the settings to match your preferences, and keep your workspace aligned with your daily schedule.
plugins folder, usually located in .obsidian/plugins inside your vault.Settings > Community Plugins.After enabling the plugin, configure the settings via Settings > Prayer Times:
Prayer Times section in your workspace to view the schedule.Date: 12/08/2024 Location: New York
| Prayer | Local Time | Time (UTC) |
|---|---|---|
| Fajr | 05:00 AM | 10:00 AM |
| Dhuhr | 12:15 PM | 05:15 PM |
| Asr | 03:45 PM | 08:45 PM |
| Maghrib | 06:10 PM | 11:10 PM |
| Isha | 07:30 PM | 12:30 AM |
When using custom templates, you can use these placeholders:
%city% — Your configured city name%YYYY% — Full year (2024)%YY% — Short year (24)%MM% — Month with leading zero (01-12)%M% — Month without leading zero (1-12)%DD% — Day with leading zero (01-31)%D% — Day without leading zero (1-31)%MMMM% — Full month name (January)%MMM% — Month abbreviation (Jan)%dddd% — Full day name (Monday)%ddd% — Day abbreviation (Mon)%date% — Full formatted date (January 15, 2024)%prayer% — Standard 12-hour time (5:23 AM)%prayer_24h% — 24-hour time (05:23)%prayer_utc% — UTC time in 12-hour format%prayer_24h_utc% — UTC time in 24-hour formatReplace "prayer" with: fajr, sunrise, dhuhr, asr, maghrib, isha, midnight
When configuring the output location, you can use these date placeholders:
%YYYY% — Full year (2024)%YY% — Short year (24)%MM% — Month with leading zero (01-12)%M% — Month without leading zero (1-12)%DD% — Day with leading zero (01-31)%D% — Day without leading zero (1-31)%MMM% — Month abbreviation (Jan)%MMMM% — Full month name (January)%ddd% — Day abbreviation (Mon)%dddd% — Full day name (Monday)Example path: Notes/%YYYY%-%MM%/%DD%.md
apiHandler.ts: Handles requests to the Aladhan API.settingsTab.ts: Implements the settings UI.settings.ts: Manages and stores plugin settings.main.ts: Initializes and integrates the plugin into Obsidian.prayerTimesPlugin.ts: Contains the core logic for fetching and displaying prayer times.npm install to set up dependencies.npm run build.Contributions are welcome. Fork the repository, make your changes, and submit a pull request.
This plugin is released under the MIT License.
This plugin connects to the Aladhan API to retrieve prayer times. Thank you to the Aladhan team for providing this valuable service.
If you encounter any issues or have suggestions, please contact the developer.