I wanted to do the same thing, but there are lots of places where the date has been hardcoded to YYYY-MM-DD and also in the Javascript validations. So I thought to leave it like that, too many changes to consider :)
hey guys
all input date must be in YYYY-MM-DD , this is just to keep things simple
all output dates are based on localisation settings in the config.ini file
- refer http://simpleinvoices.org/config#localization
does this help?
cheers
justin
Hi
If you are trying this in the tpl file then you may try something like - $invoices.date|siLocal_date
If you are doing this within php file then you may try something like - siLocal::date($invoice.date)
hey joel
can you post an example of the US date in question
- its just theres alot of different place and type of dates in Simple Invoices
and try what harvinder mentions - that should fix it up
cheers
justin
Hi
We were thinking of changing the date style as well, but there are a lot of places within simple invoices where this date style - YYYY-MM-DD is hardcoded i.e. javascript validations, when writing to database etc.
So we decided to just use this style over all instead, although it does look a little odd but if it becomes too much inconvenience we may have to do the changes on all the places. I wouldn't waste much time on changing the date structure on all the parts in Simple Invoices because no matter what there will be new requirements for the date format for different people. It is a little hard to put something in place in the config file for the date format because of the javascript validation on date fields and so on.
I guess if anything needs to be done we might just have a generic date format variable in the config file say DD-MM-YYYY and everywhere else this format gets used, but it is easier said then done.
Thanks
Harvinder Singh
I changed the ini file the country localization.
But the in the date section in SI, it shows the name of the month not the number of the month.
Such as 01.Jan.2010 but i want to see it like 01.01.2010
How to change it?
Hi don_camillo,
Smarty can set the date format for you, try to use it in your templates.
For example: {$invoice.date|date_format:"%e %B %Y"}
The only problem is that the localization is not set right for smarty!!
What I did is to add this line to your translate localization directory (lang/nl_NL/lang.php)
setlocale(LC_ALL, 'nl_NL');
Smarty use not the localization what is set in the config.ini file. BUG?
The date will by now for my email template's '2 januari 2012'.
Strangely enough it will not work for my invoice templates...
http://www.smarty.net/docsv2/en/language.modifier.date.format
It looks like you're new here. If you want to get involved, click one of these buttons!