xsoh / Hijri.js

A tool for the Islamic calender (Hijri) in Javascript
http://xsoh.github.com/Hijri.js
Other
72 stars 26 forks source link

Sometimes it doesn't get the right value #2

Open xsoh opened 11 years ago

xsoh commented 11 years ago

Sometimes it doesn't get the right value of the two digit approach (01/09/1433) sometimes get it as 1/0/1433..

mo9a7i commented 10 years ago

Another thing, how does it read Ramadan first day conflicts, is Shaaban 30 or 29 days. This kind of problems ?

xsoh commented 10 years ago

@Mo9a7i تقويم أم القرى يعتمد على شرطين في حسبه نهاية الاشهر لذلك يعتبر تقويم ثابت ولا يتغير مع دخول الشهور برؤية الهلال من عدمها. التي في النظر نستخدمها للشعائر الدينية فقط كالصيام والأعياد وغيرها. أما تقويم أم القرى فيستخدم في الأمور الرسمية كالمواعيد الحكومية وغيرها https://en.wikipedia.org/wiki/Hijri#Saudi_Arabia.27s_Umm_al-Qura_calendar

mo9a7i commented 10 years ago

معلومة جديدة علي وجميلة, عالأقل فيه أساس الواحد يقدر يرتكز عليه, شكراً على الخدمة التي هي كويسة جداً! لو تحط هالمعلومة في ال Readme أو ال Wiki أحس بتنفع ناس كثير, غير اللي يستخدمون البرنامج أيضاً

xsoh commented 10 years ago

@Mo9a7i المشكلة كثير من الناس يجهل هذه المعلومة "وأنا كنت كذلك" اعتقد المفروض تُعلم في المدارس بشكل دوري حتى يدركها الطلاب والمعلمين. عموما أنا سأكتب في مدونتي شرح عنها وآمل أن تصل لأكبر شريحة ممكنة سواء داخل أو خارج المملكة

relyas commented 4 years ago

This issue can be easily fixed by adding the base 10 as the second argument for parseInt to prevent numbers from being treated as base 8 numbers if they start with leading zeros. Example: parseInt('08', 10)