-
Notifications
You must be signed in to change notification settings - Fork 86
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
JAKIM Prayers Time #74
Comments
Yes would love to see it. As long as its doing calculation and not just using a fixed timetable that would be extremely helpful. |
https://github.com/kayrules/solatjakim-api-site. not sure if this is helpful but i will find more if there nothing here |
It looks like this is just downloading the prayer times from e-solat.gov.my. Sorry but for this library we are focusing on calculation based approaches. |
Can I know what kind of calculation is required because i did some findings and found this |
This appears to be what we already do. As discussed in #43 now that we have added the updated rounding, you should have accurate JAKIM prayer times. If you want to match the government issued timetable you just need to use the same coordinates they use. Is there anything else you're looking for? |
Because the times are not accurate especially for Subuh. Please note that the left is from JAKIm and right is from the library. Although as mentioned before that mostly is just one or two minutes early, I have received a few feedback saying that having a accurate time is ideal as the app will be relied on if a particular user goes to a new place and does not know the time. I have also tested the coordinates from the compiled locations below Subuh - 5:53 AM - 5:43 AM -> 10 Minutes Early export const locations = [
{ category: 'Johor', code: 'JHR01', location: 'Pulau Aur', latitude: '2.444152', longitude: '104.524746' },
{ category: 'Johor', code: 'JHR01', location: 'Pemanggil', latitude: '2.580882', longitude: '104.326827' },
{ category: 'Johor', code: 'JHR02', location: 'Kota Tinggi', latitude: '1.729375', longitude: '103.899227' },
{ category: 'Johor', code: 'JHR02', location: 'Mersing', latitude: '2.430917', longitude: '103.836115' },
{ category: 'Johor', code: 'JHR02', location: 'Johor Bahru', latitude: '1.492659', longitude: '103.741359' },
{ category: 'Johor', code: 'JHR03', location: 'Kluang', latitude: '2.030068', longitude: '103.318464' },
{ category: 'Johor', code: 'JHR03', location: 'Pontian', latitude: '1.485561', longitude: '103.387859' },
{ category: 'Johor', code: 'JHR04', location: 'Batu Pahat', latitude: '1.849442', longitude: '102.928834' },
{ category: 'Johor', code: 'JHR04', location: 'Muar', latitude: '2.048817', longitude: '102.571553' },
{ category: 'Johor', code: 'JHR04', location: 'Segamat', latitude: '2.503460', longitude: '102.820754' },
{ category: 'Johor', code: 'JHR04', location: 'Gemas', latitude: '2.581593', longitude: '102.612488' },
{ category: 'Kedah', code: 'KDH01', location: 'Kota Setar', latitude: '6.096953', longitude: '100.353977' },
{ category: 'Kedah', code: 'KDH01', location: 'Kubang Pasu', latitude: '6.267335', longitude: '100.425831' },
{ category: 'Kedah', code: 'KDH01', location: 'Pokok Sena', latitude: '6.167317', longitude: '100.519358' },
{ category: 'Kedah', code: 'KDH02', location: 'Pendang', latitude: '5.993039', longitude: '100.477339' },
{ category: 'Kedah', code: 'KDH02', location: 'Kuala Muda', latitude: '5.644561', longitude: '100.489023' },
{ category: 'Kedah', code: 'KDH02', location: 'Yan', latitude: '5.794950', longitude: '100.372658' },
{ category: 'Kedah', code: 'KDH03', location: 'Padang Terap', latitude: '6.256764', longitude: '100.611034' },
{ category: 'Kedah', code: 'KDH03', location: 'Sik', latitude: '5.818345', longitude: '100.743021' },
{ category: 'Kedah', code: 'KDH04', location: 'Baling', latitude: '5.675547', longitude: '100.916814' },
{ category: 'Kedah', code: 'KDH05', location: 'Kulim', latitude: '5.371742', longitude: '100.555337' },
{ category: 'Kedah', code: 'KDH05', location: 'Bandar Bahru', latitude: '5.131163', longitude: '100.495534' },
{ category: 'Kedah', code: 'KDH06', location: 'Langkawi', latitude: '6.350000', longitude: '99.800000' },
{ category: 'Kedah', code: 'KDH07', location: 'Gunung Jerai', latitude: '5.783333', longitude: '100.433333' },
{ category: 'Kelantan', code: 'KTN01', location: 'Kota Bahru', latitude: '6.116786', longitude: '102.277684' },
{ category: 'Kelantan', code: 'KTN01', location: 'Bachok', latitude: '6.069586', longitude: '102.397185' },
{ category: 'Kelantan', code: 'KTN01', location: 'Pasir Puteh', latitude: '5.836163', longitude: '102.407741' },
{ category: 'Kelantan', code: 'KTN01', location: 'Tumpat', latitude: '6.199069', longitude: '102.169372' },
{ category: 'Kelantan', code: 'KTN01', location: 'Pasir Mas', latitude: '6.042412', longitude: '102.142782' },
{ category: 'Kelantan', code: 'KTN01', location: 'Tanah Merah', latitude: '5.808887', longitude: '102.147077' },
{ category: 'Kelantan', code: 'KTN01', location: 'Machang', latitude: '5.767933', longitude: '102.215387' },
{ category: 'Kelantan', code: 'KTN01', location: 'Kuala Krai', latitude: '5.530813', longitude: '102.201851' },
{ category: 'Kelantan', code: 'KTN01', location: 'Mukim Chiku', latitude: '4.916993', longitude: '102.177656' },
{ category: 'Kelantan', code: 'KTN03', location: 'Jeli', latitude: '5.700699', longitude: '101.843151' },
{ category: 'Kelantan', code: 'KTN03', location: 'Gua Musang', latitude: '4.884279', longitude: '101.968178' },
{ category: 'Kelantan', code: 'KTN03', location: 'Mukim Galas', latitude: '4.828924', longitude: '101.934807' },
{ category: 'Kelantan', code: 'KTN03', location: 'Bertam', latitude: '5.151936', longitude: '102.043792' },
{ category: 'Melaka', code: 'MLK01', location: 'Bandar Melaka', latitude: '2.197138', longitude: '102.249070' },
{ category: 'Melaka', code: 'MLK01', location: 'Alor Gajah', latitude: '2.382211', longitude: '102.211561' },
{ category: 'Melaka', code: 'MLK01', location: 'Jasin', latitude: '2.311337', longitude: '102.430923' },
{ category: 'Melaka', code: 'MLK01', location: 'Masjid Tanah', latitude: '2.352279', longitude: '102.108926' },
{ category: 'Melaka', code: 'MLK01', location: 'Merlimau', latitude: '2.145214', longitude: '102.422383' },
{ category: 'Melaka', code: 'MLK01', location: 'Nyalas', latitude: '2.436091', longitude: '102.469871' },
{ category: 'Negeri Sembilan', code: 'NGS01', location: 'Jempol', latitude: '2.896577', longitude: '102.405454' },
{ category: 'Negeri Sembilan', code: 'NGS01', location: 'Tampin', latitude: '2.472971', longitude: '102.231194' },
{ category: 'Negeri Sembilan', code: 'NGS02', location: 'Port Dickson', latitude: '2.522540', longitude: '101.796293' },
{ category: 'Negeri Sembilan', code: 'NGS02', location: 'Seremban', latitude: '2.725889', longitude: '101.937824' },
{ category: 'Negeri Sembilan', code: 'NGS02', location: 'Kuala Pilah', latitude: '2.740474', longitude: '102.248872' },
{ category: 'Negeri Sembilan', code: 'NGS02', location: 'Jelebu', latitude: '2.941072', longitude: '102.071910' },
{ category: 'Negeri Sembilan', code: 'NGS02', location: 'Rembau', latitude: '2.590525', longitude: '102.092986' },
{ category: 'Pahang', code: 'PHG01', location: 'Pulau Tioman', latitude: '2.790249', longitude: '104.169846' },
{ category: 'Pahang', code: 'PHG02', location: 'Kuantan', latitude: '3.816667', longitude: '103.333333' },
{ category: 'Pahang', code: 'PHG02', location: 'Pekan', latitude: '3.492095', longitude: '103.389545' },
{ category: 'Pahang', code: 'PHG02', location: 'Rompin', latitude: '2.688626', longitude: '102.522802' },
{ category: 'Pahang', code: 'PHG02', location: 'Muadzam Shah', latitude: '3.056192', longitude: '103.085225' },
{ category: 'Pahang', code: 'PHG03', location: 'Maran', latitude: '3.583380', longitude: '102.779065' },
{ category: 'Pahang', code: 'PHG03', location: 'Chenor', latitude: '3.493743', longitude: '102.581850' },
{ category: 'Pahang', code: 'PHG03', location: 'Temerloh', latitude: '3.448649', longitude: '102.416348' },
{ category: 'Pahang', code: 'PHG03', location: 'Bera', latitude: '3.270526', longitude: '102.453864' },
{ category: 'Pahang', code: 'PHG03', location: 'Jerantut', latitude: '3.937395', longitude: '102.362038' },
{ category: 'Pahang', code: 'PHG04', location: 'Bentong', latitude: '3.522168', longitude: '101.910353' },
{ category: 'Pahang', code: 'PHG04', location: 'Raub', latitude: '3.793532', longitude: '101.857465' },
{ category: 'Pahang', code: 'PHG04', location: 'Kuala Lipis', latitude: '4.184330', longitude: '102.054232' },
{ category: 'Pahang', code: 'PHG05', location: 'Genting Sempah', latitude: '3.350000', longitude: '101.783333' },
{ category: 'Pahang', code: 'PHG05', location: 'Janda Baik', latitude: '3.350000', longitude: '101.883333' },
{ category: 'Pahang', code: 'PHG05', location: 'Bukit Tinggi', latitude: '3.400997', longitude: '101.846822' },
{ category: 'Pahang', code: 'PHG06', location: 'Bukit Fraser', latitude: '3.711868', longitude: '101.736556' },
{ category: 'Pahang', code: 'PHG06', location: 'Genting Highlands', latitude: '3.423978', longitude: '101.793201' },
{ category: 'Pahang', code: 'PHG06', location: 'Cameron Highlands', latitude: '4.472120', longitude: '101.380144' },
{ category: 'Pahang', code: 'PHG03', location: 'Jengka', latitude: '3.723779', longitude: '102.545654' },
{ category: 'Perak', code: 'PRK01', location: 'Tapah', latitude: '4.197730', longitude: '101.261529' },
{ category: 'Perak', code: 'PRK01', location: 'Slim River', latitude: '3.830025', longitude: '101.404645' },
{ category: 'Perak', code: 'PRK01', location: 'Tanjung Malim', latitude: '3.705842', longitude: '101.504916' },
{ category: 'Perak', code: 'PRK02', location: 'Ipoh', latitude: '4.597479', longitude: '101.090106' },
{ category: 'Perak', code: 'PRK02', location: 'Batu Gajah', latitude: '4.472081', longitude: '101.041240' },
{ category: 'Perak', code: 'PRK02', location: 'Kampar', latitude: '4.308504', longitude: '101.153653' },
{ category: 'Perak', code: 'PRK02', location: 'Sungai Siput', latitude: '4.819012', longitude: '101.073718' },
{ category: 'Perak', code: 'PRK02', location: 'Kuala Kangsar', latitude: '4.773595', longitude: '100.942045' },
{ category: 'Perak', code: 'PRK03', location: 'Pengkalan Hulu', latitude: '5.706440', longitude: '100.999837' },
{ category: 'Perak', code: 'PRK03', location: 'Grik', latitude: '5.428454', longitude: '101.129703' },
{ category: 'Perak', code: 'PRK03', location: 'Lenggong', latitude: '5.108440', longitude: '100.968034' },
{ category: 'Perak', code: 'PRK04', location: 'Temengor', latitude: '5.333186', longitude: '101.367712' },
{ category: 'Perak', code: 'PRK04', location: 'Belum', latitude: '5.740126', longitude: '101.479350' },
{ category: 'Perak', code: 'PRK05', location: 'Teluk Intan', latitude: '4.022424', longitude: '101.020625' },
{ category: 'Perak', code: 'PRK05', location: 'Bagan Datuk', latitude: '3.991910', longitude: '100.786148' },
{ category: 'Perak', code: 'PRK05', location: 'Kampung Gajah', latitude: '4.184167', longitude: '100.938719' },
{ category: 'Perak', code: 'PRK05', location: 'Seri Iskandar', latitude: '4.357145', longitude: '100.963392' },
{ category: 'Perak', code: 'PRK05', location: 'Beruas', latitude: '4.500804', longitude: '100.781508' },
{ category: 'Perak', code: 'PRK05', location: 'Parit', latitude: '4.476689', longitude: '100.909749' },
{ category: 'Perak', code: 'PRK05', location: 'Lumut', latitude: '4.236302', longitude: '100.632220' },
{ category: 'Perak', code: 'PRK05', location: 'Sitiawan', latitude: '4.216825', longitude: '100.697824' },
{ category: 'Perak', code: 'PRK05', location: 'Pulau Pangkor', latitude: '4.227491', longitude: '100.557741' },
{ category: 'Perak', code: 'PRK06', location: 'Selama', latitude: '5.218462', longitude: '100.693460' },
{ category: 'Perak', code: 'PRK06', location: 'Taiping', latitude: '4.851932', longitude: '100.741634' },
{ category: 'Perak', code: 'PRK06', location: 'Bagan Serai', latitude: '5.008062', longitude: '100.539430' },
{ category: 'Perak', code: 'PRK06', location: 'Parit Buntar', latitude: '5.118682', longitude: '100.488016' },
{ category: 'Perak', code: 'PRK07', location: 'Bukit Larut', latitude: '4.862300', longitude: '100.793000' },
{ category: 'Perlis', code: 'PLS01', location: 'Kangar', latitude: '6.440633', longitude: '100.198371' },
{ category: 'Perlis', code: 'PLS01', location: 'Padang Besar', latitude: '6.662622', longitude: '100.321665' },
{ category: 'Perlis', code: 'PLS01', location: 'Arau', latitude: '6.429708', longitude: '100.269847' },
{ category: 'Pulau Pinang', code: 'PNG01', location: 'Pulau Pinang', latitude: '5.414168', longitude: '100.328759' },
{ category: 'Sabah', code: 'SBH01', location: 'Sandakan Timur', latitude: '5.839444', longitude: '118.117173' },
{ category: 'Sabah', code: 'SBH01', location: 'Bukit Garam', latitude: '5.500122', longitude: '117.837606' },
{ category: 'Sabah', code: 'SBH01', location: 'Semawang', latitude: '5.916667', longitude: '117.766666' },
{ category: 'Sabah', code: 'SBH01', location: 'Temanggong', latitude: '4.910632', longitude: '114.934834' },
{ category: 'Sabah', code: 'SBH01', location: 'Tambisan', latitude: '5.450148', longitude: '119.109986' },
{ category: 'Sabah', code: 'SBH02', location: 'Pinangah', latitude: '4.990731', longitude: '116.832411' },
{ category: 'Sabah', code: 'SBH02', location: 'Terusan', latitude: '6.426081', longitude: '117.687599' },
{ category: 'Sabah', code: 'SBH02', location: 'Beluran', latitude: '5.702070', longitude: '117.401544' },
{ category: 'Sabah', code: 'SBH02', location: 'Kuamut', latitude: '5.015856', longitude: '117.353107' },
{ category: 'Sabah', code: 'SBH02', location: 'Telupid', latitude: '5.627233', longitude: '117.127534' },
{ category: 'Sabah', code: 'SBH03', location: 'Lahad Datu', latitude: '5.024206', longitude: '118.330746' },
{ category: 'Sabah', code: 'SBH03', location: 'Kunak', latitude: '4.686116', longitude: '118.251146' },
{ category: 'Sabah', code: 'SBH03', location: 'Silabukan', latitude: '5.136667', longitude: '118.614167' },
{ category: 'Sabah', code: 'SBH03', location: 'Tungku', latitude: '4.931209', longitude: '114.911622' },
{ category: 'Sabah', code: 'SBH03', location: 'Sahabat', latitude: '5.078867', longitude: '119.070775' },
{ category: 'Sabah', code: 'SBH03', location: 'Semporna', latitude: '4.479391', longitude: '118.611545' },
{ category: 'Sabah', code: 'SBH04', location: 'Bandar Tawau', latitude: '4.244651', longitude: '117.891186' },
{ category: 'Sabah', code: 'SBH04', location: 'Balong', latitude: '4.398421', longitude: '118.058604' },
{ category: 'Sabah', code: 'SBH04', location: 'Merotai', latitude: '4.356929', longitude: '117.827169' },
{ category: 'Sabah', code: 'SBH04', location: 'Kalabakan', latitude: '4.411679', longitude: '117.492699' },
{ category: 'Sabah', code: 'SBH05', location: 'Kudat', latitude: '6.886840', longitude: '116.825311' },
{ category: 'Sabah', code: 'SBH05', location: 'Kota Marudu', latitude: '6.465705', longitude: '116.726409' },
{ category: 'Sabah', code: 'SBH05', location: 'Pitas', latitude: '6.722237', longitude: '117.055273' },
{ category: 'Sabah', code: 'SBH05', location: 'Pulau Banggi', latitude: '7.267260', longitude: '117.150005' },
{ category: 'Sabah', code: 'SBH06', location: 'Gunung Kinabalu', latitude: '6.074544', longitude: '116.562720' },
{ category: 'Sabah', code: 'SBH07', location: 'Papar', latitude: '5.734628', longitude: '115.931851' },
{ category: 'Sabah', code: 'SBH07', location: 'Ranau', latitude: '5.953561', longitude: '116.663950' },
{ category: 'Sabah', code: 'SBH07', location: 'Kota Belud', latitude: '6.353248', longitude: '116.427877' },
{ category: 'Sabah', code: 'SBH07', location: 'Tuaran', latitude: '6.176269', longitude: '116.232790' },
{ category: 'Sabah', code: 'SBH07', location: 'Penampang', latitude: '5.914199', longitude: '116.107663' },
{ category: 'Sabah', code: 'SBH07', location: 'Kota Kinabalu', latitude: '5.980408', longitude: '116.073457' },
{ category: 'Sabah', code: 'SBH08', location: 'Pensiangan', latitude: '4.550000', longitude: '116.316667' },
{ category: 'Sabah', code: 'SBH08', location: 'Keningau', latitude: '5.337404', longitude: '116.156680' },
{ category: 'Sabah', code: 'SBH08', location: 'Tambunan', latitude: '5.721291', longitude: '116.410779' },
{ category: 'Sabah', code: 'SBH08', location: 'Nabawan', latitude: '5.122208', longitude: '116.432583' },
{ category: 'Sabah', code: 'SBH09', location: 'Sipitang', latitude: '5.079190', longitude: '115.550825' },
{ category: 'Sabah', code: 'SBH09', location: 'Membakut', latitude: '5.527729', longitude: '115.695961' },
{ category: 'Sabah', code: 'SBH09', location: 'Beaufort', latitude: '5.345118', longitude: '115.745112' },
{ category: 'Sabah', code: 'SBH09', location: 'Kuala Penyu', latitude: '5.571717', longitude: '115.597146' },
{ category: 'Sabah', code: 'SBH09', location: 'Weston', latitude: '5.216881', longitude: '115.598801' },
{ category: 'Sabah', code: 'SBH09', location: 'Tenom', latitude: '5.130495', longitude: '115.945455' },
{ category: 'Sabah', code: 'SBH09', location: 'Long Pa Sia', latitude: '5.978840', longitude: '116.075320' },
{ category: 'Sabah', code: 'SBH01', location: 'Sukau', latitude: '5.551318', longitude: '118.302786' },
{ category: 'Sabah', code: 'SBH02', location: 'Sandakan Barat', latitude: '5.814070', longitude: '117.732406' },
{ category: 'Sabah', code: 'SBH03', location: 'Tawau Timur', latitude: '4.451914', longitude: '118.169232' },
{ category: 'Sabah', code: 'SBH04', location: 'Tawau Barat', latitude: '4.487002', longitude: '117.307201' },
{ category: 'Sabah', code: 'SBH07', location: 'Putatan', latitude: '5.876932', longitude: '116.058926' },
{ category: 'Sabah', code: 'SBH07', location: 'Pantai Barat', latitude: '6.083333', longitude: '116.500000' },
{ category: 'Sarawak', code: 'SWK01', location: 'Limbang', latitude: '4.755032', longitude: '115.008146' },
{ category: 'Sarawak', code: 'SWK01', location: 'Sundar', latitude: '4.887442', longitude: '115.226701' },
{ category: 'Sarawak', code: 'SWK01', location: 'Terusan', latitude: '4.283333', longitude: '115.616666' },
{ category: 'Sarawak', code: 'SWK01', location: 'Lawas', latitude: '4.834950', longitude: '115.393738' },
{ category: 'Sarawak', code: 'SWK02', location: 'Niah', latitude: '3.866516', longitude: '113.730859' },
{ category: 'Sarawak', code: 'SWK02', location: 'Belaga', latitude: '3.200278', longitude: '113.934714' },
{ category: 'Sarawak', code: 'SWK02', location: 'Sibuti', latitude: '4.045211', longitude: '113.799896' },
{ category: 'Sarawak', code: 'SWK02', location: 'Miri', latitude: '4.399493', longitude: '113.991383' },
{ category: 'Sarawak', code: 'SWK02', location: 'Bekenu', latitude: '4.058185', longitude: '113.844193' },
{ category: 'Sarawak', code: 'SWK02', location: 'Marudi', latitude: '4.406340', longitude: '114.262830' },
{ category: 'Sarawak', code: 'SWK03', location: 'Song', latitude: '2.006440', longitude: '112.549760' },
{ category: 'Sarawak', code: 'SWK03', location: 'Balingian', latitude: '2.930870', longitude: '112.539540' },
{ category: 'Sarawak', code: 'SWK03', location: 'Sebauh', latitude: '3.063030', longitude: '113.477610' },
{ category: 'Sarawak', code: 'SWK03', location: 'Bintulu', latitude: '3.171322', longitude: '113.041907' },
{ category: 'Sarawak', code: 'SWK03', location: 'Tatau', latitude: '2.878960', longitude: '112.855621' },
{ category: 'Sarawak', code: 'SWK03', location: 'Kapit', latitude: '1.995115', longitude: '112.933085' },
{ category: 'Sarawak', code: 'SWK04', location: 'Igan', latitude: '2.823991', longitude: '111.710899' },
{ category: 'Sarawak', code: 'SWK04', location: 'Kanowit', latitude: '2.101223', longitude: '112.153298' },
{ category: 'Sarawak', code: 'SWK04', location: 'Sibu', latitude: '2.287284', longitude: '111.830535' },
{ category: 'Sarawak', code: 'SWK04', location: 'Dalat', latitude: '2.666667', longitude: '112.083333' },
{ category: 'Sarawak', code: 'SWK04', location: 'Oya', latitude: '2.858436', longitude: '111.875922' },
{ category: 'Sarawak', code: 'SWK05', location: 'Belawai', latitude: '2.220691', longitude: '111.218333' },
{ category: 'Sarawak', code: 'SWK05', location: 'Matu', latitude: '2.695497', longitude: '111.471668' },
{ category: 'Sarawak', code: 'SWK05', location: 'Daro', latitude: '2.527996', longitude: '111.417057' },
{ category: 'Sarawak', code: 'SWK05', location: 'Sarikei', latitude: '2.131703', longitude: '111.523728' },
{ category: 'Sarawak', code: 'SWK05', location: 'Julau', latitude: '2.024275', longitude: '111.916609' },
{ category: 'Sarawak', code: 'SWK05', location: 'Bitangor', latitude: '2.169966', longitude: '111.636641' },
{ category: 'Sarawak', code: 'SWK05', location: 'Rajang', latitude: '2.137227', longitude: '111.224885' },
{ category: 'Sarawak', code: 'SWK06', location: 'Kabong', latitude: '1.803557', longitude: '111.130108' },
{ category: 'Sarawak', code: 'SWK06', location: 'Lingga', latitude: '1.250000', longitude: '111.166666' },
{ category: 'Sarawak', code: 'SWK06', location: 'Sri Aman', latitude: '1.237031', longitude: '111.462079' },
{ category: 'Sarawak', code: 'SWK06', location: 'Engkelili', latitude: '1.138464', longitude: '111.666259' },
{ category: 'Sarawak', code: 'SWK06', location: 'Betong', latitude: '1.411517', longitude: '111.528999' },
{ category: 'Sarawak', code: 'SWK06', location: 'Spaoh', latitude: '1.462578', longitude: '111.479364' },
{ category: 'Sarawak', code: 'SWK06', location: 'Pusa', latitude: '1.619999', longitude: '111.291599' },
{ category: 'Sarawak', code: 'SWK06', location: 'Saratok', latitude: '1.738795', longitude: '111.337840' },
{ category: 'Sarawak', code: 'SWK06', location: 'Roban', latitude: '1.866759', longitude: '111.334493' },
{ category: 'Sarawak', code: 'SWK06', location: 'Debak', latitude: '1.562670', longitude: '111.422177' },
{ category: 'Sarawak', code: 'SWK07', location: 'Samarahan', latitude: '1.442757', longitude: '110.497711' },
{ category: 'Sarawak', code: 'SWK07', location: 'Simunjan', latitude: '1.072972', longitude: '110.915332' },
{ category: 'Sarawak', code: 'SWK07', location: 'Serian', latitude: '1.167035', longitude: '110.566506' },
{ category: 'Sarawak', code: 'SWK07', location: 'Sebuyau', latitude: '1.396803', longitude: '111.071899' },
{ category: 'Sarawak', code: 'SWK07', location: 'Meludam', latitude: '1.476546', longitude: '111.213336' },
{ category: 'Sarawak', code: 'SWK08', location: 'Kuching', latitude: '1.560000', longitude: '110.345000' },
{ category: 'Sarawak', code: 'SWK08', location: 'Bau', latitude: '1.417224', longitude: '110.154629' },
{ category: 'Sarawak', code: 'SWK08', location: 'Lundu', latitude: '1.671364', longitude: '109.851969' },
{ category: 'Sarawak', code: 'SWK08', location: 'Sematan', latitude: '1.807459', longitude: '109.775842' },
{ category: 'Sarawak', code: 'SWK09', location: 'Zon Khas', latitude: '4.962580', longitude: '115.554338' },
{ category: 'Selangor', code: 'SGR01', location: 'Gombak', latitude: '3.253502', longitude: '101.653326' },
{ category: 'Selangor', code: 'SGR01', location: 'Hulu Selangor', latitude: '3.560105', longitude: '101.658312' },
{ category: 'Selangor', code: 'SGR01', location: 'Rawang', latitude: '3.320482', longitude: '101.575924' },
{ category: 'Selangor', code: 'SGR01', location: 'Hulu Langat', latitude: '3.113117', longitude: '101.815673' },
{ category: 'Selangor', code: 'SGR01', location: 'Sepang', latitude: '2.691369', longitude: '101.750527' },
{ category: 'Selangor', code: 'SGR01', location: 'Petaling', latitude: '3.083333', longitude: '101.583333' },
{ category: 'Selangor', code: 'SGR01', location: 'Shah Alam', latitude: '3.073281', longitude: '101.518461' },
{ category: 'Selangor', code: 'SGR02', location: 'Sabak Bernam', latitude: '3.678777', longitude: '100.990592' },
{ category: 'Selangor', code: 'SGR02', location: 'Kuala Selangor', latitude: '3.340184', longitude: '101.249762' },
{ category: 'Selangor', code: 'SGR03', location: 'Klang', latitude: '3.044917', longitude: '101.445562' },
{ category: 'Selangor', code: 'SGR03', location: 'Kuala Langat', latitude: '2.803828', longitude: '101.495070' },
{ category: 'Terengganu', code: 'TRG01', location: 'Kuala Terengganu', latitude: '5.329624', longitude: '103.137014' },
{ category: 'Terengganu', code: 'TRG01', location: 'Marang', latitude: '5.207711', longitude: '103.204944' },
{ category: 'Terengganu', code: 'TRG02', location: 'Besut', latitude: '5.829012', longitude: '102.552378' },
{ category: 'Terengganu', code: 'TRG02', location: 'Setiu', latitude: '5.443798', longitude: '102.825218' },
{ category: 'Terengganu', code: 'TRG03', location: 'Hulu Terengganu', latitude: '5.073042', longitude: '103.008937' },
{ category: 'Terengganu', code: 'TRG04', location: 'Kemaman', latitude: '4.777790', longitude: '103.033887' },
{ category: 'Terengganu', code: 'TRG04', location: 'Dungun', latitude: '4.777790', longitude: '103.033887' },
{ category: 'Terengganu', code: 'TRG01', location: 'Kuala Nerus', latitude: '5.333333', longitude: '103.000000' },
{ category: 'Putrajaya', code: 'WLY01', location: 'Putrajaya', latitude: '2.926361', longitude: '101.696445' },
{ category: 'Kuala Lumpur', code: 'WLY01', location: 'Kuala Lumpur', latitude: '3.139003', longitude: '101.686855' },
{ category: 'Labuan', code: 'WLY02', location: 'Labuan', latitude: '5.275346', longitude: '115.247346' },
]; |
Because as alternative if the detection of current location coordinates does not work i will let users choose this location above and use the coordinates if its accurate also |
Does this library produce times closer to the published times you are comparing against? |
Actually for this particular one i have not tested but if you want to test this after implementing like that I could help you |
For the 10 minute difference in Aside from that, differences of 1-2 minutes is almost unavoidable. Published timetable used by governments are often "hand tweaked" and can't be replicated by calculation alone. As an app developer you can either offer location specific times that use calculations (more accurate) or you can choose to present published timetables. Asking a calculation library to replicate a timetable exactly is simply not feasible. It seems perhaps you simply want to offer the exact timetable published by the Malaysian government and that is not something this library will have as a feature. |
You mean provide like list of location with their coordinates instead of automatically using their current location right? |
@farisfaisalthena Are you located in Malaysia? However, there's a big warning even if we'd dive into that, as said @z3bi , and also as explicitly written in https://www.e-solat.gov.my : Which means that, potentially, there are as many tweaks/slightly different calculation methods as the number of states in Malaysia, it's clearly impossible to be 100% accurate, and even if we would, there would be no guarantee to stay sync over the time (for example if a mufti would be replaced by another one who would change the state's calculation method). |
@korbav hi yeah im located in malaysia. I am also sure that JAKIM is also used in Indonesia |
Great, I think at this point, we need to collect verified information about what is happening behind the scene with the calculations, how is it being spread over the different countries, which areas are concerned, what kind of tweaks are being done etc.. From my perspective, the most benefical now is that you contact directly JAKIM institute (in Malay) to get strong information/documents we can base ourselves on. After that, we will be able to have a better analyzis and to take a decision if there is an interest / a possibility / a pertinency to implement something. |
Sure thing! Would it be possible if you let me know the questions you need so I dont miss any questions or another option I can provide you the email of JAKIM |
I did tested it but unfortunately the time gets earlier compared to the current implementation |
I would say (it's also necessary to wait the input of @z3bi which will be more concise!) :
That's it for me, I don't see anything else but please also wait for @z3bi 's input before contacting JAKIM. |
No, calculating based on the user's exact coordinates are more accurate Islamically even if they are different from the published timetables. Consider that the government needs to provide a prayer time for an entire city, but on the eastern part of the city the sun sets at 5:01 PM and on the western side of the city the sun sets at 5:02 PM. The government might publish 5:02 PM for the entire city, but actually for people on the eastern side thats not the actual time of sunset. These are the kinds of tweaks that the government is doing by hand that we may simply never be able to replicate in any kind of calculation. |
In terms of contacting JAKIM, any official explanation on how they arrive at their prayer times would be a good starting point. Once we have that I think we can decide from there. |
Just a question, would it be possible if I send you the source code of the api i used for JAKIM? I used to use an api to get the accurate prayers time but its slow so thats why I switch to this library. If it would be helpful to integrate JAKIM method do let me know as I would send the source code on GitHub
The text was updated successfully, but these errors were encountered: