views:

227

answers:

1

Hi, my site changes its locale dependent upon either user settings or browser settings (where the user hasn't set their preference). I am using amline charts, the stock chart specifically, which requires the date format in 'MM/DD/YYYY' or 'DD-MM-YYYY', I guess so the chart knows how to understand the dates. There are many ways to format a date dependent upon the computer locale, however I can't find a way to get the locale format (as above).

thanks in advance.

A: 

What's the problem?

date('m/d/Y')

or

date('d-m-Y')
vartec
I mean, I need to get the string in the middle there, the 'DD-MM-YYYY' or 'DD/MM/YYYY' etc.
Ian
Oh, ok, I understand what you want. But still I don't get why? Why don't you pass 'DD-MM-YYYY' and format the date that way?
vartec
Yea, i decided to do that in the end. Thanks for your help.
Ian