Closed hammady closed 1 year ago
I trust your judgement for the best approach.
@fayez-nazzal The scope will change soon to show last_updated timestamp for each masjid individually. See #47.
@hammady I just read this comment, alright!
New schema:
{
"max_jumaas": 2,
"masjids": {
"ICCO": {
"iqamas": {
"fajr": {
"time": "6:50 am",
"changed": true
},
"zuhr": {
"time": "2:00 pm"
},
"asr": {
"time": "4:45 pm"
},
"maghrib": {
"time": "6:35 pm"
},
"isha": {
"time": "8:00 pm"
}
},
"jumas": [
"12:35 P.M. by Jawad Salman (English)",
"1:30 P.M. by Wael Hamadeh (English)",
"2:45 P.M. by Sheikh Samir Khalil (Arabic)"
],
"jumas_changed": true,
"last_updated": "2023-10-21T03:41:47.555916"
}
}
}
The last_updated
timestamp shows the UTC time in iso format. Without JS, it would show as is. With JS, it needs to be shown relatively.
@fayez-nazzal Probably this is not the latest code but it shows in 13 minutes while it should be 4 hours ago. Is there a timezone issue? My time zone is -4.
I think there is a timezone issue. This timestamp is 3am EST or 7am UTC. It is now showing 10 minutes ago and the time now EST is 7:10. It handles the value as being in current timezone while it should be parsed as UTC.
@hammady Ops..my fault, I will fix this.
@hammady
I think
dayjs
is a solid option and the most minimal. We can go more advanced usingluxon
, but I don't see any need now.There is also an option to use JavaScript's temporal API polyfill, then when browsers' JavaScript officially supports it, we can remove it without any more changes.
All mentioned options are superior to
moment
, especially for dev experience and cleanness.Let me know your thoughts!