DateUtilsLib : A simple date Lib to use with Code Igniter for local dates manipulations |
[eluser]Unknown[/eluser]
DateUtilsLib Name: DateUtilsLib 1.0 Released: Feb 19, 2012 CI Version: Tested with CodeIgniter 2.1.0 Author: Stéphane Bourzeix ChangeLog: Changed default functions to return current date. Added French as datefr. Added Spanish as datees. The DateUtilsLib is a very simple Code Igniter Lib to help you to format Dates in correct language and local format. The idea is to avoid to have to rely on Php Locale implementation to display correctly dates in various languages. The DateUtilsLib function will work just with a simple Timestamp provided. Installation and configuration: Copy DateUtils.php to your application/libraries directory. Currently supported languages: French: Use datefr() Spanish: Use datees() Usage: // load the library Code: $this->load->library('dateutils'); Function has 4 params: - timestamp: date/time (UNIX format) - modejour: l:long (lundi 23) ; c ![]() L or C in Caps puts the first letter of the day in Caps (ex C : Lun) - modemois: l:long (septembre) ; c ![]() L or C in Caps puts the first letter of the day in Caps (ex C : Lun) - modeheure: l:long (7 heures 35) ; c ![]() If you don't provide the TimeStamp or any param it will still display the current date abbr in the correct format of the correct language Examples : Code: $this->load->library('dateutils'); Code: echo $this->dateutils->datefr() = 27/04/1980 Get it here : https://github.com/DaBourz/DateUtilsLib |
Welcome Guest, Not a member yet? Register Sign In |