@staticmethod
def cmp_item(x, y):
    """ compares items by their update datetime """
    if x.has_key('updated') and y.has_key('updated'):
        return x['updated'] < y['updated'] and 1 or x['updated'] > y['updated'
            ] and -1 or 0
    elif x.has_key('updated') and not y.has_key('updated'):
        return -1
    elif not x.has_key('updated') and y.has_key('updated'):
        return 1
    else:
        return 0
