daysInMonth Method

Class: Date

Description

This method returns the number of days in the month of the Date object.

Syntax

dateObject.daysInMonth()

Parameters

None

Returns

The number of days in the month of the Date object.

When Became Available

Profile v7.0

Example

type RecordCIF cif = Db.getRecord("CIF","ACN=:ACN")

type Date date = cif.dob                  // declare Date object

type Number DAYSINMM = date.daysInMonth()

 

type Date FEB = "2000-02-04".toDate("YYYY-MM-DD")

type Number FEB2000 = FEB.daysInMonth()   // 29!

 

* Variable ACN must be defined prior to the getRecord statement.