+ 1

I dont understand why res is undefined.

I have added m and y in myP then i want it to increase or decrease it. But not working https://code.sololearn.com/WwANNT18j79s/?ref=app

22nd Feb 2022, 6:14 AM
Salman B
Salman B - avatar
53 Answers
+ 1
From what I've read, most similar programs clearly states that they only provide an estimation, and for actual (more accurate) information, one should consult an alim. So I guess we're not the only ones questioning this doubt : )
24th Feb 2022, 1:12 PM
Ipang
+ 3
I have a question, why we calculate 365 days in a year, isn't it 354 days for Hijri calendar? also why months are counted for 31 days? days in Hijri calendar are 29 ~ 30 days only ...
24th Feb 2022, 10:55 AM
Ipang
24th Feb 2022, 9:52 AM
Salman B
Salman B - avatar
+ 2
Doing some Google searching, Islamic calendars are complicated. here is a copy paste result. The months are alternately 30 and 29 days long except for the 12th, Dhū al-Ḥijjah, the length of which is varied in a 30-year cycle intended to keep the calendar in step with the true phases of the moon. In 11 years of this cycle, Dhū al-Ḥijjah has 30 days, and in the other 19 years it has 29. Thus, the year has either 354 or 355 days. So I would also like to know how is it computed?
24th Feb 2022, 11:04 AM
Bob_Li
Bob_Li - avatar
+ 2
I have counted 30 days per month and 355 days per year. Because if someone pray more than they missed there would be no problem.
24th Feb 2022, 12:04 PM
Salman B
Salman B - avatar
+ 2
Islamic calendar calculate months with the help of moon, every 29 or 30 days later moon start, what you say i dony know but you have seen thin size moon that is days one or Islamic month.
24th Feb 2022, 12:07 PM
Salman B
Salman B - avatar
+ 2
Salman, Please describe the steps I can take to reproduce the problem with increase/decrease buttons. I wanna fix it. I see you got lots of help from Bob Li and FF9900. Hope you got the solution now ...👍 BTW I can only read DM, can't reply ...
26th Feb 2022, 6:51 AM
Ipang
+ 1
Sure. What i exactly want is. There are 5 category of prayers. That is 5 prayers each day. If i missed 2 years of prayers so i just need to add 2 in prompt so it will automatically add 730 in each category. There is month prompt aswell. I also need add year and month option for each category separately. Because if i missed 1st category prayer more than other 4 category. I can add seprately. After i complete missed prayer i will decrease it accordingly.
22nd Feb 2022, 7:19 AM
Salman B
Salman B - avatar
+ 1
Minus is not working, 2nd category is not working.
22nd Feb 2022, 11:08 AM
Salman B
Salman B - avatar
22nd Feb 2022, 11:13 AM
furqan elahie
+ 1
Salman B Maybe you want something like this? I used the oop approach since the functionality is similar for all sections. Maybe somebody could improve the UI with sliding panels to auto hide the numeric inputs and improve the aesthetics. https://code.sololearn.com/WG6C9jf6yHoq/?ref=app
24th Feb 2022, 9:19 AM
Bob_Li
Bob_Li - avatar
+ 1
Thats great. Could you help me with storage? Once i close browser it resets everything. I want it to store when it reopens.
24th Feb 2022, 9:36 AM
Salman B
Salman B - avatar
+ 1
The problem is browser permission to store data. Research on creating webapps
24th Feb 2022, 9:43 AM
Bob_Li
Bob_Li - avatar
+ 1
post the link to your latest version
24th Feb 2022, 9:46 AM
Bob_Li
Bob_Li - avatar
+ 1
Count would be the same i guess. Or as per majority of countries days has been decided
24th Feb 2022, 12:46 PM
Salman B
Salman B - avatar
+ 1
But there is still the problem of synchronizing with the lunar phases. So there is no single standard?🤔 Dates and calendars are complicated.
24th Feb 2022, 12:48 PM
Bob_Li
Bob_Li - avatar
+ 1
Now lets talk about my code.
24th Feb 2022, 1:26 PM
Salman B
Salman B - avatar
+ 1
This is what I came up with based on your idea in feeds. I'm not sure the "ADD" button was doing its work as expected. I haven't implemented storage related code yet ... https://code.sololearn.com/Wj0LrNPd6yEd/?ref=app
25th Feb 2022, 2:54 AM
Ipang
+ 1
FF9900 Great code, I minimized it a bit more... and added some animation. You should add an alert box to instruct the user of the functions. For v2: long press (for mobile) or right-mouse-button click (on computer) + adds 30 long press or RMB on the number subtracts 30 normal tap or mouse-click tap is +1 or -1 for + button and number display respectively. To be clear: This is FF9900's code, I just modified it a little....😁 https://code.sololearn.com/W4338MQiKoqB/?ref=app
26th Feb 2022, 12:12 AM
Bob_Li
Bob_Li - avatar
+ 1
Thats cool. Please check your message
26th Feb 2022, 4:23 AM
Salman B
Salman B - avatar