Home > Mobile >  PHP Carbon format to New Date() on Javascript
PHP Carbon format to New Date() on Javascript

Time:02-23

I want my website changed to full server-side, or with little client-side. What format was used by Carbon to Javascript Date object? Something like this?

Wed Feb 23 2022 12:46:13 GMT 0700 (Western Indonesia Time)

CodePudding user response:

You can read here for Carbon documentation, and you can format Carbon instance whatever you like

Carbon::now()->format('Y-m-d H:i:s');
  • Related