Home | News | Projects | Releases
Bugs | RFE | Repositories | Help
Added DTSTAMP property for saving data from a CalendarJournalObject.
authorSteve Brokenshire <sbrokenshire@xestia.co.uk>
Sun, 5 Jun 2016 21:51:43 +0000 (22:51 +0100)
committerSteve Brokenshire <sbrokenshire@xestia.co.uk>
Sun, 5 Jun 2016 21:51:43 +0000 (22:51 +0100)
Added the code and unit tests for the DTSTAMP property.

source/objects/calendarjournal/CalendarJournal-Save.cpp
source/tests/xestiacalendar_icaljournalsave.h

index 3a3778a..7235419 100644 (file)
@@ -37,6 +37,34 @@ void CalendarJournalObject::SaveObjectData(string *SaveData){
                
        }
        
+       // Process the DTSTAMP.
+       
+       if (DateTimeStampData.size() > 0){
+               
+               if (DateTimeStampTokens.size() > 0){
+               
+                       DataLine += "DTSTAMP;";
+                       DataLine += DateTimeStampTokens;
+                       
+               } else {
+
+                       DataLine += "DTSTAMP";
+                       
+               }
+
+               DataLine += ":";
+               DataLine += DateTimeStampData;
+               DataLine += "\n";
+               
+               DataLineProcessed = OutputText(&DataLine);
+               
+               *SaveData += DataLineProcessed;
+               
+               DataLine.clear();
+               DataLineProcessed.clear();
+               
+       }
+       
        *SaveData += "END:VJOURNAL\n";
        
 }
\ No newline at end of file
index 08fb513..eb2263b 100644 (file)
@@ -38,6 +38,7 @@ TEST(iCalendarSaveJournal, SaveEventTests){
        "PRODID:-//Xestia//Calendar Unit Testing//KW\n"
        "BEGIN:VJOURNAL\n"
        "UID:329128-12939123-123123-13\n"
+       "DTSTAMP:20160116T190200Z\n"
        "END:VJOURNAL\n"
        "END:VCALENDAR";
        
Xestia Software Development
Yn Maystri
© 2006 - 2019 Xestia Software Development
Software

Xestia Address Book
Xestia Calendar
Development

Xestia Gelforn
Everything else

About
News
Privacy Policy