C# Class PHP.Library.PhpDateTime

Datei anzeigen Open project: jadu/Phalanger

Public Methods

Method Description
GetDate ( System.DateTime utc ) : PHP.Core.PhpArray

Returns an associative array containing the date information.

GetSunTime ( int timestamp, TimeFormats format, double latitude, double longitude, double zenith, double offset, bool getSunrise ) : object

Private Methods

Method Description
CalculateSunTime ( int day, double latitude, double longitude, double zenith, bool getSunrise ) : double

Calculates sunrise or sunset. Adopted PHP implementation by Moshe Doron ([email protected]). Returns UTC time.

CheckDate ( int month, int day, int year ) : bool
DateCreate ( ScriptContext context ) : object
DateCreate ( ScriptContext context, string time ) : object
DateCreate ( ScriptContext context, string time, DateTimeZone timezone ) : object
DateCreateFromFormat ( ScriptContext context, string format, string time ) : __PHP__DateTime
DateCreateFromFormat ( ScriptContext context, string format, string time, DateTimeZone timezone ) : __PHP__DateTime
DateFormat ( __PHP__DateTime datetime, string format ) : object
DateModify ( ScriptContext context, __PHP__DateTime datetime, string modify ) : __PHP__DateTime
DateOffsetGet ( __PHP__DateTime datetime ) : int
FormatDate ( string format ) : string
FormatDate ( string format, System.DateTime utc, TimeZoneInfo zone ) : string
FormatDate ( string format, int timestamp ) : string
FormatTime ( string format ) : string
FormatTime ( string format, System.DateTime utc, TimeZoneInfo zone ) : string

Implementation of FormatTime(string,int) function.

FormatTime ( string format, int timestamp ) : string
FormatUtcDate ( string format ) : string
FormatUtcDate ( string format, int timestamp ) : string
FormatUtcTime ( string format ) : string
FormatUtcTime ( string format, int timestamp ) : string
GetDate ( ) : PHP.Core.PhpArray
GetDate ( int timestamp ) : PHP.Core.PhpArray
GetDatePart ( char format, System.DateTime utc, TimeZoneInfo zone ) : int
GetDatePart ( string format ) : int
GetDatePart ( string format, int timestamp ) : int
GetDayNumberSuffix ( int DayNumber ) : string

English ordinal suffix for the day of the month, 2 characters - st, nd, rd or th.

GetIsoWeekAndYear ( System.DateTime dt, int &week, int &year ) : void

Converts a given DateTime to the ISO week of year number and ISO year number.

GetLocalTime ( ) : PHP.Core.PhpArray
GetLocalTime ( System.DateTime utc, bool returnAssociative ) : PHP.Core.PhpArray
GetLocalTime ( int timestamp ) : PHP.Core.PhpArray
GetLocalTime ( int timestamp, bool returnAssociative ) : PHP.Core.PhpArray
GetSunriseTime ( int timestamp ) : object
GetSunriseTime ( int timestamp, TimeFormats format ) : object
GetSunriseTime ( int timestamp, TimeFormats format, double latitude ) : object
GetSunriseTime ( int timestamp, TimeFormats format, double latitude, double longitude ) : object
GetSunriseTime ( int timestamp, TimeFormats format, double latitude, double longitude, double zenith ) : object
GetSunriseTime ( int timestamp, TimeFormats format, double latitude, double longitude, double zenith, double offset ) : object
GetSunsetTime ( int timestamp ) : object
GetSunsetTime ( int timestamp, TimeFormats format ) : object
GetSunsetTime ( int timestamp, TimeFormats format, double latitude ) : object
GetSunsetTime ( int timestamp, TimeFormats format, double latitude, double longitude ) : object
GetSunsetTime ( int timestamp, TimeFormats format, double latitude, double longitude, double zenith ) : object
GetSunsetTime ( int timestamp, TimeFormats format, double latitude, double longitude, double zenith, double offset ) : object
GetSwatchBeat ( System.DateTime utc ) : int
GetTimeOfDay ( ) : PHP.Core.PhpArray
GetTimeOfDay ( System.DateTime utc, TimeZoneInfo zone ) : PHP.Core.PhpArray
GetTimeOfDay ( bool returnDouble ) : object
MakeDateTime ( int hour, int minute, int second, int month, int day, int year ) : System.DateTime
MakeTime ( ) : int
MakeTime ( int hour ) : int
MakeTime ( int hour, int minute ) : int
MakeTime ( int hour, int minute, int second ) : int
MakeTime ( int hour, int minute, int second, int month ) : int
MakeTime ( int hour, int minute, int second, int month, int day ) : int
MakeTime ( int hour, int minute, int second, int month, int day, int year ) : int
MakeTime ( int hour, int minute, int second, int month, int day, int year, int daylightSaving ) : int
MakeUtcTime ( ) : int
MakeUtcTime ( int hour ) : int
MakeUtcTime ( int hour, int minute ) : int
MakeUtcTime ( int hour, int minute, int second ) : int
MakeUtcTime ( int hour, int minute, int second, int month ) : int
MakeUtcTime ( int hour, int minute, int second, int month, int day ) : int
MakeUtcTime ( int hour, int minute, int second, int month, int day, int year ) : int
MakeUtcTime ( int hour, int minute, int second, int month, int day, int year, int dummy ) : int
MicroTime ( bool returnDouble ) : object
MicroTime ( ) : string
StringToTime ( string time ) : object
StringToTime ( string time, System.DateTime startUtc ) : object

Implementation of StringToTime(string,int) function.

StringToTime ( string time, int start ) : object
TestGetLocalTime ( ) : void
TestGetTimeOfDay ( ) : void
TestStringToTime ( ) : void
Time ( ) : int
ToDegrees ( double radians ) : double
ToRadians ( double degrees ) : double

Method Details

GetDate() public static method

Returns an associative array containing the date information.
public static GetDate ( System.DateTime utc ) : PHP.Core.PhpArray
utc System.DateTime UTC date time.
return PHP.Core.PhpArray

GetSunTime() public static method

public static GetSunTime ( int timestamp, TimeFormats format, double latitude, double longitude, double zenith, double offset, bool getSunrise ) : object
timestamp int
format TimeFormats
latitude double
longitude double
zenith double
offset double
getSunrise bool
return object