cvs: pear /I18N/docs I18N_DateTime.php
| From: | Wolfram Kriesing | Date: | Thu, 12 Dec 2002 18:59:16 +0000 |
| Subject: | cvs: pear /I18N/docs I18N_DateTime.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-7855@lists.php.net to get a copy of this message | ||
cain Thu Dec 12 13:59:16 2002 EDT
Modified files:
/pear/I18N/docs I18N_DateTime.php
Log:
- add the really simple examples
Index: pear/I18N/docs/I18N_DateTime.php
diff -u pear/I18N/docs/I18N_DateTime.php:1.1 pear/I18N/docs/I18N_DateTime.php:1.2
--- pear/I18N/docs/I18N_DateTime.php:1.1 Fri Nov 22 08:44:56 2002
+++ pear/I18N/docs/I18N_DateTime.php Thu Dec 12 13:59:15 2002
@@ -7,7 +7,43 @@
require_once 'I18N/DateTime.php';
- $dateTime = new I18N_DateTime( 'es_ES' );
+ $lang = 'en_US';
+
+ echo 'require_once \'I18N/DateTime.php\';<br>';
+ echo '$dateTime = new I18N_DateTime( \''.$lang.'\'
);<br><br>';
+ $dateTime = new I18N_DateTime( $lang );
+
+
+ //
+ // very simple examples, to get the date and/or time for now
+ //
+ myPrint('<h1>simple Examples</h1>');
+
+ //
+ // get the time now in format DEFAULT
+ //
+ myPrint( '$dateTime->format() . . . '. $dateTime->format() );
+ myPrint( '$dateTime->formatShort() . . . '. $dateTime->formatShort() );
+ myPrint( '$dateTime->formatMedium() . . . '. $dateTime->formatMedium() );
+ myPrint( '$dateTime->formatLong() . . . '. $dateTime->formatLong() );
+ myPrint( '$dateTime->formatFull() . . . '. $dateTime->formatFull() );
+
+
+ echo '<br><br>';
+ myPrint( '$dateTime->formatTime() . . . '. $dateTime->formatTime() );
+ myPrint( '$dateTime->formatTimeShort() . . . '. $dateTime->formatTimeShort() );
+ myPrint( '$dateTime->formatTimeMedium() . . . '. $dateTime->formatTimeMedium()
);
+ myPrint( '$dateTime->formatTimeLong() . . . '. $dateTime->formatTimeLong() );
+ myPrint( '$dateTime->formatTimeFull() . . . '. $dateTime->formatTimeFull() );
+
+
+ echo '<br><br>';
+ myPrint( '$dateTime->formatDate() . . . '. $dateTime->formatDate() );
+ myPrint( '$dateTime->formatDateShort() . . . '. $dateTime->formatDateShort() );
+ myPrint( '$dateTime->formatDateMedium() . . . '. $dateTime->formatDateMedium()
);
+ myPrint( '$dateTime->formatDateLong() . . . '. $dateTime->formatDateLong() );
+ myPrint( '$dateTime->formatDateFull() . . . '. $dateTime->formatDateFull() );
+
////////////////////////////////////////////