update2
This commit is contained in:
parent
98419bd18d
commit
8a69e45efa
4919 changed files with 28311 additions and 224136 deletions
12
pfosten/vendor/nesbot/carbon/readme.md
vendored
Executable file → Normal file
12
pfosten/vendor/nesbot/carbon/readme.md
vendored
Executable file → Normal file
|
|
@ -6,6 +6,7 @@
|
|||
[](https://styleci.io/repos/5724990)
|
||||
[](https://codecov.io/github/briannesbitt/Carbon?branch=master)
|
||||
[](https://php-eye.com/package/nesbot/carbon)
|
||||
[](https://github.com/phpstan/phpstan)
|
||||
|
||||
A simple PHP API extension for DateTime. [http://carbon.nesbot.com](http://carbon.nesbot.com)
|
||||
|
||||
|
|
@ -16,7 +17,7 @@ printf("Right now is %s", Carbon::now()->toDateTimeString());
|
|||
printf("Right now in Vancouver is %s", Carbon::now('America/Vancouver')); //implicit __toString()
|
||||
$tomorrow = Carbon::now()->addDay();
|
||||
$lastWeek = Carbon::now()->subWeek();
|
||||
$nextSummerOlympics = Carbon::createFromDate(2012)->addYears(4);
|
||||
$nextSummerOlympics = Carbon::createFromDate(2016)->addYears(4);
|
||||
|
||||
$officialDate = Carbon::now()->toRfc2822String();
|
||||
|
||||
|
|
@ -24,13 +25,13 @@ $howOldAmI = Carbon::createFromDate(1975, 5, 21)->age;
|
|||
|
||||
$noonTodayLondonTime = Carbon::createFromTime(12, 0, 0, 'Europe/London');
|
||||
|
||||
$worldWillEnd = Carbon::createFromDate(2012, 12, 21, 'GMT');
|
||||
$internetWillBlowUpOn = Carbon::create(2038, 01, 19, 3, 14, 7, 'GMT');
|
||||
|
||||
// Don't really want to die so mock now
|
||||
// Don't really want this to happen so mock now
|
||||
Carbon::setTestNow(Carbon::createFromDate(2000, 1, 1));
|
||||
|
||||
// comparisons are always done in UTC
|
||||
if (Carbon::now()->gte($worldWillEnd)) {
|
||||
if (Carbon::now()->gte($internetWillBlowUpOn)) {
|
||||
die();
|
||||
}
|
||||
|
||||
|
|
@ -74,6 +75,7 @@ printf("Now: %s", Carbon::now());
|
|||
```
|
||||
|
||||
<a name="install-nocomposer"/>
|
||||
|
||||
### Without Composer
|
||||
|
||||
Why are you not using [composer](http://getcomposer.org/)? Download [Carbon.php](https://github.com/briannesbitt/Carbon/blob/master/src/Carbon/Carbon.php) from the repo and save the file into your project path somewhere.
|
||||
|
|
@ -89,4 +91,4 @@ printf("Now: %s", Carbon::now());
|
|||
|
||||
## Docs
|
||||
|
||||
[http://carbon.nesbot.com/docs](http://carbon.nesbot.com/docs)
|
||||
[http://carbon.nesbot.com/docs](http://carbon.nesbot.com/docs)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue