![]() |
change date format - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: change date format (/showthread.php?tid=28451) |
change date format - El Forum - 03-11-2010 [eluser]persian empire[/eluser] Hi. Friends i have an application that is wrote by Codeigniter . i want to change all dates in this script with persian calendar (known as "hijri calendar") . I found the multi calendar from http://codeigniter.com/wiki/Calendar/ but i don't know ho to use it . please help me . Best Regards change date format - El Forum - 03-11-2010 [eluser]persian empire[/eluser] I want when i use date(); function it shows persian calendar not default gregorian . please if anyone know this answer me . thank you change date format - El Forum - 03-11-2010 [eluser]danmontgomery[/eluser] I don't know what the difference between the persian and gregorian calendars are, but you should be able to use setlocale() for date and time formatting. change date format - El Forum - 03-12-2010 [eluser]persian empire[/eluser] thank you for reply but setlocal does not helped me . i want to use this code : please say me how . in the wiki page of multi calendar there is not good sample . multi calendar file is attached . please say me where i should copy them and how use it in my code . change date format - El Forum - 03-12-2010 [eluser]persian empire[/eluser] i have this function too . it is in zip file . change date format - El Forum - 03-12-2010 [eluser]persian empire[/eluser] No Idea ? anyone can't help me ? change date format - El Forum - 03-12-2010 [eluser]danmontgomery[/eluser] There's a sample controller in multi_calendar.zip: Code: class Blog extends Controller { For some reason it was written to replace the core calendar library rather than extend it, so you would have to put these in ./system/libraries change date format - El Forum - 03-12-2010 [eluser]persian empire[/eluser] I'm newbie to php . please give me a complete sample to use this controller in my code. i want to date() return the persian date not gregorian . i have this code : Code: <?=date('H:m', strtotime($news->news_created))?> change date format - El Forum - 03-12-2010 [eluser]danmontgomery[/eluser] [quote author="persian empire" date="1268426297"]I'm newbie to php . please give me a complete sample to use this controller in my code. i want to date() return the persian date not gregorian .[/quote] Doesn't work that way, sorry. change date format - El Forum - 03-12-2010 [eluser]persian empire[/eluser] [quote author="noctrum" date="1268426450"][quote author="persian empire" date="1268426297"]I'm newbie to php . please give me a complete sample to use this controller in my code. i want to date() return the persian date not gregorian .[/quote] Doesn't work that way, sorry.[/quote] i know this not possible but i can replace date function / |