On 2015 Jan 30, at 12:32, Steve Mykytyn wrote:
The documentation for the Date and Time Programming Guide for iOS does
not seem to be telling the truth, or perhaps I'm doing something
wrong.
From
https://developer.apple.com/library/ios/documentation/Cocoa/
Conceptual/DatesAndTimes/Articles/dtHist.html
"The Julian to Gregorian Transition
NSCalendar models the transition from the Julian to Gregorian calendar
in October 1582. During this transition, 10 days were skipped. This
means that October 15, 1582 follows October 4, 1582. All of the
provided methods for calendrical calculations take this into account,
but you may need to account for it when you are creating dates from
components. Dates created in the gap are pushed forward by 10 days.
For example October 8, 1582 is
stored as October 18, 1582."
...
In reality it's not so simple; calendar/date designations, because of
the non-integer and varying spin, orbits (365.22... or maybe
365.2425... day year), etc., religion and what have you (calendars
which use leap seconds, leap days, leap months...), are never as simple
as most of us believe they SHOULD be.
Some countries did not adopt the Gregorian adjustment until the 1750s,
and others much later than that (Russia partially converted in 1700 but
not completely until 1922, Turkey in 1926). Anyway, it's not something
you can do a neat mathematical conversion on and have it work
"perfectly" everywhere and for every date. What of those of us who
have to deal with dates going back to e.g. 1200BCE?
But then are we talking calendar conversion, date conversion, or merely
date formatting?
http://www.adamsonancestry.com/calendar/
http://www.adamsonancestry.com/pioneering_spirit/#_Toc302021234
https://en.wikipedia.org/wiki/Old_Style_and_New_Style_dates
http://galileo.rice.edu/chron/gregorian.html
http://www.britannica.com/EBchecked/topic/245469/Gregorian-calendar
http://www.britannica.com/EBchecked/topic/307826/Julian-calendar
http://scienceworld.wolfram.com/astronomy/GregorianCalendar.html
http://stackoverflow.com/questions/20446495/conversion-of-nsstring-to-
nsdate-conversion-incorrect-result
http://stackoverflow.com/questions/141315/php-check-for-a-valid-date-
weird-date-conversions
http://stackoverflow.com/questions/2140597/client-side-date-
conversions-in-gwt
http://www.cocoawithlove.com/2008/10/worldtimeconverter-dates-and-
timezones.html
http://www.codeproject.com/Articles/2730/Gregorian-Date-To-ISO-Date-
Converter
http://forum.ionicframework.com/t/problem-with-conversion-of-specific-
dates-on-ios/16689
And a slew of books, and several videos on the topic turned up when I
did an ixquick.
_Demystifying the Gregorian Calendar: A Look into Its History and the
Math Behind It_ Paperback -- 2014 April 7 by Walter A. Calhoon
_Gregorian Calendar_ [Kindle Edition] by Merv Astle
_The Calendar (Inventions That Shaped the World)_ Paperback -- 2005
September 1 by Patricia K. Kummer
_Calendar Fraud_ [Kindle Edition] by Laura Lee Vornholt-Jones, Elaine
Vornholt, Brad Vornholt...
(And why doesn't Numbers have TSV as an export option?! It's more
cleanly portable than CSV... and why are the marketing promo examples
so overly simplistic?)
_______________________________________________
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com
This email sent to arch...@mail-archive.com