C# Class Itenso.TimePeriod.TimeTool

Show file Open project: jwg4/date-difference Class Usage Examples

Public Methods

Method Description
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

Method Details

AddDays() public static method

public static AddDays ( DayOfWeek day, int days ) : DayOfWeek
day DayOfWeek
days int
return DayOfWeek

AddHalfyear() public static method

public static AddHalfyear ( YearHalfyear startHalfyear, int count, int &year, YearHalfyear &halfyear ) : void
startHalfyear YearHalfyear
count int
year int
halfyear YearHalfyear
return void

AddHalfyear() public static method

public static AddHalfyear ( int startYear, YearHalfyear startHalfyear, int count, int &year, YearHalfyear &halfyear ) : void
startYear int
startHalfyear YearHalfyear
count int
year int
halfyear YearHalfyear
return void

AddMonth() public static method

public static AddMonth ( YearMonth startMonth, int count, int &year, YearMonth &month ) : void
startMonth YearMonth
count int
year int
month YearMonth
return void

AddMonth() public static method

public static AddMonth ( int startYear, YearMonth startMonth, int count, int &year, YearMonth &month ) : void
startYear int
startMonth YearMonth
count int
year int
month YearMonth
return void

AddQuarter() public static method

public static AddQuarter ( YearQuarter startQuarter, int count, int &year, YearQuarter &quarter ) : void
startQuarter YearQuarter
count int
year int
quarter YearQuarter
return void

AddQuarter() public static method

public static AddQuarter ( int startYear, YearQuarter startQuarter, int count, int &year, YearQuarter &quarter ) : void
startYear int
startQuarter YearQuarter
count int
year int
quarter YearQuarter
return void

DayStart() public static method

public static DayStart ( System.DateTime dateTime ) : System.DateTime
dateTime System.DateTime
return System.DateTime

GetDate() public static method

public static GetDate ( System.DateTime dateTime ) : System.DateTime
dateTime System.DateTime
return System.DateTime

GetDaysInMonth() public static method

public static GetDaysInMonth ( int year, int month ) : int
year int
month int
return int

GetHalfyearOfMonth() public static method

public static GetHalfyearOfMonth ( YearMonth yearMonth ) : YearHalfyear
yearMonth YearMonth
return YearHalfyear

GetHalfyearOfMonth() public static method

public static GetHalfyearOfMonth ( YearMonth yearBaseMonth, YearMonth yearMonth ) : YearHalfyear
yearBaseMonth YearMonth
yearMonth YearMonth
return YearHalfyear

GetMonthsOfHalfyear() public static method

public static GetMonthsOfHalfyear ( YearHalfyear yearHalfyear ) : YearMonth[]
yearHalfyear YearHalfyear
return YearMonth[]

GetMonthsOfQuarter() public static method

public static GetMonthsOfQuarter ( YearQuarter yearQuarter ) : YearMonth[]
yearQuarter YearQuarter
return YearMonth[]

GetQuarterOfMonth() public static method

public static GetQuarterOfMonth ( YearMonth yearMonth ) : YearQuarter
yearMonth YearMonth
return YearQuarter

GetQuarterOfMonth() public static method

public static GetQuarterOfMonth ( YearMonth yearBaseMonth, YearMonth yearMonth ) : YearQuarter
yearBaseMonth YearMonth
yearMonth YearMonth
return YearQuarter

GetStartOfWeek() public static method

public static GetStartOfWeek ( System.DateTime time, DayOfWeek firstDayOfWeek ) : System.DateTime
time System.DateTime
firstDayOfWeek DayOfWeek
return System.DateTime

GetStartOfYearWeek() public static method

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
return System.DateTime

GetStartOfYearWeek() public static method

public static GetStartOfYearWeek ( int year, int weekOfYear, CultureInfo culture, YearWeekType yearWeekType ) : System.DateTime
year int
weekOfYear int
culture System.Globalization.CultureInfo
yearWeekType YearWeekType
return System.DateTime

GetWeekOfYear() public static method

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
return void

GetWeekOfYear() public static method

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
return void

GetWeeksOfYear() public static method

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
return int

GetWeeksOfYear() public static method

public static GetWeeksOfYear ( int year, CultureInfo culture, YearWeekType yearWeekType ) : int
year int
culture System.Globalization.CultureInfo
yearWeekType YearWeekType
return int

GetYearOf() public static method

public static GetYearOf ( YearMonth yearBaseMonth, System.DateTime moment ) : int
yearBaseMonth YearMonth
moment System.DateTime
return int

GetYearOf() public static method

public static GetYearOf ( YearMonth yearBaseMonth, int year, int month ) : int
yearBaseMonth YearMonth
year int
month int
return int

HasTimeOfDay() public static method

public static HasTimeOfDay ( System.DateTime dateTime ) : bool
dateTime System.DateTime
return bool

NextDay() public static method

public static NextDay ( DayOfWeek day ) : DayOfWeek
day DayOfWeek
return DayOfWeek

NextHalfyear() public static method

public static NextHalfyear ( YearHalfyear startHalfyear, int &year, YearHalfyear &halfyear ) : void
startHalfyear YearHalfyear
year int
halfyear YearHalfyear
return void

NextMonth() public static method

public static NextMonth ( YearMonth startMonth, int &year, YearMonth &month ) : void
startMonth YearMonth
year int
month YearMonth
return void

NextQuarter() public static method

public static NextQuarter ( YearQuarter startQuarter, int &year, YearQuarter &quarter ) : void
startQuarter YearQuarter
year int
quarter YearQuarter
return void

PreviousDay() public static method

public static PreviousDay ( DayOfWeek day ) : DayOfWeek
day DayOfWeek
return DayOfWeek

PreviousHalfyear() public static method

public static PreviousHalfyear ( YearHalfyear startHalfyear, int &year, YearHalfyear &halfyear ) : void
startHalfyear YearHalfyear
year int
halfyear YearHalfyear
return void

PreviousMonth() public static method

public static PreviousMonth ( YearMonth startMonth, int &year, YearMonth &month ) : void
startMonth YearMonth
year int
month YearMonth
return void

PreviousQuarter() public static method

public static PreviousQuarter ( YearQuarter startQuarter, int &year, YearQuarter &quarter ) : void
startQuarter YearQuarter
year int
quarter YearQuarter
return void

SetDate() public static method

public static SetDate ( System.DateTime from, System.DateTime to ) : System.DateTime
from System.DateTime
to System.DateTime
return System.DateTime

SetDate() public static method

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
return System.DateTime

SetTimeOfDay() public static method

public static SetTimeOfDay ( System.DateTime from, System.DateTime to ) : System.DateTime
from System.DateTime
to System.DateTime
return System.DateTime

SetTimeOfDay() public static method

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
return System.DateTime