Skip to content

Commit 0a94fea

Browse files
committed
docs: fix commnets in sample code
1 parent 4efa7df commit 0a94fea

2 files changed

Lines changed: 25 additions & 23 deletions

File tree

user_guide_src/source/libraries/time/020.php

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,17 @@
44

55
$time = Time::parse('August 12, 2016 4:15:23pm');
66

7-
echo $time->getYear(); // 2016
8-
echo $time->getMonth(); // 8
9-
echo $time->getDay(); // 12
10-
echo $time->getHour(); // 16
11-
echo $time->getMinute(); // 15
12-
echo $time->getSecond(); // 23
7+
// The output may vary based on locale.
8+
echo $time->getYear(); // '2016'
9+
echo $time->getMonth(); // '8'
10+
echo $time->getDay(); // '12'
11+
echo $time->getHour(); // '16'
12+
echo $time->getMinute(); // '15'
13+
echo $time->getSecond(); // '23'
1314

14-
echo $time->year; // 2016
15-
echo $time->month; // 8
16-
echo $time->day; // 12
17-
echo $time->hour; // 16
18-
echo $time->minute; // 15
19-
echo $time->second; // 23
15+
echo $time->year; // '2016'
16+
echo $time->month; // '8'
17+
echo $time->day; // '12'
18+
echo $time->hour; // '16'
19+
echo $time->minute; // '15'
20+
echo $time->second; // '23'

user_guide_src/source/libraries/time/021.php

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,17 @@
44

55
$time = Time::parse('August 12, 2016 4:15:23pm');
66

7-
echo $time->getDayOfWeek(); // 6 - but may vary based on locale's starting day of the week
8-
echo $time->getDayOfYear(); // 225
9-
echo $time->getWeekOfMonth(); // 2
10-
echo $time->getWeekOfYear(); // 33
11-
echo $time->getTimestamp(); // 1471018523 - UNIX timestamp
12-
echo $time->getQuarter(); // 3
7+
// The output may vary based on locale.
8+
echo $time->getDayOfWeek(); // '6'
9+
echo $time->getDayOfYear(); // '225'
10+
echo $time->getWeekOfMonth(); // '2'
11+
echo $time->getWeekOfYear(); // '33'
12+
echo $time->getTimestamp(); // 1471018523 - UNIX timestamp (locale independent)
13+
echo $time->getQuarter(); // '3'
1314

14-
echo $time->dayOfWeek; // 6
15-
echo $time->dayOfYear; // 225
16-
echo $time->weekOfMonth; // 2
17-
echo $time->weekOfYear; // 33
15+
echo $time->dayOfWeek; // '6'
16+
echo $time->dayOfYear; // '225'
17+
echo $time->weekOfMonth; // '2'
18+
echo $time->weekOfYear; // '33'
1819
echo $time->timestamp; // 1471018523
19-
echo $time->quarter; // 3
20+
echo $time->quarter; // '3'

0 commit comments

Comments
 (0)