Skip to content

Commit

Permalink
Shift instead of division
Browse files Browse the repository at this point in the history
  • Loading branch information
SergeiPavlov committed Aug 3, 2022
1 parent 983a400 commit de9a57a
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1440,7 +1440,7 @@ public int Day
// is an integer between 1 and 366.
//
public int DayOfYear =>
1 + ((((int)(UTicks / TicksPer6Hours) | 3) % DaysPer400Years) | 3) % DaysPer4Years / 4;
1 + (((((int)(UTicks / TicksPer6Hours) | 3) % DaysPer400Years) | 3) % DaysPer4Years >> 2);

// Returns the hash code for this DateTime.
//
Expand Down

0 comments on commit de9a57a

Please sign in to comment.