Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

Are you perchance running on a 64-bit machine? -- Larry Wall in <199711102149.NAA16878@wall.org>


devel / comp.lang.xharbour / Date + one year

SubjectAuthor
* Date + one yearOtto Haldi
`* Date + one yearRobert Campsmith
 `* Date + one yeardlzc
  `- Date + one yearRobert Campsmith

1
Date + one year

<2afd9695-c269-413d-bc84-197f2094ab62n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.xharbour
X-Received: by 2002:ad4:5be1:0:b0:498:79dc:d3ff with SMTP id k1-20020ad45be1000000b0049879dcd3ffmr10918038qvc.87.1667226552505;
Mon, 31 Oct 2022 07:29:12 -0700 (PDT)
X-Received: by 2002:a0d:dec3:0:b0:35c:99d8:b2ca with SMTP id
h186-20020a0ddec3000000b0035c99d8b2camr12917354ywe.18.1667226552258; Mon, 31
Oct 2022 07:29:12 -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 07:29:11 -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: <2afd9695-c269-413d-bc84-197f2094ab62n@googlegroups.com>
Subject: Date + one year
From: otto.hal...@gmail.com (Otto Haldi)
Injection-Date: Mon, 31 Oct 2022 14:29:12 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 1090
 by: Otto Haldi - Mon, 31 Oct 2022 14:29 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 bisexual years.

Re: Date + one year

<8d0d0d3c-e508-dc4c-8d1e-0f529241eadc@sturec.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.xharbour
Path: i2pn2.org!i2pn.org!aioe.org!V6gfjH6h0SyboN0ukXawMA.user.46.165.242.91.POSTED!not-for-mail
From: drrob...@sturec.com (Robert Campsmith)
Newsgroups: comp.lang.xharbour
Subject: Re: Date + one year
Date: Mon, 7 Nov 2022 14:05:37 -0500
Organization: Aioe.org NNTP Server
Message-ID: <8d0d0d3c-e508-dc4c-8d1e-0f529241eadc@sturec.com>
References: <2afd9695-c269-413d-bc84-197f2094ab62n@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Info: gioia.aioe.org; logging-data="58544"; posting-host="V6gfjH6h0SyboN0ukXawMA.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.4.2
X-Notice: Filtered by postfilter v. 0.9.2
Content-Language: en-US
 by: Robert Campsmith - Mon, 7 Nov 2022 19:05 UTC

I use...

LOCAL nDaysInYear := 365.25

dNewYear := dOldYear + nDaysInYear

To calculate someone's age

nAge := INT( ( dDob - dTargetDate ) / nDaysInYear )

Good Luck,
-- Robert

On 10/31/2022 10:29 AM, Otto Haldi 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 bisexual years.

Re: Date + one year

<32380e44-4e68-4d31-b406-a186538c30fan@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.xharbour
X-Received: by 2002:ad4:5fcd:0:b0:4bb:f8f2:1ebf with SMTP id jq13-20020ad45fcd000000b004bbf8f21ebfmr42428081qvb.66.1667920465752;
Tue, 08 Nov 2022 07:14:25 -0800 (PST)
X-Received: by 2002:a0d:dec3:0:b0:35c:99d8:b2ca with SMTP id
h186-20020a0ddec3000000b0035c99d8b2camr52209781ywe.18.1667920465618; Tue, 08
Nov 2022 07:14:25 -0800 (PST)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer01.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, 8 Nov 2022 07:14:25 -0800 (PST)
In-Reply-To: <8d0d0d3c-e508-dc4c-8d1e-0f529241eadc@sturec.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: <2afd9695-c269-413d-bc84-197f2094ab62n@googlegroups.com> <8d0d0d3c-e508-dc4c-8d1e-0f529241eadc@sturec.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <32380e44-4e68-4d31-b406-a186538c30fan@googlegroups.com>
Subject: Re: Date + one year
From: dlz...@cox.net (dlzc)
Injection-Date: Tue, 08 Nov 2022 15:14:25 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 1624
 by: dlzc - Tue, 8 Nov 2022 15:14 UTC

On Monday, November 7, 2022 at 12:05:40 PM UTC-7, Robert wrote:
> I use...
>
>
> LOCAL nDaysInYear := 365.25
>
> dNewYear := dOldYear + nDaysInYear
>
> To calculate someone's age
>
> nAge := INT( ( dDob - dTargetDate ) / nDaysInYear )

Fails when the dates surround 1900, or 2100, but good enough over YOUR lifetime. And it is the reverse of what is being asked for. Likely also fail near February 28 - March 1 more often than you'd like.

David A. Smith

Re: Date + one year

<7f521390-fa50-7c83-3c72-629e45c5a3a4@sturec.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.xharbour
Path: i2pn2.org!i2pn.org!aioe.org!V6gfjH6h0SyboN0ukXawMA.user.46.165.242.91.POSTED!not-for-mail
From: drrob...@sturec.com (Robert Campsmith)
Newsgroups: comp.lang.xharbour
Subject: Re: Date + one year
Date: Tue, 15 Nov 2022 14:29:26 -0500
Organization: Aioe.org NNTP Server
Message-ID: <7f521390-fa50-7c83-3c72-629e45c5a3a4@sturec.com>
References: <2afd9695-c269-413d-bc84-197f2094ab62n@googlegroups.com>
<8d0d0d3c-e508-dc4c-8d1e-0f529241eadc@sturec.com>
<32380e44-4e68-4d31-b406-a186538c30fan@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Info: gioia.aioe.org; logging-data="48490"; posting-host="V6gfjH6h0SyboN0ukXawMA.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.4.2
Content-Language: en-US
X-Notice: Filtered by postfilter v. 0.9.2
 by: Robert Campsmith - Tue, 15 Nov 2022 19:29 UTC

Thanks David,

As I may have mentioned, I use this to calculate someone's age as of a
certain date. Not calculating the orbit to Mars. Just thought it might
be a useful shortcut. You are correct in that to calculate EXACTLY one
year you must go thorough all the what-if tests.

-- Robert

On 11/8/2022 10:14 AM, dlzc wrote:
> On Monday, November 7, 2022 at 12:05:40 PM UTC-7, Robert wrote:
>> I use...
>>
>>
>> LOCAL nDaysInYear := 365.25
>>
>> dNewYear := dOldYear + nDaysInYear
>>
>> To calculate someone's age
>>
>> nAge := INT( ( dDob - dTargetDate ) / nDaysInYear )
>
> Fails when the dates surround 1900, or 2100, but good enough over YOUR lifetime. And it is the reverse of what is being asked for. Likely also fail near February 28 - March 1 more often than you'd like.
>
> David A. Smith

1
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor