Class Index | File Index

Classes


Class baja.Date


Extends baja.Simple.
Represents a baja:Date in BajaScript.

Date represents a specific day, month, and year.

When creating a Simple, always use the 'make' method instead of creating a new Object.
Defined in: obj.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
Field Summary
Field Attributes Field Name and Description
<static>  
baja.Date.DEFAULT
Default Date instance.
Fields borrowed from class baja.Value:
newCopy
Fields borrowed from class baja.Object:
equivalent, getIcon
Method Summary
Method Attributes Method Name and Description
 
Decode a Date from a String.
 
Encode the Date to a String.
 
equals(obj)
Equality test.
 
Return the day (1-31).
 
Return a new JavaScript Date using this date's year, month and day.
 
Return the month.
 
Return the weekday as a baja:Weekday FrozenEnum.
 
Return the year.
 
isAfter(date)
Return true if the specified date is after this date.
 
isBefore(date)
Return true if the specified date is before this date.
<static>  
baja.Date.make(obj)
Make a Date.
 
make(obj)
Make a Date.
 
Return a Date that maps to the current day.
 
toString(obj)
Return a String representation of the Date.
Class Detail
baja.Date()
Field Detail
<static> baja.Date.DEFAULT
Default Date instance.
Method Detail
{baja.Date} decodeFromString(str)
Decode a Date from a String.
Parameters:
{String} str
Returns:
{baja.Date}

{String} encodeToString()
Encode the Date to a String.
Returns:
{String}

{Boolean} equals(obj)
Equality test.
Parameters:
obj
Returns:
{Boolean}

{Number} getDay()
Return the day (1-31).
Returns:
{Number}

{Date} getJsDate()
Return a new JavaScript Date using this date's year, month and day.
Returns:
{Date}

{baja.FrozenEnum} getMonth()
Return the month.
Returns:
{baja.FrozenEnum} a baja:Month FrozenEnum

{baja.FrozenEnum} getWeekday()
Return the weekday as a baja:Weekday FrozenEnum.
Returns:
{baja.FrozenEnum} a baja:Weekday FrozenEnum.

{Number} getYear()
Return the year.
Returns:
{Number}

{Boolean} isAfter(date)
Return true if the specified date is after this date.
Parameters:
date
Returns:
{Boolean}

{Boolean} isBefore(date)
Return true if the specified date is before this date.
Parameters:
date
Returns:
{Boolean}

<static> {baja.Date} baja.Date.make(obj)
Make a Date.

An Object Literal is used to for the method's arguments...

  var d1 = baja.Date.make({
    year: 2008,
    month: baja.$("baja:Month").get("december"),
    day: 24
  });
  // ...or from a JavaScript Date...
  var d2 = baja.Date.make({
    jsDate: date
  });
Parameters:
{Object} obj
the Object Literal.
{Number} obj.year
{Number|baja.FrozenEnum} obj.month
Number (0-11) or a baja:Month FrozenEnum for the month of the year.
{Number} obj.day
(1-31).
{Date} obj.jsDate Optional
A JavaScript Date used to specify the year, month and day. If defined, this will override the year, month and day arguments.
Returns:
{baja.Date}

{baja.Date} make(obj)
Make a Date.

An Object Literal is used to for the method's arguments...

  var d1 = baja.$("baja:Date").make({
    year: 2008,
    month: baja.$("baja:Month").get("december"),
    day: 24
  });
  // ...or from a JavaScript Date...
  var d2 = baja.$("baja:Date").make({
    jsDate: date
  });
Parameters:
{Object} obj
the Object Literal.
{Number} obj.year
{Number|baja.FrozenEnum} obj.month
Number (0-11) or a baja:Month FrozenEnum for the month of the year.
{Number} obj.day
(1-31).
{Date} obj.jsDate Optional
A JavaScript Date used to specify the year, month and day. If defined, this will override the year, month and day arguments.
Returns:
{baja.Date}

{baja.Date} today()
Return a Date that maps to the current day.
Returns:
{baja.Date}

{String} toString(obj)
Return a String representation of the Date.
Parameters:
{Object} obj Optional
the Object Literal for the method's arguments.
{Number} obj.show Optional
flags used to format the time. For more information, please see baja.TimeFormat.
Returns:
{String}

Documentation generated by JsDoc Toolkit 2.3.2