C# 클래스 HandCoded.Finance.Date

상속: TemporalDate, IComparable
파일 보기 프로젝트 열기: formicary/fpml-toolkit-csharp 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
MAX_VALUE Date
MIN_VALUE Date

공개 메소드들

메소드 설명
CompareTo ( Date other ) : int

Returns the result of comparing this instance to another Date.

CompareTo ( Object other ) : int

Returns the result of comparing this instance to another Object.

Date ( int day, int month, int year ) : System

Constructs a Date instance given a day, month and year.

Date ( int day, int month, int year, bool utc ) : System

Constructs a Date instance given a day, month and year.

Date ( int day, int month, int year, int offset ) : System

Constructs a Date instance given a day, month and year.

Equals ( Date other ) : bool

Determines if this Date instance and another hold the same date.

Equals ( object other ) : bool

Determines if this Date instance and another hold the same date.

GetHashCode ( ) : int

Returns the hash value of the date for hash based data structures and algorithms.

IsLeapYear ( int year ) : bool

Determines if a year is a leap year.

MonthLength ( int month, bool leapYear ) : int

Returns the number of days in the given month in a leap or non-leap year.

MonthLength ( int month, int year ) : int

Returns the number of days in the given month for the specified year.

Parse ( String text ) : Date

Parses a DateTime instance from a character string in the ISO date format (as produced by ToString).

Plus ( Interval interval ) : Date

Creates a new Date based on the current instance and a given Interval.

PlusDays ( int days ) : Date

Creates a new Date based in the current instance and a given number of days adjustment.

PlusMonths ( int months ) : Date

Creates a new Date based on the current instance and a given number of months adjustment.

PlusWeeks ( int weeks ) : Date

Creates a new Date based on the current instance and a given number of weeks adjustment.

PlusYears ( int years ) : Date

Creates a new Date based on the current instance and a given number of years adjustment.

ToDateTime ( ) : DateTime

Creates a DateTime instance representing midnight on the morning of the current date.

ToString ( ) : string

Converts the instance data members to a string representation that can be displayed for debugging purposes.

비공개 메소드들

메소드 설명
Date ( DateValue dateValue, TimeZone timeZone ) : System

Constructs a Date using its DateValue and TimeZone components.

메소드 상세

CompareTo() 공개 메소드

Returns the result of comparing this instance to another Date.
public CompareTo ( Date other ) : int
other Date The Date instance to compare with.
리턴 int

CompareTo() 공개 메소드

Returns the result of comparing this instance to another Object.
If the argument is not a /// Date instance.
public CompareTo ( Object other ) : int
other Object The instance to compare with.
리턴 int

Date() 공개 메소드

Constructs a Date instance given a day, month and year.
public Date ( int day, int month, int year ) : System
day int The day of the month (1-31).
month int The month of the year (1-12).
year int The year (1900-2099).
리턴 System

Date() 공개 메소드

Constructs a Date instance given a day, month and year.
public Date ( int day, int month, int year, bool utc ) : System
day int The day of the month (1-31).
month int The month of the year (1-12).
year int The year (1900-2099).
utc bool Indicates UTC time zone.
리턴 System

Date() 공개 메소드

Constructs a Date instance given a day, month and year.
public Date ( int day, int month, int year, int offset ) : System
day int The day of the month (1-31).
month int The month of the year (1-12).
year int The year (1900-2099).
offset int The time zone offset.
리턴 System

Equals() 공개 메소드

Determines if this Date instance and another hold the same date.
public Equals ( Date other ) : bool
other Date The Date instance to compare with.
리턴 bool

Equals() 공개 메소드

Determines if this Date instance and another hold the same date.
public Equals ( object other ) : bool
other object The instance to compare with.
리턴 bool

GetHashCode() 공개 메소드

Returns the hash value of the date for hash based data structures and algorithms.
public GetHashCode ( ) : int
리턴 int

IsLeapYear() 공개 정적인 메소드

Determines if a year is a leap year.
public static IsLeapYear ( int year ) : bool
year int The year to test (1900-2099)
리턴 bool

MonthLength() 공개 정적인 메소드

Returns the number of days in the given month in a leap or non-leap year.
public static MonthLength ( int month, bool leapYear ) : int
month int The month number (1-12).
leapYear bool Flag to indicate a leap year.
리턴 int

MonthLength() 공개 정적인 메소드

Returns the number of days in the given month for the specified year.
public static MonthLength ( int month, int year ) : int
month int The month number (1-12).
year int The year (1900-2099).
리턴 int

Parse() 공개 정적인 메소드

Parses a DateTime instance from a character string in the ISO date format (as produced by ToString).
If the character string is not in the /// correct format.
public static Parse ( String text ) : Date
text String The text string to be parsed.
리턴 Date

Plus() 공개 메소드

Creates a new Date based on the current instance and a given Interval.
public Plus ( Interval interval ) : Date
interval Interval The time .
리턴 Date

PlusDays() 공개 메소드

Creates a new Date based in the current instance and a given number of days adjustment.
public PlusDays ( int days ) : Date
days int The number of days to adjust by.
리턴 Date

PlusMonths() 공개 메소드

Creates a new Date based on the current instance and a given number of months adjustment.
public PlusMonths ( int months ) : Date
months int The number of months to adjust by.
리턴 Date

PlusWeeks() 공개 메소드

Creates a new Date based on the current instance and a given number of weeks adjustment.
public PlusWeeks ( int weeks ) : Date
weeks int The number of weeks to adjust by.
리턴 Date

PlusYears() 공개 메소드

Creates a new Date based on the current instance and a given number of years adjustment.
public PlusYears ( int years ) : Date
years int The number of years to adjust by.
리턴 Date

ToDateTime() 공개 메소드

Creates a DateTime instance representing midnight on the morning of the current date.
public ToDateTime ( ) : DateTime
리턴 DateTime

ToString() 공개 메소드

Converts the instance data members to a string representation that can be displayed for debugging purposes.
public ToString ( ) : string
리턴 string

프로퍼티 상세

MAX_VALUE 공개적으로 정적으로 프로퍼티

The latest possible date that can be correctly represented.
public static Date MAX_VALUE
리턴 Date

MIN_VALUE 공개적으로 정적으로 프로퍼티

The earliest possible date that can be correctly represented,
public static Date MIN_VALUE
리턴 Date