def _normalize_date_SQL(self, field_name, field_kwargs, symbol):
        """
        allow extracting information from date

        http://www.sqlite.org/lang_datefunc.html
        """
        fstrs = []
        k_opts = {
            'day': "CAST(strftime('%d', {}) AS integer)",
            'hour': "CAST(strftime('%H', {}) AS integer)",
            'doy': "CAST(strftime('%j', {}) AS integer)", # day of year
            'julian_day': "strftime('%J', {})", # YYYY-MM-DD
            'month': "CAST(strftime('%m', {}) AS integer)",
            'minute': "CAST(strftime('%M', {}) AS integer)",
            'dow': "CAST(strftime('%w', {}) AS integer)", # day of week 0 = sunday
            'week': "CAST(strftime('%W', {}) AS integer)",
            'year': "CAST(strftime('%Y', {}) AS integer)"
        }

        for k, v in field_kwargs.items():
            fstrs.append([k_opts[k].format(self._normalize_name(field_name)), self.val_placeholder, v])

        return fstrs
def _normalize_date_SQL ( self , field_name , field_kwargs , symbol ) : fstrs = [ ] k_opts = { 'day' : "CAST(strftime('%d', {}) AS integer)" , 'hour' : "CAST(strftime('%H', {}) AS integer)" , 'doy' : "CAST(strftime('%j', {}) AS integer)" , 'julian_day' : "strftime('%J', {})" , 'month' : "CAST(strftime('%m', {}) AS integer)" , 'minute' : "CAST(strftime('%M', {}) AS integer)" , 'dow' : "CAST(strftime('%w', {}) AS integer)" , 'week' : "CAST(strftime('%W', {}) AS integer)" , 'year' : "CAST(strftime('%Y', {}) AS integer)" } for k , v in field_kwargs . items ( ) : fstrs . append ( [ k_opts [ k ] . format ( self . _normalize_name ( field_name ) ) , self . val_placeholder , v ] ) return fstrs
allow extracting information from date

        http://www.sqlite.org/lang_datefunc.html