Page 135 - Open Soource Technologies 304.indd
P. 135

Open Source Technologies



                   Notes
                                       Day of month,    d        %D          Current day in this month defined
                                       leading zeroes                        by  the  timestamp.  A  zero  is
                                                                             prepended when the day number
                                                                             is less than 10.
                                       Day of month,  j                      Current day in the month defined
                                       without leading                       by the timestamp.
                                       zeroes
                                       Formatted, locale         %x          The  date  in  preferred  Locale
                                       preferred date                        format

                                                                             <?Phy
                                                                              setlocale (LC-All, ‘1w_IL’),

                                                                              echo strft1me (‘%X\N”);//
                                                                              → shows 29/02/04 ?>
                                       Formatted, locale         %c          The  date  and  time  in  preferred
                                       Preferred date and                    locale format format.
                                       time
                                                                              <? php
                                                                              setlocale 9LC_All, n1_NL’);

                                                                              // shows zo 29 feb 2004
                                                                               → 23: 56:12 CET
                                                                              echo strft1me (“%C/n”);

                                                                              ?>
                                       Formatted, locale             %x      The date in preferred locale
                                       preferred time                        format.

                                                                              <? php
                                                                             setlocale (LC_ALL, ‘n1_NL’);
                                                                             echo strftime (‘%x\n”); //

                                                                              → shows 29-02-04
                                                                             ?>
                                       Hour 12-hour     h        %1
                                       format, leading
                                       zeroes
                                       Hour 12-hour     g
                                       format, no leading
                                       zeroes
                                       Hour, 24-hour    H        %H
                                       format, leading
                                       zeroes
                                       Hour, 24-hour    G
                                       format, no leading
                                       zeroes
                                                                                                  Contd...




        130                               LOVELY PROFESSIONAL UNIVERSITY
   130   131   132   133   134   135   136   137   138   139   140