def formatPlainText(self, stream):
        d = self.details
        vc = GCGregorianDate(date=self.eventTime)
        m_earth = self.m_location.GetEarthData()

        sb = GCStringBuilder(stream)
        sb.Format = SBTF_TEXT

        sb.AppendLine(GCStrings.getString(25))
        sb.AppendLine("")

        sb.AppendLine("{:15s} : {} {} {}".format(
            GCStrings.getString(7), vc.day,
            GCStrings.GetMonthAbreviation(vc.month), vc.year))

        sb.AppendLine("{:15s} : {}:{:02d}".format(GCStrings.getString(8),
                                                  vc.GetHour(),
                                                  vc.GetMinuteRound()))
        sb.AppendLine("")

        sb.AppendLine("{:15s} : {}".format(GCStrings.getString(9),
                                           self.m_location.m_strName))
        sb.AppendLine("{:15s} : {}".format(GCStrings.getString(10),
                                           self.m_location.m_strLatitude))
        sb.AppendLine("{:15s} : {}".format(GCStrings.getString(11),
                                           self.m_location.m_strLongitude))
        sb.AppendLine("{:15s} : {}".format(GCStrings.getString(12),
                                           self.m_location.m_strTimeZone))
        sb.AppendLine("{:15s} : N/A".format("DST"))
        sb.AppendLine("")

        sb.AppendLine("{:15s} : {}".format(GCStrings.getString(13),
                                           GCStrings.GetTithiName(d.nTithi)))
        sb.AppendLine("{:15s} : {:.2f} %".format(GCStrings.getString(14),
                                                 d.nTithiElapse))
        sb.AppendLine("{:15s} : {}".format(
            GCStrings.getString(15), GCStrings.GetNaksatraName(d.nNaksatra)))
        sb.AppendLine("{:15s} : {:.2f} % ({} pada)".format(
            GCStrings.getString(16), d.nNaksatraElapse,
            GCStrings.getString(811 + int(d.nNaksatraElapse / 25.0))))
        sb.AppendLine("{:15s} : {} ({})".format(
            "Moon Rasi", GCStrings.GetSankrantiName(d.nMoonRasi),
            GCStrings.GetSankrantiNameEn(d.nMoonRasi)))
        sb.AppendLine("{:15s} : {} ({})".format(
            "Sun Rasi", GCStrings.GetSankrantiName(d.nSunRasi),
            GCStrings.GetSankrantiNameEn(d.nSunRasi)))

        sb.AppendLine("{:15s} : {}".format(GCStrings.getString(20),
                                           GCStrings.GetPaksaName(d.nPaksa)))
        if (self.b_adhika == True):
            sb.AppendLine("{:15s} : {} {}".format(
                GCStrings.getString(22), GCStrings.GetMasaName(d.nMasa),
                GCStrings.getString(21)))
        else:
            sb.AppendLine("{:15s} : {}".format(GCStrings.getString(22),
                                               GCStrings.GetMasaName(d.nMasa)))
        sb.AppendLine("{:15s} : {}".format(GCStrings.getString(23),
                                           d.nGaurabdaYear))

        if (GCDisplaySettings.getValue(48)):
            sb.AppendLine()
            sb.AppendLine(GCStrings.getString(17))
            sb.AppendLine()

            sb.AppendLine("%25s : {}... ".format(
                GCStrings.getString(18),
                GCStrings.GetNaksatraChildSylable(
                    d.nNaksatra, int(d.nNaksatraElapse / 25.0))))
            sb.AppendLine("%25s : {}... ".format(
                GCStrings.getString(19),
                GCStrings.GetRasiChildSylable(d.nMoonRasi)))

        sb.AppendLine()
        sb.AppendLine(GCStrings.getString(24))
        sb.AppendLine()

        for o in range(TRESULT_APP_CELEBS):
            sb.AppendLine("   Gaurabda {:3d} : {} ".format(
                self.celeb_gy[o], self.celeb_date[o]))

        sb.AppendNote()
    def formatRtf(self, stream):
        d = self.details
        vc = GCGregorianDate(date=self.eventTime)
        m_earth = self.m_location.GetEarthData()

        sb = GCStringBuilder(stream)
        sb.fontSizeH1 = GCLayoutData.textSizeH1
        sb.fontSizeH2 = GCLayoutData.textSizeH2
        sb.fontSizeText = GCLayoutData.textSizeText
        sb.fontSizeNote = GCLayoutData.textSizeNote
        sb.Format = SBTF_RTF

        sb.AppendDocumentHeader()

        sb.AppendHeader1(GCStrings.getString(25))

        sb.AppendLine("\\tab {} : {{\\b {} {} {} }}".format(
            GCStrings.getString(7), vc.day,
            GCStrings.GetMonthAbreviation(vc.month), vc.year))

        sb.AppendLine("\\tab {} : {{\\b {}:{:02d} }}".format(
            GCStrings.getString(8), vc.GetHour(), vc.GetMinuteRound()))
        sb.AppendLine("")

        sb.AppendLine("\\tab {} : {{\\b {} }}".format(
            GCStrings.getString(9), self.m_location.m_strName))
        sb.AppendLine("\\tab {} : {{\\b {} }}".format(
            GCStrings.getString(10), self.m_location.m_strLatitude))
        sb.AppendLine("\\tab {} : {{\\b {} }}".format(
            GCStrings.getString(11), self.m_location.m_strLongitude))
        sb.AppendLine("\\tab {} : {{\\b {} }}".format(
            GCStrings.getString(12),
            GCTimeZone.GetTimeZoneName(self.m_location.m_nTimezoneId)))
        sb.AppendLine("\\tab {} : {{\\b N/A }}".format("DST"))
        sb.AppendLine("")

        sb.AppendLine("\\tab {} : {{\\b {} }}".format(
            GCStrings.getString(13), GCStrings.GetTithiName(d.nTithi)))
        sb.AppendLine("\\tab {} : {{\\b {:.2f} % }}".format(
            GCStrings.getString(14), d.nTithiElapse))
        sb.AppendLine("\\tab {} : {{\\b {} }}".format(
            GCStrings.getString(15), GCStrings.GetNaksatraName(d.nNaksatra)))
        sb.AppendLine("\\tab {} : {{\\b {:.2f} % ({} pada) }}".format(
            GCStrings.getString(16), d.nNaksatraElapse,
            GCStrings.getString(811 + int(d.nNaksatraElapse / 25.0))))
        sb.AppendLine("\\tab {} : {{\\b {} ({}) }}".format(
            "Moon Rasi", GCStrings.GetSankrantiName(d.nMoonRasi),
            GCStrings.GetSankrantiNameEn(d.nMoonRasi)))
        sb.AppendLine("\\tab {} : {{\\b {} ({}) }}".format(
            "Sun Rasi", GCStrings.GetSankrantiName(d.nSunRasi),
            GCStrings.GetSankrantiNameEn(d.nSunRasi)))

        sb.AppendLine("\\tab {} : {{\\b {} }}".format(
            GCStrings.getString(20), GCStrings.GetPaksaName(d.nPaksa)))
        if (self.b_adhika == True):
            sb.AppendLine("\\tab {} : {{\\b {} {} }}".format(
                GCStrings.getString(22), GCStrings.GetMasaName(d.nMasa),
                GCStrings.getString(21)))
        else:
            sb.AppendLine("\\tab {} : {{\\b {} }}".format(
                GCStrings.getString(22), GCStrings.GetMasaName(d.nMasa)))
        sb.AppendLine("\\tab {} : {{\\b {} }}".format(GCStrings.getString(23),
                                                      d.nGaurabdaYear))

        if (GCDisplaySettings.getValue(48)):
            sb.AppendLine("")
            sb.AppendHeader2(GCStrings.getString(17))
            sb.AppendLine("")
            sb.AppendLine("\\tab {} : {{\\b {}...  }}".format(
                GCStrings.getString(18),
                GCStrings.GetNaksatraChildSylable(
                    d.nNaksatra, int(d.nNaksatraElapse / 25.0))))
            sb.AppendLine("\\tab {} : {{\\b {}...  }}".format(
                GCStrings.getString(19),
                GCStrings.GetRasiChildSylable(d.nMoonRasi)))

        sb.AppendLine("{{\\fs{} {} }}".format(GCLayoutData.textSizeH2,
                                              GCStrings.getString(24)))
        sb.AppendLine("")

        for o in range(TRESULT_APP_CELEBS):
            sb.AppendLine("\\tab Gaurabda {} : {{\\b {} }}".format(
                self.celeb_gy[o], self.celeb_date[o]))

        sb.AppendDocumentTail()