diff options
author | Ash Wolf <ninji@wuffs.org> | 2023-06-28 22:22:32 +0100 |
---|---|---|
committer | Ash Wolf <ninji@wuffs.org> | 2023-06-28 22:22:32 +0100 |
commit | c0c336500955a23e344651e5412c9d9d441ef4ee (patch) | |
tree | 790769c748db307cf3314f6e896e2f61c68561a2 /src/T2DLL/T2DateTime.cpp | |
parent | 37e364b2c6cc7487a1c888d256a73e5337bb7189 (diff) | |
download | t2win-c0c336500955a23e344651e5412c9d9d441ef4ee.tar.gz t2win-c0c336500955a23e344651e5412c9d9d441ef4ee.zip |
first pass of T2DLL
Diffstat (limited to '')
-rw-r--r-- | src/T2DLL/T2DateTime.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/T2DLL/T2DateTime.cpp b/src/T2DLL/T2DateTime.cpp index 5cb704d..023fb98 100644 --- a/src/T2DLL/T2DateTime.cpp +++ b/src/T2DLL/T2DateTime.cpp @@ -45,11 +45,11 @@ int T2DateTime::GetTimeZone() { return 9; } -/*static*/ int T2DateTime::IsEqualDate(T2DateTime* a, T2DateTime* b) { +/*static*/ BOOL T2DateTime::IsEqualDate(T2DateTime* a, T2DateTime* b) { return (a->mYear == b->mYear) && (a->mMonth == b->mMonth); } -/*static*/ int T2DateTime::IsEqualDateTime(T2DateTime* a, T2DateTime* b) { +/*static*/ BOOL T2DateTime::IsEqualDateTime(T2DateTime* a, T2DateTime* b) { return IsEqualDate(a, b) && (a->mRawMinutes == b->mRawMinutes); } @@ -58,8 +58,8 @@ void T2DateTime::AddMinutes(unsigned int m) { Validate(); } -int T2DateTime::IsIncDateTime() { - int result = false; +BOOL T2DateTime::IsIncDateTime() { + BOOL result = false; mSeconds++; if (mSeconds >= 4) { @@ -95,12 +95,12 @@ unsigned int T2DateTime::CalcLapseYears(unsigned int d) const { return (CalcTotalDays() - d) / 12; } -int T2DateTime::WithinHour(int a, int b) const { +BOOL T2DateTime::WithinHour(int a, int b) const { return WithinMinutes(a * 60, b * 60); } -int T2DateTime::WithinMinutes(int a, int b) const { - int ret = true; +BOOL T2DateTime::WithinMinutes(int a, int b) const { + BOOL ret = true; int minA = AdjustMinutes(a); int minB = AdjustMinutes(b); @@ -136,7 +136,7 @@ int T2DateTime::AdjustMinutes(int m) const { archive << v; } -int T2DateTime::IsHoliday(T2TowerDoc* doc) { +BOOL T2DateTime::IsHoliday(T2TowerDoc* doc) { // TODO virt return false; } |