Subject Re: date class
From Mervyn Bick <invalid@invalid.invalid>
Date Tue, 15 Jun 2021 22:21:11 +0200
Newsgroups dbase.getting-started

On 2021/06/15 20:59, Mustansir Ghor wrote:
> Dear All
>
> The date class has a method oref.setyear(ExpN) which is suppose to change date object with same date and month but ExpN year. But it return GMT character date.
>
> Is there another way to it
>
> Best Regards
> Mustansir
>

d = new date()

? d //This will show today's date

d.setyear(2022)

?d //This will show the same month and day in 2022

d.setmonth(0) // January . Months are from 0 for Jan to 11 for Dec

?d //This will show today's day in January 2022

d.setDate(1)

?d // This will show 2022-01-01 (in the date format set for your computer.


Mervyn