Date Formatting Changes (e.g. Australia format) (v. 2.72 - 2.81)

To change the date format in version 2.72 or 2.81, open the config.php file in the /sbconf/ folder, and change the line:

define("SB_SHORT_DATE", "n/j/y"); // Short date format

to:

define("SB_SHORT_DATE", "j/n/y"); // Short date format

Please note that the notices showing MM/DD/YY will still appear next to the date fields. This will be corrected in the next release. To change these notices in version 2.72 or 2.81:

Method 1:

This method is manual. You will need to manually adjust all the files to show the correct date format notes. It is the easier mod to make, but if the client changes his or her short date format, you will have to redo the modification.

Go through the script and change:

MM/DD/YY

to:

DD/MM/YY

(Or use any note that you wish, to fit the formatting.) You will find these statements in the following files:

  • /enc/registry_register.php
  • /enc/registry_update.php
  • /storeadmin/coupons.php
  • /storeadmin/items.php
  • /storeadmin/registry.php

Method 2:

This method is dynamic. When the client changes his or her short date format, the notice will change as well. This change is in the 2.82 release.

  1. Open the stconfig.php file and add the lines:

    // DISPLAY DATE WITH CORRECT FORMAT
    function shortdatenote()
    {
    $shortdate = str_replace('Y', 'YYYY', SB_SHORT_DATE);
    $dateformarr = array('n', 'm', 'j', 'd', 'y');
    $noteformarr = array('M', 'MM', 'D', 'DD', 'YY');
    $shortdate = str_replace($dateformarr, $noteformarr, $shortdate);
    return $shortdate;
    }

    just above the line:

    // CHECK CATEGORIES
  2. Open the following files:

    • /enc/registry_register.php
    • /enc/registry_update.php
    • /storeadmin/coupons.php
    • /storeadmin/items.php
    • /storeadmin/registry.php
  3. In each file, find the code:

    MM/DD/YY

    and change it toto:

  4. Save and reload all changed files

Note that you will only have to make this modification once if you use Method 2. If a client changes the short date format, the note next to the date will automatically change to reflect that format as well.