ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/zoe/trunk/Stamp.hpp
Revision: 21
Committed: 2004-07-16T23:37:41-07:00 (20 years, 11 months ago) by douglas
File size: 949 byte(s)
Log Message:
Database!

File Contents

# Content
1 // Zoe AIM Away Message RSS Feed Generator
2 //
3 // Seth King and Douglas Thrift
4 //
5 // $Id$
6
7 #ifndef _Stamp_hpp_
8 #define _Stamp_hpp_
9
10 #include "Zoe.hpp"
11
12 #include <ctime>
13
14 class Stamp
15 {
16 private:
17 std::tm stamp;
18 public:
19 Stamp(std::time_t now = std::time(NULL)) { gmtime_r(&now, &stamp); }
20 Stamp(int day, int month = 0, int year = 0, int hour = 0, int minute = 0,
21 int second = 0);
22 Stamp(const ext::String& when);
23 ~Stamp() {}
24 operator ext::String();
25 Stamp operator+(Stamp stamp);
26 Stamp operator-(Stamp stamp);
27 Stamp& operator++() { *this += 1; return *this; }
28 Stamp operator++(int) { Stamp stamp(*this); *this += 1; return stamp; }
29 Stamp& operator+=(const Stamp& stamp) { *this = *this + stamp; return *this;
30 }
31 Stamp& operator--() { *this -= 1; return *this; }
32 Stamp operator--(int) { Stamp stamp(*this); *this -= 1; return stamp; }
33 Stamp& operator-=(const Stamp& stamp) { *this = *this - stamp; return *this;
34 }
35 };
36
37 #endif // _Stamp_hpp_

Properties

Name Value
svn:eol-style native
svn:keywords Id