Changeset 268 for Include/Classes/System/DateTime.ab
- Timestamp:
- Jun 2, 2007, 7:04:19 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Include/Classes/System/DateTime.ab
r263 r268 52 52 53 53 'Copy Constructor 54 Sub DateTime( ByRefdateTime As DateTime)54 Sub DateTime(dateTime As DateTime) 55 55 This.m_Date = dateTime.m_Date 56 56 End Sub … … 59 59 End Sub 60 60 61 Function Operator + ( ByRefvalue As TimeSpan) As DateTime61 Function Operator + (value As TimeSpan) As DateTime 62 62 Return New DateTime(Ticks + value.Ticks) 63 63 End Function 64 64 65 Function Operator - ( ByRefvalue As DateTime) As TimeSpan65 Function Operator - (value As DateTime) As TimeSpan 66 66 Return TimeSpan.FromTicks(Ticks - value.Ticks) 67 67 End Function 68 68 69 Function Operator - ( ByRefvalue As TimeSpan) As DateTime69 Function Operator - (value As TimeSpan) As DateTime 70 70 Return New DateTime(Ticks - value.Ticks) 71 71 End Function 72 72 73 Function Operator == ( ByRefvalue As DateTime) As Boolean73 Function Operator == (value As DateTime) As Boolean 74 74 Return Equals(value) 75 75 End Function 76 76 77 Function Operator <> ( ByRefvalue As DateTime) As Boolean77 Function Operator <> (value As DateTime) As Boolean 78 78 Return Not Equals(value) 79 79 End Function 80 80 81 Function Operator > ( ByRefvalue As DateTime) As Boolean81 Function Operator > (value As DateTime) As Boolean 82 82 If DateTime.Compare(This, value) > 0 Then 83 83 Return True … … 87 87 End Function 88 88 89 Function Operator < ( ByRefvalue As DateTime) As Boolean89 Function Operator < (value As DateTime) As Boolean 90 90 If DateTime.Compare(This, value) < 0 Then 91 91 Return True … … 95 95 End Function 96 96 97 Function Operator >= ( ByRefvalue As DateTime) As Boolean97 Function Operator >= (value As DateTime) As Boolean 98 98 If DateTime.Compare(This, value) => 0 Then 99 99 Return True … … 103 103 End Function 104 104 105 Function Operator <= ( ByRefvalue As DateTime) As Boolean105 Function Operator <= (value As DateTime) As Boolean 106 106 If DateTime.Compare(This, value) <= 0 Then 107 107 Return True … … 191 191 192 192 'Public Methods 193 Static Function Compare( ByRef t1 As DateTime, ByReft2 As DateTime) As Int64193 Static Function Compare(t1 As DateTime, t2 As DateTime) As Int64 194 194 Return t1.Ticks - t2.Ticks 195 195 End Function 196 196 197 Function Equals( ByRefvalue As DateTime) As Boolean197 Function Equals(value As DateTime) As Boolean 198 198 If value.m_Date = m_Date Then 199 199 Return True … … 203 203 End Function 204 204 205 Static Function Equals( ByRef t1 As DateTime, ByReft2 As DateTime) As Boolean205 Static Function Equals(t1 As DateTime, t2 As DateTime) As Boolean 206 206 If t1.m_Date = t2.m_Date Then 207 207 Return True … … 215 215 End Function 216 216 217 Function Add( ByRefvalue As TimeSpan) As DateTime217 Function Add(value As TimeSpan) As DateTime 218 218 Return This + value 219 219 End Function … … 259 259 End Function 260 260 261 Function Subtract( ByRefvalue As DateTime) As TimeSpan262 Return New DateTime(This - value)263 End Function 264 265 Function Subtract( ByRefvalue As TimeSpan) As DateTime266 Return New DateTime(This - value)261 Function Subtract(value As DateTime) As TimeSpan 262 Return This - value 263 End Function 264 265 Function Subtract(value As TimeSpan) As DateTime 266 Return This - value 267 267 End Function 268 268
Note:
See TracChangeset
for help on using the changeset viewer.