I'm using Carbon to manipulate dates I retrieved from my MySQL database. I have dates like the following:
2017-07-19 00:00:00
2017-06-26 15:27:57
As you can see, the first is the start of a day. When displaying dates like that, I would like to omit the time part. I know I can use a different format for each one. For example:
F d Y
for dates without time.F d Y g:ia
for dates with time.
What I couldn't accomplish is a simple way to check if a date has a time part to apply one format or the other. Must I use individual getters to check the hour, minute and second?