Function Description
Year getYear()

Returns the year as set in the object for the current timezone set. ie. No conversion is performed. If no year is set, this returns undefined

getYear(timezone)

Returns the year as set in the object for the given timezone.

If no year is set, this returns undefined.

The difference between the set timezone within the object and the timezone parameter is added to the hour and minute. If this results in a time on the previous or following day, the date is calculated appropriately. If the day and month adjustments result in a date in the previous or following year, the year is calculated appropriately and returned.

If the month, or day and/or hour is not set, the conversion is not performed and the currently set year is returned.

If the minute is not set, or the timzone offset minutes is not passed in the parameter, the conversion is performed as if the minutes were set to zero (00).

getUTCYear()

This is identical to calling getYear(timezone) with the value equivalent to "Z" or "00:00".

Month getMonth()

Returns the month as set in the object for the current timezone set. ie. No conversion is performed. If no month is set, this returns undefined

getMonth(timezone)

Returns the month as set in the object for the given timezone.

If no month is set, this returns undefined.

The difference between the set timezone within the object and the timezone parameter is added to the hour and minute. If this results in a time on the previous or following day, the day is calculated appropriately. If the day adjustment result in a date in the previous or following month, the month is calculated appropriately and returned.

If the day and/or hour is not set, the conversion is not performed and the currently set month is returned.

If the minute is not set, or the timzone offset minutes is not passed in the parameter, the conversion is performed as if the minutes were set to zero (00).

getUTCMonth()

This is identical to calling getMonth(timezone) with the value equivalent to "Z" or "00:00".

Week getWeek()

Returns the week as set in the object for the current timezone set. ie. No conversion is performed. If no month is set, this returns undefined

getWeek(timezone)

Returns the month as set in the object for the given timezone.

If no month is set, this returns undefined.

The difference between the set timezone within the object and the timezone parameter is added to the hour and minute. If this results in a time on the previous or following day, the day is calculated appropriately. If the day adjustment result in a date in the previous or following month, the month is calculated appropriately and returned.

If the day and/or hour is not set, the conversion is not performed and the currently set month is returned.

If the minute is not set, or the timzone offset minutes is not passed in the parameter, the conversion is performed as if the minutes were set to zero (00).

getUTCWeek()

This is identical to calling getWeek(timezone) with the value equivalent to "Z" or "00:00".