public static long Week(this DateTime dateTime, DuplicateTimeFrames timeFrame)
 {
     if (timeFrame >= DuplicateTimeFrames.Month)
     {
         return(0);
     }
     else
     {
         return(dateTime.Week());
     }
 }
 public abstract string DuplicateTimeFrameToDisplayString(DuplicateTimeFrames timeFrame);
 public RemoveDuplicateEpisodesModification(bool keepFirstEpisode, DuplicateTimeFrames timeFrame)
 {
     KeepFirstEpisode = keepFirstEpisode;
     TimeFrame        = timeFrame;
 }
 public RemoveDuplicateEpisodesModification(DuplicateTimeFrames timeFrame)
     : this(true, timeFrame)
 {
     //
 }
            private string CreateTimeFramePubDateStringFromDateString(string totalDateString, DuplicateTimeFrames timeFrame)
            {
                // two actions required:
                // 1. cut the last digits, according to the time frame
                // 2. replace the month with 00 if the format is weeks (because they can stretch over months)
                var shortString = new string(totalDateString.Reverse().Skip((int)timeFrame).Reverse().ToArray());

                if (timeFrame == DuplicateTimeFrames.Week)
                {
                    shortString = shortString.Remove(4, 2).Insert(4, "00");
                }
                return(shortString);
            }