dojox/date/umalqura/Date (version 1.10)

Summary

The component defines the UmAlqura (Hijri) Calendar Object according to Umalqura calculations This module is similar to the Date() object provided by JavaScript

Usage

var foo = new Date();
dojox/date/umalqura/Date

See the dojox/date/umalqura/Date reference documentation for more information.

Examples

Example 1

var date = new dojox.date.umalqura.Date();
document.writeln(date.getFullYear()+'\'+date.getMonth()+'\'+date.getDate());

Property Summary

Method Summary

Properties

_date
_day
_hijriBegin
_hijriEnd
_hours
_milliseconds
_minutes
_month
_MONTH_LENGTH
_seconds
_year

Methods

_addMilliseconds(milliseconds)
Parameter Type Description
milliseconds Number
Returns:function
_addMinutes(minutes)
Parameter Type Description
minutes Number
Returns:function
_addSeconds(seconds)
Parameter Type Description
seconds Number
Returns:function
_civilLeapYear(year)

return Boolean value if Islamic leap year

Parameter Type Description
year Number
Returns:boolean
_monthStart(year,month)

return the start of Islamic Month

Parameter Type Description
year Number
month Number
Returns:number
_yearStart(year)

return start of Islamic year

Parameter Type Description
year Number
Returns:number
fromGregorian(gdate)

This function returns the equivalent UmAlqura Date value for the Gregorian Date

Parameter Type Description
gdate Date
Returns:function

This function returns the equivalent UmAlqura Date value for the Gregorian Date

Examples

Example 1

var dateIslamic = new dojox.date.umalqura.Date();
var dateGregorian = new Date(2008,10,12);
dateIslamic.fromGregorian(dateGregorian);
getDate()

This function returns the date value (1 - 30)

Returns:undefined

Examples

Example 1

var date1 = new dojox.date.umalqura.Date();

document.writeln(date1.getDate);
getDay()

This function returns the week day value ( 0 - 6 ) sunday is 0, monday is 1,...etc

Returns:undefined

Examples

Example 1

var date1 = new dojox.date.umalqura.Date();

document.writeln(date1.getDay());
getDaysInIslamicMonth(month,year)

returns the number of days in the given Islamic month

Parameter Type Description
month Number
year Number
Returns:undefined
getDaysInIslamicMonth(month)
Parameter Type Description
month dojox/date/umalqura/Date
getFullYear()

This function return the year value

Returns:undefined

Examples

Example 1

var date1 = new dojox.date.umalqura.Date();

document.writeln(date1.getFullYear());
getHours()

returns the hour value

Returns:undefined
getMilliseconds()

returns the milliseconds value

Returns:undefined
getMinutes()

returns the minutes value

Returns:undefined
getMonth()

This function return the month value ( 0 - 11 )

Returns:undefined

Examples

Example 1

var date1 = new dojox.date.umalqura.Date();

document.writeln(date1.getMonth()+1);
getSeconds()

returns the seconds value

Returns:undefined
setDate(date)

This function sets the date

Parameter Type Description
date number
Returns:function

This function sets the date

Examples

Example 1

var date1 = new dojox.date.umalqura.Date();
date1.setDate(2);
setFullYear(year)

This function set Year

Parameter Type Description
year number

Examples

Example 1

var date1 = new dojox.date.umalqura.Date();
date1.setYear(1429);
setHours()

set the hours

setMilliseconds(milliseconds)

set the milliseconds

Parameter Type Description
milliseconds number
setMinutes(minutes)

set the minutes

Parameter Type Description
minutes number
setMonth(month)

This function sets the month

Parameter Type Description
month number

Examples

Example 1

var date1 = new dojox.date.umalqura.Date();
date1.setMonth(2);
setSeconds(seconds)

set seconds

Parameter Type Description
seconds number
toGregorian()

This returns the equivalent gregorian date value in Date object

Returns:instance

Examples

Example 1

var dateIslamic = new dojox.date.umalqura.Date(1429,11,20);
var dateGregorian = dateIslamic.toGregorian();
toString()

This returns a string representation of the date in "DDDD MMMM DD YYYY HH:MM:SS" format

Returns:string

Examples

Example 1

var date1 = new dojox.date.umalqura.Date();
document.writeln(date1.toString());
valueOf()

This function returns the stored time value in milliseconds since midnight, January 1, 1970 UTC

Returns:undefined
Error in the documentation? Can’t find what you are looking for? Let us know!