Review of "Hijri (Islamic) Date - Adjustable" version 2

Details Page Preview

The original Hijri date extension. Display the current Hijri (Islamic) date in the top panel. You can adjust date according to moonsighting in your area, customize color, and get sunset-based transitions. Also known as the Islamic calendar, Arabic date, or Muslim lunar calendar, this extension shows the traditional Islamic dating system with customization options. Features - Displays the current Hijri date in the GNOME top panel. - User-adjustable date offset to match local moon sighting (±3 days). - Color customization: Pick your preferred date color using a color picker. - Location-based sunset calculation: Provide latitude/longitude for accurate Islamic day transitions. - Panel positioning: Choose left or right side placement in the top panel. - Automatic daily update based on system time and sunset calculations. - Easy configuration through a graphical preferences dialog. Tested On GNOME Shell Version : Version 5 ---- : : - 3.36.8 ( Ubuntu 20.04 LTS ) Version 17 ---- : : - 40.4.0 ( Ubuntu Impish Indri (development branch) ) - 41.0 (Fedora Linux 35 (Workstation Edition)) - 42.9 (Pop!_OS 22.04 LTS) - 43.0 (Fedora Linux 37 (Workstation Edition)) - 44.0 (Fedora Linux 38 (Workstation Edition)) Versino 23 ---- :: - >=45 (Tested on Ubuntu 25.10 (GNOME 49))

Extension Homepage
https://github.com/Ameen-Sha-Cheerangan/Hijri-Date-Gnome-Extension

No comments.

Diff Against

Files

Note: Binary files aren't shown on the web site. To see all files, please download the extension zipfile.

All Versions

Previous Reviews on this Version

JustPerfection rejected
1. You cannot create objects in init (line 22 extension.js): https://gjs.guide/extensions/review-guidelines/review-guidelines.html#only-use-init-for-initialization 2. Also destroy and null out `dateLabel` in disable: https://gjs.guide/extensions/review-guidelines/review-guidelines.html#destroy-all-objects 3. You can use `y_align: Clutter.ActorAlign.CENTER` for label. No need for css to do that. 4. Use `stylesheet.css` instead of `style` (line 23 extension.js). 5. Use `42` instead of `42.5`. If you need any help with your extension you can ask us on: - [GNOME Matrix Channel](https://matrix.to/#/#extensions:gnome.org) - IRC Bridge: irc://irc.gimpnet.org/shell-extensions
AmeenShaC waiting for author
When ever I try to add a css file it is not working anymore. So I rectified the 1, 2, 5 issues.
JustPerfection rejected
Maybe you're using the wrong property name. You should use: `style_class` Wrap it inside a container: ```js let container = new St.Bin({ style_class: 'gold', }); let label = new St.Label({ text: 'My Text', y_align: Clutter.ActorAlign.CENTER, }); container.set_child(label); Main.panel._leftBox.insert_child_at_index(container, 1); ``` Inside **stylesheet.css** file: ```css .gold { background-color: gold; } ```
AmeenShaC posted a review
const St = imports.gi.St; const Main = imports.ui.main; let dateLabel; function setDate() { const change = 0; // Change this value to 0, -1, or 1 to adjust the date const currentDate = new Date(); currentDate.setDate(currentDate.getDate() + change); const formatter = new Intl.DateTimeFormat("ar-IN-u-ca-islamic", { day: "numeric", month: "long", year: "numeric", }); const modifiedHijriDate = formatter.format(currentDate); dateLabel.set_text(`${modifiedHijriDate}`); } function init() { // Initialize the extension } function enable() { dateLabel = new St.Label({ y_align: Clutter.ActorAlign.CENTER, style_class: "hijri-date-label", }); setDate(); Main.panel._leftBox.insert_child_at_index(dateLabel, 1); Main.panel._leftBox.set_child_at_index(dateLabel, 1); } function disable() { Main.panel._leftBox.remove_child(dateLabel); dateLabel.destroy(); dateLabel = null; } is this okay now
JustPerfection posted a review
yeah, that's ok.