JDateTime extension is a convenient and complete solution for users who want to use jalali date in their projects.
Yii 1.1 or above
'jdate' => array( 'class' => 'ext.jdate.JDateTime', 'convert' => true, 'jalali' => true, 'timezone' => 'Asia/Tehran', ),
Yii::app()->jdate->date("H:i:s Y/m/d",time())
Total 12 comments
Dear Mr. Ramin Farmani. Thank's for your extension and your idea about putting it on the git. what about my first part of the question?
Hi Shahcheraghean there is no any git repo yet because there is no any update for it until next issue report! thanks for using this extnsion and if I find any free time in the future I will release a bunch of component on github under GPL license so you guys can use them freely may be this happend after next major Yii framework.
Hi. I save the time in my database in DateTime format. when i use:
it just show no time in jalali, but in this case:
it do the right. By the way, Is there any git repository to fork on it?
Hi dear Ramin,
Thanks for great extension.
Would do I know what's "امرداد" ?!!! (on line 455) :-D
And also, I suggest to change some functions from private to public about functions like getDayNames(), getMonthNames(), and maybe more functions, and maybe convertNumbers(). because for example getMonthNames() many used in generate dropDownList to show all months, and maybe others be like this functions having benefit for public used.
Thanks
as I said before this extension simulate date function for jalali date so there is no any reverse method to convert jalali to Gregorian. your effort to support jalali date in model validations is totally welcomed ;) thanks a lot...
Hi,
is there any reverse method to convert Jalali to Gregorian? I'm currently work on integrating jalalidatepicker with this module and provide integration with yii AR models.
so I should provide afterFind and beforeSave and validation rules methods.
now let me know if your extension let me convert Jalali to Gregorian to save all dates in standard mySql DATE type in beforeSave method...
hi mohamad. please feel free to ask any kind of question do you have about this extension there is no any document available for this simple extension although I don't think you need more explanation to use. it's quite straightforward. function "Yii::app()->jdate->date()" do similar php date function and you can use it just as date() function but the role of this extension is not about i18n or bla bla bla. if you need and Jalali date validation in your model please read yii core validator class and make it and if it's possible for you share it with other! this is the only way to say thank you to me or any one who share their works/time/experience for you :)
is function
Yii::app()->jdate->date("H:i:s Y/m/d",time());accept only time() (timestamps)? is there any integration rule for models?new version has been just released fatal error fixed in new version
hey
I have a problem with version 0.1
Fatal error: Call to undefined method JDateTime::init() in ...\framework\base\CModule.php on line 388
sorry users! there was an error in file encoding and in the new version file encoding problems solved please update your extention
Hi,
Near 369 line:
$farsi_array = array("?", "?", "?", "?", "?", "?", "?", "?", "?", "?");
Farsi font is wrong.
This must to be corrected.
Thanks
Nabi
Leave a comment
Please login to leave your comment.