/// <summary> /// Returns value as a number of Seconds /// </summary> /// <param name="self">The value</param> /// <example> /// ((short)100).Seconds().Ago(); /// </example> public static TimeSpan Seconds(this short self) { return(self.AsD().Seconds()); }
/// <summary> /// Returns value as a number of Years /// </summary> /// <param name="self">The value</param> /// <remarks> /// This assumes 365 days per year. /// </remarks> /// <example> /// ((short)100).Years().Ago(); /// </example> public static TimeSpan Years(this short self) { return(self.AsD().Years()); }
/// <summary> /// Returns value as a number of Milliseconds /// </summary> /// <param name="self">The value</param> /// <example> /// ((short)100).Milliseconds().Ago(); /// </example> public static TimeSpan Milliseconds(this short self) { return(self.AsD().Milliseconds()); }
/// <summary> /// Returns value as a number of Months /// </summary> /// <param name="self">The value</param> /// <remarks> /// This assumes 30 days per month. Because of this, it is possible to skip over months /// even with small values. /// </remarks> /// <example> /// ((short)100).Months().Ago(); /// </example> public static TimeSpan Months(this short self) { return(self.AsD().Months()); }
/// <summary> /// Returns value as a number of Weeks /// </summary> /// <param name="self">The value</param> /// <example> /// ((short)100).Weeks().Ago(); /// </example> public static TimeSpan Weeks(this short self) { return(self.AsD().Weeks()); }
/// <summary> /// Returns value as a number of Days /// </summary> /// <param name="self">The value</param> /// <example> /// ((short)100).Days().Ago(); /// </example> public static TimeSpan Days(this short self) { return(self.AsD().Days()); }
/// <summary> /// Returns value as a number of Hours /// </summary> /// <param name="self">The value</param> /// <example> /// ((short)100).Hours().Ago(); /// </example> public static TimeSpan Hours(this short self) { return(self.AsD().Hours()); }
/// <summary> /// Returns value as a number of Minutes /// </summary> /// <param name="self">The value</param> /// <example> /// ((short)100).Minutes().Ago(); /// </example> public static TimeSpan Minutes(this short self) { return(self.AsD().Minutes()); }