Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F97862282
PhutilCalendarDateTimeTestCase.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Mon, Jan 6, 21:51
Size
640 B
Mime Type
text/x-php
Expires
Wed, Jan 8, 21:51 (2 d)
Engine
blob
Format
Raw Data
Handle
23422163
Attached To
rPHU libphutil
PhutilCalendarDateTimeTestCase.php
View Options
<?php
final
class
PhutilCalendarDateTimeTestCase
extends
PhutilTestCase
{
public
function
testDateTimeDuration
()
{
$start
=
PhutilCalendarAbsoluteDateTime
::
newFromISO8601
(
'20161128T090000Z'
)
->
setTimezone
(
'America/Los_Angeles'
)
->
setViewerTimezone
(
'America/Chicago'
)
->
setIsAllDay
(
true
);
$this
->
assertEqual
(
'20161128'
,
$start
->
getISO8601
());
$end
=
$start
->
newAbsoluteDateTime
()
->
setHour
(
0
)
->
setMinute
(
0
)
->
setSecond
(
0
)
->
newRelativeDateTime
(
'P1D'
)
->
newAbsoluteDateTime
();
$this
->
assertEqual
(
'20161129'
,
$end
->
getISO8601
());
}
}
Event Timeline
Log In to Comment