mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-10 20:42:21 +02:00
Fixed DateTime subtractions with TimeSpan
TimeSpan subtractions on DateTime was adding instead of subtracting.
This commit is contained in:
parent
ee27f6fd02
commit
1b646b091c
1 changed files with 2 additions and 2 deletions
|
@ -748,7 +748,7 @@ namespace System
|
|||
{
|
||||
return .Err;
|
||||
}
|
||||
return DateTime((uint64)(ticks + valueTicks) | InternalKind);
|
||||
return DateTime((uint64)(ticks - valueTicks) | InternalKind);
|
||||
}
|
||||
|
||||
public static DateTime operator -(DateTime d, TimeSpan t)
|
||||
|
@ -756,7 +756,7 @@ namespace System
|
|||
int64 ticks = d.InternalTicks;
|
||||
int64 valueTicks = (int64)t;
|
||||
Runtime.Assert((ticks - MinTicks >= valueTicks && ticks - MaxTicks <= valueTicks));
|
||||
return DateTime((uint64)(ticks + valueTicks) | d.InternalKind);
|
||||
return DateTime((uint64)(ticks - valueTicks) | d.InternalKind);
|
||||
}
|
||||
|
||||
public static TimeSpan operator -(DateTime lhs, DateTime rhs)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue