70 lines
1.7 KiB
Markdown
70 lines
1.7 KiB
Markdown
<!--
|
|
🛑 DON'T REMOVE ME.
|
|
This issue template apply to all
|
|
- bug reports,
|
|
- feature proposals,
|
|
- and documentation requests
|
|
|
|
Having all those informations will allow us to know exactly
|
|
what you expect and answer you faster and precisely (answer
|
|
that matches your Carbon version, PHP version and usage).
|
|
|
|
Note: Comments between <!- - and - -> won't appear in the final
|
|
issue (See [Preview] tab).
|
|
-->
|
|
Hello,
|
|
|
|
I encountered an issue with the following code:
|
|
```php
|
|
echo Carbon::parse('2018-06-01')->subDay()->month;
|
|
```
|
|
|
|
Carbon version: **PUT HERE YOUR CARBON VERSION (exact version, not the range)**
|
|
|
|
PHP version: **PUT HERE YOUR PHP VERSION**
|
|
|
|
<!--
|
|
Run the command `composer show nesbot/carbon`
|
|
to get "versions"
|
|
Use `echo phpversion();`
|
|
to get PHP version.
|
|
|
|
Some issues can depends on your context, settings,
|
|
macros, timezone, language. So to be sure the code
|
|
you give is enough to reproduce your bug, try it
|
|
first in:
|
|
https://try-carbon.herokuapp.com/?theme=xcode&export&embed
|
|
|
|
You can use the [Options] button to change the version
|
|
then when you get the bug with this editor, you can use
|
|
the [Export] button, copy the link of the opened tab,
|
|
then paste it in the issue. Then we can immediatly get
|
|
your issue.
|
|
-->
|
|
|
|
|
|
I expected to get:
|
|
|
|
```
|
|
6
|
|
```
|
|
<!--
|
|
Always give your expectations. Each use has their owns.
|
|
You may want daylight saving time to be taken into account,
|
|
someone else want it to be ignored. You may want timezone
|
|
to be used in comparisons, someone else may not, etc.
|
|
-->
|
|
|
|
But I actually get:
|
|
|
|
```
|
|
5
|
|
```
|
|
<!--
|
|
If you did not succeed to get the same result in
|
|
https://try-carbon.herokuapp.com/ then precise the
|
|
result you get.
|
|
-->
|
|
|
|
Thanks!
|