System.Globalization.CCFixed.FromDateTime C# (CSharp) Méthode

FromDateTime() public static méthode

A static method computing the fixed day number from a T:System.DateTime value.
public static FromDateTime ( System time ) : int
time System A /// value representing the date. ///
Résultat int
	public static int FromDateTime(System.DateTime time) {
		return 1 + (int)(time.Ticks / System.TimeSpan.TicksPerDay);
	}

Usage Example

Exemple #1
0
        /// <summary>Returns the year in the specified <see cref="T:System.DateTime" /> value.</summary>
        /// <returns>An integer that represents the year in the specified <see cref="T:System.DateTime" /> value.</returns>
        /// <param name="time">The <see cref="T:System.DateTime" /> to read. </param>
        /// <exception cref="T:System.ArgumentOutOfRangeException">
        ///   <paramref name="time" /> is outside the range supported by the current <see cref="T:System.Globalization.HebrewCalendar" /> object. </exception>
        public override int GetYear(DateTime time)
        {
            this.M_CheckDateTime(time);
            int date = CCFixed.FromDateTime(time);

            return(CCHebrewCalendar.year_from_fixed(date));
        }
All Usage Examples Of System.Globalization.CCFixed::FromDateTime