Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changed toIso8601String helper function #1063

Closed
wants to merge 1 commit into from

Conversation

afrojuju1
Copy link

Changed toIso8601String to take in a boolean which when false would remove the timezone from ISO8601 string.
This adds extra flexibility around ISO8601 string format.

This adds extra flexibility around ISO8601 string format
@Glavic
Copy link
Collaborator

Glavic commented Feb 13, 2018

If you need custom format, why don't you use ->format() method?

@kylekatarnls
Copy link
Collaborator

Each ->toX method should be reserved for one format. I recommend you to extend the class (or use a macro if you work with Laravel) to create an other method for your custom format.

@briannesbitt
Copy link
Owner

We would implement this as a separate method anyway, no boolean param. But regardless, doesn't need to go into Carbon. Sounds like a good place for your own class.

@Glavic Glavic added the macro candidate Rather than new methods, this could be a macro/mixin label Feb 14, 2018
kylekatarnls added a commit to kylekatarnls/Carbon that referenced this pull request Apr 13, 2018
@kylekatarnls
Copy link
Collaborator

Will appear in the documentation:
gh-pages...kylekatarnls:gh-pages-1.26

@kylekatarnls kylekatarnls added documentation Rely to documentations or gh-pages branch and removed macro candidate Rather than new methods, this could be a macro/mixin labels Apr 13, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Rely to documentations or gh-pages branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants