Ignore:
Timestamp:
05/04/07 15:01:07 (13 years ago)
Author:
lawrence
Message:

Improvements in date and person handling.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • TI07-MOLES/trunk/PythonCode/wsgi/geoUtilities.py

    r2296 r2386  
    5454class TimeCoverage: 
    5555    def __init__(self,tc): 
    56         ''' Takes a tuple of (start date, end date, status ''' 
    57         self.data=tc 
     56        ''' Takes a tuple of (start date, end date, status) ''' 
     57        copy=[] 
     58        for i in tc: 
     59            if i=='':  
     60                copy.append('Unknown') 
     61            else: copy.append(i) 
     62        self.data=tuple(copy) 
    5863    def __str__(self): 
    59         if self.data==('','',''):  
     64        if self.data==('Unknown','Unknown','Unknown'):  
    6065            return 'Unknown' 
    6166        else: 
    62             return 'Start:%s, End:%s, Status:%s'%self.data 
     67            print self.data 
     68            return 'Start Date:%s, End Date:%s<br/>Status:%s'%self.data 
    6369    def __getitem__(self,i): 
    6470        return self.data[i] 
Note: See TracChangeset for help on using the changeset viewer.