Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.c > #96062 > unrolled thread
| Started by | Rosario19 <Ros@invalid.invalid> |
|---|---|
| First post | 2016-11-08 11:28 +0100 |
| Last post | 2016-11-08 08:19 -0800 |
| Articles | 4 on this page of 24 — 9 participants |
Back to article view | Back to comp.lang.c
What about my last date functions? there are some error? Rosario19 <Ros@invalid.invalid> - 2016-11-08 11:28 +0100
Re: What about my last date functions? there are some error? Ben Bacarisse <ben.usenet@bsb.me.uk> - 2016-11-08 10:55 +0000
Re: What about my last date functions? there are some error? "Mr. Man-wai Chang" <toylet.toylet@gmail.com> - 2016-11-08 19:00 +0800
Re: What about my last date functions? there are some error? Ben Bacarisse <ben.usenet@bsb.me.uk> - 2016-11-08 11:04 +0000
Re: What about my last date functions? there are some error? "Mr. Man-wai Chang" <toylet.toylet@gmail.com> - 2016-11-08 19:22 +0800
Re: What about my last date functions? there are some error? Richard Heathfield <rjh@cpax.org.uk> - 2016-11-08 11:35 +0000
Re: What about my last date functions? there are some error? Ben Bacarisse <ben.usenet@bsb.me.uk> - 2016-11-08 15:46 +0000
Re: What about my last date functions? there are some error? Richard Heathfield <rjh@cpax.org.uk> - 2016-11-08 16:20 +0000
Re: What about my last date functions? there are some error? Rosario19 <Ros@invalid.invalid> - 2016-11-08 17:44 +0100
Re: What about my last date functions? there are some error? Richard Heathfield <rjh@cpax.org.uk> - 2016-11-08 16:51 +0000
Re: What about my last date functions? there are some error? Jerry Stuckle <jstucklex@attglobal.net> - 2016-11-08 13:21 -0500
Re: What about my last date functions? there are some error? Ben Bacarisse <ben.usenet@bsb.me.uk> - 2016-11-08 18:06 +0000
Re: What about my last date functions? there are some error? Richard Heathfield <rjh@cpax.org.uk> - 2016-11-08 18:56 +0000
Re: What about my last date functions? there are some error? Keith Thompson <kst-u@mib.org> - 2016-11-08 12:05 -0800
Re: What about my last date functions? there are some error? David Brown <david.brown@hesbynett.no> - 2016-11-08 21:10 +0100
Re: What about my last date functions? there are some error? Richard Heathfield <rjh@cpax.org.uk> - 2016-11-08 20:16 +0000
Re: What about my last date functions? there are some error? jadill33@gmail.com - 2016-11-08 11:16 -0800
Re: What about my last date functions? there are some error? Richard Heathfield <rjh@cpax.org.uk> - 2016-11-08 20:08 +0000
Re: What about my last date functions? there are some error? Keith Thompson <kst-u@mib.org> - 2016-11-08 12:11 -0800
Re: What about my last date functions? there are some error? Keith Thompson <kst-u@mib.org> - 2016-11-08 12:29 -0800
Re: What about my last date functions? there are some error? Rosario19 <Ros@invalid.invalid> - 2016-11-08 17:41 +0100
Re: What about my last date functions? there are some error? asetofsymbols@gmail.com - 2016-11-08 11:26 -0800
Re: What about my last date functions? there are some error? Ben Bacarisse <ben.usenet@bsb.me.uk> - 2016-11-08 19:38 +0000
Re: What about my last date functions? there are some error? Keith Thompson <kst-u@mib.org> - 2016-11-08 08:19 -0800
Page 2 of 2 — ← Prev page 1 [2]
| From | Rosario19 <Ros@invalid.invalid> |
|---|---|
| Date | 2016-11-08 17:41 +0100 |
| Message-ID | <6nv32cdpkia6pmtil91aogmhciu9s5dp3h@4ax.com> |
| In reply to | #96068 |
On Tue, 8 Nov 2016 11:35:44 +0000, Richard Heathfield wrote:
>long tojul(int yp,int mp,int dp){long
>a=(14-mp)/12,y=yp+4800-a,m=mp+12*a-3,jdn=dp+(153*m+2)/5+365*y+y/4-y/100+y/400-32045;return
>jdn;}
>void fromjul(int*yp,int*mp,int*dp,long jdn){long
>y=4716,j=1401,m=2,n=12,r=4,p=1461,v=3,u=5,s=153,w=2,b=274277,c=-38,f=jdn+j+(((4*jdn+b)/146097)*3)/4+c,e=r*f+v,g=(e%p)/r,h=u*g+w;*dp=(h%s)/u+1;*mp=((h/s+m)%n)+1;*yp=e/p-y+(n+m-*mp)/n;}
here the julian day result: 25/11/-4713
but do you not fear in the year 9000000 the above code overflow int?
[toc] | [prev] | [next] | [standalone]
| From | asetofsymbols@gmail.com |
|---|---|
| Date | 2016-11-08 11:26 -0800 |
| Message-ID | <5282acb3-88d9-46b5-8125-fb6225beec28@googlegroups.com> |
| In reply to | #96102 |
There is something not go... Time on January 1, 4713 BCE is the Julian date here result 25 11 -4713
[toc] | [prev] | [next] | [standalone]
| From | Ben Bacarisse <ben.usenet@bsb.me.uk> |
|---|---|
| Date | 2016-11-08 19:38 +0000 |
| Message-ID | <8760nx92z8.fsf@bsb.me.uk> |
| In reply to | #96117 |
asetofsymbols@gmail.com writes: > There is something not go... > Time on January 1, 4713 BCE > is the Julian date > here result 25 11 -4713 The Juilan day count is based on 0 being Jan 1 4713 BCE, but the calendar we use has changed. If you work the dates of the new calendar back to Julian day 0 it's Nov 24th 4714 BCE. Note that 4714 BCE is -4713 because Julian day counts include a year zero. -- Ben.
[toc] | [prev] | [next] | [standalone]
| From | Keith Thompson <kst-u@mib.org> |
|---|---|
| Date | 2016-11-08 08:19 -0800 |
| Message-ID | <lnshr2q704.fsf@kst-u.example.com> |
| In reply to | #96062 |
Rosario19 <Ros@invalid.invalid> writes:
> What about my last date functions? there are some error?
> just today i find someones...
[snip]
> #define R return
> #define L(i) for(;i-->0;)
> #define I if
> #define N int
> #define C unsigned char
> #define F for
> #define G goto
> #define P printf
> #define E else
Oh hell no.
--
Keith Thompson (The_Other_Keith) kst-u@mib.org <http://www.ghoti.net/~kst>
Working, but not speaking, for JetHead Development, Inc.
"We must do something. This is something. Therefore, we must do this."
-- Antony Jay and Jonathan Lynn, "Yes Minister"
[toc] | [prev] | [standalone]
Page 2 of 2 — ← Prev page 1 [2]
Back to top | Article view | comp.lang.c
csiph-web