Forums
New posts
Articles
Product Reviews
Policies
FAQ
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Menu
Log in
Register
Install the app
Install
Forums
macOS & iOS Developer Playground
macOS - Development and Darwin
Hebrew NSCalendar months are wrong?
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="actionjdjackson" data-source="post: 1652269" data-attributes="member: 348814"><p>Something is odd with Hebrew months when using NSCalendar - I type the following code:</p><p></p><p>[CODE]let hebrewCalendar = NSCalendar(calendarIdentifier: NSCalendarIdentifierHebrew)</p><p></p><p>let birthOfJesusDateComponents = NSDateComponents()</p><p></p><p>birthOfJesusDateComponents.year = 3755 //either 5 or 6 B.C. is possible year of His birth, I chose 6</p><p></p><p>birthOfJesusDateComponents.month = 7 //this is where the problem arises - 15 Tishri (7th month) is His most likely birthday</p><p></p><p>birthOfJesusDateComponents.day = 15</p><p></p><p>birthOfJesusDateComponents.hour = 21 //just a guess - sometime at night</p><p></p><p>birthOfJesusDateComponents.minute = 0</p><p></p><p>birthOfJesusDateComponents.second = 0</p><p></p><p>birthOfJesus = hebrewCalendar!.dateFromComponents(birthOfJesusDateComponents)![/CODE]</p><p></p><p>Then, elsewhere, I type:</p><p></p><p>[CODE]let hebrew = NSCalendar(calendarIdentifier: NSCalendarIdentifierHebrew)</p><p></p><p>let formatter = NSDateFormatter()</p><p></p><p>formatter.calendar = hebrew</p><p></p><p>formatter.dateStyle = .FullStyle</p><p></p><p>formatter.timeStyle = .MediumStyle</p><p></p><p></p><p>println(formatter.stringFromDate(birthOfJesus))[/CODE]</p><p></p><p>And I get as an output:</p><p> </p><p><strong>Friday, 15 Adar 3755 at 21:00:00</strong></p><p> </p><p>But here's the catch, <strong>Adar</strong> is NOT the <strong>7th</strong> month of the Hebrew calendar, <strong>Tishri</strong> is. At least in the ancient Hebrew calendar. Does the modern Hebrew calendar have a different month order? I'm an amateur Biblical scholar not a modern-day speaker so I don't know the answer to this.</p></blockquote><p></p>
[QUOTE="actionjdjackson, post: 1652269, member: 348814"] Something is odd with Hebrew months when using NSCalendar - I type the following code: [CODE]let hebrewCalendar = NSCalendar(calendarIdentifier: NSCalendarIdentifierHebrew) let birthOfJesusDateComponents = NSDateComponents() birthOfJesusDateComponents.year = 3755 //either 5 or 6 B.C. is possible year of His birth, I chose 6 birthOfJesusDateComponents.month = 7 //this is where the problem arises - 15 Tishri (7th month) is His most likely birthday birthOfJesusDateComponents.day = 15 birthOfJesusDateComponents.hour = 21 //just a guess - sometime at night birthOfJesusDateComponents.minute = 0 birthOfJesusDateComponents.second = 0 birthOfJesus = hebrewCalendar!.dateFromComponents(birthOfJesusDateComponents)![/CODE] Then, elsewhere, I type: [CODE]let hebrew = NSCalendar(calendarIdentifier: NSCalendarIdentifierHebrew) let formatter = NSDateFormatter() formatter.calendar = hebrew formatter.dateStyle = .FullStyle formatter.timeStyle = .MediumStyle println(formatter.stringFromDate(birthOfJesus))[/CODE] And I get as an output: [B]Friday, 15 Adar 3755 at 21:00:00[/B] But here's the catch, [B]Adar[/B] is NOT the [B]7th[/B] month of the Hebrew calendar, [B]Tishri[/B] is. At least in the ancient Hebrew calendar. Does the modern Hebrew calendar have a different month order? I'm an amateur Biblical scholar not a modern-day speaker so I don't know the answer to this. [/QUOTE]
Verification
What is Apple's smallest desktop computer called?
Post reply
Forums
macOS & iOS Developer Playground
macOS - Development and Darwin
Hebrew NSCalendar months are wrong?
Top