Custom date format with php date()

Hey, currently we can set {{{year}}}, {{{month}}} and {{{day}}}, however I’d like to set the invoice numbering scheme to something like I-{{{yy}}}-{{{id}}}, with 2 digits for the year and not 4.

That’d be pretty easy if the field allowed input interpreted by PHP’s date() function:

Well the question is if it would be better just to add more pre-defined templates.
InvoicePlane should be an easy-to-use application and I wouldn’t like to force users to look up the usage of PHPs date() formatting. Because I can’t think of a solution that allows both {{year}} and tempaltes at the moment.

maybe do something like {{{date:yy-mm-dd}}} AND offer the existing functions OR add a short explanatory key to it.

1 Like

A guide to personalize could be fine…
maybe in a file not upgradable with updates…

a file like custom.css with all user mods and settings would be fine

Hi, I have successfully customized display last 2 digits of the year. It’s very simple!

you can edit it in the file date_helper.php and add the following code to line 50

 'd/m/y' => array (
             'Setting' => 'd/m/y',
             'Datepicker' => 'dd/mm/yyyy'

Your next step on the system configuration. In the Date format you just created select the date format.

but can you also define the invoice numbering scheme in the 2-digit format? The date format itself is not the problem here.

My invoices do have to look like this: I-16-12345 (I for Invoice, 16 for the year, 12345 being the serial number)

Hi, I am looking for a way to simply make the month not fill up with zeros.
Only one digit or two digit (when 10,11,or 12)
thing is , this was part of an invoice number. it must be 20185024
where the 5 is single digit for the month