Weekday.
Inheritance: 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));
 }