Skip to content
This repository has been archived by the owner on Jul 16, 2021. It is now read-only.

[Proposal] replace Carbon with Date #675

Closed
Evertt opened this issue Jul 7, 2017 · 7 comments
Closed

[Proposal] replace Carbon with Date #675

Evertt opened this issue Jul 7, 2017 · 7 comments

Comments

@Evertt
Copy link

Evertt commented Jul 7, 2017

This Date package from jenssegers extends Carbon by adding localized methods to it.

I would love this package to become Laravel's default package. Since it extends Carbon, that means that any function that was made for Carbon doesn't have to change immediately.

Laravel 5.5 could completely switch to Date and all the projects that migrate to 5.5 and use Carbon wouldn't break. I say let's do that.

@Evertt Evertt changed the title [Proposal] replace Carbon to Date [Proposal] replace Carbon for Date Jul 7, 2017
@Evertt Evertt changed the title [Proposal] replace Carbon for Date [Proposal] replace Carbon with Date Jul 7, 2017
@lucasmichot
Copy link

@Evertt why don't you use macros, as \Illuminate\Support\Carbon support them?

@driesvints
Copy link
Member

I also think #362 is a much much better choice. Also replacing Carbon should only be done in a major release like Laravel 6.

@sisve
Copy link

sisve commented Nov 1, 2017

I'm against any change that would increase the dependency on Carbon in any way, this is one of those changes. People will get used to these new method and will then have trouble converting to another datetime library.

Carbon cannot be trusted with your timezone management. We must migrate away from Carbon. briannesbitt/Carbon#863

@Evertt
Copy link
Author

Evertt commented Nov 1, 2017

@driesvints

Also replacing Carbon should only be done in a major release like Laravel 6.

Well not if the replacement extends Carbon, right? Because that means that all code that was depending on Carbon still works. Anyhow, yeah I like Chronos for the safety it gives. I just hope that we can extend that library with extra localization support as well.

@driesvints
Copy link
Member

Well not if the replacement extends Carbon, right?

Extending Carbon is a bad idea. Carbon isn't maintained anymore which means that the longer you wait with replacing it the harder it will be to do so in the future. You shouldn't rely on 3rd-party code that isn't maintained anymore. It's best to bite the bullet and replace it with a better and maintained alternative.

@davidstanley01
Copy link

Any interest in a PR to do this?

@driesvints
Copy link
Member

@davidstanley01 unless Taylor decides that this can be done I don't think it's worth the effort. Next release is 5.6 so it won't be for that release.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants