コード例 #1
0
    def __radd__(self, other):
        if not _Date:
            _delayed_import()

        if other == None:
            return None
        if isinstance(other, datetime.datetime):
            return _Date(other).add(self)
        elif isinstance(other, _Date):
            return other.add(self)
        return self + other
コード例 #2
0
ファイル: durations.py プロジェクト: rv404674/TUID
    def __radd__(self, other):
        if not _Date:
            _delayed_import()

        if other == None:
            return None
        if isinstance(other, datetime.datetime):
            return _Date(other).add(self)
        elif isinstance(other, _Date):
            return other.add(self)
        return self + other