Date format

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #1279
    ExpertGeeks
    Participant

    Hi,
    I’ve noticed that the date is MM/DD/YYYY. Everything I can think of is set to en_GB (and so should be DD/MM/YYY). How can I fix this ? Thanks.

    #1280
    RRowley
    Participant

    I’ve standardized the date format displayed on screens to the database format, yyyy-mm-dd. The value on the invoice, expense and payment view screens had been missed. The most recent update, Version: 2020.0.11, corrects this.

    If you want a difference format for the printed invoice, you’ll need to develop a custom template.

    #1288
    ExpertGeeks
    Participant

    I’ve downloaded the zip from github, but it seems to be a revision off;

    Version: 2020.0.10 — 20201217

    This is still showing the date in MM-DD-YYYY format. How/where would I need to edit this to make changes to the date format ? My template references this field using;

    {$invoice.date|utilDate}

    • This reply was modified 1 week, 4 days ago by ExpertGeeks.
    #1290
    ExpertGeeks
    Participant

    I also tried a git clone and copying across the usual config files etc etc and I get;

    PdoDb – construct error: SQLSTATE[HY000] [1698] Access denied for user ‘root’@’localhost’ (Error code: 0)

    #1291
    ExpertGeeks
    Participant

    I’ve manually made the changes listed here;

    https://github.com/fearless359/simpleinvoices/commit/62c86040ae3cc154aa3e76bc51d1f8fd25f16155

    to my working copy of 2020.0.10 which should bring me up to v2020.0.11. Despite all dates now showing as YYYY-MM-DD in the menus, they’re still MM-DD-YYYY in the print preview and the PDF’s for both the default template and my own eg-invoice template.

    • This reply was modified 1 week, 4 days ago by ExpertGeeks.
    #1293
    ExpertGeeks
    Participant

    Apologies, I think the version issue might have been to a permission on the config folder. I’ve tried the update again and now it shows 2020.0.11, however the print preview and the pdfs still have the date formate of MM-DD-YYYY. I’d be very happy with your new format of YYYY-MM-DD, I think this format makes the most sense. If only I could get the PDF’s to comply !

    #1294
    RRowley
    Participant

    PDF’s are an exception to the rule. They contain their own code to display values and any changes you want to make require you to implement a customized version. Check out the directions for the Invoice Templates & Styles menu link to the left.

    #1295
    ExpertGeeks
    Participant

    The default template (which the “Invoices Templates & Styles” you referenced to edit) renders the date in MM-DD-YYYY format.

    I can’t put this any more plainly, how can I get the default template to display the date in the format YYYY-MM-DD ?

    #1296
    RRowley
    Participant

    You need to make a custom template. The instructions I mentioned tell you how to initially set this up. You can copy the default directory to a new directory named for example, “mypdf”, and then modify line 35 of the template.tpl file and change {$invoice.date|utilDate} to {$invoice.date|htmlSafe}.

Viewing 9 posts - 1 through 9 (of 9 total)
  • You must be logged in to reply to this topic.