I've created a special class in the folder class/xoopsform as formdatepicker.php. The result is being able to delete many files from the old calendar, and use a simple method call using the id and using the datepicker plugin of jquery datepicker.js
Thank you for your attention. by using datetime class still the problem is remained. The problem is: 1- we (persian/arabic community) use local date format (Hegira date not Gregorian date) 2- we (persian/arabic community) use local numbers (Not latin 0123456789)
And php functions can not handle local dates and local numbers.
Currently we have "formatTimestamp" function for output date/time and we fully customize it for our needs.
so we have to define a xoops function for input date/time. we should do the same localization as has been done for formatTimestamp.
Add the function (strtotime / createFromFormat / Xo_strtotime, ANYTHING YOU LIKE) to xoopslocal class.
Then we can use the same procedure: extending the function abilities in languages/OUR_LANG/locale.php)
we just need a function in xoopslocal class. Therefore it is up to developers to define a new xoops function from scratch like formatTimestamp or add the already php functions (strtotime / createFromFormat) like number_format to xoopslocal class.
Also the next most important step is forcing all module/core developers to unify their methods for getting the date/time from user (use THAT XOOPS FUNCTION just like using the formatTimestamp)
We can hack every modules and every core and add our above mentioned needs but i want to prevent this kind of localization (hard code and hack).
@ timgno: you misunderstood me. Persian and Arabic communities need more localization than just some definitions. |for example please see the below code i copy and paste from http://hasheminezhad.com/datepicker
this file is: jquery.ui.datepicker-cc-ar.js [Arabic calendar]
you can see there are some other new functions like HijriDate. So IMO it is better to move the whole customizations (definitions for Garegorian Calendar and definitions + functions for other calendars) to language folder.