C# 클래스 HandCoded.Finance.DateTime

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

공개 프로퍼티들

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

공개 메소드들

메소드 설명
CompareTo ( DateTime 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.

DateTime ( int day, int month, int year, int hours, int minutes, decimal seconds, bool utc ) : System

Constructs a DateTime instance given all the date and time components and a flag indicating UTC time or not.

DateTime ( int day, int month, int year, int hours, int minutes, decimal seconds, int offset ) : System

Constructs a DateTime instance given all the date and time components plus a time zone offset.

DateTime ( int day, int month, int year, int hours, int minutes, int seconds ) : System

Constructs a DateTime instance given all the date and time components.

DateTime ( int day, int month, int year, int hours, int minutes, int seconds, bool utc ) : System

Constructs a DateTime instance given all the date and time components and a flag indicating UTC time or not.

DateTime ( int day, int month, int year, int hours, int minutes, int seconds, int offset ) : System

Constructs a DateTime instance given all the date and time components plus a time zone offset.

Equals ( DateTime other ) : bool

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

Equals ( object other ) : bool

Determines if this Date instance and another object 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.

Normalize ( ) : DateTime

Uses the timezone information to create a UTC normalised DateTime from the current instance.

Parse ( String text ) : DateTime

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

ToDate ( ) : Date

Creates a Date instance based in the date component values of the current instance.

ToString ( ) : string

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

ToTime ( ) : Time

Creates a Time instance based in the date component values of the current instance.

비공개 메소드들

메소드 설명
DateTime ( DateValue dateValue, TimeValue timeValue, TimeZone timeZone ) : System

Constructs a DateTime instance from its date, time and time zone components.

메소드 상세

CompareTo() 공개 메소드

Returns the result of comparing this instance to another Date.
public CompareTo ( DateTime other ) : int
other DateTime 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

DateTime() 공개 메소드

Constructs a DateTime instance given all the date and time components and a flag indicating UTC time or not.
public DateTime ( int day, int month, int year, int hours, int minutes, decimal seconds, 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).
hours int The number of hours (0-24).
minutes int The number of minutes (0-59).
seconds decimal The number of seconds (0-59).
utc bool Indicates UTC time zone.
리턴 System

DateTime() 공개 메소드

Constructs a DateTime instance given all the date and time components plus a time zone offset.
public DateTime ( int day, int month, int year, int hours, int minutes, decimal seconds, 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).
hours int The number of hours (0-24).
minutes int The number of minutes (0-59).
seconds decimal The number of seconds (0-59).
offset int The time zone offset.
리턴 System

DateTime() 공개 메소드

Constructs a DateTime instance given all the date and time components.
public DateTime ( int day, int month, int year, int hours, int minutes, int seconds ) : 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).
hours int The number of hours (0-24).
minutes int The number of minutes (0-59).
seconds int The number of seconds (0-59).
리턴 System

DateTime() 공개 메소드

Constructs a DateTime instance given all the date and time components and a flag indicating UTC time or not.
public DateTime ( int day, int month, int year, int hours, int minutes, int seconds, 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).
hours int The number of hours (0-24).
minutes int The number of minutes (0-59).
seconds int The number of seconds (0-59).
utc bool Indicates UTC time zone.
리턴 System

DateTime() 공개 메소드

Constructs a DateTime instance given all the date and time components plus a time zone offset.
public DateTime ( int day, int month, int year, int hours, int minutes, int seconds, 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).
hours int The number of hours (0-24).
minutes int The number of minutes (0-59).
seconds int The number of seconds (0-59).
offset int The time zone offset.
리턴 System

Equals() 공개 메소드

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

Equals() 공개 메소드

Determines if this Date instance and another object 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

Normalize() 공개 메소드

Uses the timezone information to create a UTC normalised DateTime from the current instance.
public Normalize ( ) : DateTime
리턴 DateTime

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 ) : DateTime
text String The text string to be parsed.
리턴 DateTime

ToDate() 공개 메소드

Creates a Date instance based in the date component values of the current instance.
public ToDate ( ) : Date
리턴 Date

ToString() 공개 메소드

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

ToTime() 공개 메소드

Creates a Time instance based in the date component values of the current instance.
public ToTime ( ) : Time
리턴 Time

프로퍼티 상세

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

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

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

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