Overlaping shifts and gaps are also covered because of the recursion. Because of the recursion there is no need for double checks and complex if conditions. The order of the shifts is not important any more, the most recent one will be always picked (because of the correct calculation using AddHour(-1)). If (shiftBeginTime.TimeOfDay > startTime.TimeOfDay) Rookie police officer Jessica Loren (Juliana Harkavy - The Walking Dead) has been assigned the last shift at a closing police station and must wait for a. public Shift FindCurrentShift(DateTime startTime, DateTime endTime, List shifts)ĭateTime shiftBeginTime = DateTime.Parse((aShift.BeginTime).ToString()) My current code works (for my purposes) but isn't ideal as it requires startTime and that the shifts be in order in the collection. ' Much company was brought him thereby, and much profit. Juliana Harkavy stars as a rookie police officer who is tasked with taking the last shift at a police station before it is permanently closed. It was written by DiBlasi and Scott Poiley, both of whom produced along with Mary Poiley. As she waits for the final hazmat crew to pick up bio-hazard waste, she. Last Shift is a 2014 American psychological horror film directed by Anthony DiBlasi. When you have different groups of people working 24 hours a day on different shifts (say one group works three 8-hour shifts, another works two 12-hour shifts, last group works two 10-hour shifts with 4 hours unmanned) given a point in time what is the most straight forward way to return which shift started most recently?įor one example, I have a List of 8 hour Shifts (which BeginTime's are 6am, 2pm, 10pm respectively) public class Shift an ale - house, with the sign of the Shirt, inscribed under it, ' This is my last shift. Officer Jessica Loren is assigned the last shift in a police station that is closing.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |