Class Index | File Index

Classes


Class ThaiSolarDate


Extends GregorianDate.
Construct a new Thai solar date object. The constructor parameters can contain any of the following properties:

If the constructor is called with another Thai solar date instance instead of a parameter block, the other instance acts as a parameter block and its settings are copied into the current instance.

If the constructor is called with no arguments at all or if none of the properties listed above from unixtime through millisecond are present, then the date components are filled in with the current date at the time of instantiation. Note that if you do not give the time zone when defaulting to the current time and the time zone for all of ilib was not set with ilib.setTimeZone(), then the time zone will default to UTC ("Universal Time, Coordinated" or "Greenwich Mean Time").

If any of the properties from year through millisecond are not specified in the params, it is assumed that they have the smallest possible value in the range for the property (zero or one).


Defined in: ilib-full-dyn.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
ThaiSolarDate(params)
Fields borrowed from class GregorianDate:
day, hour, millisecond, minute, month, second, year
Method Summary
Method Attributes Method Name and Description
 
after(dow)
Return a new Gregorian date instance that represents the first instance of the given day of the week after the current date.
 
before(dow)
Return a new Gregorian date instance that represents the first instance of the given day of the week before the current date.
 
Return the name of the calendar that governs this date.
 
Return the Rata Die (fixed day) number of this date.
 
onOrAfter(dow)
Return a new Gregorian date instance that represents the first instance of the given day of the week on or after the current date.
 
Return a new Gregorian date instance that represents the first instance of the given day of the week on or before the current date.
Methods borrowed from class GregorianDate:
getDayOfWeek, getDayOfYear, getEra
Class Detail
ThaiSolarDate(params)
Parameters:
{Object=} params
parameters that govern the settings and behaviour of this Thai solar date
Method Detail
{IDate} after(dow)
Return a new Gregorian date instance that represents the first instance of the given day of the week after the current date. The day of the week is encoded as a number where 0 = Sunday, 1 = Monday, etc.
Parameters:
{number} dow
the day of the week after the current date that is being sought
Returns:
{IDate} the date being sought

{IDate} before(dow)
Return a new Gregorian date instance that represents the first instance of the given day of the week before the current date. The day of the week is encoded as a number where 0 = Sunday, 1 = Monday, etc.
Parameters:
{number} dow
the day of the week before the current date that is being sought
Returns:
{IDate} the date being sought

{string} getCalendar()
Return the name of the calendar that governs this date.
Returns:
{string} a string giving the name of the calendar

{number} getRataDie()
Return the Rata Die (fixed day) number of this date.
Returns:
{number} the rd date as a number

{IDate} onOrAfter(dow)
Return a new Gregorian date instance that represents the first instance of the given day of the week on or after the current date. The day of the week is encoded as a number where 0 = Sunday, 1 = Monday, etc.
Parameters:
{number} dow
the day of the week on or after the current date that is being sought
Returns:
{IDate} the date being sought

{IDate} onOrBefore(dow)
Return a new Gregorian date instance that represents the first instance of the given day of the week on or before the current date. The day of the week is encoded as a number where 0 = Sunday, 1 = Monday, etc.
Parameters:
{number} dow
the day of the week on or before the current date that is being sought
Returns:
{IDate} the date being sought

Documentation generated by JsDoc Toolkit 2.4.0 on Tue Feb 02 2016 15:53:55 GMT-0800 (PST)