Date format change?

  • Is it possible to easily change the date format to dd-mm-yyyy?
    Be good if this was an option in the Admin setup.
    If so, I'd like to know the file to alter for entry form (1st preference) plus other display windows where dates appear.

    • katzlbt

      To implement date formats one would need to change the incoming date format to the mySQL date format in Contact.class.php here:

      Line 432 $queryContent .= $db->escape($vv[$c]) . ',';

      Something like this should work:

      if($k == 'date' && ($c=='value' or 'value2' or 'value1'))
          $queryContent .= $db->escape(processDate($vv[$c])) . ',';

      Outgoing (displayed) date formats is a different matter and probably is best to do in _getValueGroups() ... not sure about side effects here, but all date processing should be done in mysql.

    • It's a good idea to implement this option on the Admin setup...
      I had to do many tries to understand in which format I should insert the data on my contacts.
      besides the standard format here in my country is dd-mm-yyyy as well.

      I'm not a programer so I have a great difficulty to understand how to do the changes. Would be great if the reloaded version could assimilate the way to insert dates used in php-addressbook v3.1.5.

      The way they do that is simple and I believe that offers a easiest way to customize.

    • By the way this Address book will be more international if add a option to sort the names in two ways in the Admin Panel setup ...

      Doe, John or
      John Doe

      Here in Brazil we use to call people mostly by the first name, so sometimes is hard to find someone that we looking for just looking on the list, and for this I need to use the search field...
      Not a big deal... but would be realy great to implement this 2 options on the Admin setup:

      Date format
      Alphabetical sort format

      By the way... congratulations, this is a great Address book and has a great potential.
      Its realy close to have all the features that I'm looking for to be "the perfect Address book" to me.

    • You can sort differently by changing the SQL in: