C# Class BB.Caching.Redis.Analytics.BitwiseAnalytics.DateTimeUtil

Utility methods for datetime string formatting.
Datei anzeigen Open project: JesseBuesking/BB.Caching

Public Methods

Method Description
MinKeysForRange ( System.DateTime start, System.DateTime end, TimeInterval timeInterval = TimeInterval.FifteenMinutes, DayOfWeek firstDayOfWeek = DayOfWeek.Sunday ) : Tuple[]

Finds the minimum subset of keys required to cover the range of time specified by start and end using the TimeInterval specified.

Private Methods

Method Description
DaysInMonth ( System.DateTime dateTime ) : string[]
DaysInWeek ( System.DateTime dateTime, DayOfWeek firstDayOfWeek = DayOfWeek.Sunday ) : string[]
FifteenMinutes ( System.DateTime dateTime ) : string
FifteenMinutesInHour ( System.DateTime dateTime ) : string[]
HoursInDay ( System.DateTime dateTime ) : string[]
MonthsInQuarter ( System.DateTime dateTime ) : string[]
OneDay ( System.DateTime dateTime ) : string
OneHour ( System.DateTime dateTime ) : string
OneMonth ( System.DateTime dateTime ) : string
QuarterNumber ( System.DateTime dateTime ) : string
WeekNumber ( System.DateTime dateTime, DayOfWeek firstDayOfWeek = DayOfWeek.Sunday ) : string

Method Details

MinKeysForRange() public static method

Finds the minimum subset of keys required to cover the range of time specified by start and end using the TimeInterval specified.
/// This exception should never be triggered unless a new TimeInterval is supported. ///
public static MinKeysForRange ( System.DateTime start, System.DateTime end, TimeInterval timeInterval = TimeInterval.FifteenMinutes, DayOfWeek firstDayOfWeek = DayOfWeek.Sunday ) : Tuple[]
start System.DateTime /// The start of the time range. ///
end System.DateTime /// The end of the time range. ///
timeInterval TimeInterval /// The time interval. ///
firstDayOfWeek DayOfWeek /// The first day to start each week. Defaults to Sunday which is used in the US, CA, and JP. You can /// change it to Monday to get weekly aggregates which are accurate for other countries, but it'll double /// the weekly data stored. ///
return Tuple[]