java Date to c# ticks

J

John Stockton

In comp.lang.java.programmer message
The full story is quite complex. Different parts of world accepted
the Gregorian calendar at different times.

Indeed. But, knowing you to be in Canada, I gave it special treatment.

It is said that mainland Nova Scotia changed from Gregorian to Julian
(sic) previous to 1752. Can you give the last Gregorian and first
Julian date at that change (one expects it to have occurred at local
midnight), from trustworthy Canadian sources?
There are parts of the
world today still on the Julian calendar.

I rather doubt whether any parts of the world still use it in their
daily secular life. Russian (and other) Orthodox celebrate Easter by
the Ju8lian Calendar and the pre-1752 (for us) rules. Mount Athos maybe
uses the Greek Orthodox version, but they don't have a secular life.
BigDate works off two different definitions, the papal and the British
adoption.

Those are different, but (when extrapolated as necessary in a reasonably
obvious manner) give the same answers. I have seen part of the Canadian
law on Easter, but not the most interesting part. Is it on line?
 
L

Lew

Arne said:
Nanoseconds in year 1 is absurd.

But it is not absurd to measure nanoseconds (or at least milliseconds
today).

And it is not absurd to be able to store days many years back.

And it is not absurd to use the same unit for all times.

So we have now proven that:
3 x not absurd = absurd

Two wrongs don't make a right.

But three lefts do.
 
L

Lew

Martin said:
To say nothing of the transitions between the various calendars, which,
over the mere 2009 years in that range are probably more significant than
spin rate and orbit deviations.

I look at such a system (100 ns "ticks" since 0001-01-01T00:00:00.00...Z) as a
"normalized" calendar/time system. Arguing that you cannot precisely measure
0001-01-01T00:00:00.00...Z as a number of ticks ago since NOW is specious;
that datetime is *defined* by being that many ticks ago from NOW. So instead
of trying to measure how many ticks ago "time zero" is, you now have the
uncertainty of measuring how great was the wobble since then.

Heisenberg. Tomayto/tomahto. Frequency/duration. Position/velocity. How
many angels can dance on the head of a pin?

(A: Depends on the caterer.)
 
D

Dr J R Stockton

In comp.lang.java.programmer message <[email protected]
september.org>, Fri, 5 Mar 2010 09:14:18, Eric Sosman <esosman@ieee-dot-
org.invalid> posted:
I've no quarrel with measuring *intervals* in tiny units.
The thing that started me ranting and foaming at the mouth was
the statement that "C# (.net) ticks are based on nanoseconds
since 1/1/0001." *That's* the association I regard as fiction,
bordering on nonsense.

That's just due to the customary imprecision of US nerds.

Those are GMT nanoseconds (no leap seconds); from Monday 0001-01-01
00:00:00 GMT = 0 ("since Jan 1" actually means "starting Jan 2"); and
the days are of the proleptic Gregorian Calendar.

IIRC, GMT there should actually be UT, but that will be taken as a typo
for UTC.

Januarius of that year actually started on the previous day.

The Gregorian Calendar is valid perpetually from 1582-10-14, by Papal
definition. If the civil calendar is ever changed, it will no longer be
Gregorian. The proleptic extension is obvious, and has the authority of
ISO 8601.

A bad choice of start, too; arithmetic is simpler if the count starts at
AD 0000 March 1, since that follows the rarest exceptional end-of-
February.
 
E

Eric Sosman

Martin said:
To say nothing of the transitions between the various calendars,
which, over the mere 2009 years in that range are probably more
significant than spin rate and orbit deviations.

I look at such a system (100 ns "ticks" since
0001-01-01T00:00:00.00...Z) as a "normalized" calendar/time system.
Arguing that you cannot precisely measure 0001-01-01T00:00:00.00...Z as
a number of ticks ago since NOW is specious; that datetime is *defined*
by being that many ticks ago from NOW.[...]

In short, the definition is useless, useless in the sense
that one cannot use it to say what the tick count should be at
any given NOW. If you holler NOW! and consult the clocks on
Systems A and B, and the clocks disagree by five minutes, say,
can the definition help you determine which (if either) is
correct? Since the definition is circular ("The current time
is defined as the number of ticks since a moment so-and-so many
ticks ago"), the operators of A and B can *both* claim their
clocks are correct. One might just as well define the time as
the number of ticks since the Ark hit Ararat.

In "The Devil's Dictionary," Ambrose Bierce defined a magnet
as an object exerting the force of magnetism, and magnetism as the
force exerted by a magnet (noting that the paired definitions were
the distillation of innumerable scientific treatises). Circular
definitions can still be funny ("Recursion: see Recursion"), but
it seems not everyone sees the joke.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top