C# 클래스 InTheHand.DateTimeOffsetHelper

Helper class for DateTimeOffset.
PlatformVersion supported AndroidAndroid 4.4 and later iOSiOS 9.0 and later macOSOS X 10.7 and later Windows UWPWindows 10 Windows StoreWindows 8.1 or later Windows Phone StoreWindows Phone 8.1 or later Windows Phone SilverlightWindows Phone 8.0 or later Windows (Desktop Apps)Windows Vista or later
파일 보기 프로젝트 열기: inthehand/Charming

공개 메소드들

메소드 설명
FromNSDate ( NSDate date ) : DateTimeOffset
FromUnixTimeMilliseconds ( long milliseconds ) : DateTimeOffset

Converts a Unix time expressed as the number of milliseconds that have elapsed since 1970-01-01T00:00:00Z to a DateTimeOffset value.

FromUnixTimeSeconds ( long seconds ) : DateTimeOffset

Converts a Unix time expressed as the number of seconds that have elapsed since 1970-01-01T00:00:00Z to a DateTimeOffset value.

ToNSDate ( this value ) : NSDate
ToUnixTimeMilliseconds ( this date ) : long

Returns the number of milliseconds that have elapsed since 1970-01-01T00:00:00.000Z.

Unix time represents the number of seconds that have elapsed since 1970-01-01T00:00:00Z (January 1, 1970, at 12:00 AM UTC). It does not take leap seconds into account. This method returns the number of milliseconds in Unix time.

This method first converts the current instance to UTC before returning the number of milliseconds in its Unix time. For date and time values before 1970-01-01T00:00:00Z, this method returns a negative value.

ToUnixTimeSeconds ( this date ) : long

Returns the number of seconds that have elapsed since 1970-01-01T00:00:00Z.

Unix time represents the number of seconds that have elapsed since 1970-01-01T00:00:00Z (January 1, 1970, at 12:00 AM UTC). It does not take leap seconds into account.

This method first converts the current instance to UTC before returning its Unix time. For date and time values before 1970-01-01T00:00:00Z, this method returns a negative value.

메소드 상세

FromNSDate() 공개 정적인 메소드

public static FromNSDate ( NSDate date ) : DateTimeOffset
date NSDate
리턴 DateTimeOffset

FromUnixTimeMilliseconds() 공개 정적인 메소드

Converts a Unix time expressed as the number of milliseconds that have elapsed since 1970-01-01T00:00:00Z to a DateTimeOffset value.
public static FromUnixTimeMilliseconds ( long milliseconds ) : DateTimeOffset
milliseconds long A Unix time, expressed as the number of milliseconds that have elapsed since 1970-01-01T00:00:00Z (January 1, 1970, at 12:00 AM UTC). /// For Unix times before this date, its value is negative.
리턴 DateTimeOffset

FromUnixTimeSeconds() 공개 정적인 메소드

Converts a Unix time expressed as the number of seconds that have elapsed since 1970-01-01T00:00:00Z to a DateTimeOffset value.
public static FromUnixTimeSeconds ( long seconds ) : DateTimeOffset
seconds long A Unix time, expressed as the number of seconds that have elapsed since 1970-01-01T00:00:00Z (January 1, 1970, at 12:00 AM UTC). /// For Unix times before this date, its value is negative.
리턴 DateTimeOffset

ToNSDate() 공개 정적인 메소드

public static ToNSDate ( this value ) : NSDate
value this
리턴 NSDate

ToUnixTimeMilliseconds() 공개 정적인 메소드

Returns the number of milliseconds that have elapsed since 1970-01-01T00:00:00.000Z.
Unix time represents the number of seconds that have elapsed since 1970-01-01T00:00:00Z (January 1, 1970, at 12:00 AM UTC). It does not take leap seconds into account. This method returns the number of milliseconds in Unix time.

This method first converts the current instance to UTC before returning the number of milliseconds in its Unix time. For date and time values before 1970-01-01T00:00:00Z, this method returns a negative value.

public static ToUnixTimeMilliseconds ( this date ) : long
date this The DateTimeOffset value.
리턴 long

ToUnixTimeSeconds() 공개 정적인 메소드

Returns the number of seconds that have elapsed since 1970-01-01T00:00:00Z.
Unix time represents the number of seconds that have elapsed since 1970-01-01T00:00:00Z (January 1, 1970, at 12:00 AM UTC). It does not take leap seconds into account.

This method first converts the current instance to UTC before returning its Unix time. For date and time values before 1970-01-01T00:00:00Z, this method returns a negative value.

public static ToUnixTimeSeconds ( this date ) : long
date this The DateTimeOffset value.
리턴 long