Beispiel #1
0
 /// <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());
 }
Beispiel #2
0
 /// <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());
 }
Beispiel #3
0
 /// <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());
 }
Beispiel #4
0
 /// <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());
 }
Beispiel #5
0
 /// <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());
 }
Beispiel #6
0
 /// <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());
 }
Beispiel #7
0
 /// <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());
 }
Beispiel #8
0
 /// <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());
 }