Warning: Use of undefined constant Symbol - assumed 'Symbol' (this will throw an Error in a future version of PHP) in /mnt/new-ebs/workbench-106550/lib/dojo/util/docscripts/lib/parser2/dojo2.inc on line 215 Warning: Use of undefined constant JavaScriptSymbol - assumed 'JavaScriptSymbol' (this will throw an Error in a future version of PHP) in /mnt/new-ebs/workbench-106550/lib/dojo/util/docscripts/lib/parser2/dojo2.inc on line 215

dojo/date.js

  • Provides:

    • dojo.date
  • dojo.date

    • summary
      Date manipulation utilities
    • type
      Object
  • dojo.date.getDaysInMonth

    • parameters:
      • dateObject: (typeof Date)
    • returns
      Number
    • summary
      Returns the number of days in the month used by dateObject
    • type
      Function
  • dojo.date.isLeapYear

    • parameters:
      • dateObject: (typeof Date)
    • returns
      Boolean
    • summary
      Determines if the year of the dateObject is a leap year
    • description
      Leap years are years with an additional day YYYY-02-29, where the
      year number is a multiple of four with the following exception: If
      a year is a multiple of 100, then it is only a leap year if it is
      also a multiple of 400. For example, 1900 was not a leap year, but
      2000 is one.
    • type
      Function
  • dojo.date.getTimezoneName

    • parameters:
      • dateObject: (typeof Date)
        Needed because the timezone may vary with time (daylight savings)
    • returns
      String
    • summary
      Get the user's time zone as provided by the browser
    • description
      Try to get time zone info from toString or toLocaleString method of
      the Date object -- UTC offset is not a time zone.  See
      http://www.twinsun.com/tz/tz-link.htm Note: results may be
      inconsistent across browsers.
    • type
      Function
  • dojo.date.compare

    • parameters:
      • date1: (typeof Date)
        object
      • date2: (typeof Date)
        object.  If not specified, the current Date is used.
      • portion: (typeof String)
        A string indicating the "date" or "time" portion of a Date object.
        Compares both "date" and "time" by default.  One of the following:
        "date", "time", "datetime"
    • returns
      int
    • summary
      Compare two date objects by date, time, or both.
    • description
      Returns 0 if equal, positive if a > b, else negative.
    • type
      Function
  • dojo.date.add

    • parameters:
      • date: (typeof Date)
        Date object to start with
      • interval: (typeof String)
        A string representing the interval.  One of the following:
        "year", "month", "day", "hour", "minute", "second",
        "millisecond", "quarter", "week", "weekday"
      • amount: (typeof int)
        How much to add to the date.
    • returns
      Date
    • summary
      Add to a Date in intervals of different size, from milliseconds to years
    • type
      Function
  • dojo.date.difference

    • parameters:
      • date1: (typeof Date)
        object
      • date2: (typeof Date)
        object.  If not specified, the current Date is used.
      • interval: (typeof String)
        A string representing the interval.  One of the following:
        "year", "month", "day", "hour", "minute", "second",
        "millisecond", "quarter", "week", "weekday"
        Defaults to "day".
    • returns
      Number (integer)
    • summary
      Get the difference in a specific unit of time (e.g., number of
      months, weeks, days, etc.) between two dates, rounded to the
      nearest integer.
    • type
      Function
  • dojo

    • type
      Object