شكرا أبوبلقيس 
تمت الإضافة إلى أول الموضوع

تمت الإضافة إلى أول الموضوع
p = Input.GetText("Input3");
p = String.ToNumber(p);
x = Input.GetText("Input1");
x = String.ToNumber(x);
y = Input.GetText("Input2");
y = String.ToNumber(y);
----
if p == 2014 then
ff = 0
if y == 1 then
f = x +3 +ff
elseif y == 2 then
f = x -1+ff
elseif y == 3 then
f = x -1+ff
elseif y ==4 then
f = x +2+ff
elseif y ==5 then
f = x +4+ff
elseif y ==6 then
f = x +0+ff
elseif y ==7 then
f = x +2+ff
elseif y ==8 then
f = x +5+ff
elseif y == 9 then
f = x +1+ff
elseif y == 10 then
f = x +3+ff
elseif y == 11 then
f = x -1+ff
elseif y == 12 then
f = x +1+ff
end
if f == 0 or f == 7 or f == 14 or f == 21 or f == 28 or f == 35 then
Dialog.Message("Notice", "السبت");
elseif f == 1 or f == 8 or f == 15 or f == 22 or f == 29 or f == 36 then
Dialog.Message("Notice", "الأحد");
elseif f == 2 or f == 9 or f == 16 or f == 23 or f == 30 then
Dialog.Message("Notice", "الاثنين");
elseif f == 3 or f == 10 or f == 17 or f == 24 or f == 31 then
Dialog.Message("Notice", "الثلاثاء");
elseif f == 4 or f == 11 or f == 18 or f == 25 or f == 32 then
Dialog.Message("Notice", "الأربعاء");
elseif f == 5 or f == 12 or f == 19 or f == 26 or f == 33 then
Dialog.Message("Notice", "الخميس");
elseif f == 6 or f == 13 or f == 20 or f == 27 or f == 34 then
Dialog.Message("Notice", "الجمعة");
end
end
if p == 2015 then
ff = 1
if y == 1 then
f = x +3 +ff
elseif y == 2 then
f = x -1+ff
elseif y == 3 then
f = x -1+ff
elseif y ==4 then
f = x +2+ff
elseif y ==5 then
f = x +4+ff
elseif y ==6 then
f = x +0+ff
elseif y ==7 then
f = x +2+ff
elseif y ==8 then
f = x +5+ff
elseif y == 9 then
f = x +1+ff
elseif y == 10 then
f = x +3+ff
elseif y == 11 then
f = x -1+ff
elseif y == 12 then
f = x +1+ff
end
if f == 0 or f == 7 or f == 14 or f == 21 or f == 28 or f == 35 then
Dialog.Message("Notice", "السبت");
elseif f == 1 or f == 8 or f == 15 or f == 22 or f == 29 or f == 36 then
Dialog.Message("Notice", "الأحد");
elseif f == 2 or f == 9 or f == 16 or f == 23 or f == 30 then
Dialog.Message("Notice", "الاثنين");
elseif f == 3 or f == 10 or f == 17 or f == 24 or f == 31 then
Dialog.Message("Notice", "الثلاثاء");
elseif f == 4 or f == 11 or f == 18 or f == 25 or f == 32 then
Dialog.Message("Notice", "الأربعاء");
elseif f == 5 or f == 12 or f == 19 or f == 26 or f == 33 then
Dialog.Message("Notice", "الخميس");
elseif f == 6 or f == 13 or f == 20 or f == 27 or f == 34 then
Dialog.Message("Notice", "الجمعة");
end
end
if p == 2016 then
ff = 2
if y == 1 then
f = x +3 +ff
elseif y == 2 then
f = x -1+ff+1
elseif y == 3 then
f = x -1+ff+1
elseif y ==4 then
f = x +2+ff+1
elseif y ==5 then
f = x +4+ff+1
elseif y ==6 then
f = x +0+ff+1
elseif y ==7 then
f = x +2+ff+1
elseif y ==8 then
f = x +5+ff+1
elseif y == 9 then
f = x +1+ff+1
elseif y == 10 then
f = x +3+ff+1
elseif y == 11 then
f = x -1+ff+1
elseif y == 12 then
f = x +1+ff+1
end
if f == 0 or f == 7 or f == 14 or f == 21 or f == 28 or f == 35 then
Dialog.Message("Notice", "السبت");
elseif f == 1 or f == 8 or f == 15 or f == 22 or f == 29 or f == 36 then
Dialog.Message("Notice", "الأحد");
elseif f == 2 or f == 9 or f == 16 or f == 23 or f == 30 then
Dialog.Message("Notice", "الاثنين");
elseif f == 3 or f == 10 or f == 17 or f == 24 or f == 31 then
Dialog.Message("Notice", "الثلاثاء");
elseif f == 4 or f == 11 or f == 18 or f == 25 or f == 32 then
Dialog.Message("Notice", "الأربعاء");
elseif f == 5 or f == 12 or f == 19 or f == 26 or f == 33 then
Dialog.Message("Notice", "الخميس");
elseif f == 6 or f == 13 or f == 20 or f == 27 or f == 34 then
Dialog.Message("Notice", "الجمعة");
end
end
function get_day_of_week(dd, mm, yy)
local days = { "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat" }
local mmx = mm
if (mm == 1) then mmx = 13; yy = yy-1 end
if (mm == 2) then mmx = 14; yy = yy-1 end
local val8 = dd + (mmx*2) + math.floor(((mmx+1)*3)/5) + yy + math.floor(yy/4) - math.floor(yy/100) + math.floor(yy/400) + 2
local val9 = math.floor(val8/7)
local dw = val8-(val9*7)
if (dw == 0) then
dw = 7
end
return dw, days[dw]
end
result = Dialog.Message("Notice",get_day_of_week(28, 09, 14) );
TAMER = os.time({year=Input.GetText("Input3"), month=Input.GetText("Input2"), day=Input.GetText("Input1")})Dialog.Message("ABOU_BELKISS:)", os.date("%A",TAMER))
تعليق