Esempio n. 1
0
 def index(self, v):
     '''
     Get index of a value.
     
     :param v: (*datetime or string*) Date time value
     
     :returns: (*int*) Value index
     '''
     if isinstance(v, datetime.datetime):
         v = miutil.jdatetime(v)
     else:
         v = miutil.str2jdate(v)
     return self._index.indexOf(v)
Esempio n. 2
0
 def index(self, v):
     '''
     Get index of a value.
     
     :param v: (*datetime or string*) Date time value
     
     :returns: (*int*) Value index
     '''
     if isinstance(v, datetime.datetime):
         v = miutil.jdatetime(v)
     else:
         v = miutil.str2jdate(v)
     return self._index.indexOf(v)