| Modul: | x_cDate |
| Author: | Dietrich Roland Pehlke |
| Nick: | aldus |
| Version: | 0.4.2 |
| State: | RC |
| License: | GNU - General Public License |
| GUID: | EAF752D0-4BE6-4D67-BC45-4785BDAD6660 |
| Platform: | LEPTON/WB hybrid |
| Last info: | 2013-05-04 |
| Rating: | |
| Download: | here |
| Forum: | here |
| Description: | A simple code-modul (class) for modify/transforming date-formats on both sites: backend and frontend.
Require: PHP 5.2.x / WB 2.7.x There is a »QuickStart« Documentation inside the ZIP-Package, you can also read after using the link inside the "About" section for modules at the info-line. |
Code Example
A very quick one you can make inside a code2-modul-page in the backend like
$d = new c_date();
$d->format="%A, %d. <font style='color:#900;'><i>%B</i></font> %Y<br />";
echo $d->toHTML() ;
echo $d->transform("11/03/1966");
echo $d->transform("11.03.1966") ;
echo $d->transform("03-11-1966", 'm-d-y') ;
echo $d->transform("1966-03-11", 'y m D') ;
echo $d->transform("1966/03/11", 'ymd') ;
echo $d->transform("03/11/66", CDATE_USE_MDY) ;
echo $d->set_wb_lang("EN");
echo $d->toHTML() ;
$str = "<br><br>On 11.03.1998 Mr. Unkown has shown his new book »Anastasitica« inside his office.<br>";
$str .= "And on 03.06.2008 we will read it!<br />";
$d->parse_string($str);
echo $str;
$a = $d->test_locale("de_AT", false);
foreach ($a as $t) echo "<br />".$t;
Will produce this output:



News-Feeder