<?php
/**
* Zend Framework
*
* LICENSE
*
* This source file is subject to the new BSD license that is bundled
* with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://framework.zend.com/license/new-bsd
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@zend.com so we can send you a copy immediately.
*
* @category Zend
* @package Zend_Date
* @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: Date.php 9610 2008-06-04 19:21:43Z thomas $
*/
/**
* Include needed Date classes
*/
require_once 'Zend/Date/DateObject.php';
require_once 'Zend/Locale.php';
require_once 'Zend/Locale/Format.php';
require_once 'Zend/Locale/Math.php';
/**
* @category Zend
* @package Zend_Date
* @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Zend_Date extends Zend_Date_DateObject
{
private $_Locale = null;
// Fractional second variables
private $_Fractional = 0;
private $_Precision = 3;
private static $_Options = array(
'format_type' => 'iso', // format for date strings 'iso' or 'php'
'fix_dst' => true, // fix dst on summer/winter time change
'extend_month' => false, // false - addMonth like SQL, true like excel
'cache' => null, // cache to set
'timesync' => null // timesync server to set
);
// Class wide Date Constants
// day formats
const DAY = 'DAY'; // d - 2 digit day of month, 01-31
const DAY_SHORT = 'DAY_SHORT'; // j - 1,2 digit day of month, 1-31
const DAY_SUFFIX = 'DAY_SUFFIX'; // S - english suffix day of month, st-th
const DAY_OF_YEAR = 'DAY_OF_YEAR'; // z - Number of day of year
const WEEKDAY = 'WEEKDAY'; // l - full day name - locale aware, Monday - Sunday
const WEEKDAY_SHORT = 'WEEKDAY_SHORT'; // --- 3 letter day of week - locale aware, Mon-Sun
const WEEKDAY_NARROW = 'WEEKDAY_NARROW'; // --- 1 letter day name - locale aware, M-S
const WEEKDAY_NAME = 'WEEKDAY_NAME'; // D - abbreviated day name, 1-3 letters - locale aware, Mon-Sun
const WEEKDAY_8601 = 'WEEKDAY_8601'; // N - digit weekday ISO 8601, 1-7 1 = monday, 7=sunday
const WEEKDAY_DIGIT = 'WEEKDAY_DIGIT'; // w - weekday, 0-6 0=sunday, 6=saturday
// week formats
const WEEK = 'WEEK'; // W - number of week ISO8601, 1-53
// month formats
const MONTH = 'MONTH'; // m - 2 digit month, 01-12
const MONTH_SHORT = 'MONTH_SHORT'; // n - 1 digit month, no leading zeros, 1-12
const MONTH_DAYS = 'MONTH_DAYS'; // t - Number of days this month
const MONTH_NAME = 'MONTH_NAME'; // F - full month name - locale aware, January-December
const MONTH_NAME_SHORT = 'MONTH_NAME_SHORT'; // M - 3 letter monthname - locale aware, Jan-Dec
const MONTH_NAME_NARROW = 'MONTH_NAME_NARROW'; // --- 1 letter month name - locale aware, J-D
// year formats
const YEAR = 'YEAR'; // Y - 4 digit year
const YEAR_SHORT = 'YEAR_SHORT'; // y - 2 digit year, leading zeros 00-99
const YEAR_8601 = 'YEAR_8601'; // o - number of year ISO8601
const YEAR_SHORT_8601= 'YEAR_SHORT_8601';// --- 2 digit number of year ISO8601
const LEAPYEAR = 'LEAPYEAR'; // L - is leapyear ?, 0-1
// time formats
const MERIDIEM = 'MERIDIEM'; // A,a - AM/PM - locale aware, AM/PM
const SWATCH = 'SWATCH'; // B - Swatch Internet Time
const HOUR = 'HOUR'; // H - 2 digit hour, leading zeros, 00-23
const HOUR_SHORT = 'HOUR_SHORT'; // G - 1 digit hour, no leading zero, 0-23
const HOUR_AM = 'HOUR_AM'; // h - 2 digit hour, leading zeros, 01-12 am/pm
const HOUR_SHORT_AM = 'HOUR_SHORT_AM'; // g - 1 digit hour, no leading zero, 1-12 am/pm
const MINUTE = 'MINUTE'; // i - 2 digit minute, leading zeros, 00-59
const MINUTE_SHORT = 'MINUTE_SHORT'; // --- 1 digit minute, no leading zero, 0-59
const SECOND = 'SECOND'; // s - 2 digit second, leading zeros, 00-59
const SECOND_SHORT = 'SECOND_SHORT'; // --- 1 digit second, no leading zero, 0-59
const MILLISECOND = 'MILLISECOND'; // --- milliseconds
// timezone formats
const TIMEZONE_NAME = 'TIMEZONE_NAME'; // e - timezone string
const DAYLIGHT = 'DAYLIGHT'; // I - is Daylight saving time ?, 0-1
const GMT_DIFF = 'GMT_DIFF'; // O - GMT difference, -1200 +1200
const GMT_DIFF_SEP = 'GMT_DIFF_SEP'; // P - seperated GMT diff, -12:00 +12:00
const TIMEZONE = 'TIMEZONE'; // T - timezone, EST, GMT, MDT
const TIMEZONE_SECS = 'TIMEZONE_SECS'; // Z - timezone offset in seconds, -43200 +43200
// date strings
const ISO_8601 = 'ISO_8601'; // c - ISO 8601 date string
const RFC_2822 = 'RFC_2822'; // r - RFC 2822 date string
const TIMESTAMP = 'TIMESTAMP'; // U - unix timestamp
// additional formats
const ERA = 'ERA'; // --- short name of era, locale aware,
const ERA_NAME = 'ERA_NAME'; // --- full name of era, locale aware,
const DATES = 'DATES'; // --- standard date, locale aware
const DATE_FULL = 'DATE_FULL'; // --- full date, locale aware
const DATE_LONG = 'DATE_LONG'; // --- long date, locale aware
const DATE_MEDIUM = 'DATE_MEDIUM'; // --- medium date, locale aware
const DATE_SHORT = 'DATE_SHORT'; // --- short date, locale aware
const TIMES = 'TIMES'; // --- standard time, locale aware
const TIME_FULL = 'TIME_FULL'; // --- full time, locale aware
const TIME_LONG = 'TIME_LONG'; // --- long time, locale aware
const TIME_MEDIUM = 'TIME_MEDIUM'; // --- medium time, locale aware
const TIME_SHORT = 'TIME_SHORT'; // --- short time, locale aware
const ATOM = 'ATOM'; // --- DATE_ATOM
const COOKIE = 'COOKIE'; // --- DATE_COOKIE
const RFC_822 = 'RFC_822'; // --- DATE_RFC822
const RFC_850 = 'RFC_850'; // --- DATE_RFC850
const RFC_1036 = 'RFC_1036'; // --- DATE_RFC1036
const RFC_1123 = 'RFC_1123'; // --- DATE_RFC1123
const RFC_3339 = 'RFC_3339'; // --- DATE_RFC3339
const RSS = 'RSS'; // --- DATE_RSS
const W3C = 'W3C'; // --- DATE_W3C
/**
* Generates the standard date object, could be a unix timestamp, localized date,
* string, integer, array and so on. Also parts of dates or time are supported
* Always set the default timezone: http://php.net/date_default_timezone_set
* For example, in your bootstrap: date_default_timezone_set('America/Los_Angeles');
* For detailed instructions please look in the docu.
*
* @param string|integer|Zend_Date|array $date OPTIONAL Date value or value of date part to set
* ,depending on $part. If null the actual time is set
* @param string $part OPTIONAL Defines the input format of $date
* @param string|Zend_Locale $locale OPTIONAL Locale for parsing input
* @return Zend_Date
* @throws Zend_Date_Exception
*/
public function __construct($date = null, $part = null, $locale = null)
{
if (Zend_Locale::i
没有合适的资源?快使用搜索试试~ 我知道了~
资源详情
资源评论
资源推荐
收起资源包目录
ZF blog 功能强大的博客zend framework (2000个子文件)
css-gen.cfg 0B
spellchecker.cfm 5KB
style.css 14KB
fck_editor.css 8KB
fck_editor.css 8KB
fck_editor.css 8KB
fck_dialog.css 6KB
fck_dialog.css 6KB
fck_dialog.css 6KB
layout.css 5KB
ThickBox.css 4KB
fck_internal.css 4KB
fck_editorarea.css 3KB
lightbox.css 2KB
site.css 2KB
fck_dialog_common.css 2KB
fck_showtableborders_gecko.css 2KB
browser.css 2KB
pagenav.css 1KB
styles.css 1024B
spellerStyle.css 890B
adminlogin.css 636B
main.css 267B
QQWry2.Dat 6.63MB
Thumbs.db 199KB
Thumbs.db 174KB
Thumbs.db 36KB
Thumbs.db 16KB
Thumbs.db 9KB
Thumbs.db 6KB
Thumbs.db 4KB
zend-framework.flf 8KB
logo.gif 17KB
messbgw.gif 17KB
combgw.gif 16KB
aabox.gif 14KB
boxtop.gif 14KB
combotw.gif 13KB
comtopw.gif 13KB
bluebg.gif 10KB
fck_strip.gif 9KB
loadingAnimation.gif 7KB
_default.gif 5KB
default.gif 5KB
fck_strip.gif 5KB
fck_strip.gif 5KB
lightbox-ico-loading.gif 4KB
logo_fckeditor.gif 2KB
fck_plugin.gif 2KB
spinner.gif 2KB
html.gif 1KB
htm.gif 1KB
rdp.gif 1KB
spellchecker_net.gif 1KB
album.gif 1KB
box.gif 1KB
ai.gif 1KB
embaressed_smile.gif 1KB
teeth_smile.gif 1KB
yahoo.gif 1KB
shades_smile.gif 1KB
tounge_smile.gif 1KB
wink_smile.gif 1KB
sad_smile.gif 1KB
regular_smile.gif 1KB
vivi.gif 1KB
whatchutalkingabout_smile.gif 1KB
envelope.gif 1KB
digit.gif 1KB
heart.gif 1012B
hexun.gif 995B
thumbs_down.gif 992B
poco.gif 990B
thumbs_up.gif 989B
365key.gif 988B
baidu.gif 982B
kiss.gif 978B
qq.gif 978B
sprites.gif 959B
sprites.gif 959B
sprites.gif 959B
fla.gif 946B
yesky.gif 936B
logo_fredck.gif 920B
google.gif 908B
delicious.gif 873B
lightbox-btn-prev.gif 832B
toolbar.buttonbg.gif 829B
messbotw.gif 820B
lightbox-btn-next.gif 812B
navbg.gif 734B
swf.gif 725B
swt.gif 724B
bmp.gif 709B
gif.gif 704B
lightbox-btn-close.gif 700B
html.gif 621B
htm.gif 621B
rdp.gif 606B
fck_flashlogo.gif 599B
共 2000 条
- 1
- 2
- 3
- 4
- 5
- 6
- 20
春哥4885
- 粉丝: 5
- 资源: 53
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- 信呼OA系统2.1.7版源码
- 3122080306 邹子轩 实验报告二.docx
- 基于STM32 NUCLEO板设计彩色LED照明灯(纯cubeMX开发)(大赛作品,文档完整,可直接运行)
- 发那科工业机器人保养大全
- Sphere.h
- REMD固有时间尺度分解信号分量可视化(Matlab完整源码和数据)
- 嵌入式系统双单片机STC89C52+STC15W104多功能学习板电路图可扩展 适用于单片机初学者和教学
- 基于STM32蓝牙控制小车系统设计(硬件+源代码+论文)大赛作品
- XILINXFPGA源码基于Spartan3火龙刀系列FPGA开发板VGA测试例程
- Java聊天室的设计与实现【尚学堂·百战程序员】
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
评论0