Closed alikoza closed 3 years ago
You import {utcDateCalendarTime} from "support/utils/common";
and we have absolutely no way to know what is this function, where it come from. The same goes for almost all the JS functions here.
Then it sounds you mix 2 different translation systems, you should either make your backend sending an ISO8601 string or a timestamp so you can work with it properly and translate from the front side, or you format back-end side (with Carbon) and so you should not add any translation layer for the dates in your front.
Anyway, this is unworkable from here. Please if you open an issue again here, follow strictly the issue template GitHub asked you kindly not to remove. And stick to the PHP part that concerns Carbon directly. No front-end stuff will be fixed there, here is the place to report bugs or submit feature in Carbon describing precisely actual and expected behaviors.
Thanks.
I have a model which looks like below :
And what I have in my view file is :
Not changes the language of date in this case. But what is quite interesting is when I use utcDateCalendarTime() like below translation is sucesfull without any problem :
Can Anyone please explain me why I am getting the date in translated form when I use render(), however when I use any function of getTime() or getTimeStamp() it doesn't work. What happens when we use the utcDateCalendarTime() inside of the function? Something happens and localisation(translation) not occurs. i really dig deep and still did not find any information related to this issue. Date format from datebase is exactly the same.
reactjs