C# Класс Itenso.TimePeriod.TimeTool

Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
AddDays ( DayOfWeek day, int days ) : DayOfWeek
AddHalfyear ( YearHalfyear startHalfyear, int count, int &year, YearHalfyear &halfyear ) : void
AddHalfyear ( int startYear, YearHalfyear startHalfyear, int count, int &year, YearHalfyear &halfyear ) : void
AddMonth ( YearMonth startMonth, int count, int &year, YearMonth &month ) : void
AddMonth ( int startYear, YearMonth startMonth, int count, int &year, YearMonth &month ) : void
AddQuarter ( YearQuarter startQuarter, int count, int &year, YearQuarter &quarter ) : void
AddQuarter ( int startYear, YearQuarter startQuarter, int count, int &year, YearQuarter &quarter ) : void
DayStart ( System.DateTime dateTime ) : System.DateTime
GetDate ( System.DateTime dateTime ) : System.DateTime
GetDaysInMonth ( int year, int month ) : int
GetHalfyearOfMonth ( YearMonth yearMonth ) : YearHalfyear
GetHalfyearOfMonth ( YearMonth yearBaseMonth, YearMonth yearMonth ) : YearHalfyear
GetMonthsOfHalfyear ( YearHalfyear yearHalfyear ) : YearMonth[]
GetMonthsOfQuarter ( YearQuarter yearQuarter ) : YearMonth[]
GetQuarterOfMonth ( YearMonth yearMonth ) : YearQuarter
GetQuarterOfMonth ( YearMonth yearBaseMonth, YearMonth yearMonth ) : YearQuarter
GetStartOfWeek ( System.DateTime time, DayOfWeek firstDayOfWeek ) : System.DateTime
GetStartOfYearWeek ( int year, int weekOfYear, CultureInfo culture, CalendarWeekRule weekRule, DayOfWeek firstDayOfWeek, YearWeekType yearWeekType ) : System.DateTime
GetStartOfYearWeek ( int year, int weekOfYear, CultureInfo culture, YearWeekType yearWeekType ) : System.DateTime
GetWeekOfYear ( System.DateTime moment, CultureInfo culture, CalendarWeekRule weekRule, DayOfWeek firstDayOfWeek, YearWeekType yearWeekType, int &year, int &weekOfYear ) : void
GetWeekOfYear ( System.DateTime moment, CultureInfo culture, YearWeekType yearWeekType, int &year, int &weekOfYear ) : void
GetWeeksOfYear ( int year, CultureInfo culture, CalendarWeekRule weekRule, DayOfWeek firstDayOfWeek, YearWeekType yearWeekType ) : int
GetWeeksOfYear ( int year, CultureInfo culture, YearWeekType yearWeekType ) : int
GetYearOf ( YearMonth yearBaseMonth, System.DateTime moment ) : int
GetYearOf ( YearMonth yearBaseMonth, int year, int month ) : int
HasTimeOfDay ( System.DateTime dateTime ) : bool
NextDay ( DayOfWeek day ) : DayOfWeek
NextHalfyear ( YearHalfyear startHalfyear, int &year, YearHalfyear &halfyear ) : void
NextMonth ( YearMonth startMonth, int &year, YearMonth &month ) : void
NextQuarter ( YearQuarter startQuarter, int &year, YearQuarter &quarter ) : void
PreviousDay ( DayOfWeek day ) : DayOfWeek
PreviousHalfyear ( YearHalfyear startHalfyear, int &year, YearHalfyear &halfyear ) : void
PreviousMonth ( YearMonth startMonth, int &year, YearMonth &month ) : void
PreviousQuarter ( YearQuarter startQuarter, int &year, YearQuarter &quarter ) : void
SetDate ( System.DateTime from, System.DateTime to ) : System.DateTime
SetDate ( System.DateTime from, int year, int month = 1, int day = 1 ) : System.DateTime
SetTimeOfDay ( System.DateTime from, System.DateTime to ) : System.DateTime
SetTimeOfDay ( System.DateTime from, int hour, int minute, int second, int millisecond ) : System.DateTime

Описание методов

AddDays() публичный статический Метод

public static AddDays ( DayOfWeek day, int days ) : DayOfWeek
day DayOfWeek
days int
Результат DayOfWeek

AddHalfyear() публичный статический Метод

public static AddHalfyear ( YearHalfyear startHalfyear, int count, int &year, YearHalfyear &halfyear ) : void
startHalfyear YearHalfyear
count int
year int
halfyear YearHalfyear
Результат void

AddHalfyear() публичный статический Метод

public static AddHalfyear ( int startYear, YearHalfyear startHalfyear, int count, int &year, YearHalfyear &halfyear ) : void
startYear int
startHalfyear YearHalfyear
count int
year int
halfyear YearHalfyear
Результат void

AddMonth() публичный статический Метод

public static AddMonth ( YearMonth startMonth, int count, int &year, YearMonth &month ) : void
startMonth YearMonth
count int
year int
month YearMonth
Результат void

AddMonth() публичный статический Метод

public static AddMonth ( int startYear, YearMonth startMonth, int count, int &year, YearMonth &month ) : void
startYear int
startMonth YearMonth
count int
year int
month YearMonth
Результат void

AddQuarter() публичный статический Метод

public static AddQuarter ( YearQuarter startQuarter, int count, int &year, YearQuarter &quarter ) : void
startQuarter YearQuarter
count int
year int
quarter YearQuarter
Результат void

AddQuarter() публичный статический Метод

public static AddQuarter ( int startYear, YearQuarter startQuarter, int count, int &year, YearQuarter &quarter ) : void
startYear int
startQuarter YearQuarter
count int
year int
quarter YearQuarter
Результат void

DayStart() публичный статический Метод

public static DayStart ( System.DateTime dateTime ) : System.DateTime
dateTime System.DateTime
Результат System.DateTime

GetDate() публичный статический Метод

public static GetDate ( System.DateTime dateTime ) : System.DateTime
dateTime System.DateTime
Результат System.DateTime

GetDaysInMonth() публичный статический Метод

public static GetDaysInMonth ( int year, int month ) : int
year int
month int
Результат int

GetHalfyearOfMonth() публичный статический Метод

public static GetHalfyearOfMonth ( YearMonth yearMonth ) : YearHalfyear
yearMonth YearMonth
Результат YearHalfyear

GetHalfyearOfMonth() публичный статический Метод

public static GetHalfyearOfMonth ( YearMonth yearBaseMonth, YearMonth yearMonth ) : YearHalfyear
yearBaseMonth YearMonth
yearMonth YearMonth
Результат YearHalfyear

GetMonthsOfHalfyear() публичный статический Метод

public static GetMonthsOfHalfyear ( YearHalfyear yearHalfyear ) : YearMonth[]
yearHalfyear YearHalfyear
Результат YearMonth[]

GetMonthsOfQuarter() публичный статический Метод

public static GetMonthsOfQuarter ( YearQuarter yearQuarter ) : YearMonth[]
yearQuarter YearQuarter
Результат YearMonth[]

GetQuarterOfMonth() публичный статический Метод

public static GetQuarterOfMonth ( YearMonth yearMonth ) : YearQuarter
yearMonth YearMonth
Результат YearQuarter

GetQuarterOfMonth() публичный статический Метод

public static GetQuarterOfMonth ( YearMonth yearBaseMonth, YearMonth yearMonth ) : YearQuarter
yearBaseMonth YearMonth
yearMonth YearMonth
Результат YearQuarter

GetStartOfWeek() публичный статический Метод

public static GetStartOfWeek ( System.DateTime time, DayOfWeek firstDayOfWeek ) : System.DateTime
time System.DateTime
firstDayOfWeek DayOfWeek
Результат System.DateTime

GetStartOfYearWeek() публичный статический Метод

public static GetStartOfYearWeek ( int year, int weekOfYear, CultureInfo culture, CalendarWeekRule weekRule, DayOfWeek firstDayOfWeek, YearWeekType yearWeekType ) : System.DateTime
year int
weekOfYear int
culture System.Globalization.CultureInfo
weekRule CalendarWeekRule
firstDayOfWeek DayOfWeek
yearWeekType YearWeekType
Результат System.DateTime

GetStartOfYearWeek() публичный статический Метод

public static GetStartOfYearWeek ( int year, int weekOfYear, CultureInfo culture, YearWeekType yearWeekType ) : System.DateTime
year int
weekOfYear int
culture System.Globalization.CultureInfo
yearWeekType YearWeekType
Результат System.DateTime

GetWeekOfYear() публичный статический Метод

public static GetWeekOfYear ( System.DateTime moment, CultureInfo culture, CalendarWeekRule weekRule, DayOfWeek firstDayOfWeek, YearWeekType yearWeekType, int &year, int &weekOfYear ) : void
moment System.DateTime
culture System.Globalization.CultureInfo
weekRule CalendarWeekRule
firstDayOfWeek DayOfWeek
yearWeekType YearWeekType
year int
weekOfYear int
Результат void

GetWeekOfYear() публичный статический Метод

public static GetWeekOfYear ( System.DateTime moment, CultureInfo culture, YearWeekType yearWeekType, int &year, int &weekOfYear ) : void
moment System.DateTime
culture System.Globalization.CultureInfo
yearWeekType YearWeekType
year int
weekOfYear int
Результат void

GetWeeksOfYear() публичный статический Метод

public static GetWeeksOfYear ( int year, CultureInfo culture, CalendarWeekRule weekRule, DayOfWeek firstDayOfWeek, YearWeekType yearWeekType ) : int
year int
culture System.Globalization.CultureInfo
weekRule CalendarWeekRule
firstDayOfWeek DayOfWeek
yearWeekType YearWeekType
Результат int

GetWeeksOfYear() публичный статический Метод

public static GetWeeksOfYear ( int year, CultureInfo culture, YearWeekType yearWeekType ) : int
year int
culture System.Globalization.CultureInfo
yearWeekType YearWeekType
Результат int

GetYearOf() публичный статический Метод

public static GetYearOf ( YearMonth yearBaseMonth, System.DateTime moment ) : int
yearBaseMonth YearMonth
moment System.DateTime
Результат int

GetYearOf() публичный статический Метод

public static GetYearOf ( YearMonth yearBaseMonth, int year, int month ) : int
yearBaseMonth YearMonth
year int
month int
Результат int

HasTimeOfDay() публичный статический Метод

public static HasTimeOfDay ( System.DateTime dateTime ) : bool
dateTime System.DateTime
Результат bool

NextDay() публичный статический Метод

public static NextDay ( DayOfWeek day ) : DayOfWeek
day DayOfWeek
Результат DayOfWeek

NextHalfyear() публичный статический Метод

public static NextHalfyear ( YearHalfyear startHalfyear, int &year, YearHalfyear &halfyear ) : void
startHalfyear YearHalfyear
year int
halfyear YearHalfyear
Результат void

NextMonth() публичный статический Метод

public static NextMonth ( YearMonth startMonth, int &year, YearMonth &month ) : void
startMonth YearMonth
year int
month YearMonth
Результат void

NextQuarter() публичный статический Метод

public static NextQuarter ( YearQuarter startQuarter, int &year, YearQuarter &quarter ) : void
startQuarter YearQuarter
year int
quarter YearQuarter
Результат void

PreviousDay() публичный статический Метод

public static PreviousDay ( DayOfWeek day ) : DayOfWeek
day DayOfWeek
Результат DayOfWeek

PreviousHalfyear() публичный статический Метод

public static PreviousHalfyear ( YearHalfyear startHalfyear, int &year, YearHalfyear &halfyear ) : void
startHalfyear YearHalfyear
year int
halfyear YearHalfyear
Результат void

PreviousMonth() публичный статический Метод

public static PreviousMonth ( YearMonth startMonth, int &year, YearMonth &month ) : void
startMonth YearMonth
year int
month YearMonth
Результат void

PreviousQuarter() публичный статический Метод

public static PreviousQuarter ( YearQuarter startQuarter, int &year, YearQuarter &quarter ) : void
startQuarter YearQuarter
year int
quarter YearQuarter
Результат void

SetDate() публичный статический Метод

public static SetDate ( System.DateTime from, System.DateTime to ) : System.DateTime
from System.DateTime
to System.DateTime
Результат System.DateTime

SetDate() публичный статический Метод

public static SetDate ( System.DateTime from, int year, int month = 1, int day = 1 ) : System.DateTime
from System.DateTime
year int
month int
day int
Результат System.DateTime

SetTimeOfDay() публичный статический Метод

public static SetTimeOfDay ( System.DateTime from, System.DateTime to ) : System.DateTime
from System.DateTime
to System.DateTime
Результат System.DateTime

SetTimeOfDay() публичный статический Метод

public static SetTimeOfDay ( System.DateTime from, int hour, int minute, int second, int millisecond ) : System.DateTime
from System.DateTime
hour int
minute int
second int
millisecond int
Результат System.DateTime