From c8cf4013166a97c9859b2f5a173d7283c4fcf8cf Mon Sep 17 00:00:00 2001 From: Tomasz Sowa Date: Sat, 5 May 2012 15:13:45 +0000 Subject: [PATCH] some cosmetic changes in date.h git-svn-id: svn://ttmath.org/publicrep/pikotools/trunk@406 e52654a7-88a9-db11-a3e9-0013d4bc506e --- date/date.h | 68 ++++++++++++++++++++++++++--------------------------- 1 file changed, 34 insertions(+), 34 deletions(-) diff --git a/date/date.h b/date/date.h index 157a6a9..e3cc2e2 100644 --- a/date/date.h +++ b/date/date.h @@ -85,6 +85,40 @@ public: Date & operator-=(time_t t); + /* + converts time_t in seconds (from unix epoch) to this object + */ + void FromTime(time_t t); + + + /* + converts tm structure to this object + */ + void FromTm(const tm & t); + + + /* + returns time_t (in seconds from unix epoch) + */ + time_t ToTime() const; + + + /* + return tm structure + only tm_year, tm_mon, tm_mday, tm_hour, tm_min, tm_sec fields are set + the rest is equal to zero + */ + tm ToTm() const; + + + /* + getting/setting the number of days from 0000:03:01 (year 0, month 3 - March, day 1) + (ToDays() and FromDays() can work even with a year less than 1970) + */ + long long ToDays() const; + void FromDays(long long g); + + /* returns a difference in second between two dates (always a value greater than zero) @@ -141,40 +175,6 @@ public: void AssertCorrectDate(); - /* - converts time_t in seconds (from unix epoch) to this object - */ - void FromTime(time_t t); - - - /* - converts tm structure to this object - */ - void FromTm(const tm & t); - - - /* - returns time_t (in seconds from unix epoch) - */ - time_t ToTime() const; - - - /* - return tm structure - only tm_year, tm_mon, tm_mday, tm_hour, tm_min, tm_sec fields are set - the rest is equal to zero - */ - tm ToTm() const; - - - /* - getting/setting the number of days from 0000:03:01 (year 0, month 3 - March, day 1) - (ToDays() and FromDays() can work even with a year less than 1970) - */ - long long ToDays() const; - void FromDays(long long g); - - /* returns how many days there is in a month y - year 1970 - ...