// class_current_date.h (c) Kari Laitinen // http://www.naturalprogramming.com/ // 1999-??-?? File created. // 2013-11-14 Last modification. #ifndef CLASS_CURRENT_DATE_H // prohibiting multiple inclusions #define CLASS_CURRENT_DATE_H #include // C-style time/date utilites #include "class_date.h" class Current_date : public Date { public: Current_date( char given_date_print_format = 'A' ) ; } ; Current_date::Current_date( char given_date_print_format ) { time_t seconds_since_1970 ; time( &seconds_since_1970 ) ; this_day = localtime( &seconds_since_1970 ) -> tm_mday ; this_month = localtime( &seconds_since_1970 ) -> tm_mon + 1 ; this_year = localtime( &seconds_since_1970 ) -> tm_year + 1900 ; date_print_format = given_date_print_format ; } #endif // end of include guard