예제 #1
0
        /// <summary>
        /// get farsi mah number
        /// </summary>
        /// <param name="selectedYear"></param>
        /// <param name="selectedMonth"></param>
        /// <param name="selectedDay"></param>
        /// <returns></returns>
        internal static int?SaalNum(int?selectedYear, int?selectedMonth, int?selectedDay)
        {
            var shamsi = ConvertDate.ToShamsiDate(selectedYear, selectedMonth, selectedDay);

            if (shamsi == null)
            {
                return(null);
            }

            return(shamsi.Saal);
        }
예제 #2
0
 /// <summary>
 /// return only the year, used for example in the footer and copyright in one shot
 /// </summary>
 /// <param name="dateTime"></param>
 /// <returns></returns>
 public static int SaalNum(DateTime dateTime)
 {
     return(ConvertDate.ToShamsiDate(dateTime).Saal);
 }
예제 #3
0
 /// <summary>
 /// روزه ماه
 /// </summary>
 /// <param name="dateTime"></param>
 /// <returns></returns>
 public static int RoozNum(DateTime dateTime)
 {
     return(ConvertDate.ToShamsiDate(dateTime).RoozeMah);
 }
예제 #4
0
 /// <summary>
 /// return only the month , used for example in the footer and copyright in one shot
 /// </summary>
 /// <param name="dateTime"></param>
 /// <returns></returns>
 public static int MahNum(DateTime dateTime)
 {
     return(ConvertDate.ToShamsiDate(dateTime).Mah);
 }