<cDateTime>.DaysInMonth

<< Click to Display Table of Contents >>

Navigation:  ThinBASIC Language > thinBasic Functions > Date and Time > cDateTime > cDateTime_Methods >

<cDateTime>.DaysInMonth

 

Description

 

Returns the number of days in month specified in cDateTime variable.

 

Syntax

 

<cDateTime>.DaysInMonth

 

Returns

 

Number, days in month of cDateTime variable month.

 

Remarks

 

Restrictions

 

See also

 

Examples

 

' Create an object with current date and time

Dim firstDateTime As New cDateTime

 

' Set its values

firstDateTime.NewDate(2020, 1, 1) ' January 1st 2020

 

' Create another object with current date and time

Dim secondDateTime As New cDateTime

 

secondDateTime.NewDate(2020, 2, 1) ' February 1st 2020

 

' Display date part of myDateTime as DD.MM.YYYY string

MsgBox 0, "firstDateTime"  + firstDateTime.toString  + " days in month: " + firstDateTime.daysInMonth + $CRLF +

          "secondDateTime" secondDateTime.toString + " days in month: " + secondDateTime.daysInMonth + $CRLF