示例#1
0
        public static void JulianDayToLocal(SPCalendarType calType, int jDay, IntlDate id)
        {
            SimpleDate simpleDate = new SimpleDate(0, 0, 0);

            SPIntlCal.GetLocalCalendar(calType).JulianDayToDate(jDay, ref simpleDate, 0, 0);
            id.Init(simpleDate.Year, simpleDate.Month, simpleDate.Day, simpleDate.Era, calType);
        }
示例#2
0
 public static bool IsCalendarSupported(SPCalendarType calType)
 {
     try
     {
         SPIntlCal.GetLocalCalendar(calType);
         return(true);
     }
     catch (Exception)
     {
     }
     return(false);
 }
示例#3
0
 public static int LocalToJulianDay(SPCalendarType calType, ref SimpleDate di, int iAdvance, int jDayCurrent)
 {
     return(SPIntlCal.GetLocalCalendar(calType).DateToJulianDay(ref di, iAdvance, jDayCurrent));
 }
示例#4
0
 public static int LocalToJulianDay(SPCalendarType calType, ref SimpleDate di)
 {
     return(SPIntlCal.GetLocalCalendar(calType).DateToJulianDay(ref di, 0, 0));
 }
示例#5
0
 public static bool IsSupportedLocalJulianDay(SPCalendarType calType, int jDay)
 {
     return(SPIntlCal.GetLocalCalendar(calType).IsSupportedJulianDay(jDay));
 }
示例#6
0
 public static bool IsLocalDateValid(SPCalendarType calType, ref SimpleDate di, int iAdvance, int jDayCurrent)
 {
     return(SPIntlCal.GetLocalCalendar(calType).IsDateValid(ref di, iAdvance, jDayCurrent));
 }
示例#7
0
 public static bool IsLocalDateValid(SPCalendarType calType, ref SimpleDate di)
 {
     return(SPIntlCal.GetLocalCalendar(calType).IsDateValid(ref di, 0, 0));
 }
示例#8
0
 public static bool IsSupportedLocalDate(SPCalendarType calType, ref SimpleDate di)
 {
     return(SPIntlCal.GetLocalCalendar(calType).IsSupportedDate(ref di));
 }
示例#9
0
 public static bool IsSupportedLocalYear(SPCalendarType calType, int year)
 {
     return(SPIntlCal.GetLocalCalendar(calType).IsSupportedYear(year));
 }
示例#10
0
 public static int MonthsInLocalYear(SPCalendarType calType, ref SimpleDate di)
 {
     return(SPIntlCal.GetLocalCalendar(calType).MonthsInYear(ref di));
 }
示例#11
0
 public static int DaysInLocalMonth(SPCalendarType calType, ref SimpleDate di, int iAdvance)
 {
     return(SPIntlCal.GetLocalCalendar(calType).DaysInMonth(ref di, iAdvance));
 }
示例#12
0
 public static bool IsLocalYearLeap(SPCalendarType calType, int year)
 {
     return(SPIntlCal.GetLocalCalendar(calType).IsYearLeap(year));
 }
示例#13
0
 public static int GetEraJulianDay(SPCalendarType calType, int era)
 {
     return(SPIntlCal.GetLocalCalendar(calType).GetEraJulianDay(era));
 }
示例#14
0
 public static int EraOffset(SPCalendarType calType, int era)
 {
     return(SPIntlCal.GetLocalCalendar(calType).GetEraOffset(era));
 }
示例#15
0
        public static int LocalToJulianDay(SPCalendarType calType, IntlDate id)
        {
            SimpleDate simpleDate = new SimpleDate(id.Year, id.Month, id.Day, id.Era);

            return(SPIntlCal.GetLocalCalendar(calType).DateToJulianDay(ref simpleDate, 0, 0));
        }
示例#16
0
 public static bool IsSupportedLocalMonth(SPCalendarType calType, int year, int month)
 {
     return(SPIntlCal.GetLocalCalendar(calType).IsSupportedMonth(year, month));
 }
示例#17
0
 public static void JulianDayToLocal(SPCalendarType calType, int jDay, ref SimpleDate di)
 {
     SPIntlCal.GetLocalCalendar(calType).JulianDayToDate(jDay, ref di, 0, 0);
 }
示例#18
0
 public static void JulianDayToLocal(SPCalendarType calType, int jDay, ref SimpleDate di, int iAdvance, int jDayCurrent)
 {
     SPIntlCal.GetLocalCalendar(calType).JulianDayToDate(jDay, ref di, iAdvance, jDayCurrent);
 }