# Path: dxfgrabber/juliandate.py
# def calendar_date(juliandate):
#     return CalendarDate(juliandate).result


from datetime import datetime
from .juliandate import calendar_date

    def setup_attributes(self, tags):
        date = 0
        time = 0
        for code, value in super(Sun, self).setup_attributes(tags):
            if code == 40:
                self.intensity = value
            elif code == 63:
                self.sun_color = value
            elif code == 70:
                self.shadow_type = value
            elif code == 71:
                self.shadow_map_size = value
            elif code == 90:
                self.version = value
            elif code == 91:
                date = value
            elif code == 92:
                time = value
            elif code == 280:
                self.shadow_softness = value
            elif code == 290:
                self.status = bool(value)
            elif code == 291:
                self.shadows = bool(value)
            elif code == 292:
                self.daylight_savings_time = bool(value)
            else:
                yield code, value  # chain of generators

        if date > 0:

# Path: dxfgrabber/juliandate.py
# def calendar_date(juliandate):
#     return CalendarDate(juliandate).result


# Path: dxfgrabber/dxfobjects.py
from datetime import datetime
from .juliandate import calendar_date

    def setup_attributes(self, tags):
        date = 0
        time = 0
        for code, value in super(Sun, self).setup_attributes(tags):
            if code == 40:
                self.intensity = value
            elif code == 63:
                self.sun_color = value
            elif code == 70:
                self.shadow_type = value
            elif code == 71:
                self.shadow_map_size = value
            elif code == 90:
                self.version = value
            elif code == 91:
                date = value
            elif code == 92:
                time = value
            elif code == 280:
                self.shadow_softness = value
            elif code == 290:
                self.status = bool(value)
            elif code == 291:
                self.shadows = bool(value)
            elif code == 292:
                self.daylight_savings_time = bool(value)
            else:
                yield code, value  # chain of generators

        if date > 0:

            date = calendar_date(date)
