Changeset 3099 for WAeUP_SRP


Ignore:
Timestamp:
4 Feb 2008, 10:12:41 (17 years ago)
Author:
joachim
Message:

use correct condition

File:
1 edited

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/base/PatchExtendedWidgetsCPSDateTimeWidget.py

    r3096 r3099  
    3131            datamodel[field_id] = None
    3232            return 1
    33     # import pdb;pdb.set_trace()
     33    #import pdb;pdb.set_trace()
    3434    if self.view_format.startswith('iso8601'):
    3535        if re.match(r'^[0-9]+-[0-9]{2}-[0-9]{2}', date) is not None:
     
    3939            return 0
    4040    else:
    41         if re.match(r'^[0-9]?[0-9]/[0-9]?[0-9]/[0-9]{2,4}$', date) is not None:
     41        if re.match(r'^[0-9]?[0-9][/,\-,\.][0-9]?[0-9][/,\-,\.][0-9]{2,4}$', date) is not None:
    4242            d, m, y = re.split(r'[/,\-,\.]',date) # always use d/m/y and use /,- or . as separator
    4343            #d, m, y = date.split('/') # always use d/m/y
Note: See TracChangeset for help on using the changeset viewer.