Rocksolid Light

Welcome to RetroBBS

mail  files  register  newsreader  groups  login

Message-ID:  

7 May, 2024: fms is rebuilding. Don't expect much in that section for quite a few days, maybe longer.


devel / comp.lang.xharbour / Re: Date() + one year

SubjectAuthor
* Date() + one yearOtto Haldi
+- Re: Date() + one yearEnrico Maria Giordano
`* Re: Date() + one yeardlzc
 `* Re: Date() + one yearEnrico Maria Giordano
  `* Re: Date() + one yearRainer Berning
   +* Re: Date() + one yearOtto Haldi
   |`* Re: Date() + one yeartimepro timesheet
   | `* Re: Date() + one yearIngo Steinbuechel
   |  `* Re: Date() + one yeartimepro timesheet
   |   `- Re: Date() + one yearEnrico Maria Giordano
   `- Re: Date() + one yeardlzc

1
Date() + one year

<610f9078-05d4-40bd-afd3-053702b0cc08n@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=17130&group=comp.lang.xharbour#17130

  copy link   Newsgroups: comp.lang.xharbour
X-Received: by 2002:a05:6214:20a7:b0:4bb:9359:8368 with SMTP id 7-20020a05621420a700b004bb93598368mr11058262qvd.122.1667226738159;
Mon, 31 Oct 2022 07:32:18 -0700 (PDT)
X-Received: by 2002:a81:4941:0:b0:367:d6d4:4697 with SMTP id
w62-20020a814941000000b00367d6d44697mr13222311ywa.402.1667226737905; Mon, 31
Oct 2022 07:32:17 -0700 (PDT)
Path: i2pn2.org!i2pn.org!news.niel.me!glou.org!news.glou.org!usenet-fr.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.xharbour
Date: Mon, 31 Oct 2022 07:32:17 -0700 (PDT)
Injection-Info: google-groups.googlegroups.com; posting-host=62.2.210.254; posting-account=JUJWmgoAAAC6zTWwzAl5l2TCnYthlL4o
NNTP-Posting-Host: 62.2.210.254
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <610f9078-05d4-40bd-afd3-053702b0cc08n@googlegroups.com>
Subject: Date() + one year
From: otto.haldi.1955@gmail.com (Otto Haldi)
Injection-Date: Mon, 31 Oct 2022 14:32:18 +0000
Content-Type: text/plain; charset="UTF-8"
 by: Otto Haldi - Mon, 31 Oct 2022 14:32 UTC

Hello,
What is the easiest way to add a year to a date?
If I do Date()+365, I will have an error with leap years.

Re: Date() + one year

<tjoncf$h1kq$1@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=17131&group=comp.lang.xharbour#17131

  copy link   Newsgroups: comp.lang.xharbour
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: e.m.giordano@emagsoftware.it (Enrico Maria Giordano)
Newsgroups: comp.lang.xharbour
Subject: Re: Date() + one year
Date: Mon, 31 Oct 2022 15:50:56 +0100
Organization: A noiseless patient Spider
Lines: 18
Message-ID: <tjoncf$h1kq$1@dont-email.me>
References: <610f9078-05d4-40bd-afd3-053702b0cc08n@googlegroups.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Mon, 31 Oct 2022 14:50:55 -0000 (UTC)
Injection-Info: reader01.eternal-september.org; posting-host="e7784e6aaf0a66e56f277041d94ee748";
logging-data="558746"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+9gZDrEF4rrd3VfgnAp8f3"
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.4.1
Cancel-Lock: sha1:Nj+7bWPkBPsnvsm5ptzP89cQWok=
In-Reply-To: <610f9078-05d4-40bd-afd3-053702b0cc08n@googlegroups.com>
 by: Enrico Maria Giordan - Mon, 31 Oct 2022 14:50 UTC

Il 31/10/2022 15:32, Otto Haldi ha scritto:

> Hello,
> What is the easiest way to add a year to a date?
> If I do Date()+365, I will have an error with leap years.

Something like

Date() + 365 + IF( IsLeap( Year( Date() ) ), 1, 0 )

--
Enrico Maria Giordano

http://www.emagsoftware.it
http://www.emagsoftware.it/emgmusic
http://www.emagsoftware.it/spectrum
http://www.emagsoftware.it/tbosg

Re: Date() + one year

<6d28cf43-353a-4261-becf-09800abe88den@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=17132&group=comp.lang.xharbour#17132

  copy link   Newsgroups: comp.lang.xharbour
X-Received: by 2002:a05:620a:2002:b0:6fa:19cd:81f6 with SMTP id c2-20020a05620a200200b006fa19cd81f6mr7750140qka.691.1667231890414;
Mon, 31 Oct 2022 08:58:10 -0700 (PDT)
X-Received: by 2002:a25:700b:0:b0:6cb:a3fd:5313 with SMTP id
l11-20020a25700b000000b006cba3fd5313mr14024391ybc.218.1667231890246; Mon, 31
Oct 2022 08:58:10 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.xharbour
Date: Mon, 31 Oct 2022 08:58:09 -0700 (PDT)
In-Reply-To: <610f9078-05d4-40bd-afd3-053702b0cc08n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=68.107.209.13; posting-account=7bF0GwoAAABMFHX6V4fON4-1F6LFJ834
NNTP-Posting-Host: 68.107.209.13
References: <610f9078-05d4-40bd-afd3-053702b0cc08n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <6d28cf43-353a-4261-becf-09800abe88den@googlegroups.com>
Subject: Re: Date() + one year
From: dlzc1@cox.net (dlzc)
Injection-Date: Mon, 31 Oct 2022 15:58:10 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 2013
 by: dlzc - Mon, 31 Oct 2022 15:58 UTC

On Monday, October 31, 2022 at 7:32:19 AM UTC-7, otto.ha...@gmail.com wrote:
> Hello,
> What is the easiest way to add a year to a date?
> If I do Date()+365, I will have an error with leap years.

You just need to increment the year. Enrico's method fails if "next year" is a leap year and the date sought is after February. This is sensitive to the date format you have set...

dThisOne := date()
dThatOne := CTOD( str( month( dThisOne )) + "-" + ;
str(day( dThisOne )) + "-" +;
str(year( dThisOne + 1 )) )

Maybe something safer derived from Clipper Tools using STOD and PADLEFT...

dThisOne := date()
dThatOne := STOD( PADLEFT( str( year( dThisOne + 1 )), "0") +;
PADLEFT(str( month( dThisOne )), "0") +;
PADLEFT(str( day( dThisOne )), "0") );

Coded in my head, not tried.

David A. Smith

Re: Date() + one year

<tjp1od$hs6l$1@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=17133&group=comp.lang.xharbour#17133

  copy link   Newsgroups: comp.lang.xharbour
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: e.m.giordano@emagsoftware.it (Enrico Maria Giordano)
Newsgroups: comp.lang.xharbour
Subject: Re: Date() + one year
Date: Mon, 31 Oct 2022 18:47:59 +0100
Organization: A noiseless patient Spider
Lines: 14
Message-ID: <tjp1od$hs6l$1@dont-email.me>
References: <610f9078-05d4-40bd-afd3-053702b0cc08n@googlegroups.com>
<6d28cf43-353a-4261-becf-09800abe88den@googlegroups.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Mon, 31 Oct 2022 17:47:57 -0000 (UTC)
Injection-Info: reader01.eternal-september.org; posting-host="e7784e6aaf0a66e56f277041d94ee748";
logging-data="585941"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/tsFQUIP9QA1D1khzG9iNv"
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.4.1
Cancel-Lock: sha1:fT2IBOGUJwa2dSoM8s6C8Gk+eJs=
In-Reply-To: <6d28cf43-353a-4261-becf-09800abe88den@googlegroups.com>
 by: Enrico Maria Giordan - Mon, 31 Oct 2022 17:47 UTC

Il 31/10/2022 16:58, dlzc ha scritto:

> Enrico's method fails if "next year" is a leap year and the date sought is after February.

Ops, you are right!

--
Enrico Maria Giordano

http://www.emagsoftware.it
http://www.emagsoftware.it/emgmusic
http://www.emagsoftware.it/spectrum
http://www.emagsoftware.it/tbosg

Re: Date() + one year

<tjp5sn$i6mb$1@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=17134&group=comp.lang.xharbour#17134

  copy link   Newsgroups: comp.lang.xharbour
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: rberning@arcor.de (Rainer Berning)
Newsgroups: comp.lang.xharbour
Subject: Re: Date() + one year
Date: Mon, 31 Oct 2022 19:58:30 +0100
Organization: A noiseless patient Spider
Lines: 15
Message-ID: <tjp5sn$i6mb$1@dont-email.me>
References: <610f9078-05d4-40bd-afd3-053702b0cc08n@googlegroups.com>
<6d28cf43-353a-4261-becf-09800abe88den@googlegroups.com>
<tjp1od$hs6l$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Mon, 31 Oct 2022 18:58:31 -0000 (UTC)
Injection-Info: reader01.eternal-september.org; posting-host="21833154199e25bc62fb202dbc1c8c6a";
logging-data="596683"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+nZTjRQFePqGw0EQmVY2FY"
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.4.1
Cancel-Lock: sha1:jqyRofM1hI2g70ksti9+1ZobTBE=
In-Reply-To: <tjp1od$hs6l$1@dont-email.me>
 by: Rainer Berning - Mon, 31 Oct 2022 18:58 UTC

Am 31.10.2022 um 18:47 schrieb Enrico Maria Giordano:
> Il 31/10/2022 16:58, dlzc ha scritto:
>
>> Enrico's method fails if "next year" is a leap year and the date sought is after February.
>
> Ops, you are right!
>

Use function AddMonth from xHarbour.

-> nDate := AddMonth(Date(), 12)

R. Berning

Re: Date() + one year

<tjr5fr$aho$1@rasp.pasdenom.info>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=17135&group=comp.lang.xharbour#17135

  copy link   Newsgroups: comp.lang.xharbour
Path: i2pn2.org!i2pn.org!news.nntp4.net!pasdenom.info!.POSTED.62-2-210-254.static.cablecom.ch!not-for-mail
From: ohaldi@chateau.ch (Otto Haldi)
Newsgroups: comp.lang.xharbour
Subject: Re: Date() + one year
Date: Tue, 1 Nov 2022 14:03:55 +0100
Organization: <https://pasdenom.info/news.html>
Message-ID: <tjr5fr$aho$1@rasp.pasdenom.info>
References: <610f9078-05d4-40bd-afd3-053702b0cc08n@googlegroups.com>
<6d28cf43-353a-4261-becf-09800abe88den@googlegroups.com>
<tjp1od$hs6l$1@dont-email.me> <tjp5sn$i6mb$1@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Tue, 1 Nov 2022 13:03:55 -0000 (UTC)
Injection-Info: rasp.pasdenom.info; posting-account="otto@usenet"; posting-host="62-2-210-254.static.cablecom.ch:62.2.210.254";
logging-data="10808"; mail-complaints-to="abuse@pasdenom.info"
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.4.1
Cancel-Lock: sha256:0vtXW1yHrbN1I0eOSfIZ9fTWxp6O50jKAU3JGccrwEY=
Content-Language: fr
In-Reply-To: <tjp5sn$i6mb$1@dont-email.me>
 by: Otto Haldi - Tue, 1 Nov 2022 13:03 UTC

Thanks so much that fixed the problem, you help is appreciated
Otto

Le 31/10/2022 à 19:58, Rainer Berning a écrit :
> Am 31.10.2022 um 18:47 schrieb Enrico Maria Giordano:
>> Il 31/10/2022 16:58, dlzc ha scritto:
>>
>>> Enrico's method fails if "next year" is a leap year and the date
>>> sought is after February.
>>
>> Ops, you are right!
>>
>
> Use function AddMonth from xHarbour.
>
> -> nDate := AddMonth(Date(), 12)
>
> R. Berning
>
>

Re: Date() + one year

<80779eb7-00ba-4084-bbf4-75daa8f25d5cn@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=17136&group=comp.lang.xharbour#17136

  copy link   Newsgroups: comp.lang.xharbour
X-Received: by 2002:a37:5f05:0:b0:6ec:59fe:1ab4 with SMTP id t5-20020a375f05000000b006ec59fe1ab4mr13311215qkb.111.1667312216315;
Tue, 01 Nov 2022 07:16:56 -0700 (PDT)
X-Received: by 2002:a25:dacc:0:b0:6cb:866:6245 with SMTP id
n195-20020a25dacc000000b006cb08666245mr18940223ybf.473.1667312216071; Tue, 01
Nov 2022 07:16:56 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.xharbour
Date: Tue, 1 Nov 2022 07:16:55 -0700 (PDT)
In-Reply-To: <tjr5fr$aho$1@rasp.pasdenom.info>
Injection-Info: google-groups.googlegroups.com; posting-host=96.242.45.184; posting-account=jZAeNwoAAABYWjMRM-FfqKkHfC3Iph0l
NNTP-Posting-Host: 96.242.45.184
References: <610f9078-05d4-40bd-afd3-053702b0cc08n@googlegroups.com>
<6d28cf43-353a-4261-becf-09800abe88den@googlegroups.com> <tjp1od$hs6l$1@dont-email.me>
<tjp5sn$i6mb$1@dont-email.me> <tjr5fr$aho$1@rasp.pasdenom.info>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <80779eb7-00ba-4084-bbf4-75daa8f25d5cn@googlegroups.com>
Subject: Re: Date() + one year
From: timecosting@gmail.com (timepro timesheet)
Injection-Date: Tue, 01 Nov 2022 14:16:56 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 2058
 by: timepro timesheet - Tue, 1 Nov 2022 14:16 UTC

On Tuesday, November 1, 2022 at 6:33:57 PM UTC+5:30, Otto Haldi wrote:
> Thanks so much that fixed the problem, you help is appreciated
> Otto
> Le 31/10/2022 à 19:58, Rainer Berning a écrit :
> > Am 31.10.2022 um 18:47 schrieb Enrico Maria Giordano:
> >> Il 31/10/2022 16:58, dlzc ha scritto:
> >>
> >>> Enrico's method fails if "next year" is a leap year and the date
> >>> sought is after February.
> >>
> >> Ops, you are right!
> >>
> >
> > Use function AddMonth from xHarbour.
> >
> > -> nDate := AddMonth(Date(), 12)
> >
> > R. Berning
> >
> >
hi:

i have this simple method:

if (year(yourdate+nnn))/4=int((year(yourdate+nnn))/4)
'this is leap year'
....
....

Re: Date() + one year

<jsd09fFgh2mU1@mid.individual.net>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=17137&group=comp.lang.xharbour#17137

  copy link   Newsgroups: comp.lang.xharbour
Path: i2pn2.org!i2pn.org!news.swapon.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: schlingo@spamfence.net (Ingo Steinbuechel)
Newsgroups: comp.lang.xharbour
Subject: Re: Date() + one year
Date: Tue, 1 Nov 2022 17:36:36 +0100
Lines: 19
Message-ID: <jsd09fFgh2mU1@mid.individual.net>
References: <610f9078-05d4-40bd-afd3-053702b0cc08n@googlegroups.com>
<6d28cf43-353a-4261-becf-09800abe88den@googlegroups.com>
<tjp1od$hs6l$1@dont-email.me> <tjp5sn$i6mb$1@dont-email.me>
<tjr5fr$aho$1@rasp.pasdenom.info>
<80779eb7-00ba-4084-bbf4-75daa8f25d5cn@googlegroups.com>
Reply-To: <I.Steinbuechel@web.de>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Trace: individual.net HV6+qLFas+XczBFE+7yL2QU5mi8i0zvWSBwnU+qUAsY6Ac9+kL
Cancel-Lock: sha1:ww97M/1oK3C4vkP6CxBwdhHu/og=
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.4.1 Hamster/2.1.0.1547
Content-Language: de-DE, en-US
In-Reply-To: <80779eb7-00ba-4084-bbf4-75daa8f25d5cn@googlegroups.com>
X-Korrnews: 4.11
 by: Ingo Steinbuechel - Tue, 1 Nov 2022 16:36 UTC

Hi,

"timepro timesheet" <timecosting@gmail.com> schrieb:

> i have this simple method:
>
> if (year(yourdate+nnn))/4=int((year(yourdate+nnn))/4)
> 'this is leap year'

this is not correct. Look at the definition of a leap year [1].

Regards Ingo

[1] https://en.wikipedia.org/wiki/Leap_year#Algorithm

--
Threema - Sicherer und privater Messenger: https://threema.ch/de
Meine Threema-ID: https://threema.id/ZV9BWDXK
Warum Threema? https://warumthreema.de/

Re: Date() + one year

<ce8bf69b-34a5-47bc-b1ef-d29551a6e870n@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=17138&group=comp.lang.xharbour#17138

  copy link   Newsgroups: comp.lang.xharbour
X-Received: by 2002:a05:620a:28cd:b0:6cf:93b3:a78 with SMTP id l13-20020a05620a28cd00b006cf93b30a78mr13861687qkp.11.1667322445876;
Tue, 01 Nov 2022 10:07:25 -0700 (PDT)
X-Received: by 2002:a5b:1c3:0:b0:6ac:c87f:3dc8 with SMTP id
f3-20020a5b01c3000000b006acc87f3dc8mr17815374ybp.547.1667322445579; Tue, 01
Nov 2022 10:07:25 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.xharbour
Date: Tue, 1 Nov 2022 10:07:25 -0700 (PDT)
In-Reply-To: <jsd09fFgh2mU1@mid.individual.net>
Injection-Info: google-groups.googlegroups.com; posting-host=96.242.45.184; posting-account=jZAeNwoAAABYWjMRM-FfqKkHfC3Iph0l
NNTP-Posting-Host: 96.242.45.184
References: <610f9078-05d4-40bd-afd3-053702b0cc08n@googlegroups.com>
<6d28cf43-353a-4261-becf-09800abe88den@googlegroups.com> <tjp1od$hs6l$1@dont-email.me>
<tjp5sn$i6mb$1@dont-email.me> <tjr5fr$aho$1@rasp.pasdenom.info>
<80779eb7-00ba-4084-bbf4-75daa8f25d5cn@googlegroups.com> <jsd09fFgh2mU1@mid.individual.net>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <ce8bf69b-34a5-47bc-b1ef-d29551a6e870n@googlegroups.com>
Subject: Re: Date() + one year
From: timecosting@gmail.com (timepro timesheet)
Injection-Date: Tue, 01 Nov 2022 17:07:25 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 2165
 by: timepro timesheet - Tue, 1 Nov 2022 17:07 UTC

On Tuesday, November 1, 2022 at 10:07:06 PM UTC+5:30, Ingo Steinbuechel wrote:
> Hi,
>
> "timepro timesheet" <timec...@gmail.com> schrieb:
> > i have this simple method:
> >
> > if (year(yourdate+nnn))/4=int((year(yourdate+nnn))/4)
> > 'this is leap year'
> this is not correct. Look at the definition of a leap year [1].
>
> Regards Ingo
>
> [1] https://en.wikipedia.org/wiki/Leap_year#Algorithm
>
> --
> Threema - Sicherer und privater Messenger: https://threema.ch/de
> Meine Threema-ID: https://threema.id/ZV9BWDXK
> Warum Threema? https://warumthreema.de/
ingo:

by algorithm/mathematically...you are right...
(2100 can be divided by 4, but isn't a leap year)
but does anyone contemplate (while) coding for year 2100 onward...(the 'next century' leap year should be 2400).

Re: Date() + one year

<tjrm19$qqt2$1@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=17139&group=comp.lang.xharbour#17139

  copy link   Newsgroups: comp.lang.xharbour
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: e.m.giordano@emagsoftware.it (Enrico Maria Giordano)
Newsgroups: comp.lang.xharbour
Subject: Re: Date() + one year
Date: Tue, 1 Nov 2022 18:46:19 +0100
Organization: A noiseless patient Spider
Lines: 14
Message-ID: <tjrm19$qqt2$1@dont-email.me>
References: <610f9078-05d4-40bd-afd3-053702b0cc08n@googlegroups.com>
<6d28cf43-353a-4261-becf-09800abe88den@googlegroups.com>
<tjp1od$hs6l$1@dont-email.me> <tjp5sn$i6mb$1@dont-email.me>
<tjr5fr$aho$1@rasp.pasdenom.info>
<80779eb7-00ba-4084-bbf4-75daa8f25d5cn@googlegroups.com>
<jsd09fFgh2mU1@mid.individual.net>
<ce8bf69b-34a5-47bc-b1ef-d29551a6e870n@googlegroups.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Tue, 1 Nov 2022 17:46:17 -0000 (UTC)
Injection-Info: reader01.eternal-september.org; posting-host="e620599c1def1daf2659d5b255c5a5f9";
logging-data="879522"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18S8ec+7qSPUUKfDP11We9O"
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.4.1
Cancel-Lock: sha1:fZ/mb9ZLMrhQ07Nrczm22chVJyc=
In-Reply-To: <ce8bf69b-34a5-47bc-b1ef-d29551a6e870n@googlegroups.com>
 by: Enrico Maria Giordan - Tue, 1 Nov 2022 17:46 UTC

Il 01/11/2022 18:07, timepro timesheet ha scritto:

> but does anyone contemplate (while) coding for year 2100 onward...

Of course! :-)

--
Enrico Maria Giordano

http://www.emagsoftware.it
http://www.emagsoftware.it/emgmusic
http://www.emagsoftware.it/spectrum
http://www.emagsoftware.it/tbosg

Re: Date() + one year

<7f2948ad-e1ff-4858-9017-06ad2c632c42n@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=17141&group=comp.lang.xharbour#17141

  copy link   Newsgroups: comp.lang.xharbour
X-Received: by 2002:ad4:5f4f:0:b0:4bb:e056:b0d8 with SMTP id p15-20020ad45f4f000000b004bbe056b0d8mr24314319qvg.80.1667501819289;
Thu, 03 Nov 2022 11:56:59 -0700 (PDT)
X-Received: by 2002:a81:86c2:0:b0:332:a104:f7e4 with SMTP id
w185-20020a8186c2000000b00332a104f7e4mr31577743ywf.505.1667501819097; Thu, 03
Nov 2022 11:56:59 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.xharbour
Date: Thu, 3 Nov 2022 11:56:58 -0700 (PDT)
In-Reply-To: <tjp5sn$i6mb$1@dont-email.me>
Injection-Info: google-groups.googlegroups.com; posting-host=68.107.209.13; posting-account=7bF0GwoAAABMFHX6V4fON4-1F6LFJ834
NNTP-Posting-Host: 68.107.209.13
References: <610f9078-05d4-40bd-afd3-053702b0cc08n@googlegroups.com>
<6d28cf43-353a-4261-becf-09800abe88den@googlegroups.com> <tjp1od$hs6l$1@dont-email.me>
<tjp5sn$i6mb$1@dont-email.me>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <7f2948ad-e1ff-4858-9017-06ad2c632c42n@googlegroups.com>
Subject: Re: Date() + one year
From: dlzc1@cox.net (dlzc)
Injection-Date: Thu, 03 Nov 2022 18:56:59 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 1773
 by: dlzc - Thu, 3 Nov 2022 18:56 UTC

On Monday, October 31, 2022 at 11:58:33 AM UTC-7, Rainer Berning wrote:
> Am 31.10.2022 um 18:47 schrieb Enrico Maria Giordano:
> > Il 31/10/2022 16:58, dlzc ha scritto:
> >
> >> Enrico's method fails if "next year" is a leap year and the date sought is after February.
> >
> > Ops, you are right!
> >
> Use function AddMonth from xHarbour.
>
> -> nDate := AddMonth(Date(), 12)

Elegant. According to Clipper Tools, could be:
-> nDate := AddMonth( , 12) (or maybe just ->AddMonth(12) )
.... since it says it defaults to system date

David A. Smith

1
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor