\SystemDateTime

Representation of date and time.

Summary

Methods
Properties
Constants
__construct()
Date()
Parse()
DayOfStart()
DayOfEnd()
Now()
year()
month()
day()
ToString()
$Year
$Month
$Day
$Hour
$Minute
$Second
No constants found
No protected methods found
No protected properties found
N/A
format()
No private properties found
N/A

Properties

$Year

$Year : integer

Type

integer

$Month

$Month : integer

Type

integer

$Day

$Day : integer

Type

integer

$Hour

$Hour : integer

Type

integer

$Minute

$Minute : integer

Type

integer

$Second

$Second : integer

Type

integer

Methods

__construct()

__construct(\DateTime  $date = null) 

Parameters

\DateTime $date

一个给定的日期时间,如果这个参数被忽略, 则会创建一个当前的时间点

Date()

Date() : \DateTime

Returns

\DateTime

Parse()

Parse(string  $dateTimeStr) : \System\DateTime

Parameters

string $dateTimeStr

Returns

\System\DateTime

DayOfStart()

DayOfStart(\System\DateTime  $day = NULL) : \System\DateTime

获取今天开始的时间点

Parameters

\System\DateTime $day

如果这个参数被忽略掉了,就默认为今天

Returns

\System\DateTime

DayOfEnd()

DayOfEnd(\System\DateTime  $day = NULL) : \System\DateTime

获取今天结束的时间点

Parameters

\System\DateTime $day

如果这个参数被忽略掉了,就默认为今天

Returns

\System\DateTime

year()

year() 

month()

month() 

day()

day() 

ToString()

ToString() : string

MySql date time style.

Returns

string

format()

format(  $n) 

尝试自动对小于零的数字进行前导零的填充

Parameters

$n