pejmana
چهارشنبه 11 شهریور 1383, 10:50 صبح
با سلام 
من یکبار هم عاجزانه این درخواست را کردم اما فقط به من پاسخ دادید که دنبالش بگردم و هرچه بیشتر گشتم کمتر به نتیجه رسیدم .بنابراین یکبار دیگر درخواست میکنم که اگر کسی مبدل  فقط (((تاریخ شمسی به میلادی))) را واقعاً دارد(نه آدرس آنرا) در صورت امکان برایم ایمیل کند.
با تشکر
JavanSoft
چهارشنبه 11 شهریور 1383, 14:57 عصر
FunctionToFarsiDate(eng_date : String):String;
var
  code,year,month,day,f_year,f_month,f_day,lastday,
    plus,minus,intercalary : integer;
  strg : string;
  m,Ret:string;
begin
  strg:=eng_date;
  plus:=0;
  m:='';
  while (length(strg)>0) and (strg[1]<>'/') do
  begin
    m:=m+strg[1];
    delete(strg,1,1);
  end;
  val(m,day,code);
  if (code<>0) then
  begin
    ToFarsiDate:='';
    exit;
  end;
  if (length(strg)>0) and (strg[1]='/') then delete(strg,1,1);
  m:='';
  while (length(strg)>0) and (strg[1]<>'/') do
  begin
    m:=m+strg[1];
    delete(strg,1,1);
  end;
  val(m,month,code);
  if (code<>0) then
  begin
    ToFarsiDate:='';
    exit;
  end;
  if (length(strg)>0) and (strg[1]='/') then delete(strg,1,1);
  m:='';
  while (length(strg)>0)  do
  begin
    m:=m+strg[1];
    delete(strg,1,1);
  end;
  val(m,year,code);
  if (code<>0) then
  begin
    ToFarsiDate:='';
    exit;
  end;
   case month of
     1,5,6 : plus := 10;
     2,4   : plus := 11;
     3,7,8,9,11,12: plus := 9;
     10 : plus := 8;
   end;
   year := year  mod 100;
   intercalary := year ;
   if (intercalary mod 4 = 0) then
     if (month > 2) then plus := plus + 1;
   if ((intercalary-1) mod 4 = 0) then
   begin
     lastday := 30;
     if (month <= 3) then plus := plus + 1;
   end
   else lastday := 29;
   f_year := year - 22;
   if (f_year < 0) then f_year:=f_year+100;
   f_month := month + 9;
   if (f_month > 12) then
   begin
     f_month:=f_month-12;
     inc(f_year);
   end;
   f_day := day+plus;
   if (f_month <= 6) then minus:=31
   else if (f_month>6) and (f_month<12) then minus:=30
   else minus:=lastday;
   if (f_day>minus) then
   begin
     f_day:=f_day-minus;
     inc(f_month);
   end;
   if (f_month > 12) then
   begin
     f_month:=f_month-12;
     inc(f_year);
   end;
   str(f_year,m);
   Ret:=m+'/';
   str(f_month,m);
   Ret:=Ret+m+'/';
   str(f_day,m);
   Ret:=Ret+m;
   ToFarsiDate:=Ret;
end;
pejmana
چهارشنبه 11 شهریور 1383, 16:15 عصر
آقای محمد وکیلی دستتون درد نکنه ، اما من تاریخ شمسی به میلادی را میخواستم نه میلادی به شمسی در ضمن به زبان VB نه Delphi
 :?  :roll:
linux
چهارشنبه 11 شهریور 1383, 17:03 عصر
برادر من! 
کم کم 10 بار این موضوع مطرح شده و جواب داده شده
pejmana
چهارشنبه 11 شهریور 1383, 17:10 عصر
دوست عزیز شما اگه راست میگید و 10 تا سورس بیشتر هست یکیشو رو کنید.
تشکر
linux
چهارشنبه 11 شهریور 1383, 23:11 عصر
این بالا یه جستجو هست تا حالا ندیدیش؟
فقط تو قسمت جستجو شمسی تایپ می کردی 50 مورد مطلب برای شما می آورد
حالا این یه مورد نگاه کن
http://www.barnamenevis.org/forum/viewtopic.php?t=2830&highlight=%D4%E3%D3%ED
http://www.barnamenevis.org/forum/viewtopic.php?t=3499&highlight=%D4%E3%D3%ED
vBulletin® v4.2.5, Copyright ©2000-1404, Jelsoft Enterprises Ltd.