Author: wyoung
Date: Wed Jul 29 13:56:21 2009
New Revision: 2553

URL: http://svn.gna.org/viewcvs/mysqlpp?rev=2553&view=rev
Log:
Comment improvements

Modified:
    trunk/lib/datetime.h

Modified: trunk/lib/datetime.h
URL: 
http://svn.gna.org/viewcvs/mysqlpp/trunk/lib/datetime.h?rev=2553&r1=2552&r2=2553&view=diff
==============================================================================
--- trunk/lib/datetime.h (original)
+++ trunk/lib/datetime.h Wed Jul 29 13:56:21 2009
@@ -63,12 +63,12 @@
 
        /// \brief Initialize object from discrete y/m/d h:m:s values.
        ///
-       /// \param y year_
-       /// \param mon month_
-       /// \param d day_ of month_
-       /// \param h hour_
-       /// \param min minute_
-       /// \param s second_
+       /// \param y year, 1000-9999
+       /// \param mon month, 1-12
+       /// \param d day of month, 1-31
+       /// \param h hour, 0-23
+       /// \param min minute, 0-59
+       /// \param s second, 0-59
        DateTime(unsigned short y, unsigned char mon, unsigned char d,
                        unsigned char h, unsigned char min, unsigned char s) :
        Comparable<DateTime>(),
@@ -179,7 +179,8 @@
        /// \brief Get the date/time value's year part
        ///
        /// There's no trickery here like in some date/time implementations
-       /// where you have to add 1900 or something like that.
+       /// where you have to add 1900 or something like that.  It simply
+       /// returns the year in natural form, in the range 1000-9999.
        unsigned short year() const { return year_; }
 
        /// \brief Change the date/time value's year part
@@ -192,7 +193,7 @@
        unsigned short year_;   ///< the year, as a simple integer
        unsigned char month_;   ///< the month, 1-12
        unsigned char day_;             ///< the day, 1-31
-       unsigned char hour_;    ///< the hour, 0-23
+       unsigned char hour_;    ///< the hour, 0-23 (not 0-255 as in Time!)
        unsigned char minute_;  ///< the minute, 0-59
        unsigned char second_;  ///< the second, 0-59
 
@@ -223,6 +224,10 @@
        Date() : year_(0), month_(0), day_(0) { }
 
        /// \brief Initialize object
+       ///
+       /// \param y year, 1000-9999
+       /// \param m month, 1-12
+       /// \param d day of month, 1-31
        Date(unsigned short y, unsigned char m, unsigned char d) :
        Comparable<Date>(),
        year_(y),
@@ -315,7 +320,7 @@
        void year(unsigned short y) { year_ = y; }
 
 private:
-       unsigned short year_;   ///< the year, as a simple integer
+       unsigned short year_;   ///< the year, as a simple integer, 1000-9999
        unsigned char month_;   ///< the month, 1-12
        unsigned char day_;             ///< the day, 1-31
 };
@@ -341,6 +346,9 @@
        Time() : hour_(0), minute_(0), second_(0) { }
 
        /// \brief Initialize object
+       /// \param h hour, 0-255 (yes, > 1 day is legal in SQL!)
+       /// \param m minute, 0-59
+       /// \param s second, 0-59
        Time(unsigned char h, unsigned char m, unsigned char s) :
        hour_(h),
        minute_(m),
@@ -398,10 +406,10 @@
        /// \brief Parse a SQL time string into this object.
        const char* convert(const char*);
 
-       /// \brief Get the time's hour part, 0-23
+       /// \brief Get the time's hour part, 0-255
        unsigned char hour() const { return hour_; }
 
-       /// \brief Change the time's hour part, 0-23
+       /// \brief Change the time's hour part, 0-255
        void hour(unsigned char h) { hour_ = h; }
 
        /// \brief Get the time's minute part, 0-59
@@ -428,7 +436,7 @@
        std::string str() const { return *this; }
 
 private:
-       unsigned char hour_;    ///< the hour, 0-23
+       unsigned char hour_;    ///< the hour, 0-255 (yes, > 1 day is legal 
SQL!)
        unsigned char minute_;  ///< the minute, 0-59
        unsigned char second_;  ///< the second, 0-59
 };


_______________________________________________
Mysqlpp-commits mailing list
[email protected]
https://mail.gna.org/listinfo/mysqlpp-commits

Reply via email to