C# Class Fan.Sys.DateTime

DateTime represents an absolute instance in time.
Inheritance: FanObj
Show file Open project: xored/f4 Class Usage Examples

Public Properties

Property Type Description
m_defVal DateTime

Public Methods

Method Description
@typeof ( ) : Type
Equals ( object obj ) : bool
GetHashCode ( ) : int
boot ( ) : DateTime
compare ( object obj ) : long
date ( ) : Fan.Sys.Date
day ( ) : long
dayOfYear ( int year, int mon, int day ) : int

Static util for day of year (0-365). NOTE: this is zero based, unlike public Fantom method.

dayOfYear ( ) : long
dotnet ( long dotnetTicks ) : DateTime
dotnet ( ) : long
dst ( ) : bool
floor ( Duration accuracy ) : DateTime
fromHttpStr ( string s ) : DateTime
fromHttpStr ( string s, bool check ) : DateTime
fromIso ( string s ) : DateTime
fromIso ( string s, bool check ) : DateTime
fromJava ( long millis ) : DateTime
fromJava ( long millis, TimeZone tz ) : DateTime
fromJava ( long millis, TimeZone tz, bool negIsNull ) : DateTime
fromLocale ( string s, string pattern ) : DateTime
fromLocale ( string s, string pattern, TimeZone tz ) : DateTime
fromLocale ( string s, string pattern, TimeZone tz, bool check ) : DateTime
fromStr ( string s ) : DateTime
fromStr ( string s, bool check ) : DateTime
getDST ( ) : bool
getDay ( ) : int
getHour ( ) : int
getMin ( ) : int
getNanoSec ( ) : int
getSec ( ) : int
getTicks ( ) : long
getYear ( ) : int
hash ( ) : long
hour ( ) : long
hoursInDay ( ) : long
isLeapYear ( int year ) : bool
isLeapYear ( long year ) : bool
isMidnight ( ) : bool
make ( long year, Month month, long day, long hour, long min ) : DateTime
make ( long year, Month month, long day, long hour, long min, long sec ) : DateTime
make ( long year, Month month, long day, long hour, long min, long sec, long ns ) : DateTime
make ( long year, Month month, long day, long hour, long min, long sec, long ns, TimeZone tz ) : DateTime
makeTicks ( long ticks ) : DateTime
makeTicks ( long ticks, TimeZone tz ) : DateTime
midnight ( ) : DateTime
min ( ) : long
minus ( Duration duration ) : DateTime
minusDateTime ( DateTime time ) : Duration
month ( ) : Month
nanoSec ( ) : long
now ( ) : DateTime
now ( Duration tolerance ) : DateTime
nowTicks ( ) : long
nowUnique ( ) : long
nowUtc ( ) : DateTime
nowUtc ( Duration tolerance ) : DateTime
plus ( Duration duration ) : DateTime
sec ( ) : long
ticks ( ) : long
time ( ) : Time
toCode ( ) : string
toHttpStr ( ) : string
toIso ( ) : string
toJava ( ) : long
toLocale ( ) : string
toLocale ( string pattern ) : string
toRel ( ) : DateTime
toStr ( ) : string
toTimeZone ( TimeZone tz ) : DateTime
toUtc ( ) : DateTime
tz ( ) : TimeZone
tzAbbr ( ) : string
weekOfYear ( ) : long
weekOfYear ( Weekday startOfWeek ) : long
weekday ( ) : Weekday
weekdayInMonth ( int year, int mon, int weekday, int pos ) : int
weekdayInMonth ( long year, Month mon, Weekday weekday, long pos ) : long
year ( ) : long

Private Methods

Method Description
DateTime ( ) : System.Globalization
DateTime ( int year, int month, int day, int hour, int min, int sec, long ns, int knownOffset, TimeZone tz ) : System.Globalization
DateTime ( long ticks, TimeZone tz ) : System.Globalization
checkYear ( int year ) : void

If not valid year range 1901 to 2099 throw ArgErr.

fillInDayOfYear ( byte mon, byte days, int daysInMon ) : void
firstWeekday ( int year, int mon ) : int

Get the first weekday of the specified year and month (0-11).

fromStr ( string s, bool check, bool iso ) : DateTime
getMonth ( ) : int
makeDT ( Fan.Sys.Date d, Time t ) : DateTime
makeDT ( Date d, Time t, TimeZone tz ) : DateTime
num ( string s, int index ) : int
numDaysInMonth ( int year, int month ) : int

Get the number days in the specified month (0-11).

ticksToYear ( long ticks ) : int

Compute the year for ns ticks.

weekOfYear ( int year, int month, int day, Weekday startOfWeek ) : int

Method Details

@typeof() public method

public @typeof ( ) : Type
return Type

Equals() public method

public Equals ( object obj ) : bool
obj object
return bool

GetHashCode() public method

public GetHashCode ( ) : int
return int

boot() public static method

public static boot ( ) : DateTime
return DateTime

compare() public method

public compare ( object obj ) : long
obj object
return long

date() public method

public date ( ) : Fan.Sys.Date
return Fan.Sys.Date

day() public method

public day ( ) : long
return long

dayOfYear() public static method

Static util for day of year (0-365). NOTE: this is zero based, unlike public Fantom method.
public static dayOfYear ( int year, int mon, int day ) : int
year int
mon int
day int
return int

dayOfYear() public method

public dayOfYear ( ) : long
return long

dotnet() public static method

public static dotnet ( long dotnetTicks ) : DateTime
dotnetTicks long
return DateTime

dotnet() public method

public dotnet ( ) : long
return long

dst() public method

public dst ( ) : bool
return bool

floor() public method

public floor ( Duration accuracy ) : DateTime
accuracy Duration
return DateTime

fromHttpStr() public static method

public static fromHttpStr ( string s ) : DateTime
s string
return DateTime

fromHttpStr() public static method

public static fromHttpStr ( string s, bool check ) : DateTime
s string
check bool
return DateTime

fromIso() public static method

public static fromIso ( string s ) : DateTime
s string
return DateTime

fromIso() public static method

public static fromIso ( string s, bool check ) : DateTime
s string
check bool
return DateTime

fromJava() public static method

public static fromJava ( long millis ) : DateTime
millis long
return DateTime

fromJava() public static method

public static fromJava ( long millis, TimeZone tz ) : DateTime
millis long
tz TimeZone
return DateTime

fromJava() public static method

public static fromJava ( long millis, TimeZone tz, bool negIsNull ) : DateTime
millis long
tz TimeZone
negIsNull bool
return DateTime

fromLocale() public static method

public static fromLocale ( string s, string pattern ) : DateTime
s string
pattern string
return DateTime

fromLocale() public static method

public static fromLocale ( string s, string pattern, TimeZone tz ) : DateTime
s string
pattern string
tz TimeZone
return DateTime

fromLocale() public static method

public static fromLocale ( string s, string pattern, TimeZone tz, bool check ) : DateTime
s string
pattern string
tz TimeZone
check bool
return DateTime

fromStr() public static method

public static fromStr ( string s ) : DateTime
s string
return DateTime

fromStr() public static method

public static fromStr ( string s, bool check ) : DateTime
s string
check bool
return DateTime

getDST() public method

public getDST ( ) : bool
return bool

getDay() public method

public getDay ( ) : int
return int

getHour() public method

public getHour ( ) : int
return int

getMin() public method

public getMin ( ) : int
return int

getNanoSec() public method

public getNanoSec ( ) : int
return int

getSec() public method

public getSec ( ) : int
return int

getTicks() public method

public getTicks ( ) : long
return long

getYear() public method

public getYear ( ) : int
return int

hash() public method

public hash ( ) : long
return long

hour() public method

public hour ( ) : long
return long

hoursInDay() public method

public hoursInDay ( ) : long
return long

isLeapYear() public static method

public static isLeapYear ( int year ) : bool
year int
return bool

isLeapYear() public static method

public static isLeapYear ( long year ) : bool
year long
return bool

isMidnight() public method

public isMidnight ( ) : bool
return bool

make() public static method

public static make ( long year, Month month, long day, long hour, long min ) : DateTime
year long
month Month
day long
hour long
min long
return DateTime

make() public static method

public static make ( long year, Month month, long day, long hour, long min, long sec ) : DateTime
year long
month Month
day long
hour long
min long
sec long
return DateTime

make() public static method

public static make ( long year, Month month, long day, long hour, long min, long sec, long ns ) : DateTime
year long
month Month
day long
hour long
min long
sec long
ns long
return DateTime

make() public static method

public static make ( long year, Month month, long day, long hour, long min, long sec, long ns, TimeZone tz ) : DateTime
year long
month Month
day long
hour long
min long
sec long
ns long
tz TimeZone
return DateTime

makeTicks() public static method

public static makeTicks ( long ticks ) : DateTime
ticks long
return DateTime

makeTicks() public static method

public static makeTicks ( long ticks, TimeZone tz ) : DateTime
ticks long
tz TimeZone
return DateTime

midnight() public method

public midnight ( ) : DateTime
return DateTime

min() public method

public min ( ) : long
return long

minus() public method

public minus ( Duration duration ) : DateTime
duration Duration
return DateTime

minusDateTime() public method

public minusDateTime ( DateTime time ) : Duration
time DateTime
return Duration

month() public method

public month ( ) : Month
return Month

nanoSec() public method

public nanoSec ( ) : long
return long

now() public static method

public static now ( ) : DateTime
return DateTime

now() public static method

public static now ( Duration tolerance ) : DateTime
tolerance Duration
return DateTime

nowTicks() public static method

public static nowTicks ( ) : long
return long

nowUnique() public static method

public static nowUnique ( ) : long
return long

nowUtc() public static method

public static nowUtc ( ) : DateTime
return DateTime

nowUtc() public static method

public static nowUtc ( Duration tolerance ) : DateTime
tolerance Duration
return DateTime

plus() public method

public plus ( Duration duration ) : DateTime
duration Duration
return DateTime

sec() public method

public sec ( ) : long
return long

ticks() public method

public ticks ( ) : long
return long

time() public method

public time ( ) : Time
return Time

toCode() public method

public toCode ( ) : string
return string

toHttpStr() public method

public toHttpStr ( ) : string
return string

toIso() public method

public toIso ( ) : string
return string

toJava() public method

public toJava ( ) : long
return long

toLocale() public method

public toLocale ( ) : string
return string

toLocale() public method

public toLocale ( string pattern ) : string
pattern string
return string

toRel() public method

public toRel ( ) : DateTime
return DateTime

toStr() public method

public toStr ( ) : string
return string

toTimeZone() public method

public toTimeZone ( TimeZone tz ) : DateTime
tz TimeZone
return DateTime

toUtc() public method

public toUtc ( ) : DateTime
return DateTime

tz() public method

public tz ( ) : TimeZone
return TimeZone

tzAbbr() public method

public tzAbbr ( ) : string
return string

weekOfYear() public method

public weekOfYear ( ) : long
return long

weekOfYear() public method

public weekOfYear ( Weekday startOfWeek ) : long
startOfWeek Weekday
return long

weekday() public method

public weekday ( ) : Weekday
return Weekday

weekdayInMonth() public static method

public static weekdayInMonth ( int year, int mon, int weekday, int pos ) : int
year int
mon int
weekday int
pos int
return int

weekdayInMonth() public static method

public static weekdayInMonth ( long year, Month mon, Weekday weekday, long pos ) : long
year long
mon Month
weekday Weekday
pos long
return long

year() public method

public year ( ) : long
return long

Property Details

m_defVal public static property

public static DateTime,Fan.Sys m_defVal
return DateTime