Page 517 - Beginning PHP 5.3
P. 517

Chapter 16: PHP and the Outside World

                             Character             Description
                               o (lowercase  “ o ”            The ISO - 8601 year number. This is usually the same value as Y; however
                                            )
                                                 if the ISO - 8601 week number belongs to the previous or the next year,
                                                 that year is used instead. For example, the ISO - 8601 year number for
                                                 January 1, 2000 is 1999

                               L                     1 if the date is in a leap year, 0 otherwise

                            date()  also allows the following time - formatting characters:


                             Character            Description

                               g                  The hour in 12 - hour format, without leading zeros (1 – 12)
                                h                 The hour in 12 - hour format, with leading zeros (01 – 12)

                                G                 The hour in 24 - hour format, without leading zeros (0 – 23)
                                H                 The hour in 24 - hour format, with leading zeros (00 – 23)
                                i                 Minutes, with leading zeros (00 – 59)

                                s                 Seconds, with leading zeros (00 – 59)
                                u                   Microseconds (will always be zero because, at the time of writing,  date()
                                                can only accept an integer timestamp)

                                B                 Swatch Internet Time  —  a time - zone - free, decimal time measure. See
                                                  http://en.wikipedia.org/wiki/Swatch_Internet_Time  for details
                                a                  “ am ”  or  “ pm ”,  depending on the value of the hour

                                A                  “ AM ”  or  “ PM ”,  depending on the value of the hour
                                e                   The full time zone identifier of the currently set time zone (such as  “ UTC ”
                                                or  “ America/Indiana/Indianapolis ” )
                                T                   The time zone abbreviation for the currently set time zone (such as  “ UTC ”
                                                or  “ EST ” ). Abbreviations are best avoided because the same abbreviation
                                                is often used for multiple time zones throughout the world
                                O (capital  “ O ”            The time zone offset from GMT, in the format  hhmm . For example, the
                                          )
                                                  “ America/Indiana/Indianapolis ”  time zone is 5 hours behind GMT, so its
                                                offset is    – 0500
                               P                  Same as  O , but with a colon between the hours and minutes (for example,
                                                   - 05:00 )







                                                                                                         479





                                                                                                      9/21/09   9:15:29 AM
          c16.indd   479
          c16.indd   479                                                                              9/21/09   9:15:29 AM
   512   513   514   515   516   517   518   519   520   521   522