Alhootti
Active Member
B4X:
Logger connected to: emulator-5554
--------- beginning of /dev/log/system
--------- beginning of /dev/log/main
** Receiver (bootstartsvc) OnReceive **
*** Service (starter) Create ***
** Service (starter) Start **
** Service (bootstartsvc) Create **
bootatstartsvc.Service_create()
** Service (bootstartsvc) Start **
bootatstartsvc.Service_Start()
** Activity (main) Create, isFirst = true **
main_ramdan_left (java line: 2520)
java.text.ParseException: Unparseable date: "30/02/2025" (at offset 10)
at java.text.DateFormat.parse(DateFormat.java:555)
at anywheresoftware.b4a.keywords.DateTime.DateParse(DateTime.java:148)
at Ta.Clo.main._ramdan_left(main.java:2520)
at Ta.Clo.main._activity_create(main.java:672)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:213)
at Ta.Clo.main.afterFirstLayout(main.java:105)
at Ta.Clo.main.access$000(main.java:17)
at Ta.Clo.main$WaitForLayout.run(main.java:83)
at android.os.Handler.handleCallback(Handler.java:733)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5001)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:785)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:601)
at dalvik.system.NativeStart.main(Native Method)
*** Service (starter) Create ***
** Service (starter) Start **
** Activity (main) Create, isFirst = true **
main_ramdan_left (java line: 2520)
java.text.ParseException: Unparseable date: "30/02/2025" (at offset 10)
at java.text.DateFormat.parse(DateFormat.java:555)
im using this code :
B4X:
Private Sub Ramdan_Left
Dim LeftRam As String
If Hij_Mon >= 10 And Hij_Mon <= 12 Then
Hij_Year = Hij_Year + 1
End If
Dim Meladi As List = HijriConverter.HijriToGregorian(Hij_Year,"09","01" )
LeftRam = NumberFormat(Meladi.Get(0), 2 ,0) & "/" & NumberFormat(Meladi.Get(1), 2 ,0) & "/" & Meladi.Get(2)
Dim diff As Period
DateTime.DateFormat="dd/MM/yyyy"
diff = DateUtils.PeriodBetweenInDays(DateTime.Now ,DateTime.DateParse(LeftRam))
LeftRam = NumberFormat(diff.Days + 2,0,0) '
ASClock3.MiddleText = " " & LeftRam
Label30.Text = "Left : "
Label37.Visible = True
End Sub