Skip to content

Commit 9409310

Browse files
committed
Fix README
1 parent 3a2122b commit 9409310

File tree

1 file changed

+30
-30
lines changed

1 file changed

+30
-30
lines changed

README.md

+30-30
Original file line numberDiff line numberDiff line change
@@ -37,24 +37,24 @@ extension=timecop.so
3737
- Freeze time to a specific point.
3838
- Travel back to a specific point in time, but allow time to continue moving forward from there.
3939
- Override the following PHP stock functions and class, which supports freezing or traveling time.
40-
- time()
41-
- mktime()
42-
- gmmktime()
43-
- date()
44-
- gmdate()
45-
- idate()
46-
- getdate()
47-
- localtime()
48-
- strtotime()
49-
- strftime()
50-
- gmstrftime()
51-
- unixtojd()
52-
- DateTime::_construct()
53-
- DateTime::createFromFormat() (PHP >= 5.3.4)
54-
- date_create()
55-
- date_create_from_format() (PHP >= 5.3.4)
40+
- `time()`
41+
- `mktime()`
42+
- `gmmktime()`
43+
- `date()`
44+
- `gmdate()`
45+
- `idate()`
46+
- `getdate()`
47+
- `localtime()`
48+
- `strtotime()`
49+
- `strftime()`
50+
- `gmstrftime()`
51+
- `unixtojd()`
52+
- `DateTime::_construct()`
53+
- `DateTime::createFromFormat()` (PHP >= 5.3.4)
54+
- `date_create()`
55+
- `date_create_from_format()` (PHP >= 5.3.4)
5656
- Rewrite value of the following global variables when the time has been moved.
57-
- $_SERVER['REQUEST_TIME']
57+
- `$_SERVER['REQUEST_TIME']`
5858

5959
## USAGE
6060

@@ -66,7 +66,7 @@ var_dump(gmdate("Y-m-d H:i:s")); // string(19) "1970-01-01 00:00:00"
6666
var_dump(strtotime("+100000 sec")); // int(100000)
6767
```
6868

69-
## The difference between `timecop_freeze()` and `timecop_travel()`
69+
### The difference between `timecop_freeze()` and `timecop_travel()`
7070

7171
`timecop_freeze()` is used to statically mock the concept of now. As your program executes, `time()` will not change unless you make subsequent calls into the Timecop API. `timecop_travel()`, on the other hand, computes an offset between what we currently think time() is and the time passed in. It uses this offset to simulate the passage of time. To demonstrate, consider the following code snippets:
7272

@@ -77,7 +77,7 @@ timecop_freeze($new_time);
7777
sleep(10);
7878
var_dump($new_time == time()); // bool(true)
7979

80-
timecop_return(); // "turn off" Timecop
80+
timecop_return(); // "turn off" php-timecop
8181

8282
timecop_travel($new_time);
8383
sleep(10);
@@ -87,29 +87,29 @@ var_dump($new_time == time()); // bool(false)
8787
## CHANGELOG
8888

8989
###version 1.0.5, 2013/11/26
90-
- Fix `TimecopDateTime::createFromFormat()` to reutrn TimecopDateTime instance on PHP >= 5.3.4
91-
- The previous version returns DateTime instance
90+
- Fix `TimecopDateTime::createFromFormat()` to reutrn `TimecopDateTime` instance on PHP >= 5.3.4
91+
- The previous version returns `DateTime` instance
9292
- Implement identical function `timecop_date_create_from_format()`
93-
- BUG: not supporting "relative formats" currently.
94-
- Support 2nd argument of TimecopDateTime::_construct()
93+
- BUG: not supporting "relative formats" for this method currently.
94+
- Fix behavior of `TimecopDateTime::_construct()` when its 2nd argument is specified.
9595

9696
###version 1.0.4, 2013/03/11
97-
- Fix SIGSEGV in TimecopDateTime::__construct() called with NULL as 1st argument
97+
- Fix SIGSEGV in `TimecopDateTime::__construct()` called with NULL as 1st argument
9898

9999
###version 1.0.3, 2013/03/09
100100

101-
- Fix the time traveling implementation for TimecopDateTime::__construct()
102-
- Fix timecop_date_create() to return TimecopDateTime instance
103-
- The previous version returns DateTime instance
104-
- Add TimecopDateTime::getTimestamp(), TimecopDateTime::setTimestamp() only for PHP 5.2.x
101+
- Fix the time traveling implementation for `TimecopDateTime::__construct()`
102+
- Fix `timecop_date_create()` to return `TimecopDateTime` instance
103+
- The previous version returns `DateTime` instance
104+
- Add `TimecopDateTime::getTimestamp()`, `TimecopDateTime::setTimestamp()` only for PHP 5.2.x
105105

106106
###version 1.0.2, 2013/03/06
107107

108-
- Implement timecop_date_create()
108+
- Implement `timecop_date_create()`
109109

110110
###version 1.0.1, 2013/03/04
111111

112-
- Implement time traveling feature for TimecopDateTime::__construct() with 1 or 2 arguments
112+
- Implement time traveling feature for `TimecopDateTime::__construct()` with 1 or 2 arguments
113113
- The previous version works correctly only for no arguments calling: "new TimecopDateTime()"
114114

115115
###version 1.0.0, 2012/11/21

0 commit comments

Comments
 (0)