Changeset 4c3ff30 in tol
- Timestamp:
- Jun 19, 2009, 10:19:59 AM (17 years ago)
- Branches:
- 1941-docker-image-to-test, devel, master
- Children:
- dcc8c8b
- Parents:
- 64bb607
- Location:
- tol/bbasic
- Files:
-
- 2 edited
-
dtealgeb.cpp (modified) (1 diff)
-
tol_bdate.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
tol/bbasic/dtealgeb.cpp
r64bb607 r4c3ff30 736 736 return(BDate(year, month, locTime->tm_mday, 737 737 locTime->tm_hour, locTime->tm_min, locTime->tm_sec)); 738 } 739 else 740 { 741 return(BDate(0, JANUARY, 0)); 742 } 743 } 744 745 //-------------------------------------------------------------------- 746 BDate DteNowGmt() 747 748 /*! Returns todays date and now time. 749 */ 750 //-------------------------------------------------------------------- 751 { 752 time_t sec = time(NIL); 753 struct tm* gmTime = gmtime(&sec); 754 if (gmTime) 755 { 756 BMonth month = (BMonth)(gmTime->tm_mon+1); //localtime()returns0-11months 757 BInt year = gmTime->tm_year; // localtime() returns 99 year 758 year = (year < 1900) ? 1900+year : year; 759 return(BDate(year, month, gmTime->tm_mday, 760 gmTime->tm_hour, gmTime->tm_min, gmTime->tm_sec)); 738 761 } 739 762 else -
tol/bbasic/tol_bdate.h
r64bb607 r4c3ff30 470 470 //! Returns today date 471 471 TOL_API BDate DteToday(); 472 //! Returns todays date and now time472 //! Returns todays date and now local time 473 473 TOL_API BDate DteNow(); 474 //! Returns todays date and now GMT time 475 TOL_API BDate DteNowGmt(); 474 476 //! Returns the date of the Easter's Sunday in the year given as parameter 475 477 TOL_API BDate DteEasterSunday(BInt year);
Note: See TracChangeset
for help on using the changeset viewer.
