C# Class DevUtils.DateTimeExtensions.Utils

Date urils class
Exibir arquivo Open project: jornfilho/.net-Dev-Utils

Public Methods

Method Description
AddBusinessDays ( this date, int days ) : System.DateTime

Add business days on a DateTime

AddBusinessDays ( this date, int days, DayOfWeek businessDays ) : System.DateTime

Add business days on a DateTime

EndOfBusinessMonth ( Month month, int year ) : System.DateTime

Get end of month from year/month

EndOfBusinessMonth ( Month month, int year, DayOfWeek businessDays ) : System.DateTime

Get end of month from year/month

EndOfBusinessMonth ( this date ) : System.DateTime

Get end of business month

EndOfBusinessMonth ( this date, DayOfWeek businessDays ) : System.DateTime

Get end of business month

EndOfBusinessWeek ( this date ) : System.DateTime

Get end of business week

EndOfBusinessWeek ( this date, DayOfWeek lastBusinessDay ) : System.DateTime

Get end of business week

EndOfBusinessYear ( int year ) : System.DateTime

Get end of business year

EndOfBusinessYear ( int year, DayOfWeek businessDays ) : System.DateTime

Get end of business year

EndOfBusinessYear ( this date ) : System.DateTime

Get end of business year

EndOfBusinessYear ( this date, DayOfWeek businessDays ) : System.DateTime

Get end of business year

EndOfDay ( this date ) : System.DateTime

Get end of day

EndOfMonth ( Month month, int year ) : System.DateTime

Get end of month from year/month

EndOfMonth ( this date ) : System.DateTime

Get end of month

EndOfWeek ( this date ) : System.DateTime

Get end of week

EndOfWeek ( this date, DayOfWeek lastDay ) : System.DateTime

Get end of week

EndOfYear ( int year ) : System.DateTime

Get end of year

EndOfYear ( this date ) : System.DateTime

Get end of year

RemoveBusinessDays ( this date, int days ) : System.DateTime

Remove business days on a DateTime

RemoveBusinessDays ( this date, int days, DayOfWeek businessDays ) : System.DateTime

Remove business days on a DateTime

SetDate ( this date, int year, int month, int day ) : System.DateTime

Set date of datetime

SetDay ( this date, int day ) : System.DateTime

Set day of date

SetHour ( this date, int hour ) : System.DateTime

Set hour of date

SetMillisecond ( this date, int millisecond ) : System.DateTime

Set millisecond of date

SetMinute ( this date, int minute ) : System.DateTime

Set minute of date

SetMonth ( this date, int month ) : System.DateTime

Set month of date

SetSecond ( this date, int second ) : System.DateTime

Set second of date

SetTime ( this date, int hour, int minute ) : System.DateTime

Set time of date

SetTime ( this date, int hour, int minute, int second ) : System.DateTime

Set time of date

SetTime ( this date, int hour, int minute, int second, int millisecond ) : System.DateTime

Set time of date

SetYear ( this date, int year ) : System.DateTime

Set year of date

StartOfBusinessMonth ( Month month, int year ) : System.DateTime

Get start of month from year/month

StartOfBusinessMonth ( Month month, int year, DayOfWeek businessDays ) : System.DateTime

Get start of month from year/month

StartOfBusinessMonth ( this date ) : System.DateTime

Get start of business month

StartOfBusinessMonth ( this date, DayOfWeek businessDays ) : System.DateTime

Get start of business month

StartOfBusinessWeek ( this date ) : System.DateTime

Get start of business week

StartOfBusinessWeek ( this date, DayOfWeek firstBusinessDay ) : System.DateTime

Get start of business week

StartOfBusinessYear ( int year ) : System.DateTime

Get start of business year

StartOfBusinessYear ( int year, DayOfWeek businessDays ) : System.DateTime

Get start of business year

StartOfBusinessYear ( this date ) : System.DateTime

Get start of business year

StartOfBusinessYear ( this date, DayOfWeek businessDays ) : System.DateTime

Get start of business year

StartOfDay ( this date ) : System.DateTime

Get start of day

StartOfMonth ( Month month, int year ) : System.DateTime

Get start of month from year/month

StartOfMonth ( this date ) : System.DateTime

Get start of month

StartOfWeek ( this date ) : System.DateTime

Get start of week

StartOfWeek ( this date, DayOfWeek firstDay ) : System.DateTime

Get start of week

StartOfYear ( int year ) : System.DateTime

Get start of year

StartOfYear ( this date ) : System.DateTime

Get start of year

Method Details

AddBusinessDays() public static method

Add business days on a DateTime
public static AddBusinessDays ( this date, int days ) : System.DateTime
date this Date to add days
days int Days to add
return System.DateTime

AddBusinessDays() public static method

Add business days on a DateTime
public static AddBusinessDays ( this date, int days, DayOfWeek businessDays ) : System.DateTime
date this Date to add days
days int Days to add
businessDays DayOfWeek Business days
return System.DateTime

EndOfBusinessMonth() public static method

Get end of month from year/month
public static EndOfBusinessMonth ( Month month, int year ) : System.DateTime
month Month month reference
year int year reference
return System.DateTime

EndOfBusinessMonth() public static method

Get end of month from year/month
public static EndOfBusinessMonth ( Month month, int year, DayOfWeek businessDays ) : System.DateTime
month Month month reference
year int year reference
businessDays DayOfWeek business days list
return System.DateTime

EndOfBusinessMonth() public static method

Get end of business month
public static EndOfBusinessMonth ( this date ) : System.DateTime
date this base date
return System.DateTime

EndOfBusinessMonth() public static method

Get end of business month
public static EndOfBusinessMonth ( this date, DayOfWeek businessDays ) : System.DateTime
date this base date
businessDays DayOfWeek business days list
return System.DateTime

EndOfBusinessWeek() public static method

Get end of business week
public static EndOfBusinessWeek ( this date ) : System.DateTime
date this base date
return System.DateTime

EndOfBusinessWeek() public static method

Get end of business week
public static EndOfBusinessWeek ( this date, DayOfWeek lastBusinessDay ) : System.DateTime
date this base date
lastBusinessDay DayOfWeek last week business day
return System.DateTime

EndOfBusinessYear() public static method

Get end of business year
public static EndOfBusinessYear ( int year ) : System.DateTime
year int reference year
return System.DateTime

EndOfBusinessYear() public static method

Get end of business year
public static EndOfBusinessYear ( int year, DayOfWeek businessDays ) : System.DateTime
year int reference year
businessDays DayOfWeek business days list
return System.DateTime

EndOfBusinessYear() public static method

Get end of business year
public static EndOfBusinessYear ( this date ) : System.DateTime
date this base date
return System.DateTime

EndOfBusinessYear() public static method

Get end of business year
public static EndOfBusinessYear ( this date, DayOfWeek businessDays ) : System.DateTime
date this base date
businessDays DayOfWeek business days list
return System.DateTime

EndOfDay() public static method

Get end of day
public static EndOfDay ( this date ) : System.DateTime
date this base date
return System.DateTime

EndOfMonth() public static method

Get end of month from year/month
public static EndOfMonth ( Month month, int year ) : System.DateTime
month Month month reference
year int year reference
return System.DateTime

EndOfMonth() public static method

Get end of month
public static EndOfMonth ( this date ) : System.DateTime
date this base date
return System.DateTime

EndOfWeek() public static method

Get end of week
public static EndOfWeek ( this date ) : System.DateTime
date this base date
return System.DateTime

EndOfWeek() public static method

Get end of week
public static EndOfWeek ( this date, DayOfWeek lastDay ) : System.DateTime
date this base date
lastDay DayOfWeek last week day
return System.DateTime

EndOfYear() public static method

Get end of year
public static EndOfYear ( int year ) : System.DateTime
year int reference year
return System.DateTime

EndOfYear() public static method

Get end of year
public static EndOfYear ( this date ) : System.DateTime
date this base date
return System.DateTime

RemoveBusinessDays() public static method

Remove business days on a DateTime
public static RemoveBusinessDays ( this date, int days ) : System.DateTime
date this Date to remove days
days int Days to remove
return System.DateTime

RemoveBusinessDays() public static method

Remove business days on a DateTime
public static RemoveBusinessDays ( this date, int days, DayOfWeek businessDays ) : System.DateTime
date this Date to remove days
days int Days to remove
businessDays DayOfWeek Business days
return System.DateTime

SetDate() public static method

Set date of datetime
public static SetDate ( this date, int year, int month, int day ) : System.DateTime
date this Date to set date
year int Year to set
month int Month to set
day int Day to set
return System.DateTime

SetDay() public static method

Set day of date
public static SetDay ( this date, int day ) : System.DateTime
date this Date to set date
day int Day to set
return System.DateTime

SetHour() public static method

Set hour of date
public static SetHour ( this date, int hour ) : System.DateTime
date this Date to set time
hour int Hours to set
return System.DateTime

SetMillisecond() public static method

Set millisecond of date
public static SetMillisecond ( this date, int millisecond ) : System.DateTime
date this Date to set time
millisecond int Millisecond to set
return System.DateTime

SetMinute() public static method

Set minute of date
public static SetMinute ( this date, int minute ) : System.DateTime
date this Date to set time
minute int Minute to set
return System.DateTime

SetMonth() public static method

Set month of date
public static SetMonth ( this date, int month ) : System.DateTime
date this Date to set date
month int Month to set
return System.DateTime

SetSecond() public static method

Set second of date
public static SetSecond ( this date, int second ) : System.DateTime
date this Date to set time
second int Second to set
return System.DateTime

SetTime() public static method

Set time of date
public static SetTime ( this date, int hour, int minute ) : System.DateTime
date this Date to add time
hour int Hours to add
minute int Minutes to add
return System.DateTime

SetTime() public static method

Set time of date
public static SetTime ( this date, int hour, int minute, int second ) : System.DateTime
date this Date to add time
hour int Hours to add
minute int Minutes to add
second int Seconds to add
return System.DateTime

SetTime() public static method

Set time of date
public static SetTime ( this date, int hour, int minute, int second, int millisecond ) : System.DateTime
date this Date to add time
hour int Hours to add
minute int Minutes to add
second int Seconds to add
millisecond int Milliseconds to add
return System.DateTime

SetYear() public static method

Set year of date
public static SetYear ( this date, int year ) : System.DateTime
date this Date to set date
year int Year to set
return System.DateTime

StartOfBusinessMonth() public static method

Get start of month from year/month
public static StartOfBusinessMonth ( Month month, int year ) : System.DateTime
month Month month reference
year int year reference
return System.DateTime

StartOfBusinessMonth() public static method

Get start of month from year/month
public static StartOfBusinessMonth ( Month month, int year, DayOfWeek businessDays ) : System.DateTime
month Month month reference
year int year reference
businessDays DayOfWeek business days list
return System.DateTime

StartOfBusinessMonth() public static method

Get start of business month
public static StartOfBusinessMonth ( this date ) : System.DateTime
date this base date
return System.DateTime

StartOfBusinessMonth() public static method

Get start of business month
public static StartOfBusinessMonth ( this date, DayOfWeek businessDays ) : System.DateTime
date this base date
businessDays DayOfWeek business days list
return System.DateTime

StartOfBusinessWeek() public static method

Get start of business week
public static StartOfBusinessWeek ( this date ) : System.DateTime
date this base date
return System.DateTime

StartOfBusinessWeek() public static method

Get start of business week
public static StartOfBusinessWeek ( this date, DayOfWeek firstBusinessDay ) : System.DateTime
date this base date
firstBusinessDay DayOfWeek first week business day
return System.DateTime

StartOfBusinessYear() public static method

Get start of business year
public static StartOfBusinessYear ( int year ) : System.DateTime
year int year reference
return System.DateTime

StartOfBusinessYear() public static method

Get start of business year
public static StartOfBusinessYear ( int year, DayOfWeek businessDays ) : System.DateTime
year int year reference
businessDays DayOfWeek business days list
return System.DateTime

StartOfBusinessYear() public static method

Get start of business year
public static StartOfBusinessYear ( this date ) : System.DateTime
date this base date
return System.DateTime

StartOfBusinessYear() public static method

Get start of business year
public static StartOfBusinessYear ( this date, DayOfWeek businessDays ) : System.DateTime
date this base date
businessDays DayOfWeek business days list
return System.DateTime

StartOfDay() public static method

Get start of day
public static StartOfDay ( this date ) : System.DateTime
date this base date
return System.DateTime

StartOfMonth() public static method

Get start of month from year/month
public static StartOfMonth ( Month month, int year ) : System.DateTime
month Month month reference
year int year reference
return System.DateTime

StartOfMonth() public static method

Get start of month
public static StartOfMonth ( this date ) : System.DateTime
date this base date
return System.DateTime

StartOfWeek() public static method

Get start of week
public static StartOfWeek ( this date ) : System.DateTime
date this base date
return System.DateTime

StartOfWeek() public static method

Get start of week
public static StartOfWeek ( this date, DayOfWeek firstDay ) : System.DateTime
date this base date
firstDay DayOfWeek first week day
return System.DateTime

StartOfYear() public static method

Get start of year
public static StartOfYear ( int year ) : System.DateTime
year int year reference
return System.DateTime

StartOfYear() public static method

Get start of year
public static StartOfYear ( this date ) : System.DateTime
date this base date
return System.DateTime