Weekday.
상속: Enum
예제 #1
0
파일: DateTimeStr.cs 프로젝트: nomit007/f4
 internal DateTimeStr(string pattern, Locale locale, Date d)
 {
     this.pattern  = pattern;
       this.m_locale = locale;
       this.year     = d.getYear();
       this.mon      = d.month();
       this.day      = d.getDay();
       try { this.weekday = d.weekday(); } catch (Exception) {}
 }
예제 #2
0
파일: DateTimeStr.cs 프로젝트: nomit007/f4
 //////////////////////////////////////////////////////////////////////////
 // Constructors
 //////////////////////////////////////////////////////////////////////////
 internal DateTimeStr(string pattern, Locale locale, DateTime dt)
 {
     this.pattern  = pattern;
       this.m_locale = locale;
       this.year     = dt.getYear();
       this.mon      = dt.month();
       this.day      = dt.getDay();
       this.hour     = dt.getHour();
       this.min      = dt.getMin();
       this.sec      = dt.getSec();
       this.ns       = dt.getNanoSec();
       this.weekday  = dt.weekday();
       this.tz       = dt.tz();
       this.dst      = dt.dst();
 }
예제 #3
0
파일: DateTime.cs 프로젝트: xored/f4
        internal static int weekOfYear(int year, int month, int day, Weekday startOfWeek)
        {
            int firstWeekday = DateTime.firstWeekday(year, 0); // zero based
              int lastDayInFirstWeek = 7 - (firstWeekday - startOfWeek.ord);

              // special case for first week
              if (month == 0 && day <= lastDayInFirstWeek) return 1;

              // compute from dayOfYear - lastDayInFirstWeek
              int doy = dayOfYear(year, month, day) + 1;
              int woy = (doy - lastDayInFirstWeek - 1) / 7;
              return woy + 2; // add first week and make one based
        }
예제 #4
0
파일: DateTime.cs 프로젝트: xored/f4
 public long weekOfYear(Weekday startOfWeek)
 {
     return weekOfYear(getYear(), month().ord, getDay(), startOfWeek);
 }
예제 #5
0
파일: DateTime.cs 프로젝트: xored/f4
 public static long weekdayInMonth(long year, Month mon, Weekday weekday, long pos)
 {
     return weekdayInMonth((int)year, mon.ord, weekday.ord, (int)pos);
 }
예제 #6
0
파일: Date.cs 프로젝트: syatanic/fantom
 public long weekOfYear(Weekday startOfWeek)
 {
     return(DateTime.weekOfYear(getYear(), month().ord, getDay(), startOfWeek));
 }
예제 #7
0
파일: Date.cs 프로젝트: syatanic/fantom
 public long weekOfYear()
 {
     return(weekOfYear(Weekday.localeStartOfWeek()));
 }
예제 #8
0
 public static long weekdayInMonth(long year, Month mon, Weekday weekday, long pos)
 {
     return(weekdayInMonth((int)year, mon.ord, weekday.ord, (int)pos));
 }