0

Is there a way to get the day, month and year order for a locale in Babel? I am display three input fields for a date on a web page, and I would like to get the order correct based on the user's preferred language.

I know there is Locale.date_formats, but parsing date format strings to determine the order seems unreliable.

desertnaut
  • 57,590
  • 26
  • 140
  • 166
Seth
  • 6,514
  • 5
  • 49
  • 58

1 Answers1

1

I think you have to parse the date formats – that's similar to how the CLDR data itself represents the "order" of date components.

Felix Schwarz
  • 2,938
  • 4
  • 28
  • 41