janisetnies Posted August 14, 2007 Report Share Posted August 14, 2007 Pamekleju tepat pa forumu un nevarēju atrast nekur kodu kas uzrada Latviski dienas nosaukumu, mēnesi, datumu, gadu! Piemēram šitā: Otrdiena, 14.Augusts 2007! Varbūt kādam ir Latvisko dienu, mēnešu, kods? Ļoti vajag! Link to comment Share on other sites More sharing options...
Grey_Wolf Posted August 14, 2007 Report Share Posted August 14, 2007 kas pats nevari uzrakstiit? 12 meneshi 7 dienas un paris rindinjas koda... Link to comment Share on other sites More sharing options...
janisetnies Posted August 14, 2007 Author Report Share Posted August 14, 2007 kas pats nevari uzrakstiit?12 meneshi 7 dienas un paris rindinjas koda... Nevaru, ja vari uzraksti :) Link to comment Share on other sites More sharing options...
v3rb0 Posted August 14, 2007 Report Share Posted August 14, 2007 require_once 'Zend/Date.php'; require_once 'Zend/Locale.php'; $zd = new Zend_Date(); echo $zd -> toString('EEEE, dd.MMMM YYYY',new Zend_Locale('lv_LV')); Link to comment Share on other sites More sharing options...
janisetnies Posted August 14, 2007 Author Report Share Posted August 14, 2007 īsti nesapratu, ierakstot to kodu, man no tās vietas rāda baltu lapu! Link to comment Share on other sites More sharing options...
Val Posted August 14, 2007 Report Share Posted August 14, 2007 uztaisi masīvu nedēļas dienām un masīvu mēnešu nosaukumiem brien uz http://lv.php.net/date Link to comment Share on other sites More sharing options...
janisetnies Posted August 14, 2007 Author Report Share Posted August 14, 2007 Nu lieta tāda, ka es neprotu tadus masīvus veidot un tāpēc jautāju jums, kuri prot! Domāju tas neprasa ilgu laiku un kadam jau drošvien ir, jo skatos daudzos portālos ir Latviski! Link to comment Share on other sites More sharing options...
Val Posted August 14, 2007 Report Share Posted August 14, 2007 domāju, ka ir iemesls iemācīties: http://lv2.php.net/manual/en/function.array.php Link to comment Share on other sites More sharing options...
janisetnies Posted August 14, 2007 Author Report Share Posted August 14, 2007 Nav ne vēlēšanas, gribēšanas un laika lai mācītos! Tāpēc arī prasu! Link to comment Share on other sites More sharing options...
Val Posted August 14, 2007 Report Share Posted August 14, 2007 ar tādu attieksmi, neko nepanāksi... Link to comment Share on other sites More sharing options...
andrisp Posted August 14, 2007 Report Share Posted August 14, 2007 janisetnies, man nav ne vēlēšanās, ne gribēšanas, ne laika atbildēt tādiem kā tu, kas negrib mācīties. ;) Link to comment Share on other sites More sharing options...
janisetnies Posted August 14, 2007 Author Report Share Posted August 14, 2007 (edited) Nu neko ja negribi palīdzēt nepalīdzi, zemeslode jau nepārstās rinķot! Ja pagiadām nevienam nav šī koda (neticu), tad iztikšu bez! Jo nu vajag jau ļoti, bet nu nav laika lai tagad atietu no viena darba uz citu! Edited August 14, 2007 by janisetnies Link to comment Share on other sites More sharing options...
hackerman Posted August 14, 2007 Report Share Posted August 14, 2007 janisetnies, LOL, skolā arī tā pateiksi? maybe kādam būs aizķēries lieks atestāts priekš tevis? Ja negribi pats rakstīt, aizej ciemos pie janhouse un nozodz viņam javaskriptu :D Link to comment Share on other sites More sharing options...
march Posted August 14, 2007 Report Share Posted August 14, 2007 $angliski = array('/Monday/','/Tuesday/','/Wednesday/','/Thursday/','/Friday/','/Saturday/','/Sunday/', '/January/','/February/','/March/','/April/','/May/','/June/','/July/','/August/','/September/','/October/','/November/','/December/'); $latviski = array('Pirmdiena','Otrdiena','Treрdiena','Ceturtdiena','Piektdiena','Sestdiena','Svētdiena', 'Janvāris', 'Februāris', 'Marts', 'Aprīlis', 'Maijs', 'Jūnijs', 'Jūlijs', 'Augusts', 'Septembris', 'Oktobris', 'Novembris', 'Decembris'); $datums = preg_replace($angliski, $latviski, date("l, j. F Y")); echo $datums; Link to comment Share on other sites More sharing options...
andrisp Posted August 14, 2007 Report Share Posted August 14, 2007 Pričom preg_replace ? Lieliski var iztikt ar str_replace. Link to comment Share on other sites More sharing options...
Recommended Posts