DatePart.class.php

Go to the documentation of this file.
00001 <?php
00002 /***************************************************************************
00003  *   Copyright (C) 2007 by Konstantin V. Arkhipov                          *
00004  *                                                                         *
00005  *   This program is free software; you can redistribute it and/or modify  *
00006  *   it under the terms of the GNU Lesser General Public License as        *
00007  *   published by the Free Software Foundation; either version 3 of the    *
00008  *   License, or (at your option) any later version.                       *
00009  *                                                                         *
00010  ***************************************************************************/
00011 /* $Id: DatePart.class.php 4687 2007-12-09 18:57:18Z voxus $ */
00012 
00018     final class DatePart extends Enumeration
00019     {
00020         const CENTURY           = 1;
00021         const DAY               = 2;
00022         const DECADE            = 3;
00023         const DOW               = 4; // day of week
00024         const DOY               = 5; // day of year
00025         const EPOCH             = 6;
00026         const HOUR              = 7;
00027         const MICROSECONDS      = 8;
00028         const MILLENIUM         = 9; // damn useful
00029         const MILLISECONDS      = 10;
00030         const MINUTE            = 11;
00031         const MONTH             = 12;
00032         const QUARTER           = 13;
00033         const SECOND            = 14;
00034         const TIMEZONE          = 15;
00035         const TIMEZONE_HOUR     = 16;
00036         const TIMEZONE_MINUTE   = 17;
00037         const WEEK              = 18;
00038         const YEAR              = 19;
00039         
00040         protected $names = array(
00041             self::CENTURY           => 'CENTURY',
00042             self::DAY               => 'DAY',
00043             self::DECADE            => 'DECADE',
00044             self::DOW               => 'DOW',
00045             self::DOY               => 'DOY',
00046             self::EPOCH             => 'EPOCH',
00047             self::HOUR              => 'HOUR',
00048             self::MICROSECONDS      => 'MICROSECONDS',
00049             self::MILLENIUM         => 'MILLENIUM',
00050             self::MILLISECONDS      => 'MILLISECONDS',
00051             self::MINUTE            => 'MINUTE',
00052             self::MONTH             => 'MONTH',
00053             self::QUARTER           => 'QUARTER',
00054             self::SECOND            => 'SECOND',
00055             self::TIMEZONE          => 'TIMEZONE',
00056             self::TIMEZONE_HOUR     => 'TIMEZONE_HOUR',
00057             self::TIMEZONE_MINUTE   => 'TIMEZONE_MINUTE',
00058             self::WEEK              => 'WEEK',
00059             self::YEAR              => 'YEAR'
00060         );
00061     }
00062 ?>

Generated on Sun Dec 9 21:56:23 2007 for onPHP by  doxygen 1.5.4