DateTimeExtensionMethods
Provides extension methods for some date/time modifications.
Methods
Gets the normalised factor into the current hour.
Returns: Normalised factor.
Gets the timespan into the current hour.
Returns: Timespan. Always between zero and one hour.
Gets the normalised factor into the current minute.
Returns: Normalised factor.
Gets the timespan into the current minute.
Returns: Timespan. Always between zero and one minute.
Gets the normalised factor into the current second.
Returns: Normalised factor.
Gets the timespan into the current second.
Returns: Timespan. Always between zero and one second.
Format the age of a time span.
Convert a floating point number into a DateTime instance counting the days since January 1st 2020. Note that overflow will be handled by returning a DateTime.MinValue or DateTime.MaxValue.
Convert a DateTime into a floating point number counting the days since January 1st 2020.
Returns: Number. Note it may be negative.
Convert a TimeSpan into a floating point number counting the total number of days.
Returns: Number. Note it may be negative.