techouse/intl-date-time

Implement different Dateformat

Closed this issue · 1 comments

in my project, I want it to show in the format as "MM/DD/YYYY" in US
I've tried

->format('MM-DD-YYYY)
->format('MM/DD/YYYY)
->dateFormat('MM-DD-YYYY')
->dateFormat('MM/DD/YYYY')

none of them is working

->dateFormat('MM/DD/YYYY') seems to work but gives an error message: The Expires must be in the format dd/MM/yyyy

Screen Shot 2021-01-19 at 1 46 28 PM

also when I try to use it with ->minDate(Carbon::now()), it gives the totally wrong date to start with

Screen Shot 2021-01-19 at 1 48 08 PM

Hey!

As this module extracts locales from MomentJS it only supports locales that MomentJS supports and en-US is not one of them. This is a known bug of MomentJS that hasn't been fixed in over 2 years.