Loading

Author Topic: Change date format  (Read 343 times)

sajjadnajafi

  • Newbie
  • *
  • Posts: 23
    • Email
Change date format
« on: February 20, 2012, 05:24:39 pm »
Hi
How i can change date format for OS-class to sunny calender?
Like wp-wp-jalali plugin for wordpress:http://wordpress.org/extend/plugins/wp-jalali/
Tanks
Search Result:
::::::::::::::http://forums.osclass.org/general-help/change-date-formate/
:::::::::::::::::::::::::
 :'( :'( :-\ :o ???
Please help me
<<<<<<< ThankfuL >>>>>>>

_CONEJO

  • Administrator
  • Hero Member
  • *****
  • Posts: 1922
Re: Change date format
« Reply #1 on: February 21, 2012, 11:34:39 am »
Hi sajjadnajafi,

I've been reading, but I could find a way to convert from gregorian to jalali calendar explained. Would you mind pointing me some usefull link on how to calculate jalali date correctly?
I should understand what I'm doing in order to do it ;)


Thanks

sajjadnajafi

  • Newbie
  • *
  • Posts: 23
    • Email
Re: Change date format
« Reply #2 on: February 21, 2012, 06:02:17 pm »

How i can change date format for OS-class to sunny calender?
Like wp-wp-jalali plugin for wordpress:http://wordpress.org/extend/plugins/wp-jalali/
Hi sajjadnajafi,

I've been reading, but I could find a way to convert from gregorian to jalali calendar explained. Would you mind pointing me some usefull link on how to calculate jalali date correctly?
I should understand what I'm doing in order to do it ;)


Thanks
hi
Thanks for your post ;D
sanny Date Converter in Attachment
If it was not helpful Tell me to introduce another source
Sorry I do not speak English well !

sajjadnajafi

  • Newbie
  • *
  • Posts: 23
    • Email
Re: Change date format
« Reply #3 on: February 21, 2012, 08:24:31 pm »
This sites is also useful:
http://taghvim.com/
http://www.en.iran.ir/about/iranian-calendar
http://en.wikipedia.org/wiki/Iranian_calendar
http://en.wikipedia.org/wiki/Category:Months_of_the_Iranian_calendar
http://www.farsiweb.ir/wiki/Iranian_calendar
http://farhadi.ir/works/jalalijscalendar
http://www.irantour.org/Iran/iranianmonths.html
http://www.codeproject.com/Articles/28380/Persian-Calendar-in-PHP
http://www.phpclasses.org/package/2256-PHP-Generate-persian-month-calendar-in-HTML.html
http://sourceforge.net/projects/percal/
http://www.phpkode.com/scripts/item/persian-calendar-date-function/
https://github.com/sasy360/Iranian-Calendar-for-Wordpress/blob/master/iraniancal.php
http://www.phpclasses.org/package/6864-PHP-Manipulate-dates-in-the-Persian-Jalali-calendar.html
http://www.trirand.net/forum/default.aspx?g=posts&t=1643
http://www.codeproject.com/Articles/26947/Persian-Calendar-with-Simulated-PHP-Methods-in-C
http://www.phpclasses.org/package/4852-PHP-Convert-and-format-dates-of-the-Persian-calendar.html
http://userscripts.org/scripts/show/85375
http://userscripts.org/scripts/show/89996
http://moodle.org/mod/forum/discuss.php?d=28694
https://github.com/sasy360/Iranian-Calendar-for-Wordpress
http://iranculture.ca/English/index.php?option=com_content&view=article&id=54&Itemid=97
http://www.freedownloadmanager.org/download/solar-hejri-calendar-java-script-3844960.html
http://www.sencha.com/forum/showthread.php?147567-Jalali-Solar-Hijri-Plugin
http://www.codeproject.com/Articles/28129/Creating-a-CLR-Persian-Date-Convertor-Function-for
http://www.codeproject.com/Articles/28101/Persian-Date-Viewer-Gadget
http://www.codeproject.com/KB/datetime/hijrigregorianclass.aspx?msg=2749584
http://forums.asp.net/t/1303604.aspx


_CONEJO

  • Administrator
  • Hero Member
  • *****
  • Posts: 1922
Re: Change date format
« Reply #4 on: February 22, 2012, 12:27:04 pm »
Hi,

Thanks for the help. It was really useful.


Please try the one attached to this reply.

INSTRUCTIONS
1.- Install plugin (as normal)
2.- Edit YOUR THEME, every time it said "osc_format_date", change to "osc_format_jdate"
3.- Enjoy

NOTE: I'm not sure if it's working fine or not, but it should, consider it's the first time I use it.

I really tried to find a way to avoid the osc_format_jdate change in your theme, but it's not possible with PHP. Since osc_format_date is a function and already exists, it can not be redeclared. The options were : 1 modify the core of OSClass (which will make your OSClass not upgradable) or 2.- modify your theme (I choose this one). If you don't want to change your theme, modify oc-includes/osclass/helpers/hUtils.php and delete from line 124 to 142 (osc_format_date function, the line numbers may be different!!!).


Please, tell me if that worked ;)



sajjadnajafi

  • Newbie
  • *
  • Posts: 23
    • Email
Re: Change date format
« Reply #5 on: February 23, 2012, 11:32:19 pm »
:) ;) :D ;D :o 8) :) ;) :D ;D :o 8) :) ;) :D ;D :o 8) :) ;) :D ;D :o 8) :) ;) :D ;D :o 8) :) ;) :)
worked!
:) ;) :D ;D :o 8) :) ;) :D ;D :o 8) :) ;) :D ;D :o 8) :) ;) :D ;D :o 8) :) ;) :D ;D :o 8) :) ;) :)
Thank you very very very ... very much