image\cslogo3d1.gif

JScript Date Object getMonth Method

Retrieves the month value of the Date object according to local time.

Syntax: JScript Date Object getMonth Method

objDate.getMonth()

Arguments: JScript Date Object getMonth Method

objDate

The name of a Date object. Required.

Remarks: JScript Date Object getMonth Method

To get the month value according to Universal Coordinated Time (UTC), use the getUTCMonth method.

The getMonth method returns an integer between 0 and 11 indicating the month stored in the Date object. The integer returned is not the traditional number used to indicate the month—it is one less. If "Jan 5, 1996 08:47:00" is stored in a Date object, getMonth returns 0.

Copyright 2001 Sun Microsystems, Inc. All rights reserved. Legal Notice.